diff --git a/Data/scripts/commands/LoginEventCommand.lua b/Data/scripts/commands/LoginEventCommand.lua index 7236d434..88d29680 100644 --- a/Data/scripts/commands/LoginEventCommand.lua +++ b/Data/scripts/commands/LoginEventCommand.lua @@ -20,18 +20,24 @@ function onEventStarted(player, actor, triggerName, dreamCode, innCode, narg1, n 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); + warpOutOfInn(player, innCode, true); end player:EndEvent(); end -function warpOutOfInn(player, innCode) +function warpOutOfInn(player, innCode, isNightmare) + local spawnCode = SPAWN_NO_ANIM; + + if (isNightmare) then + spawnCode = SPAWN_NIGHTMARE; + end + if (innCode == 1) then - GetWorldManager():DoZoneChange(player, 133, nil, 0, 15, -444.266, 39.518, 191, 1.9); + GetWorldManager():DoZoneChange(player, 133, nil, 0, spawnCode, -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); + GetWorldManager():DoZoneChange(player, 155, nil, 0, spawnCode, 59.252, 4, -1219.342, 0.852); elseif (innCode == 3) then - GetWorldManager():DoZoneChange(player, 209, nil, 0, 15, -110.157, 202, 171.345, 0); + GetWorldManager():DoZoneChange(player, 209, nil, 0, spawnCode, -110.157, 202, 171.345, 0); end end \ No newline at end of file