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