Register forum user name Search FAQ

Gammon Forum

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 ➜ Dmage Numbers

Dmage Numbers

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


Posted by Saryn   USA  (28 posts)  Bio
Date Sat 23 Aug 2003 05:42 PM (UTC)

Amended on Sat 23 Aug 2003 05:44 PM (UTC) by Saryn

Message
Ok I want to add an extra thing to fight messages.

Bob oliterates you! (244 dmg)

I know to start in fight.c but after that I am lost. I want to add the numbers at the end when taking and giving hits so people know how much damage they are doing to their targets or had bad they are getting smacked around. Any help?
Top

Posted by Yourdrunkendad   (35 posts)  Bio
Date Reply #1 on Sat 23 Aug 2003 05:53 PM (UTC)

Amended on Sat 23 Aug 2003 05:54 PM (UTC) by Yourdrunkendad

Message
find this piece of code in fight.c

sprintf( buf1, "$n's %s %s $N%c (%d)", attack, vp, punct );
sprintf( buf2, "Your %s %s $N%c (%d)", attack, vp, punct );
sprintf( buf3, "$n's %s %s you%c (%d)", attack, vp, punct );

and change it to read

sprintf( buf1, "$n's %s %s $N%c (%d)", attack, vp, punct, dam );
sprintf( buf2, "Your %s %s $N%c (%d)", attack, vp, punct, dam );
sprintf( buf3, "$n's %s %s you%c (%d)", attack, vp, punct, dam );


Shampoo is for sissies real men use poo*
[werd]thewerd.com "Smacking Your Mom Then Running Away"
Top

Posted by Saryn   USA  (28 posts)  Bio
Date Reply #2 on Sat 23 Aug 2003 07:09 PM (UTC)

Amended on Sat 23 Aug 2003 07:14 PM (UTC) by Saryn

Message
Thank you! Works perfectly :P but now I have another probelm that I havnt seen befor..first time I've typed kill since I got the mud running.


3 [main] SEMBIA 1924 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION

593 [main] SEMBIA 1924 open_stackdumpfile: Dumping stack trace to sembia.exe
.stackdump

this looks greek to me. After:

Your (null) jolts Rupart! (2)

The mud crashes and the mud window returns the above stackdump error. Anybody know?

Edit: The null is barehand damage..I need to set that dmg type soon.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 24 Aug 2003 05:18 AM (UTC)
Message
This doesn't look good:

Your (null) jolts Rupart! (2)

Sounds like "attack" is a null pointer. Better work out why.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Boborak   USA  (228 posts)  Bio
Date Reply #4 on Sun 24 Aug 2003 09:01 AM (UTC)
Message
Make sure you've added your attack type to const.c

-Bobo
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #5 on Sun 24 Aug 2003 02:48 PM (UTC)
Message
Also, I recently had to do this with my SWR code, if you have the mob set to have bite, sting, tail, or claw, the skills are not included in stock SWR and just close with {}'s, so you have to right them, make sure that the gsn's are in, as well as make the skills inside the game, making sure that you are setting the dammsg on them.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Saryn   USA  (28 posts)  Bio
Date Reply #6 on Wed 27 Aug 2003 12:29 AM (UTC)
Message
OK this is the weirdest thing. It took out the dam out of the end of those 3 lines and fighitng doesnt crash my mud. Right now I just get

Log: [*****] BUG: Dam_message: bad dt 204 from rupart in 2000.
Rupart brushes you.
Log: [*****] BUG: Dam_message: bad dt 170 from rupart in 2000.

Havn't figured that one yet. But I noticed without the dam at the end of those 3 lines, it 1) doesn't crash my mud and 2) doesn't give a null when someone fights. Anybody have any thoughts?
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.


20,983 views.

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

Go to topic:           Search the forum


[Go to top] top

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