|
mercilus Newbie
Joined: 31 Oct 2006 Posts: 2
|
Posted: Tue Oct 31, 2006 8:57 am
Random that Don't Repeat |
Alright I will see if I can explain clearly what I am trying to do here.
In the MUD I play I am a profession that does lots of different things per round. Which can include spells, melee and music all in one round.
Now most of these skills are afflictions so of course I don't want to double up on them unless of course they are healed.
Now my intent is to make 3 rows of buttons where I can select what I will be doing manually, but the game goes fairly quickly and I might be drunk sometimes...so I will want it to pick certain skills at random to do but not repeat them if it has just done that skill.
So is there a way to pick a random alias to fire off based on a predefined group of them, and eliminate certain ones that have been used. (Which if the affliction is healed in front of me it will go back into the mixup(but I can figure that out on my own if I can figure out that first part)).
So a fight might go something like this on the generic random.
Round 1:
Give Insomnia
Freeze Target
Trip Target
Round 2:
Give Anorexia
Burn Target
Breakarm Target
(Target Heals Insomnia)
Round 3:
Insomnia is now an option, but not a must.
Acid Target
BreakLegs Target. |
|
|
|
darkspot Apprentice
Joined: 29 Jul 2002 Posts: 105
|
Posted: Tue Oct 31, 2006 4:55 pm |
#var atkList {give insomnia|freeze target|trip target|give anorxia|burn target|breakarm target|acid target|breaklegs target}
#var templist {}
#forall {@atkList} {#additem templist {%i}}
#alias sAtk {satk2 %item(@templist,%random(1,%numitems(@templist)))}
#alias sAtk2 {#delitem templist {%0};%0}
#trigger {insomnia cured message} {#additem templist {give insomnia}}
untested, but I think it should work in general. |
|
|
|
mercilus Newbie
Joined: 31 Oct 2006 Posts: 2
|
Posted: Tue Oct 31, 2006 8:07 pm |
Great thanks for the response, that should be what I needed right there!
|
|
|
|
|
|