I've just started using mushclient, so I'll fit multiple questions here in order to learn different techniques.
Hope I lay down my concepts clearly, any advice or suggestion is much appreciated.
Background:
blue-green knife
sharp sword
small axe
atk1 requires knife and sword, atk2 requires sword and axe, atk3 requires knife, etc...
Need to keep track of what is held on my LEFT or RIGHT hand.
So when I use alias atk1, I will hold knife and sword, when I do atk2, axe will replace knife,
on whatever hand it was. Hope you get the idea.
My plan:
-Variable-
item = (blue-green knife|sharp sword|small axe)
-triggers-
^You wield (@!item) on left hand.$
^You remove the (@!item) on right hand.$
-script (left hand example, called by triggers when holding or removing weapons)-
hands = {}
hands.left.held = 0 -- when hand is empty
hands.left = {knife = "blue-green knife", sword = "sharp sword", axe = "small axe"}
Scenario (what I hope to do):
Recieve trigger --> You wield sharp sword on left hand.
Calls function in script, using matching variable from trigger ("sharp sword"), determines it matches
--> hands.left.sword = "sharp sword"
Q1) How do I link the matching variable from the trigger to my script, in order to match it against my table?
Now takes the key of (hands.left.sword = "sharp sword"), which is sword, and stores it in (hands.left.held = sword)
Q2) How can I isolate the key from here?
If I use
^You wield (@!item) on (@!handside) hand.$
(where I'll make @handside = left|right)
Q3) How can I get the first and second matching variables in a script? Like how can I do World.Note (first variable, second variable)
(So from then on, I can directly use a function to unwield the (hands.left.held = sword) value. When I use an alias, it will do a series of IF statements to check and wield, from the values in the tables. I've got this bit covered I think)
I'm sure I'll have more questions stemming from this, as I try to implement it. I hope this isn't too confusing.
|