|
Izulien Newbie
Joined: 24 Jul 2012 Posts: 9 Location: United States
|
Posted: Sat Aug 11, 2012 9:17 pm
Pulling a single string from a String List Variable |
This should be a super simple option but I'm apparently just missing it completely.
I would like to pull a simple string out of my string list variable to send to the mud in a triggered event.
In this case I would like to have a randomized yell in certain events.
I could do this as a simple trigger using #CASE and manually putting my yells in but I will most likely be constantly adding/removing yell options/phrases and thus using a variable will make things easier.
#var AmazingYell {Oh yeah|Boo-yah|I am the best around}
#trigger {You do something amazing}{yell %random(@AmazingYell)}
Then when I do something amazing I'll simply yell one of my amazing yells.
Obviously the above doesn't function properly but it is the basics of what I would like to do.
Currently I would have to use
#trigger {You do something amazing}{yell #case %random {Oh Yeah} {Boo-yah} {I am the best around}} |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sat Aug 11, 2012 9:35 pm |
%item(@amazingyell, %random(1, %numitems(@amazingyell)))
You can access the help file with:
#help %random |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Izulien Newbie
Joined: 24 Jul 2012 Posts: 9 Location: United States
|
Posted: Sat Aug 11, 2012 10:11 pm |
Item! Gah I couldn't figure that out. This is why you my friend are the Wizard and I am yet a newb. I shall attempt this and will get back to you if this doesn't work out ;)
Edit:
After testing this worked perfectly. I'm also glad you thought of the item number as well so I can continually add/remove items from the list! |
|
|
|
|
|