|
Motient Beginner
Joined: 14 Mar 2004 Posts: 18 Location: USA
|
Posted: Fri Sep 17, 2004 6:01 am
trigger help |
I have a autoprac trigger that needs one line tweaked to get it to work without misfiring
Code: |
#TRIGGER {%item(*)(%d)} {#IF (%item( @SpellMax, @SpellCount)=%1) {#ADD SpellCount 1}} |
when I switch the PracSpellAlarm class when I run out of energy it starts looking for the above trigger and if I haven't fleed or left the room fast enough it would pick on a line of this
You stave the Clan Training Dummy extremely hard! (77)
When that happens somehow Spellcount moves up instead of looking for
fireball(some variable spaces)76
Code: |
#CLASS {CastSpellAlarm} {disable}
#ALARM {3} {cast '%item( @SpellList, @SpellCount)'dummy}
#TRIGGER {You haven't the energy to cast that spell!} {#T- CastSpellAlarm;#T+ PracSpellAlarm;e}
#CLASS 0
#CLASS {PracSpellAlarm} {disable}
#TRIGGER {No way! You're fighting for your life!} {flee}
#TRIGGER {PANIC! You couldn't escape!} {flee}
#ALARM {15} {prac %item( @SpellList, @SpellCount)}
#TRIGGER {3672m} {w;#T- PracSpellAlarm;#T+ CastSpellAlarm} "" {nocr|prompt}
#TRIGGER {%item(*)(%d)} {#IF (%item( @SpellMax, @SpellCount)=%1) {#ADD SpellCount 1}}
#VAR SpellList {create fire|shape fire|burning hands|fireball|wall of fire|flame strike|fire storm|incinerate|explosive fireball}
#VAR SpellMax {77|77|77|77|77|77|77|77|77}
#VAR SpellCount {1} {1}
|
|
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Sat Sep 18, 2004 3:30 pm |
I'm not quite sure what you're trying to do with %item(*), but I don't think that's what you want in the pattern. If you're trying to match an item within a variable list, then use that variable enclosed in braced:
Quote: |
#TR {({@SpellList}) (%d)} {#IF (%item( @SpellMax, @SpellCount)=%1) {#ADD SpellCount 1}} |
|
|
_________________ .geniusclown |
|
|
|
Motient Beginner
Joined: 14 Mar 2004 Posts: 18 Location: USA
|
Posted: Sun Sep 19, 2004 3:21 pm |
That didn't work it kept trying to practice the same item over and over again instead of going to the next spell on the variable list.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Sep 19, 2004 4:55 pm |
#TR {({@SpellList}) %s (%d)} {#IF ((%item( @SpellList, @SpellCount) = "%1") AND (%item( @SpellMax, @SpellCount) >= %2)) {#ADD SpellCount 1}}
%s requires at least one space to match, so the pattern above requires at least 3 spaces between the item and the number. If there might not be that many, remove the spaces before and after %s. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
Motient Beginner
Joined: 14 Mar 2004 Posts: 18 Location: USA
|
Posted: Mon Sep 20, 2004 3:44 pm |
Code: |
#CLASS {CastSpellAlarm} {disable}
#ALARM {3} {cast '%item( @SpellList, @SpellCount)'windblade}
#TRIGGER {You haven't the energy to cast that spell!} {e;#T- CastSpellAlarm;#T+ fleeSpellAlarm}
#CLASS 0
#CLASS {fleeSpellAlarm} {disable}
#TRIGGER {No way! You're fighting for your life!} {flee}
#TRIGGER {PANIC! You couldn't escape!} {flee}
#TRIGGER {Down - Entry Room to Algeroth} {#T- fleeSpellAlarm;#T+ PracSpellAlarm}
#CLASS 0
#CLASS {PracSpellAlarm} {disable}
#ALARM {15} {prac %item( @SpellList, @SpellCount)}
#TRIGGER {({@SpellList})%s(%d)} {#IF ((%item( @SpellList, @SpellCount) = "%1") AND (%item( @SpellMax, @SpellCount) = %2)) {#ADD SpellCount 1}}
#TRIGGER {4346m} {w;#T- PracSpellAlarm;#T+ CastSpellAlarm} "" {nocr|prompt}
#CLASS 0
#VAR SpellList {create fire|shape fire|burning hands|fireball|wall of fire|flame strike|fire storm|incinerate|explosive fireball}
#VAR SpellMax {77|77|77|77|77|77|77|77|77}
#VAR SpellCount {1} {1} |
|
|
|
|
|
|