mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
56 lines
1.3 KiB
Lua
56 lines
1.3 KiB
Lua
require("global");
|
|
|
|
properties = {
|
|
permissions = 0,
|
|
parameters = "sssss",
|
|
description = ""
|
|
}
|
|
|
|
function onTrigger(player, argc, animation, layoutId, instanceId, maxInstanceId)
|
|
instanceId = tonumber(instanceId);
|
|
|
|
if (maxInstanceId ~= nil) then
|
|
maxInstanceId = tonumber(maxInstanceId);
|
|
else
|
|
maxInstanceId = instanceId;
|
|
end
|
|
|
|
actorClassId = 5900001;
|
|
while (instanceId <= maxInstanceId) do
|
|
if (actorClassId == nil) then
|
|
player:SendMessage(0x20, "", "No actor class id provided.");
|
|
return;
|
|
end
|
|
|
|
local pos = player:GetPos();
|
|
local x = pos[1];
|
|
local y = pos[2];
|
|
local z = pos[3];
|
|
local zone = pos[5];
|
|
|
|
actorClassId = tonumber(actorClassId);
|
|
|
|
if (actorClassId ~= nil) then
|
|
zone = player.CurrentArea;
|
|
actor = zone:SpawnActor(actorClassId, "mapobj", pos[1], pos[2], pos[3], tonumber(layoutId), tonumber(instanceId));
|
|
|
|
print("test");
|
|
wait(2);
|
|
actor:PlayMapObjAnimation(player, animation);
|
|
zone:DespawnActor("mapobj");
|
|
wait(0.5);
|
|
player:SendMessage(0x20, "", "Playing animation for instance: " .. instanceId);
|
|
end
|
|
instanceId = instanceId + 1;
|
|
end
|
|
end;
|
|
--!testmapobj 5900001 421 2810 2820
|
|
|
|
--dun4 (0x19e) - Copperbell Mines
|
|
--dun1 - Mun Tuy
|
|
--dun2 - Tam Tara
|
|
--debug:_getAllCharacter("MapObjStandard")[1]
|
|
|
|
|
|
--Ferry (Thanalan, Z=-130): 5145, 252
|
|
--Ferry (La Noscea, Z=+130): 5144, 201 |