Page 1 of 1

VIPMud - Chainwalk

Posted: Thu Nov 23, 2017 10:17 pm
by Edoras
Someone mentioned wanting a chainwalk style command for VIPMud today and nerd sniped me hard. Got it to work though.

Note: This is the first thing I've ever created for VIP Mud, so if there's a more effective way to provide it, or something blatantly obvious needs to be added, let me know if you could.


usage: chainwalk east,north,east,go gate,go arch,south,go stables,wander
using chainwalk, provide each direction you would like to go (including go commands e.g. go gate, go arch, wander, out) and chainwalk will incrementally execute the directions with a 1.5 second delay after arriving to the previous room.
usage: chainstop
chainstop will delete any queued chainwalk commands. If you get stuck in combat, find someone you want to talk to, or otherwise need to stop chainwalking, this command is very important to remember.

To use chainwalk for VIPMud:
Paste the following code block into your .set file for your character and/or the Clok mud within VIPmud.

Code: Select all

#Alias chainwalk {
@chainwalkDirections = %0;
@chainwalkStatus = %pos(",",@chainwalkDirections);
@nextDirection = %left(@chainwalkDirections,%pos(",",@chainwalkDirections)-1);
@chainwalkDirections = %right(@chainwalkDirections,%Length(@chainwalkDirections)-%pos(",",@chainwalkDirections));
#trig {<chainwalk1>You head *} {
#If {@chainwalkStatus = 0} {#Alarm 1.5 {@chainwalkDirections};#UnTrigger chainwalk1;#UnTrigger chainwalk2;};
@nextDirection = %left(@chainwalkDirections,%pos(",",@chainwalkDirections)-1);
@chainwalkDirections = %right(@chainwalkDirections,%Length(@chainwalkDirections)-%pos(",",@chainwalkDirections));
@chainwalkStatus = %pos(",",@chainwalkDirections);
#Alarm 1.5 {@nextDirection};
};
#trig {<chainwalk2>You venture *} {
#If {@chainwalkStatus = 0} {#Alarm 1.5 {@chainwalkDirections};#UnTrigger chainwalk1;#UnTrigger chainwalk2;};
@nextDirection = %left(@chainwalkDirections,%pos(",",@chainwalkDirections)-1);
@chainwalkDirections = %right(@chainwalkDirections,%Length(@chainwalkDirections)-%pos(",",@chainwalkDirections));
@chainwalkStatus = %pos(",",@chainwalkDirections);
#Alarm 1.5 {@nextDirection};
};
@nextDirection;
};
#Alias chainstop {
#say {Stopping chainwalking};
#UnTrigger chainwalk1;
#UnTrigger chainwalk2;
};

Re: VIPMud - Chainwalk

Posted: Fri Nov 24, 2017 3:04 am
by Jirato
Thanks for sharing.

Re: VIPMud - Chainwalk

Posted: Fri Nov 24, 2017 6:27 pm
by jilliana
You are a miracle-worker! Thank you so much!

Re: VIPMud - Chainwalk

Posted: Sat Nov 25, 2017 5:15 am
by xavier
You say this is the first thing you've created in VipMud. I'm thorughly impressed. I was scripting in it for months before I managed something that complicated. I had been scripting in vipmud for a few years before I started work on the original clok sound pack. If you don't mind as I update the sound pack for vipmud nwo that I'm playing again, do you mind if I include this code?

Re: VIPMud - Chainwalk

Posted: Sat Nov 25, 2017 8:08 am
by Edoras
Not at all, the code is yours to do as you wish!

I'm glad you like it: I've done a lot of scripting in MUSH and I'm a coder for a living, so it comes a little easier to me. That said I still spent 3 solid hours on it and almost quit. Realizing that there was a windows help .chm file (as opposed to just the text file) was what saved my bacon.