Can someone help me with two things, Ive only just started to get into Mushclient scripting and Im not a whiz at coding by nature.
*****
Firstly,
I want to make a scan script that will read the exits in the room, and upon calling the script (ie an alias will call the scan script). The scan script will look in the directions.
For example the mud provides text like this:
Obvious exits: n e se(closed) gate
My idea was to have a trigger read the exits and set them to a variable. Everytime I move the trigger will reupdate the "obvious exits" in the particular room im in. When the alias entered tos run the script, it will look though the variable (and the obvious exits stored inside it), expand and do: (using the example above):
look north
look east
open southeast
look southeast
look gate
My major problems is I dont know how to manipulate the variable that will contain "n e se(closed) gate" so that a script can go through it.
Ideas?
*****
Secondly, I have a trigger that a script creates for use in pk. What the trigger sends back upon firing is what I am having troubles with. I want to be able to change what the trigger sends and have more than one line of commands send triggered.
ie i may want the trigger to send these commands
follow <victim>
backstab <victim>
or at othertimes
bash <victim>
cast 'acid blast' <victim>
etc
I cannot work out how using the world.addtrigger command i can get the trigger to send more than one command. I tried having the trigger call a variable, but once again cannot work out how to make a variable contain more than one line of text. Alternatively I could make the trigger call a script with the commands inside. I say again I would like the actions that the trigger sends be easy to change, and preferably not needing to bring up the mushiclient configuration console (for in pk, i need the scripts to run fast. Hence just write an alias that will update my actions upon the trigger firing)
*****
Firstly,
I want to make a scan script that will read the exits in the room, and upon calling the script (ie an alias will call the scan script). The scan script will look in the directions.
For example the mud provides text like this:
Obvious exits: n e se(closed) gate
My idea was to have a trigger read the exits and set them to a variable. Everytime I move the trigger will reupdate the "obvious exits" in the particular room im in. When the alias entered tos run the script, it will look though the variable (and the obvious exits stored inside it), expand and do: (using the example above):
look north
look east
open southeast
look southeast
look gate
My major problems is I dont know how to manipulate the variable that will contain "n e se(closed) gate" so that a script can go through it.
Ideas?
*****
Secondly, I have a trigger that a script creates for use in pk. What the trigger sends back upon firing is what I am having troubles with. I want to be able to change what the trigger sends and have more than one line of commands send triggered.
ie i may want the trigger to send these commands
follow <victim>
backstab <victim>
or at othertimes
bash <victim>
cast 'acid blast' <victim>
etc
I cannot work out how using the world.addtrigger command i can get the trigger to send more than one command. I tried having the trigger call a variable, but once again cannot work out how to make a variable contain more than one line of text. Alternatively I could make the trigger call a script with the commands inside. I say again I would like the actions that the trigger sends be easy to change, and preferably not needing to bring up the mushiclient configuration console (for in pk, i need the scripts to run fast. Hence just write an alias that will update my actions upon the trigger firing)