|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Wed Oct 27, 2004 5:53 am
Inconsistent prompt trigger |
I play a mud called Achaea, and i recently made this auto health vial drinking script.
It works well most of the time, but on some instances, which i can not find any common times where it happens, but sometimes it will not pick up the prompt.
In Achaea the prompt looks like this
1000h, 1000m
This is my prompt trigger: The options checked are Trigger on Trigger, Newline, and Prompt.
Pattern: (%d)h, (%d)m
Value:
health = %1
mana = %2
#math healthdamage (@maxhealth - %1)
#math manadamage (@maxmana - %2)
#IF (@drinkbalance = 1) {#if (@health < 4200 OR @mana < 1400) {dr}}
This prompt triggers the alias DR if those values are true. This is the DR alias
Pattern: DR
Value:
#math manadamage (@maxmana - @mana)
#math healthdamage (@maxhealth - @health)
#IF (@health < 3000 OR @recklessness = 1) {
drink health
drinkbalance = 0
} {
#if (@healthdamage > @manadamage) {
drink health
drinkbalance = 0
} {
drink mana
drinkbalance = 0
}
}
When I manually do the DR alias, it always works. So im almost positive its a problem with the prompt trigger. I cant understand why it just doesnt pick up the prompt sometimes though. If there is any other information you need to try and solve this problem, let me know. |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Wed Oct 27, 2004 6:53 am |
i dont know if it matters, but actually the full prompt is
1000h, 1000m ex- |
|
|
|
Arawn_V2 Newbie
Joined: 27 Oct 2004 Posts: 2
|
Posted: Wed Oct 27, 2004 8:58 am |
Ok, this might get a little too involved for what you might want to do. But here goes. First thing is trigger the entire propmt. This insures that you don't somehow get an instance that skips around your trigger. Also, you have the right idea with a drink balance variable, however it leaves you open to multiple sips when you're off of sip balance. I'm going to give you my entire auto drinking system, is for mana and health alike. I have tested it, it hasn't failed me yet. And there aren't any multiple sips. My trigger values are gonna be verbatim, so tailor them to your needs (i.e the colors and the substitutions).
Trigger #1:
Pattern: ^You may drink another health or mana elixir.$
Value:
#co blueviolet
#sub "----- ELIXER BALANCE BACK ------"
elixerBalance = 1
currentlySipping = 0
checkSips
Trigger #2:
Pattern: Health: %1/%2 Mana: %3/%4 //This is from the 'page' it sets the max health and max mana value.
Value:
maxHealth = %2
maxMana = %4
Trigger #3:
Pattern: ^(%d)h, (%d)m, (%d)e (*)-
Value:
checkSips
Trigger #4:
Pattern: You take a drink
Value:
elixerBalance = 0
Trigger #5: //same pattern as #3, just is a different class folder so that the two don't override each other.
Pattern: ^(%d)h, (%d)m, (%d)e (*)-
Value:
#math sipIfHealth %int( (@maxHealth)*0.8) //This is in place to set the appropriate variables for the auto-drinker
#math sipIfMana %int( (@maxMana)*0.8)
health = %1
mana = %2
Alias #1:
Name: checkSips //This will take stupidity into account as well, just change the stupidity variable to your
Value:
#if (@elixerBalance = 1 & @currentlySipping = 0 & @health <= @sipIfHealth) {
#if (@stupid = 1) {
#2 drink health
currentlySipping = 1
} {
drink health
currentlySipping = 1
}
} {
#if (@elixerBalance = 1 & @currentlySipping = 0 & @mana <= @sipIfMana) {
#if (@stupid = 1) {
#2 drink mana
currentlySipping = 1
} {
drink mana
currentlySipping = 1
}
}
}
Variables:
currentlySipping (0)
sipIfHealth
sipIfMana
maxHealth
maxMana
health
mana
elixerBalance (1)
The only Trigger options I use are trigger on trigger and new line. Also I always use my variables as a 0 state is not having or false, and a 1 state is having or true.
Hope this helps you some
-Arawn |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Sun Oct 31, 2004 5:39 am |
i use that, and i have the same problem.
is there something wrong with my client?
why is it not picking up the prompt sometimes?
some one please help me with this. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Oct 31, 2004 5:55 am |
do you have the prompt option checked and the newline unchecked for the trigger?
|
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Sun Oct 31, 2004 10:06 am |
actually, i have the both of them checked, should newline not be?
|
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Mon Nov 01, 2004 12:36 pm |
can some one please help me with this, its severly hindering my gameplay.
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Nov 01, 2004 1:33 pm |
Well if the DR alias works like it is supposed to then maybe the fault lies in this line
uncheck the newline option for the prompt trigger too
#IF (@drinkbalance = 1) {#if (@health < 4200 OR @mana < 1400) {dr}}
Upon closer examination of your code REMOVE the spaces between expressions
#IF (@drinkbalance=1) {#if (@health<4200 OR @mana<1400) {dr}}
If it still fails to work that one of your variables is prolly not getting set correctly |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Tue Nov 02, 2004 9:09 am |
This is the sipper Arawn gave me, set up for my settings. see if you can pick anything out of this as to why its not working consistently. Prompt triggers are set to prompt checked, newline unchecked.
This is my folder with the autosipping program. please tell me whats wrong with it.
#CLASS {AutoDrinking}
#ALIAS CheckSips {
#if (@elixerBalance = 1 & @currentlySipping = 0 & @health<@sipIfHealth) {
#if (@recklessness = 1) {
drink health
currentlySipping = 1
} {
drink health
currentlySipping = 1
}
} {
#if (@elixerBalance = 1 & @currentlySipping = 0 & @mana<@sipIfMana) {
#if (@recklessness = 1) {
drink mana
currentlySipping = 1
} {
drink mana
currentlySipping = 1
}
}
}
}
#TRIGGER {Health: %1/%2 Mana: %3/%4} {
maxHealth = %2
maxMana = %4
}
#TRIGGER {^(%d)h, (%d)m (*)-} {CheckSips} "" {nocr|prompt}
#CLASS 0
#CLASS {AutoDrinking|Variables}
#VAR CurrentlySipping {0} {0}
#VAR sipIfMana {1776}
#VAR sipIfHealth {4385}
#VAR MaxMana {2886}
#VAR MaxHealth {4367}
#VAR health {4367}
#VAR elixerBalance {1} {1}
#VAR mana {2562}
#CLASS 0
#CLASS {AutoDrinking|Variables|Triggers for Variables}
#TRIGGER {You may drink another health or mana elixir.} {
#cw 178
elixerBalance = 1
currentlySipping = 0
checkSips
}
#TRIGGER {You take a drink} {elixerBalance = 0}
#CLASS 0
#CLASS {AutoDrinking|Prompt}
#TRIGGER {^(%d)h, (%d)m (*)-} {
#math sipIfHealth %int( (@maxHealth)*0.95)
#math sipIfMana %int( (@maxMana)*0.75)
health=%1
mana=%2
} "" {nocr|prompt}
#CLASS 0 |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Thu Nov 04, 2004 7:51 am |
still waiting.
|
|
|
|
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Thu Nov 04, 2004 10:51 am |
Do you use just the HM(2000h, 2000m ex-), or the HMEW(2000h, 2000m, 12000e, 12000w ex-) prompt?
If you use only the HM prompt then your prompt trigger will NOT match when have no balance and no equilbrium.
To fix this change the trigger patern to
^(%d)h, (%d)m(*)-
no space after the 'm'. |
|
_________________ -Serentus- |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Thu Nov 04, 2004 11:58 am |
its not picking up the prompt at all with that trigger message.
|
|
|
|
rpcervi Beginner
Joined: 04 Nov 2004 Posts: 14
|
Posted: Thu Nov 04, 2004 12:05 pm |
Hey, Katalyst, if you want, email me at rpcervi@yahoo.com and i will send you another setup for an autosipper, the only defect with it, is when you die, it wont start autosipping till you drink again, or if you run outta vials of a certain kind, it stops, i am still working on the tweaks for it, but normally i dont run out or die, so its setup nicely for the most part.
|
|
|
|
DustyShouri Novice
Joined: 29 Oct 2004 Posts: 34
|
Posted: Thu Nov 04, 2004 12:27 pm |
This is my autosipping system, and it works pretty good.
The button is for toggling priority between mana and health sipping. I could of made it an alias, but I thought that would be easier.
#CLASS {Sipping}
#ALIAS autosip {#if (@elixirbalance!=1 & @sippingelixir!=1 & @autosipping!=1 & @judging!=1 & @shattering!=1) {#if (@managing!=1) {#if (!%ismember( anorexic, @afflictions)) {#if (@health<@minhealth) {siphealth} {#if (@mana<@minmana) {sipmana}}}} {#if (!%ismember( anorexic, @afflictions)) {#if (@mana<@minmana) {sipmana} {#if (@health<@minhealth) {siphealth}}}}}}
#ALIAS siphealth {#var sippingelixir 1;sip health}
#ALIAS sipmana {#var sippingelixir 1;sip mana}
#ALIAS autosipoff {#var autosipping 1;#echo %ansi( blink)Auto sipping is off!;autosip}
#ALIAS autosipon {#var autosipping 0;#echo %ansi( blink)Auto sipping is on!;autosip}
#TRIGGER {(%d)h, (%d)m %w-} {#var health %1;#var mana %2;#math minhealth @maxhealth-(@maxhealth/6);#math minmana @maxmana-(@maxmana/6);autosip}
#TRIGGER {Health: (%d)/(%d)%sMana: (%d)/(%d)} {#var health %1;#var maxhealth %2;#var mana %3;#var maxmana %4}
#TRIGGER {The elixir heals and soothes you.} {#var elixirbalance 1;#var sippingelixir 0}
#TRIGGER {Your mind feels stronger and more alert.} {#var elixirbalance 1;#var sippingelixir 0}
#TRIGGER {You may drink another health or mana elixir.} {#var elixirbalance 0;#var sippingelixir 0;autosip}
#BUTTON 4 {Health} {} {Mana} {} {} {managing} {} {Size} {63} {15} {Pos} {2} {304} {12} {6} {} {} "Sipping" {} {} {}
#CLASS 0 |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Fri Nov 05, 2004 9:31 am |
okay, like i said im using the sipper i posted last.
I figured out when its not working, and it never works in this situation.
If my health falls below 1000 it wont work.
any number in the tripple digits or lower, WILL NOT set off the prompt, i have no clue why, and this is rediculous. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri Nov 05, 2004 12:49 pm |
No its not ridiculus you just need to use the corrent wildcard in your trigger pattern post some output of your prompt with > 1k hp and less then 1K hp between the forums CODE tags but chances are you need something like this
^(&4)h(&4)m |
|
|
|
katalyst Beginner
Joined: 27 Oct 2004 Posts: 10
|
Posted: Fri Nov 05, 2004 1:58 pm |
im not sure what you mean. it has no output below 1000hp, i does nothing when i gets below that number.
is that prompt trigger doing anything different than this?
^(%d)h, (%d)m (*)- |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Fri Nov 05, 2004 5:15 pm |
^(%d)h, (%d)m (*)-
is different than
^ (%d)h, (%d)m (*)-
If you paste a copy of your prompt as it usually is (>1k) and do the same after getting beat down below 1k, we might be able to detect what the difference is in your prompt that is causing it to not fire. |
|
|
|
DustyShouri Novice
Joined: 29 Oct 2004 Posts: 34
|
Posted: Sat Nov 06, 2004 1:09 am |
^(%d)h, (%d)m %w-
It's what I use and it works fine. |
|
|
|
|
|