mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Updated Commands.
This commit is contained in:
parent
0c435d91c9
commit
09705bec4e
15 changed files with 302 additions and 59 deletions
|
@ -5,9 +5,10 @@ properties = {
|
|||
parameters = "sssssss",
|
||||
description =
|
||||
[[
|
||||
<zone> |
|
||||
<zone> <x> <y> <z> |
|
||||
<zone> <x> <y> <z> <privateArea> <target name>.
|
||||
Warp player or <targetname> to a location from a list, or enter a zoneID with coordinates.
|
||||
!warp <spawn list> |
|
||||
!warp <zone> <x> <y> <z> |
|
||||
!warp <zone> <x> <y> <z> <privateArea> <targetname> |
|
||||
]],
|
||||
}
|
||||
|
||||
|
@ -53,7 +54,7 @@ function onTrigger(player, argc, p1, p2, p3, p4, privateArea, name, lastName)
|
|||
local z = tonumber(applyPositionOffset(p3, player_z)) or player_z;
|
||||
|
||||
player:SendMessage(messageID, sender, string.format("setting coordinates X:%d Y:%d Z:%d within current zone (%d)", x, y, z, player_zone));
|
||||
worldManager:DoPlayerMoveInZone(player, x, y, z, 0x0F);
|
||||
worldManager:DoPlayerMoveInZone(player, x, y, z, 0, 0x00);
|
||||
else
|
||||
local zone = tonumber(applyPositionOffset(p1, player_zone)) or player_zone;
|
||||
local x = tonumber(applyPositionOffset(p2, player_x)) or player_x;
|
||||
|
@ -71,9 +72,10 @@ end;
|
|||
|
||||
function applyPositionOffset(str, offset)
|
||||
local s = str;
|
||||
print(s);
|
||||
if s:find("@") then
|
||||
s = tonumber(s:sub(s:find("@") + 1, s:len())) + offset;
|
||||
s = tonumber(s:sub(s:find("@") + 1, s:len()));
|
||||
if s then s = s + offset end;
|
||||
end
|
||||
print(s);
|
||||
return s;
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue