|
blairferrell Newbie
Joined: 19 Aug 2011 Posts: 7
|
Posted: Wed Oct 12, 2011 7:59 pm
Help with Multi-Line Triggers |
So, this is my current dilemma. I'm trying to set a trigger that will automatically execute a game command (ENEMY) on any item found within a string list that I have, when detected on WHO.
So for example, I've added Rhiarinn and Zeph to my string list
So #SHOW @enemylist
produces
Rhiarinn|Zeph
Now, I want to trigger it so when I type for example, QWHO
which provides me this :
Arica, Kando, Ithilcelu, Erwing, Ged, Mallaidh, Shlean, Thaeae, Zylo, Bryana, Medeia, Elaisa, Nuradla, Tora, Grin, Rhiarinn, Dracus, Ainsley, Sutao, Zeph, Akaxi, Gaadgoro, Haya, Renatta, Braem, Vanko, Irbe, Orsyn, Yudi.
...plus 12 more that are unseen.
It will execute ENEMY on any name found matching in my enemylist string list.
Half the problem is I don't know how to set up a multi line trigger, so that it only fires the ENEMY trigger when the condition of "...plus %d more that are unseen" is met. I obviously can't have the ENEMY trigger firing off anytime anything happens, as the only way to capture that first part of the QWHO would be (%*)
Other problem is I'm not sure how to write the script itself to enemy.
Would I #forall @enemylist {#if %pos(%i, %1) {ENEMY %i}} ?
Or am I far off the mark. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4701 Location: Pensacola, FL, USA
|
Posted: Thu Oct 13, 2011 1:16 am |
what you would do is something like...
#ONINPUT {qwho} {#T+ whoEnemy}
#TR "whoEnemy" {({@enemyList})} {ENEMY %1}
#TR {...plus %d more that are unseen} {#T- whoEnemy} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
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
|
|