mudletmapper.xml
2.29 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.001">
<ScriptPackage>
<Script isActive="yes" isFolder="no">
<name>mapper</name>
<packageName></packageName>
<script>mudlet = mudlet or {}; mudlet.mapper_script = true
exitmap = {
n = 1,
north = 1,
ne = 2,
northeast = 2,
nw = 3,
northwest = 3,
e = 4,
east = 4,
w = 5,
west = 5,
s = 6,
south = 6,
se = 7,
southeast = 7,
sw = 8,
southwest = 8,
u = 9,
up = 9,
d = 10,
down = 10,
["in"] = 11,
out = 12,
[1] = "north",
[2] = "northeast",
[3] = "northwest",
[4] = "east",
[5] = "west",
[6] = "south",
[7] = "southeast",
[8] = "southwest",
[9] = "up",
[10] = "down",
[11] = "in",
[12] = "out",
}
function doSpeedWalk()
echo("Path we need to take: " .. table.concat(speedWalkDir, ", ") .. "\n")
echo("Rooms we'll pass through: " .. table.concat(speedWalkPath, ", ") .. "\n")
speedwalk(table.concat(speedWalkDir, " "))
end
function readNewRoom()
local info = gmcp.Room.Info
addAreaName(info.zone)
addRoom(info.num)
setRoomCoordinates(info.num, info.coord.x, info.coord.y, info.coord.z)
setRoomArea(info.num, info.zone)
centerview(info.num)
display(gmcp)
for direction,num in pairs(info.exits) do
print("Creating exit: " .. direction)
if direction == "east" then
setExitStub(info.num, exitmap.e, true)
connectExitStub(info.num, exitmap.e)
elseif direction == "west" then
setExitStub(info.num, exitmap.w, true)
connectExitStub(info.num, exitmap.w)
elseif direction == "north" then
setExitStub(info.num, exitmap.n, true)
connectExitStub(info.num, exitmap.n)
elseif direction == "south" then
setExitStub(info.num, exitmap.s, true)
connectExitStub(info.num, exitmap.s)
end
end
print("Mapper test: " .. info.zone)
end
registerAnonymousEventHandler("gmcp.Room.Info", "readNewRoom")</script>
<eventHandlerList/>
</Script>
</ScriptPackage>
</MudletPackage>