|
Ash Novice
Joined: 17 Nov 2000 Posts: 31 Location: USA
|
Posted: Sat Aug 31, 2002 5:44 am
Wondering about a Potion System |
Just curious would it be possible to make a system, that when you run out of a certain potion, it will look for another one, if thats out it'll try the next and so fourth. Just so you dont have to use 10 diff aliases for pretty much the same potion. You could just use one alias. Im thinkin it would have to count the potions and keep track of them.
Heres some settings that my mud lays out.
You put a potion encased in a platinum satchel in a small bag.
You get a potion encased in a platinum satchel from a small bag.
Oh, and would it be at all possible to use scrolls to, without having to use another alias? Like I'd use the alias PO, this would get a potion quarff it, but when this potion runs out the next thing in the list might be a scroll, it would get the scroll and recite it onmyself. This might not be possible though. Any info would be mucho appreciated. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Aug 31, 2002 8:22 am |
How about track things by funcationality?
You'll have to use triggers to sort the functionality so here would be an example.
Lets pretend you only use your small bag for storing things.
You'd need triggers to watch how your small bag inventory increases.
#TRIGGER {You put a potion encased in a green satchel in a small bag.} {#VARIABLE Healing_things %additem( "quaff green", @healing_things)}
#TRIGGER {You put a yellow scroll 'foobar' in a small bag.} {#VARIABLE Healing_things %additem( "recite yellow", @healing_things)}
You'd need triggers to watch how your small bag inventory decreases.
#TRIGGER {You get a potion encased in a green satchel from a small bag.} {#VARIABLE Healing_things %delitem( "quaff green", @Healing_things)}
#TRIGGER {You get a yellow scroll 'foobar' from a small bag.} {#VARIABLE Healing_things %delitem( "recite yellow", @Healing_things)}
Then the healme alias will recite or quaff.
#ALIAS healme {#IF (%numitems( @Healing_things)>0) {get %word( %item( @Healing_things, 1), 2) bag;%item( @Healing_things, 1)} {#SH Nothing in inventory that heals!}}
Ton Diening |
|
|
|
Ash Novice
Joined: 17 Nov 2000 Posts: 31 Location: USA
|
Posted: Sat Aug 31, 2002 10:44 am |
Im not 100% sure but when I type the po alias it will only get the potion.satchel and trys quarfing it, im not sure its keeping a record of how many of each item I have, so when I run out it will try for the next item on the list.
With this way would it be able to say ok you got 3 potions.satchels and 2 green.scrolls, your out of potions.satchels so lets try a green.scroll. Im not very super good with zmud commands, but would you maybe have to make another variable to keep track of how many there is of each type of potions like potion1=10, potion2=4, scroll1=4, scroll6=10
Thnks
-Ash |
|
|
|
|
|
|
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
|
|