1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 12:47:46 +00:00
project-meteor-server/Data/scripts/commands/gm/testmapobj.lua
CuriousJorge a7b1b79461 Hildibrand series of quests all in. Requires inn dream handling and some retail accuracy double-checking to finish it off. Misc script fixes also.
===============================
Nudgenpc.lua    - Added a command variation
Testmapobj.lua - Added !help documentation
DftWil.lua            - Corrected an npc name/function
Player.cs             - Changed Dalamud packet to default to 7, not 0.  Fixes the moon not displaying in a specific Hildibrand cutscene
Etc5g0.lua          - Made quest accepting retail-accurate with how it displayed messages/ended the TalkEvent
Etc5g1.lua          - Added Bed !.  Kinda kludged in atm since it's a pre-accepted quest state.
Etc5u1.lua          - Same as above
Etc5l1.lua           - Quest "Private Eyes" scripted.
Etc5l2.lua           - Quest "Mysteries of the Red Moon" scripted
Etc5l3.lua           - Quest "Prophecy Inspection" scripted
2022-04-13 11:45:49 -04:00

61 lines
No EOL
1.4 KiB
Lua

require("global");
properties = {
permissions = 0,
parameters = "sssss",
description =
[[
Tests a layout/region id w/ an animation string
!testmapobj <anim> <region> <layout> <maxlayout>
]],
}
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