|
jamiesname Newbie
Joined: 20 Sep 2008 Posts: 1
|
Posted: Sat Sep 20, 2008 5:10 am
How to alternate potions? |
I'm a newb as far as zmud settings go, so bare with me please. Someone gave me a setting a long time ago to alternate potions on the MUD I play. I vaguely remember some of the text.
I had to set a variable named hth. It's value was potion44444. Then another variable named htt and its value was potion44444 then potion55555 in the next line and I clicked string list. Then made an alias (this is where I forgot what to do) the value was four lines long and the purpose of it was to sip from potion44444 and then switch to sip from potion55555 the second time, then switch back to potion44444 the third time, etc.
My question is, does anyone know how I can make my potions do that again? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sat Sep 20, 2008 5:33 am |
you could make a list of the potions you want to drink, then use a variable as a placeholder
#VAR potions {potion44444|potion55555|potion44444}
#VAR potionToSip 1
Then you incriment it when you succeed your sip, and a check to make sure your counter is not out of bounds
#TRIGGER {succefull sipping message(s)} {#ADD potionToSip 1;#IF (@potionToSip>%numitems(@potion)) {potionToSip=1}}
Then make an alias to do your sipping as needed like so
#ALIAS sipper {sip %item(@potions, @potionToSip)} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Rappy Wanderer
Joined: 15 Jul 2005 Posts: 96
|
Posted: Sat Sep 20, 2008 12:13 pm |
%case would be a better option, no need to check for out of bounds.
Code: |
#TRIGGER {successful sipping message} {#ADD potionToSip 1}
#ALIAS sipper {sip %case(@potionToSip,"potion44444","potion5555")
|
-Rappy |
|
_________________ Windows 11 Pro,
cMUD 3.34 |
|
|
|
|
|