1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-22 20:57:47 +00:00

Added script to handle what happens after a dream that causes a warp. Adds a quest for Hildi ones, warps all other 3.

This commit is contained in:
Filip Maj 2019-07-27 22:43:47 -04:00
parent c753e61b62
commit 7883143089
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,37 @@
--[[
LoginEventCommand Script
Handles post-dream events.
--]]
require ("global")
function onEventStarted(player, actor, triggerName, dreamCode, innCode, narg1, narg2, bedActor)
--In Plain Sight
if (dreamCode == 1) then
player:AddQuest("Etc5g1");
warpOutOfInn(player, innCode);
--Prophecy Inspection
elseif (dreamCode == 2) then
player:AddQuest("Etc5l3");
warpOutOfInn(player, innCode);
--Nael Nightmare
elseif (dreamCode == 20) then
GetWorldManager():DoZoneChange(player, 244, nil, 0, SPAWN_NIGHTMARE, player.positionX, player.positionY, player.positionZ, player.rotation);
end
player:EndEvent();
end
function warpOutOfInn(player, innCode)
if (innCode == 1) then
GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9);
elseif (innCode == 2) then
GetWorldManager():DoZoneChange(player, 155, nil, 0, 15, 59.252, 4, -1219.342, 0.852);
elseif (innCode == 3) then
GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0);
end
end

View file

@ -131,6 +131,20 @@ CLASSID_LNC = 8;
CLASSID_THM = 22;
CLASSID_CNJ = 23;
-- SPAWNS
SPAWN_NO_ANIM = 0x00;
SPAWN_ANIM1 = 0x02;
SPAWN_RETAINER = 0x03;
SPAWN_POPMOB = 0x4;
SPAWN_UKN1 = 0x5;
SPAWN_UKN2 = 0x7;
SPAWN_LOADING1 = 0x0F;
SPAWN_LOADING2 = 0x10;
SPAWN_INSTANCE_ERROR = 0x12;
SPAWN_CHOCOBO_GET = 0x13;
SPAWN_CHOCOBO_RENTAL = 0x14;
SPAWN_CUTTER_SANDS = 0x17;
SPAWN_NIGHTMARE = 0x18;
--UTILS