[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Need help with sub timers..

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Need help with sub timers..

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Spike   (27 posts)  [Biography] bio
Date Sat 25 Sep 2004 05:56 AM (UTC)  quote  ]

Amended on Sat 25 Sep 2004 06:01 AM (UTC) by Spike

Message
Ok...I just got sub timers down, thou I'm trying to make it so you can stack them. For instance say the code was for a dig command. If the player spammed it 10 times it would simply wait for the first sub_timer to finish, then move on to the next untill it's done all ten times. Or if the player spammed dig 10 times then typed save, it would correctly go through the dig sub timer ten times, then save...cant figure out how to do this kinda new to timers and all...but I have no ideas. Hope someone can shed some light on this for me, thanks.


edit- I tried to simply remove the return from sub_timer do abort like this:

case SUB_TIMER_DO_ABORT:
ch->substate = SUB_TIMER_CANT_ABORT;
//return;

..while the commands went through..they just spammed out quickly ignoring the timer portion.

[Go to top] top

Posted by Spike   (27 posts)  [Biography] bio
Date Reply #1 on Sun 26 Sep 2004 02:25 PM (UTC)  quote  ]
Message
Anyone with any ideas on this one?
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #2 on Sun 26 Sep 2004 04:33 PM (UTC)  quote  ]
Message
I haven't done much with add_timer, but what you probably have to do is change how timers/substates are handled. It'll probably require changing the add_timer function and some others. Thats as much as I can think of right now.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Spike   (27 posts)  [Biography] bio
Date Reply #3 on Mon 27 Sep 2004 11:51 AM (UTC)  quote  ]
Message
..I figured as much, just needed to know a little past that. Guess I'll try to assign the timer that I need to know a type of number identifying them..and try to have the other functions work with that number instead of type...probably wont work but it's worth the try.
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #4 on Mon 27 Sep 2004 12:56 PM (UTC)  quote  ]
Message
The problem, as I understand it, is that before the new timer is assigned during process of the command/skill, it first has to go through interp(), which is where the one command is interupted. Now, what you could do it have another type, something like TIMER_DO_FUN_MULTI, where if the original is of that type it is skipped when being disabled in interp, and then you could have the second one stack on top.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] 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.


1,422 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]