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 ➜ Where is the code that deals with damage?

Where is the code that deals with damage?

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


Posted by Forestsofbliss   (6 posts)  Bio
Date Fri 01 Aug 2003 12:50 AM (UTC)
Message
I want the damage to show at the end of each hit of a weapon
or attack. For example :
Your slash hits the wolf! (15)

Where is the code that would deal with this?
Or if someone knows of a snippet that would do this
that would help.
Thanks
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 01 Aug 2003 01:58 AM (UTC)
Message
See Fighting system. Searching this forum can usually find some useful results. In this case I searched on 'damage hp' in the SMAUG section.

- Nick Gammon

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

Posted by Forestsofbliss   (6 posts)  Bio
Date Reply #2 on Fri 01 Aug 2003 04:51 AM (UTC)
Message
Ok I looked over that topic. I was able to add the damage
to most of the attacks. But on spells and skills it doesnt work right. for my weapons it does this
Your slash hits Icingdeath. (5)
which is what i want
but i added the exact same thing to all these that were in the new_dam_message function
sprintf( buf1, "$n's %s %s $N%c test7(%w)", attack, vp, punct, dam );
And when a spell or skill is used it shows no number instead its like this -
Your suspiric grasp wounds Icingdeath! ()
showing dam to be null i guess
What could I be doing wrong? Shouldnt dam hold the damage
even if its a spell or skill? I even tried putting test numbers in the sprintf's and enumerated them, and found the ones that deal with skills, and dam was in there, just no number in dam. Its really bothering me.
thanks again.
Top

Posted by Forestsofbliss   (6 posts)  Bio
Date Reply #3 on Fri 01 Aug 2003 05:17 AM (UTC)
Message
Thanks for all the help. I figured it out. just needed %i
Top

Posted by Yourdrunkendad   (35 posts)  Bio
Date Reply #4 on Sat 09 Aug 2003 05:25 AM (UTC)
Message
Would you mind sharing your code please, I'm just not exactly sure how you implemented that into your source.

Shampoo is for sissies real men use poo*
[werd]thewerd.com "Smacking Your Mom Then Running Away"
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.


16,280 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.