|
Apostolic Newbie
Joined: 25 Feb 2005 Posts: 3
|
Posted: Sun Mar 06, 2005 10:46 pm
Autoheal trigger difficulties |
I'm trying to get this expandable autoheal trigger to work, but I've been so far totally unable to get it into any sort of working order. Probably unsurprising given my total lack of experience with coding anything. I've read what I could about autoheal scripts in the forum history, but still haven't been entirely able to figure it out.
Here's what my prompts look like, for starters:
(7882/8874hp)(583/655mp)(1880/1880mv)(235xp TNL)(50295130 gold):
I'm trying to make the trigger dynamically calculate so that it'll use a healing potion, an action I have aliased as 'potheal,' whenever the current hp value drops a certain amount below the max value. That amount, hopefully, should be easily adjustable, for the moment, the trigger is designed around a gap of 1500. Here's what I'm working with:
Pattern: ~(&hp/&{maxhp}hp~)
Value: %if("%2-%1"<1500, potheal)
Of course, this doesn't include any of the necessary pieces to keep it from spamming the potheal alias when it drops below momentarily. I haven't a clue how to make that work.
Sorry for my incompetence, and thanks in advance for your help. Let me know if I need to give any other info...I think I've put it all in. |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Sun Mar 06, 2005 11:20 pm |
Code: |
#TRIGGER "PH" {~(&%d{hp}/&%d{maxhp}hp~)} {#T- PH
#if (%eval(%2-%1) > 1500) {potheal;#ALARM +1 {#T+ PH}} {#T+ PH}
} |
First thing his trigger does is disable itself with #T- PH
PH is the ID of the trigger.
Then if if the difference between hp and maxhp is greater than 1500
it fires the potheal command and makes a temporary alarm trigger to
turn itself back on in 1 second, if the differences is 1500 or less
it just turns itself back on right away.
I only made the trigger match the hp part of your prompt, but you may want to expand it so that it only matches on a complete prompt. |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
|
|
|
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
|
|