Welcome to the Builder Academy

Question speedwalk questions

More
20 Mar 2016 13:35 #5634 by Uzo
speedwalk questions was created by Uzo
Hello everyone im new to coding and mudding

i downloaded tbamud and quickly got tired of walking so i found a speedwalk command
it Works and compiles well

how ever just writing speedwalk doesnt ask where people wanna go, where and how would i do that. also the speedwalk is extremely fast, maybe a delay would be good ?

any ideas and sulutions will be apreciated.


ACMD(do_speedwalk) {
int dir, r;

for (r = 1; *argument && r; argument++) {
while (*argument == ' ')
++argument;

switch (*argument) {
case 'N':
case 'n':
dir = NORTH;
break;
case 'E':
case 'e':
dir = EAST;
break;
case 'S':
case 's':
dir = SOUTH;
break;
case 'W':
case 'w':
dir = WEST;
break;
case 'U':
case 'u':
dir = UP;
break;
case 'D':
case 'd':
dir = DOWN;
break;
default:
send_to_char(ch, "Alas, you can't go that way.\r\n");
return;
break;
}

r = perform_move(ch, dir, 1);
if (r && *(argument + 1))
send_to_char(ch, "\r\n");
}
}

Please Log in or Create an account to join the conversation.

More
20 Mar 2016 22:01 #5636 by WhiskyTest
Replied by WhiskyTest on topic speedwalk questions
Hi Uzo

There are a few ways to do this.

1.) Alias
Within TBAMud you can use the 'alias' command to create your own speedwalk routes.
Eg: alias mypath n;n;s;s;e;d;n
Then when you type 'mypath' the alias would send the commands n;n;s;s;e;d;n to the MUD.
It's limitations are that it only works from point A to point B, you wouldn't be able to use it from anywhere else in the game.
For more info see HELP ALIAS in game

2.) Mud Clients
MUD clients like Zmud/Cmud will have their own methods of saving paths, aliases and macros which will do similar things as option 1. CMUD even has an automapper that you can double click on and it will walk you to that room.
The automapper feature works anywhere in the game as long as the mapper has your correct location, and you have mapped the path to the destination correctly.

3.) DG Scripts
You could look into creating scripts that can teleport you to locations

Please Log in or Create an account to join the conversation.

More
23 Mar 2016 15:32 - 23 Mar 2016 15:34 #5683 by Kyle
Replied by Kyle on topic speedwalk questions

how ever just writing speedwalk doesnt ask where people wanna go, where and how would i do that.


I haven't tested it but something like this should accomplish what you desire.
Code:
ACMD(do_speedwalk) { int dir, r; +if (!argument || !*argument) { + send_to_char(ch, "Where do you want to go?\r\n"); + return; +} for (r = 1; *argument && r; argument++) { while (*argument == ' ') ++argument;
Last edit: 23 Mar 2016 15:34 by Kyle. Reason: fixed formatting and added forgotten bracket

Please Log in or Create an account to join the conversation.

Time to create page: 0.188 seconds