Hi all
First off massive props to Mr Gammon - I've mudded on and off for years, and only recent been pointed in the direction of MUSHclient, and its certainly enhanced my experience.
I've been playing around with the scripting options, mainly for simple things like disarm triggers and hunger/thirst triggers. My knowledge of scripting is therefore, pretty limited but I'm getting there.
The "chase" script i've been thinking off would work like this.
I'd use an alias ctarget *
to set a variable as chasetarget
This would be the person I'd like to go after.
I'd use an alias chaseaction *
which would set a variable for an action to do @ the target.
I'd then have an alias ct, which ideally would perform a few actions.
First off it would scan - returning what is in rooms nearby, if it saw the variable chasetarget in any of those rooms it would then send the appropriate movement commands to go to that room, followed by chaseaction @ chasetarget.
An example of the what the MUD returns for a scan would look like this.
Scan
You scan all around.
You scan north.
You scan east.
*** Range 2 (east) ***
(White Aura) BADGUY the Nastyperson is here, sitting astride a warhorse.
You scan south.
You scan west.
You scan up.
You scan down.
In this example I would want the script to enter east;east;chaseaction @ chasetarget (or whatever the syntax is).
One thing that would be fairly important also would be that the trigger to move to the target and attack it should only trigger when using the alias ct. I'd like to be able to use scan in normal situations without the trigger firing.
Might anybody have any tips on how to go about putting something like this together?
First off massive props to Mr Gammon - I've mudded on and off for years, and only recent been pointed in the direction of MUSHclient, and its certainly enhanced my experience.
I've been playing around with the scripting options, mainly for simple things like disarm triggers and hunger/thirst triggers. My knowledge of scripting is therefore, pretty limited but I'm getting there.
The "chase" script i've been thinking off would work like this.
I'd use an alias ctarget *
to set a variable as chasetarget
This would be the person I'd like to go after.
I'd use an alias chaseaction *
which would set a variable for an action to do @ the target.
I'd then have an alias ct, which ideally would perform a few actions.
First off it would scan - returning what is in rooms nearby, if it saw the variable chasetarget in any of those rooms it would then send the appropriate movement commands to go to that room, followed by chaseaction @ chasetarget.
An example of the what the MUD returns for a scan would look like this.
Scan
You scan all around.
You scan north.
You scan east.
*** Range 2 (east) ***
(White Aura) BADGUY the Nastyperson is here, sitting astride a warhorse.
You scan south.
You scan west.
You scan up.
You scan down.
In this example I would want the script to enter east;east;chaseaction @ chasetarget (or whatever the syntax is).
One thing that would be fairly important also would be that the trigger to move to the target and attack it should only trigger when using the alias ct. I'd like to be able to use scan in normal situations without the trigger firing.
Might anybody have any tips on how to go about putting something like this together?