[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  New spell doesnt work!!!

New spell doesnt work!!!

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by ChrisV   (8 posts)  [Biography] bio
Date Sun 07 Jul 2002 04:57 AM (UTC)
Message
Ok... when I try to use the spell in the game nothing appers, it just says, 'Huh?' Why does it do it... It's in the skills.dat file... and when i type kamehameha, no work.....


#SKILL
Name kamehameha~
Type Spell
Flags 4
Target 1
Mana 15
Code spell_smaug
Dammsg Test~
Hitchar Test~
Minlevel 5
End

thats the spell.. any how do i get it to damage. like to set it at a specific..lets say.. 80-120 damage range, how would i? thanks!
[Go to top] top

Posted by ChrisV   (8 posts)  [Biography] bio
Date Reply #1 on Sun 07 Jul 2002 05:01 AM (UTC)
Message
Also.... I'm using Visual C++, is that a good editor for the Source changes?.. Seems like i cant get any new spells to implement for now.. dunno... can anyone varify that Visual works? Heres a example..after i build it.. it says when i run it it cannot find FlameBall(as a example i used FlameBall)

ch_ret spell_flameball( int sn, int level, CHAR_DATA *ch, void *vo )
{
CHAR_DATA *victim = (CHAR_DATA *) vo;
int dam;

dam = dice(6, 8);
if ( saves_spell_staff( level, victim ) )
dam /= 2;
return damage( ch, victim, dam, sn );
}

The thing is.. its same as flamestrike.. but when i use it.. the smaug doesnt get it for some reason, says connot find spell_flameball...
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Mon 08 Jul 2002 04:41 AM (UTC)
Message
Did you compile it after making the changes? Did you put the resulting .exe file into the appropriate directory?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by ChrisV   (8 posts)  [Biography] bio
Date Reply #3 on Mon 08 Jul 2002 05:07 AM (UTC)
Message
Oh my god imma idiot.. forgot to compile! Thanks!!! LOL Stupid me:)
[Go to top] top

Posted by ChrisV   (8 posts)  [Biography] bio
Date Reply #4 on Mon 08 Jul 2002 05:09 AM (UTC)
Message
Now, how would i make it so it hits a range of 80 to 120 damage.. thats random...?
[Go to top] top

Posted by Kain   USA  (43 posts)  [Biography] bio
Date Reply #5 on Mon 08 Jul 2002 11:34 PM (UTC)
Message
Here's an example of a snippet from the code for Spectral Furor:


level = UMAX(0, level);
level = UMIN(18, level);
dam = 1.3*(level*number_range( 1, 7 )+9);

So if I'm understanding your question correctly, you'll just want to tailor your code using the above as an example. You'll just need to pull out a calculator to get the range you need.

As a general rule of thumb (say for designing a mob) damage is figured out by the formula:

(number of dice) * (dice size) + number

So 2d6+10 will set the damage from 12-22

Hope that helps
[Go to top] top

Posted by Chris L   USA  (57 posts)  [Biography] bio
Date Reply #6 on Tue 09 Jul 2002 12:07 AM (UTC)
Message
your first msg u set it to spell not skill so have to c 'kameh.. whatever =)' also you have dice not set.. dice is what smaug uses to determine damage like 1d20 would be 1 roll of a 20 sided dice etc, should use sset and read
help sset and
help smaugspells
[Go to top] top

Posted by ChrisV   (8 posts)  [Biography] bio
Date Reply #7 on Tue 09 Jul 2002 04:02 AM (UTC)
Message
Wow! THank you all:) This is greatly apprciated!!!
[Go to top] top

Posted by ChrisV   (8 posts)  [Biography] bio
Date Reply #8 on Tue 09 Jul 2002 04:37 AM (UTC)
Message
mmm. doesnt work.. i got in source of c++

ch_ret spell_kamehameha( int sn, int level, CHAR_DATA *ch, void *vo )
{
CHAR_DATA *victim = (CHAR_DATA *) vo;
int dam;

dam = 1.3*(level*number_range( 1, 7 )+9);
return damage( ch, victim, dam, sn );
return rNONE;
}


and in skills.dat...
#SKILL
Name kamehameha~
Type Skill
Flags 0
Target 1
Mana 15
Rounds 8
Code spell_kamehameha
Dammsg Kamehameha~
Hitroom A strong ray beam hits $N!~
Hitvict A strong beam hit you!
End

BUGS I GET ARE (In starting of the server):
fread_skill: unknown skill/spells spell_kamehameha


and others that look like they have to do.. these ones have been there forever.. dunno what they are
fread_word: EOF encounted on read.
fread_number: EOF encounted on read.
fread_to_eol: EOF encounted on read
BUG load_planes: can't open plane file for read.
[Go to top] top

Posted by Chris L   USA  (57 posts)  [Biography] bio
Date Reply #9 on Wed 10 Jul 2002 01:44 AM (UTC)
Message
u need to add declares in mud.h and add the parts in tables.c open each then just do a search for 'spell_black_lightning' and copy what it does with your spell_kamehahehamm.. thing
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,059 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]