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 ➜ Affects to up stats while on

Affects to up stats while on

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


Posted by MasterJay   (23 posts)  Bio
Date Mon 22 Aug 2005 03:35 PM (UTC)
Message
I want to make a do_ fuction for my mud to grant a player an affect that will up their stats until the affect is gone (by death ). The do_ fuction works perfectly, minus that the stats on the victim do not go up. But how do you make an affect increase the stats for a player as long as the affect is on? (like str +2, int +3 but when the player dies, the affect is gone so the stats return to normal)

I dont need anything to take off the affect, it automatically goes away when the player dies. I just want some help to increase the victims stats while the affect is in place. Thanks in advance
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Mon 22 Aug 2005 08:55 PM (UTC)
Message
I'm not sure I understand your problem. I've never had trouble with spell effects that add e.g. 2 strength. How exactly are you creating these effects?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by MasterJay   (23 posts)  Bio
Date Reply #2 on Mon 22 Aug 2005 09:31 PM (UTC)
Message
Okay lemme back up a bit and maybe that'll help you to understand it.

What I am planning is an affect to increase a few stats while that affect is on, it will be triggered by a command and not a skill.

Its an affect like "ShockShield" or "Fireshield" that displays a message under the players name. But I want it to be when a player has that affect, that their stats increase by say 2 in str and 3 in INT. but when the affect goes away the stats return to their base. In short its a temporary stat increase.

The command works (the messages are sent to the user and victim and the victim gets the affect) but how can I make it that the victim's stats boost for as long as they have that affect on?

Maybe this is a better way to put it: I want an affect to do more then just show like " *Bob has electricity going through him" I want it to also give Bob a +2 in spd while he still has the affect of electricity going through him.

I'm not very good at explaining things, sorry If I sound repetitive.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Mon 22 Aug 2005 09:35 PM (UTC)
Message
Why can't you use the same method that e.g. objects use? An effect that works on AF_STRENGTH or whatever it is, with a modifier of e.g. +2?

And how are you adding the effect? Is it by adding something to the list of effects, or by setting an affected_by bit?

An easy way of solving this problem would be to edit the function get_curr_str and simply have it return +2 if the player is affected_by(your_affect). It's a little less general, but hey...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by MasterJay   (23 posts)  Bio
Date Reply #4 on Tue 23 Aug 2005 12:40 AM (UTC)
Message
I added it as an affected_by bit

Heh, I spent too much thought on this way instead of that.

I did that and now it works perfectly, Thank you very much!
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.


17,057 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.