Hello again :)
On the mud that I play there is an item that basically sends an announcement to the player, telling him/her that 30 seconds have past by. Also on the mud that I play, every 60 seconds you are allowed to drink a special liquid that refreshes your mana.
What most people do is they set up a trigger that searches for announcement, and then drinks from the liquid. The problem with this is that because you can only drink every 60 seconds, the first announcement (indicating 30 seconds) is just a spammy useless action of your trigger going off and not actually being able to drink anything.
I'm looking make a script that triggers off of the 2nd announcement (indicating that 60 seconds has passed) rather than the 1st announcement.
And what I have so far isn't working:
First of all, I have a trigger that sets a variable whenever the timer goes off, in this case I call it "on". Then I have the below in my script
sub checkhourglass (name, line, wildcards)
dim varset
varset = world.GetVariable ("on")
if Not IsEmpty (varset) then
world.DeleteVariable "on"
world.send "get chalice pouch;drink chalice;fill chalice barrel"
End if
end sub
My idea is that when the trigger sets the variable, then the above would first check to see if the variable exists, it deletes the variable, and then preforms the necessary actions.
But it doesn't work. Can anyone suggest where I'm going wrong or if there's even an easier way to do this?
Thanks much,
Demptus
On the mud that I play there is an item that basically sends an announcement to the player, telling him/her that 30 seconds have past by. Also on the mud that I play, every 60 seconds you are allowed to drink a special liquid that refreshes your mana.
What most people do is they set up a trigger that searches for announcement, and then drinks from the liquid. The problem with this is that because you can only drink every 60 seconds, the first announcement (indicating 30 seconds) is just a spammy useless action of your trigger going off and not actually being able to drink anything.
I'm looking make a script that triggers off of the 2nd announcement (indicating that 60 seconds has passed) rather than the 1st announcement.
And what I have so far isn't working:
First of all, I have a trigger that sets a variable whenever the timer goes off, in this case I call it "on". Then I have the below in my script
sub checkhourglass (name, line, wildcards)
dim varset
varset = world.GetVariable ("on")
if Not IsEmpty (varset) then
world.DeleteVariable "on"
world.send "get chalice pouch;drink chalice;fill chalice barrel"
End if
end sub
My idea is that when the trigger sets the variable, then the above would first check to see if the variable exists, it deletes the variable, and then preforms the necessary actions.
But it doesn't work. Can anyone suggest where I'm going wrong or if there's even an easier way to do this?
Thanks much,
Demptus