|
methonis Beginner
Joined: 16 Dec 2002 Posts: 13
|
Posted: Sun May 16, 2004 7:24 am
Changing the variable in an alias via trigger... |
Here we go:
1. Potion A (@fire1) is carried. Potion B (@fire2)is in a sack
2. ALIAS dr is set to sip @fire1.
3. When potion A runs out and I attempt to drink from it, receive message - "There is naught in an empty potion bottle worth supping."
At this point, when that message is received, I'd like to remove @fire2 from sack and then change ALIAS dr to read sip @fire2 instead of sip @fire1.
Now, if I only needed this for one potion, a single trigger would work fine, but I have about 15 different kinds of potions, each with it's own backup in my sack. The behaviour needs to be the same for all of them, but I need it to recognize which potion is empty, and then pull the correct one from the sack. I guess this means it would have to look at which alias was called directly before the trigger text was displayed (whether it was sip @fire1, sip @diffusion1, sip @invisible1).
I'm really not sure how to go about that, any ideas are welcome.
Methonis |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun May 16, 2004 7:55 pm |
Instead of changing the alias, I decided to just swap the values of @fire1 and @fire2.
#AL dr {#VAR lastpotion {@fire1|@fire2};sip @fire1}
#TR {There is naught in an empty potion} {remove %item( @lastpotion, 2) from sack;#VAR fire1 {%item( @lastpotion, 2)};#VAR fire2 {%item( @lastpotion, 1)};dr} |
|
|
|
|
|
|
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
|
|