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
Teial
Newbie


Joined: 29 Jun 2011
Posts: 1
Location: Paulsboro

PostPosted: Wed Jun 29, 2011 7:05 am   

Need help
 
I am trying to make a countdown trigger that will show in a status bar

These are the triggers I have so far:

#action {You give the %1 of a %2 to the orc pursuer.} {#ALARM OQAlarm {120}}
#action {You give a %1 of a %2 to the orc pursuer.} {#ALARM OQAlarm {120}}
#action {You give an %1 of a %2 to the orc pursuer.} {#ALARM OQAlarm {120}}
#action {Tadamir the guildsman exclaims to you. 'Here is your reward, as promised.'$} {#ALARM CQAlarm {60}}
#var {CQTime} {60;#ALARM CQAlarm {*60} {#IF (@CQTime) {#ADD CQTime -1} {#SUSPEND CQAlarm}
#Var {OQTime} {120;#ALARM OQAlarm {*120} {#IF (@OQTime) {#ADD OQTime -1} {#SUSPEND OQAlarm}

The problem I'm running into is that the timer won't reset its self. It just stays at 0 even after a new item is handed in/given.
Any help would be great.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Wed Jul 06, 2011 2:13 pm   
 
What countdown are you trying to show in the status bar? How is your status bar defined?

The way I'm reading this script, it looks like you have two timers, one for completing a quest action that has a 2 minute timer, and another for turning in the quest which has a 1 minute timer. When each of these timers reaches zero, it either ticks down is respective QTime or stops the alarm if the QTime is at zero. Curiously, the OQAlarm ticks down once every 2 minutes. Are you watching these two QTime variables? They're defined in the first place, and the #AL will count them down, but I don't see anywhere that they're supposed to be reset. When should CQTime and OQTime reset?

You're missing some close braces, which will cause all sorts of problems. As written here, your #VAR commands are defining functions, not simple variables.

Also, a suggestion to reduce the number of triggers: you can condense the first three triggers into one:
#action {You give {a|an|the} %1 of a %2 to the orc pursuer.} {#ALARM OQAlarm {120}}

Also, are you trying to capture what you're giving? If the %1 and %2 are unused, you can use a general wildcard to fire the trigger:
#action {You give * of * to the orc pursuer.} {#ALARM OQAlarm {120}}

Either way, this will reset the alarm to 2 minutes if it's already in countdown. There is no #RESUME command, so if the QTime reaches zero, the alarm is stopped and never restarts - this may also be your problem.

With a little more information about what you're trying to do, we can tweak this script to work smoothly.
_________________
.geniusclown
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Wed Jul 13, 2011 4:30 pm   
 
The two timers are for two completely different quests within the game I play.

Basics:
Quest one has a 60 minute cool down period. Quest two has a 2 hour cool down period.

With the orc %1 is a body part and %2 is the NPC's name.
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