|
noxquzes Newbie
Joined: 20 Nov 2006 Posts: 2
|
Posted: Mon Nov 20, 2006 11:32 pm
Trigger Variable! Help out a newbie please!!! |
Please help me with a trigger i'm trying to set up. Basically I am trying to use an ability once I have enough focus to use it. I'm trying to set up the trigger to go off when this prompt is displayed
<Enemy(100) Focus(xx) Armor(10,000)>
where the enemy and armor can be any number and the focus is at or above 50. So when I hit 50 focus I will automatically hit the ability 'electric hell ball'.
I'm still new to triggers and anything you can do would help out lots thank you. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Nov 21, 2006 4:06 am |
#trig {~<Enemy~((%d)~) Focus~((%d)~) Armor~((*)~)~>} {#if (%2 > 50) {cast 'electric hell ball' @target}}
You'll want to check the "prompt" option in the settings editor for this trigger. What I did to create this pattern was quote out all the special characters <> () and then change the numbers into (%d), which matches any number. "10,000" isn't actually a number because of the comma, so I had to use (*) instead. In the scripts that fire off this trigger, the two numbers and the armor value will be parsed into %1-%3, so the #if command checks if the second one, focus, is greater than 50 and casts electric hell ball if it is.
Bear in mind though that this will cast the spell EVERY time your focus is greater than 50, even if you're not in combat and not intending to use it. If the prompt went off and tried to use the command, but it failed and the focus didn't go down, it would keep trying on every prompt until it did it. Very spammy. You'll have to disable the trigger when you don't want to use it, or create an alias like this:
#alias {ehb} {#var ehb 1}
then change the trigger script to:
{#if (%2 > 50 AND @ehb) {cast 'electric hell ball' @target;#var ehb 0}
Which will only cast the spell if you've typed the alias "ehb" since you last used the attack. |
|
|
|
noxquzes Newbie
Joined: 20 Nov 2006 Posts: 2
|
Posted: Tue Nov 21, 2006 4:18 am |
thank you very much! This prompt is a battle prompt only so I don't have to worry about casting outside of battle. Thanks!
|
|
|
|
|
|