Summer2005-04-04 15:10:52
I made an autosipper that's triggered by the prompt:
Not the usual zMud format, but I hope it's understandable anyway. I know the apply health thing can be better, but until I figure out how, just sticking with a simpler one first.
$hhme being the variable that keeps track of the balance for health, mana and bromide potions, $hme the illusion check, and $check is just there so I don't try to do more than one option. $check is reset to 0 at next prompt.
While it works fine normally, the problem comes in when things are scrolling really fast (e.g. 30 people hitting a tentacle at once). Because of the speed the prompts go by, I could get something like: 1339h, 2357m, 2180e multiple times before $hme gets set to 1, and end up drinking health multiple times.
Question: Is there any way to stop this from happening without being able to set a timer / avoiding spammy situations?
Edit: Edited for mistakes. Also don't need help with this part of the trigger anymore. Thanks lots to all who helped / are intending to help.
CODE
/action {%1h, %2m, %3e} {
 /if {$hhme=0}{
   /if {$check=0}{/if {%1<2200}{sip health;/var check 1;/var hme 1}};
   /if {$check=0}{/if {$knight=1}{/if {%1>2200}{apply health;/var check 1;/var hme 1}}};
   /if {$check=0}{/if {%2<2300}{sip mana;/var check 1;/var hme 1}};
   /if {$check=0}{/if {%3<1800}{sip bromide;/var check 1;/var hme 1}}
 }
}
 /if {$hhme=0}{
   /if {$check=0}{/if {%1<2200}{sip health;/var check 1;/var hme 1}};
   /if {$check=0}{/if {$knight=1}{/if {%1>2200}{apply health;/var check 1;/var hme 1}}};
   /if {$check=0}{/if {%2<2300}{sip mana;/var check 1;/var hme 1}};
   /if {$check=0}{/if {%3<1800}{sip bromide;/var check 1;/var hme 1}}
 }
}
Not the usual zMud format, but I hope it's understandable anyway. I know the apply health thing can be better, but until I figure out how, just sticking with a simpler one first.
$hhme being the variable that keeps track of the balance for health, mana and bromide potions, $hme the illusion check, and $check is just there so I don't try to do more than one option. $check is reset to 0 at next prompt.
While it works fine normally, the problem comes in when things are scrolling really fast (e.g. 30 people hitting a tentacle at once). Because of the speed the prompts go by, I could get something like: 1339h, 2357m, 2180e multiple times before $hme gets set to 1, and end up drinking health multiple times.
Question: Is there any way to stop this from happening without being able to set a timer / avoiding spammy situations?
Edit: Edited for mistakes. Also don't need help with this part of the trigger anymore. Thanks lots to all who helped / are intending to help.
Unknown2005-04-05 22:50:30
For your client - What you want is a variable, let's call it doDrink, that you will set to 1 whenever you send the drink command. In those if-statements of yours, where you check for your health level, add in a check for doDrink. If it's 1 (on), then do nothing. To set it back, use a timer.
Here is where zMUD excels, with its expression triggers that will let you trigger a variable change for example. Using those for your autosipper will not only reduce the amount of posible lag on your computer during spammy fights (with the trigger firing at every one of those prompts) but it will also make the handling of flags such as doDrink much, much more enjoyable.
Here is where zMUD excels, with its expression triggers that will let you trigger a variable change for example. Using those for your autosipper will not only reduce the amount of posible lag on your computer during spammy fights (with the trigger firing at every one of those prompts) but it will also make the handling of flags such as doDrink much, much more enjoyable.
Unknown2005-04-05 23:17:43
my prompt trigger has one clause at the beggining, if it ran in the last 750 ms, don't run.
Unknown2005-04-05 23:45:33
That'll work just as a alarm/timer, with the exception of when you have blackout. Then your prompt-trigger wont fire, but an alarm or timer will.
Unknown2005-04-05 23:55:46
in blackout I am not worried about my prompt trigger spamming 

Unknown2005-04-06 00:08:34
It wont spam, as you'll never see the prompt. Hence why prompt triggers for any curing is inferior to alarm/timers.
Unknown2005-04-06 00:10:33
why? do what I do, have a black out prompt trigger as well.
Unknown2005-04-06 00:16:10
QUOTE(CroX @ Apr 5 2005, 02:08 PM)
It wont spam, as you'll never see the prompt. Hence why prompt triggers for any curing is inferior to alarm/timers.
90516
It's superior. Just look at the ACP.
Unknown2005-04-06 00:17:20
anything based off time in the world of networking is a risk.
Summer2005-04-06 03:31:15
QUOTE(CroX @ Apr 6 2005, 06:50 AM)
For your client - What you want is a variable, let's call it doDrink, that you will set to 1 whenever you send the drink command. In those if-statements of yours, where you check for your health level, add in a check for doDrink. If it's 1 (on), then do nothing. To set it back, use a timer.
Here is where zMUD excels, with its expression triggers that will let you trigger a variable change for example. Using those for your autosipper will not only reduce the amount of posible lag on your computer during spammy fights (with the trigger firing at every one of those prompts) but it will also make the handling of flags such as doDrink much, much more enjoyable.
Here is where zMUD excels, with its expression triggers that will let you trigger a variable change for example. Using those for your autosipper will not only reduce the amount of posible lag on your computer during spammy fights (with the trigger firing at every one of those prompts) but it will also make the handling of flags such as doDrink much, much more enjoyable.
90462
The $check is the equivalent of doSomething, and $hme is the Something.
"/var
In a normal situation with me spamming myself with focus body / insomnia as fast as possible (to test the prompt), I end up drinking twice. It's 30 people hitting one tentacle at once that kills off half a vial because everything just scrolls past before the client has a chance to change the variable to 1.
I came up with the (probably not so) bright idea of triggering it to "You can drink another health, mana, or ego potion again." and a few other things, rather than the prompt, same as how I'm doing the rest of my cures, but it'd mean that everytime I don't need to sip at the hme balance back prompt, I'd have to sip again manually or wait for up to several seconds, which is workable if not my most favoured way.
Was almost done with my curing system, then found out I couldn't use it because the client would rather crash than check more than one and a half (very long) lines worth of no-wrap if statements in notepad.

Morik2005-04-06 03:59:01
QUOTE(Anonymous @ Apr 6 2005, 08:16 AM)
It's superior. Just look at the ACP.
90528
and, if you'll note, it did alternate between alarm/timer and prompt at least once.
My suggestion? Wrap everything up in aliases which you can call to do things such as 'trysip', 'tryherb', 'tryaffhealing', 'trysalve' .. then you can call them from timers /and/ the prompt. Brilliant!

Unknown2005-04-06 07:44:50
QUOTE(Summer @ Apr 6 2005, 05:31 AM)
The $check is the equivalent of doSomething, and $hme is the Something.
"/var " is probably the equivalent of "@="
In a normal situation with me spamming myself with focus body / insomnia as fast as possible (to test the prompt), I end up drinking twice. It's 30 people hitting one tentacle at once that kills off half a vial because everything just scrolls past before the client has a chance to change the variable to 1.
"/var
In a normal situation with me spamming myself with focus body / insomnia as fast as possible (to test the prompt), I end up drinking twice. It's 30 people hitting one tentacle at once that kills off half a vial because everything just scrolls past before the client has a chance to change the variable to 1.
Right.. You had one of those. -thwap me- Allright then, your system is obviously not keeping up with the speed of text, wierd.. You could try to put the variable change asap in the trigger.
I'm afraid I don't know how to solve such a problem with another client, besides going to the download section of http://www.zuggsoft.com

Summer2005-04-06 08:21:37
You mean zMud will keep up line by line even when getting spammed with say 30+ prompts in less than a second?
As far as I know JMC client doesn't have a forum. In fact, if the website is accurate, it hasn't been updated for the last 4 years either. I'm using it because 1) it's freeware, and 2) I like it more than the other clients I've tried, even when it's giving me problems like this.
Coding time: JMC ->
<- Me
Testing time: JMC (cloud) ->
<- Me
Fixing problems time: JMC ->
<- Me
As far as I know JMC client doesn't have a forum. In fact, if the website is accurate, it hasn't been updated for the last 4 years either. I'm using it because 1) it's freeware, and 2) I like it more than the other clients I've tried, even when it's giving me problems like this.
Coding time: JMC ->

Testing time: JMC (cloud) ->

Fixing problems time: JMC ->

Thorgal2005-04-06 08:53:44
The only thing you should ever be using alarms or timers for is to restore balances.
Unknown2005-04-06 09:57:11
QUOTE(Thorgal @ Apr 6 2005, 10:53 AM)
The only thing you should ever be using alarms or timers for is to restore balances.
90800
And this is because..? I'm using timers for all my curing in another IRE game (Imperian), and I'm able to keep up with the afflictions of a good Malignist (massive afflictions).
Gol2005-04-06 15:58:36
because if the server lags slightly, and herb balance comes back .5 seconds later, you'll eat a herb that'll have no effect, and reset your timer, and you'll probably keep eating off balance. If you're accounting for this by adding in a .5 second delay over normal herb balance before eating, you're not curing at the best possible speed. k?
Summer2005-04-06 16:02:45
Does the herb balance stack? I don't have a timestamp to check, but I was under the impression that if you eat while offbalance, it's just as though you never ate it.
Shiri2005-04-06 16:15:32
That's right, Summer. Eating a herb drops herbbalance, but only if you're already on it.
Unknown2005-04-06 17:22:18
If your using zMUD and your prompt trigger is spamming you, just make a second state to keep it from firing for a half second.
The second state has no pattern and no command value. It simply keeps the prompt disabled until the 500ms time elapses. This is the most elegant and reliable solution I've come up with for this problem so far.
As for expression triggers, my very first system for zMUD used these for curing and it was not only slow, it was unpredictable. According to Zugg himself, these types of triggers are slow by nature because they are matched every single time any variable is changed. Imagine a large combat system with scores of variables, and then imagine an alias that modifies a half dozen or even a dozen variables. You've just fired all your expression triggers far too many times. In my experience, they were very slow to fire when I was spammed with messages during an intense fight. Triggering off the prompt helped, but it still sucked on speed. Using an alias that I call only when there's a state change is the best I that I've found so far for speed and efficiency.
CODE
#TRIGGER {^(%d)h, (%d)m} {do prompt stuff and whatever} "" {nocr|prompt}
#COND {} {} {wait|param=500}
#COND {} {} {wait|param=500}
The second state has no pattern and no command value. It simply keeps the prompt disabled until the 500ms time elapses. This is the most elegant and reliable solution I've come up with for this problem so far.
As for expression triggers, my very first system for zMUD used these for curing and it was not only slow, it was unpredictable. According to Zugg himself, these types of triggers are slow by nature because they are matched every single time any variable is changed. Imagine a large combat system with scores of variables, and then imagine an alias that modifies a half dozen or even a dozen variables. You've just fired all your expression triggers far too many times. In my experience, they were very slow to fire when I was spammed with messages during an intense fight. Triggering off the prompt helped, but it still sucked on speed. Using an alias that I call only when there's a state change is the best I that I've found so far for speed and efficiency.
Summer2005-04-06 18:27:35
Mmmm... I'll think more on it. Thanks for all the help everyone.