-
Notifications
You must be signed in to change notification settings - Fork 1
/
run2.tin
106 lines (95 loc) · 3.57 KB
/
run2.tin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#class {GaidinBDJ_run2} {kill}
#class {GaidinBDJ_run2} {open}
#nop Speedwalk script intended for 3k (but should be usable everywhere).;
#nop by Gaidin (gaidinbdj@gmail.com);
#nop v3;
#nop It is based off the strings for the necromancer "vision" power on;
#nop 3-Kingdoms MUD, but NECRO VISION STRINGS ARE NOT COMPATIBLE!;
#nop Notably, numbers are *NOT* used as directions. They're used to;
#nop repeat a direction (12n, 10SE, etc.);
#nop The function "nec_to_run" can be attempted to convert necro vision;
#nop strings to run strings. You can try the nec_to_run function;
#nop your own risk.;
#nop Paths are just a single string with no spaces. If you have an;
#nop unrecognized element, the execution will fail.;
#nop Commands:;
#nop n: north e: east s: south w:west;
#nop NE: northeast SE: southeast SW: southwest NW: northwest;
#nop u: up d: down i: in o: out;
#nop r: enter x: exit c: climb l: leave;
#nop p: portal g: gate t: stairs h: home;
#nop v: vortex;
#var {r2_command_list[n]} {n};
#var {r2_command_list[e]} {e};
#var {r2_command_list[w]} {w};
#var {r2_command_list[s]} {s};
#var {r2_command_list[NW]} {nw};
#var {r2_command_list[NE]} {ne};
#var {r2_command_list[SW]} {sw};
#var {r2_command_list[SE]} {se};
#var {r2_command_list[u]} {u};
#var {r2_command_list[d]} {d};
#var {r2_command_list[i]} {in};
#var {r2_command_list[o]} {out};
#var {r2_command_list[r]} {enter};
#var {r2_command_list[x]} {exit};
#var {r2_command_list[c]} {climb};
#var {r2_command_list[l]} {leave};
#var {r2_command_list[p]} {portal};
#var {r2_command_list[g]} {gate};
#var {r2_command_list[t]} {stairs};
#var {r2_command_list[h]} {home};
#var {r2_command_list[v]} {vortex};
#var {r2_command_list[f]} {focus};
#nop Focus is only here for nec string compatibility. Ish.;
#alias run {
#if {"%0" == ""} {
#showme Usage: run <direction string>;
#showme Commands:;
#showme n: north e: east s: south w:west;
#showme NE: northeast SE: southeast SW: southwest NW: northwest;
#showme u: up d: down i: in o: out;
#showme r: enter x: exit c: climb l: leave;
#showme p: portal g: gate t: stairs h: home;
#showme v: vortex;
#showme Numbers may be used to repeat a command. e.g. run 12e19w;
#return;
};
#var {r2_path} {%0};
#replace {r2_path} { } {};
#var {r2_element} {};
#var {r2_command} {};
#list {r2_commands} {create} {};
#parse {$r2_path} {char} {
#var {r2_element} {$r2_element$char};
#regex {$r2_element} {{^(\d*)(n|e|w|s|NW|NE|SW|SE|u|d|i|o|r|x|c|l|p|g|t|h|v|f)}} {
#NOP DEBUG #showme {Num:&2 Dir:&3};
#if {"&2" == ""} {#var {r2_command} {$r2_command_list[&3]}} {#var {r2_command} {#&2 $r2_command_list[&3]}};
#NOP DEBUG #showme {Adding:$r2_command};
#list {r2_commands} {add} {$r2_command};
#var {r2_element} {};
} {
#NOP DEBUG #showme {Skipping:$r2_element};
};
};
#if {"$r2_element" != ""} {
#showme {Something went wrong. Probably here: $r2_element};
} {
#showme {Looks good. Executing.};
#list {r2_commands} {simplify};
$r2_commands;
};
};
#function nec_to_run {
#local {tmp_nec} {%0};
#replace {tmp_nec} {1} {SW};
#replace {tmp_nec} {2} {s};
#replace {tmp_nec} {3} {SE};
#replace {tmp_nec} {4} {w};
#replace {tmp_nec} {6} {e};
#replace {tmp_nec} {7} {NW};
#replace {tmp_nec} {8} {n};
#replace {tmp_nec} {9} {NE};
#return $tmp_nec;
};
#class {GaidinBDJ_run2} {close}