|
kent Beginner
Joined: 03 Apr 2006 Posts: 29
|
Posted: Mon Jun 03, 2013 10:27 pm
sitting up a variable to choose from the list of monsters |
This is the trigger name
#Trigger {^You sense a hidden life form in the area.$}
this is the variable that I am working with
@InvMonster {imp|assi|kend|kobold|goblin}
Finally this is the body:
#loo 1,5 {
cib @invmonster
#wait 4000
}
The problem I am having is each time I one of these monsters. I would like the trigger to fire like this
You sense a hidden life form in the area.
I start to cast 'iceball' @InvMonster
at one of these five monsters, but it is seeing {imp|assi|kend|kobold|goblin} as one monster instead of seperate beasts. help |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Jun 04, 2013 2:37 am |
Use %item() to get a specific element. Assuming you want to just pick one at random, use %random().
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
kent Beginner
Joined: 03 Apr 2006 Posts: 29
|
Posted: Tue Jun 04, 2013 7:33 pm tried %item() nothing :( |
MattLofton wrote: |
Use %item() to get a specific element. Assuming you want to just pick one at random, use %random(). |
not sure if I am doing this correctly. %item() is suppost to go in the variable like this
@InvMonster {%item( imp|assi|kend|kobold|goblin)}
or like this
#loo 1,5 {
cib, %item(@invmonster)
#wait 4000
}
both ways didn't not seem work. Anymore ideas? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Jun 04, 2013 8:10 pm |
your syntax is wrong. %item() requires 2 arguments, the first being the stringlist you wish to act upon and the second being the position of the element you want.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 176
|
Posted: Tue Jan 13, 2015 10:17 am |
I use seomthing similar...
^(%w) dealt the killing blow to Small Kresh Pack.$
#IF (@np > 500) {vani}
vani = #Loo 10 {v animal %i} |
|
|
|
|
|