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
➜ Immortal - Non Wait_State
Immortal - Non Wait_State
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Asean Novari
USA (82 posts) Bio
|
Date
| Sat 05 Mar 2005 01:29 AM (UTC) |
Message
| I got tired of waiting for all of my make_*** commands to get done... Im an immortal they should be done the second i enter the command..
So i went into the net and found this snippet of saqid's
To make it so that immortals never are affected by WAIT_STATE (no code-generated
lag), you just need to make this simple addition to WAIT_STATE:
in MUD.H, find the following...
#define WAIT_STATE(ch, npulse) ((ch)->wait=(!IS_NPC(ch)&&ch->pcdata->nuisance&&\
(ch->pcdata->nuisance->flags>4))?UMAX((ch)->wait,\
(npulse+((ch)->pcdata->nuisance->flags-4)+ \
ch->pcdata->nuisance->power)): \
UMAX((ch)->wait, (npulse)))
And change it to look like this:
#define WAIT_STATE(ch, npulse) ((ch)->wait=(!IS_NPC(ch)&&ch->pcdata->nuisance&&\
(ch->pcdata->nuisance->flags>4))?UMAX((ch)->wait,\
(npulse+((ch)->pcdata->nuisance->flags-4)+ \
ch->pcdata->nuisance->power)): \
UMAX((ch)->wait, (IS_IMMORTAL(ch) ? 0 :(npulse))))
Make clean, and recompile.
however when i search in mud.h for what it says to find its not there what i find instead is..
#define WAIT_STATE(ch, npulse) ((ch)->wait = UMAX((ch)->wait, (npulse))) |
| Top |
|
Posted by
| Asean Novari
USA (82 posts) Bio
|
Date
| Reply #1 on Sat 05 Mar 2005 01:32 AM (UTC) Amended on Sat 05 Mar 2005 01:36 AM (UTC) by Asean Novari
|
Message
| Also when i do replace what consists of the wait_state with what the snippet suggests.. then try to recompile i get these errors
Administrator@Home ~/swr1fuss/src
$ make
make -s swreality
Compiling o/swskills.o....
swskills.c: In function `do_bribe':
swskills.c:4322: error: structure has no member named `nuisance'
swskills.c:4322: error: structure has no member named `nuisance'
swskills.c:4322: error: structure has no member named `nuisance'
swskills.c:4322: error: structure has no member named `nuisance'
swskills.c:4322: error: structure has no member named `nuisance'
swskills.c:4322: error: structure has no member named `nuisance'
make[1]: *** [o/swskills.o] Error 1
make: *** [all] Error 2
Any ideas?
there are more than just do_bribe.. but too much to list in
one post.. and they are the same kind of errors so if you
can tell me how to fix the one then i can do the rest
*edit*
The other errors are also with commands that have no wait to them.. like snipe and beg... |
| Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #2 on Sat 05 Mar 2005 01:36 AM (UTC) |
Message
| Well, with that specific snippet, its for a different code base and probably won't work that way. Check what field stock swr looks for and use that instead of nuisance.
As for the make skills, that still won' work, as they don't use wait states. Look at the code for add_timer for the engineering skills.
If your still havign issues with the wait state (also a good thing to have) I can check my code when I get home from work to give you a definite example. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Asean Novari
USA (82 posts) Bio
|
Date
| Reply #3 on Sat 05 Mar 2005 01:38 AM (UTC) |
Message
| Thanks Greven.. i would really appreciate that.. |
| Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #4 on Sat 05 Mar 2005 02:14 AM (UTC) |
Message
| With no testing, mind you, something like this should work:
#define WAIT_STATE(ch, npulse) ( (ch)->wait= (UMAX( (ch)->wait, (IS_IMMORTAL(ch) ? 0 :(npulse) ) ) ) ) |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #5 on Sat 05 Mar 2005 03:29 AM (UTC) |
Message
| Yeah, thats almost exactly what I have#define WAIT_STATE(ch, npulse) ((ch)->wait = UMAX((ch)->wait, (IS_IMMORTAL(ch) ? 0 :(npulse))))
As for the engineerings skills, this is what I used in add_timer in handler.c. Should be fairly obvious where to put it. if (!timer)
{
CREATE(timer, TIMER, 1);
timer->count = count;
if (IS_IMMORTAL(ch))
timer->count = 0;
timer->type = type;
timer->do_fun = fun;
timer->value = value;
LINK(timer, ch->first_timer, ch->last_timer, next, prev);
}
|
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #6 on Sat 05 Mar 2005 01:35 PM (UTC) |
Message
| Personally, I used something like this to have some flexibility:
UMAX((ch)->wait, ((IS_IMMORTAL(ch) && xIS_SET(ch->act, PLR_NODELAY)) ? 0 :(npulse)))
|
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | 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,216 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top