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


Joined: 16 Sep 2012
Posts: 1

PostPosted: Sun Sep 16, 2012 3:17 am   

Zmud Prompt Reader
 
I'm trying to set up a prompt reader that automatically checks me for various defences, and if those defences are lacking, zmud shoots up and fixes it. I am having a problem with the trigger spamming me out and causing me to go through thousands of potions/poisons in about 4 seconds. Here's what I have so far:

This is the prompt that shows up with every new 'line' in zmud:

839h, 784m ei{--}

This is the trigger I'm using to read it:

^(%d)h, (%d)m (*)~-

Inside this trigger, is as follows:

#IF (%pos( "b", "%3")) {blinddef=1} {
blinddef=0
goingblind=0
}
#if (@blinddef=0 AND @goingblind=0) {
sip blinding potion
@goingblind=1
}

I have all the right variables, and the variables are picking up the the right 1/0's as per the first #if statement.
The problem comes from when it tries to make me go blind, I sip a blinding potion, and set goingblind=1, but there's a delay from when you sip the potion, anywhere from 5-8 seconds before "b" shows up in my prompt, so the next line that pops up resets goingblind=0. As you can probably see, it just spams my shit all out of control. What could I add to this to give it time to actually go blind before it spams my trigger out? Any suggestions are appreciated, and if you have any questions, please let me know.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4711
Location: Pensacola, FL, USA

PostPosted: Sun Sep 16, 2012 4:33 am   
 
i would suggest naming your prompt trigger, then have it disable itself (#T-) when it tries to cure an ailment, and make a named #ALARM to reenable it (#T+) after a sufficient delay
_________________
Discord: Shalimarwildcat
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