Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 130 additions & 86 deletions mudlet-mapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,7 @@ raiseEvent("mmapper updated pdb")</script>
<name>Login</name>
<script>raiseEvent("mmp logged in", "ashyria")
mmp.game = "ashyria"
mmp.echo("We're connected to Ashyria.")</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
Expand Down Expand Up @@ -2103,6 +2104,43 @@ end</script>
</regexCodePropertyList>
</Trigger>
</TriggerGroup>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Astaria</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList />
<regexCodePropertyList />
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Login</name>
<script>raiseEvent("mmp logged in", "Astaria")
mmp.game = "astaria"</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string> The Kingdom of Astaria</string>
</regexCodeList>
<regexCodePropertyList>
<integer>3</integer>
</regexCodePropertyList>
</Trigger>
</TriggerGroup>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>Asteria</name>
<script></script>
Expand Down Expand Up @@ -7094,7 +7132,7 @@ function mmp.gotoFeature(partialFeatureName, dashtype)
return
end
raiseEvent("mmp clear externals")
mmp.gotoRoom(closestFeature, dashtype, "room")
mmp.gotoRoom(closestFeature, dashtype, "area")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this change do?

end</script>
<eventHandlerList>
<string>RoomNum</string>
Expand Down Expand Up @@ -10379,6 +10417,7 @@ end
if gmcp.Room.Info.num then
centerview(gmcp.Room.Info.num)
elseif gmcp.Room.Info.roomhash then
print(tostring(mmp.roomidFromHash(gmcp.Room.Info.roomhash)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug?

centerview(mmp.roomidFromHash(gmcp.Room.Info.roomhash))
end
end
Expand Down Expand Up @@ -10415,7 +10454,7 @@ local function makeroom(oldid, newid, x, y, z)
local fgr, fgg, fgb = unpack(color_table.red)
local bgr, bgg, bgb = unpack(color_table.blue)
highlightRoom(newid, fgr, fgg, fgb, bgr, bgg, bgb, 1, 100, 100)
if mmp.envids[gmcp.Room.Info.environment] then
if mmp.game ~= "astaria" and mmp.envids[gmcp.Room.Info.environment] then
setRoomEnv(newid, mmp.envids[gmcp.Room.Info.environment])
else
setRoomEnv(newid, getRoomEnv(oldid))
Expand Down Expand Up @@ -10479,13 +10518,28 @@ local function getshiftedcoords(original, ox, oy, oz)
y = (y or oy)
z = (z or oz) + 1
else
-- Astaria has a lot of non-standard exits that the mapper doesn't like in hash based games
-- so I have sent them into the sky, they can be manually moved by the person mapping.
if game ~= "Astaria" then
mmp.echo(
"Don't know where to shift the coordinates for a " ..
tostring(w) ..
" (" ..
tostring(original) ..
") exit. Setting to z+40"
)
x = (x or ox)
y = (y or oy)
z = (z or oz) + 40
else
mmp.echo(
"Don't know where to shift the coordinates for a " ..
tostring(w) ..
" (" ..
tostring(original) ..
") exit."
)
end
end
return x, y, z
end
Expand Down Expand Up @@ -10714,9 +10768,14 @@ function mmp.mappingNewroom(_, num)
gmcp.Room.Info.environment ..
"."
end
-- check indoors status

-- check indoors status
if mmp.game ~= "asteria" or mmp.game ~= "ashyria" then
local indoors = table.contains(gmcp.Room.Info.details, "indoors")
local indoors
if mmp.game ~= "astaria" then
indoors = table.contains(gmcp.Room.Info.details, "indoors")
else indoors = (gmcp.Room.Info.environment == "indoors")
end
if indoors and (getRoomUserData(num, "indoors") == '' or getRoomUserData(num,"outdoors") ~= '') then
setRoomUserData(num, "indoors", "y")
clearRoomUserDataItem(num, "outdoors")
Expand All @@ -10728,8 +10787,8 @@ function mmp.mappingNewroom(_, num)
end
end

-- check server area name (Achaea only for now)
if mmp.game == "achaea" then
-- check server area name (Achaea only for now, and Astaria now too)
if mmp.game == "astaria" or mmp.game == achaea then
local serverArea = gmcp.Room.Info.area
if serverArea ~= getRoomUserData(num, "Game Area") then
setRoomUserData(num, "Game Area", serverArea)
Expand Down Expand Up @@ -12148,85 +12207,70 @@ end</script>
if game ~= "Astaria" then return end
mmp.envids =
{
["field"] = 3,
-- old ones below
["a sheltered dell"] = 68,
["Arcane Temple"] = 66,
["Blackened Lands"] = 58,
["Blackstone Dungeon"] = 65,
["Blackstone Keep"] = 62,
["Constructed underground"] = 2,
["Dark Forest"] = 1,
["Deep Ocean"] = 24,
["Desert Ruins"] = 38,
["Dwarven city"] = 18,
["Forestal Council"] = 44,
["Frozen Bog"] = 76,
["Lake of Fire"] = 56,
["Natural underground"] = 3,
["Noble Bar"] = 53,
["Noble Chambers"] = 51,
["Rocky Shore"] = 77,
["Sylayan city"] = 19,
["Tainted Underground"] = 35,
["Tainted Water"] = 39,
["Underground Lake"] = 36,
["Vast Ocean"] = 26,
["Wetlands Village"] = 64,
["within a tent"] = 69,
Academia = 42,
Acropolis = 33,
Beach = 5,
Blighted = 74,
bog = 73,
Catacombs = 63,
Church = 54,
Cliffs = 67,
Crags = 32,
Desert = 6,
Docks = 30,
Farmland = 41,
Forest = 4,
Freshwater = 22,
Garden = 21,
garrison = 71,
Grasslands = 7,
Graveyard = 46,
Hills = 9,
Jungle = 17,
Mountains = 14,
Nobility = 50,
Ocean = 20,
Path = 11,
Polar = 27,
Pond = 49,
pyramid = 72,
quarry = 70,
River = 10,
Road = 12,
Ruins = 37,
Scrublands = 78,
Sewer = 23,
Swamp = 15,
Temple = 57,
Tower = 79,
transportation = 48,
Tundra = 16,
Underworld = 28,
Urban = 8,
Valley = 13,
Villa = 75,
Village = 47,
Volcano = 59,
Warrens = 31,
}

indoors = 272,
road = 259,
shallow = 262,
lake = 268,
river = 268,
deepriver = 260,
sea = 260,
waterline = 268,
swells = 268,
shallows = 268,
surf = 268,
undertoe = 268,
waves = 268,
seaswell = 268,
breakers = 268,
deepswells = 268,
reef = 268,
channel = 268,
shelf = 268,
opensea = 268,
bridge = 259,
sewer = 272,
desert = 267,
field = 258,
rocky = 259,
highlands = 259,
plain = 259,
shore = 262,
valley = 258,
forest = 258,
hills = 259,
moor = 258,
cave = 259,
badlands = 259,
deepforest = 258,
beach = 267,
jungle = 258,
swamp = 258,
mountain = 259,
peak = 259,
volcano = 257,
ud_street = 263,
ud_path = 272,
ud_rough = 272,
ud_indoors = 272,
ud_tough = 272,
dunes = 267,
sands = 267,
}
mmp.waterenvs = {}
local waterids = { "River", "Ocean", "Deep Ocean", "Vast Ocean", "Underground Lake", "Tainted Water", "Lake of Fire" }
for i = 1, #waterids do mmp.waterenvs[mmp.envids[waterids[i]]] = true end
mmp.envidsr = {}
for name, id in pairs(mmp.envids) do
mmp.envidsr[id] = name
end

mmp.colorcodes = {}
mmp.colorcodes[258] = {176, 224, 230, 255}
mmp.colorcodes[259] = {160, 82, 45, 255}

mmp.envidsr = {};
for name, id in pairs(mmp.envids) do mmp.envidsr[id] = name end
function mmp.setAstariaColorcodes()
for id, rgba in pairs(mmp.colorcodes) do
setCustomEnvColor(id, rgba[1], rgba[2], rgba[3], rgba[4])
end
end
end</script>
<eventHandlerList>
<string>mmp logged in</string>
Expand Down Expand Up @@ -13002,7 +13046,7 @@ end</script>
</ScriptGroup>
</ScriptPackage>
<KeyPackage />
<VariablePackage>
<HiddenVariables />
</VariablePackage>
<HelpPackage>
<helpURL></helpURL>
</HelpPackage>
</MudletPackage>