Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ New spell doesnt work!!!
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| ChrisV
(8 posts) 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! | Top |
|
Posted by
| ChrisV
(8 posts) 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... | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) 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 | Top |
|
Posted by
| ChrisV
(8 posts) 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:) | Top |
|
Posted by
| ChrisV
(8 posts) 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...? | Top |
|
Posted by
| Kain
USA (43 posts) 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 | Top |
|
Posted by
| Chris L
USA (57 posts) 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 | Top |
|
Posted by
| ChrisV
(8 posts) Bio
|
Date
| Reply #7 on Tue 09 Jul 2002 04:02 AM (UTC) |
Message
| Wow! THank you all:) This is greatly apprciated!!! | Top |
|
Posted by
| ChrisV
(8 posts) 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. | Top |
|
Posted by
| Chris L
USA (57 posts) 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 | 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.
24,717 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top