Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
dane
Beginner


Joined: 27 Apr 2005
Posts: 18

PostPosted: Thu Feb 09, 2006 7:49 pm   

Questions about Timer vs. Alarm
 
Hi all-

On the mud I play I use spears to throw at targets to make them come to me. Once the monster enters the room, the fight lasts roughly 10 seconds. Then once the monster is killed, I repeat the action...so on. The ticks on the mud are 60 seconds. If I sleep right before a tick I get more hit points back.

SO in a nutshell. I want to stop throwing within 15 seconds, and then start it up again once the tick occurs. Any thoughts would be appreciated.

Thanks
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Feb 09, 2006 9:29 pm   
 
Code:

TICK           0
Throw 10s  10
Throw 10s  20
Throw 10s  30
Throw 10s  40
Throw 10s  50
sleep         60
wake & throw

So we'll try and optimize for within 15s of the TICK.

#VAR throwtrigger {0} {0} "SpearChucker"
#TRIGGER ThrowTrigger {Your mob is DEAD!!} {#IF (@throwtrigger) {throw spear at target} {sleep}} "SpearChucker" {}
#TRIGGER ThrowTick {TICK MESSAGE} {#VAR throwtrigger 1;wake;throw spear at target;#ALARM throwtriggerend +45 {#VAR throwtrigger 0}} "SpearChucker" {}

I think thats correct syntax.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net