Repositioned LaNoscea and Shroud Aetherytes. Linked them up too. Teleporting to one now causes you to appear *near* it, and facing it.

This commit is contained in:
Filip Maj 2017-05-02 21:44:44 -04:00
parent 844f21d9a4
commit 9505cd71be
7 changed files with 98 additions and 110 deletions

View file

@ -21,6 +21,7 @@ eventGLJoin () - Ask to join party leader's leve
require ("global")
require ("aetheryte")
require ("utils")
function init(npc)
return false, false, 0, 0;
@ -29,12 +30,19 @@ end
function onEventStarted(player, aetheryte, triggerName)
aetheryteId = aetheryte:GetActorClassId();
parentNode = aetheryteParentLinks[aetheryteId];
menuChoice = callClientFunction(player, "eventAetheryteChildSelect", true, aetheryteChildLinks[aetheryteId], 100, 1);
parentNode = aetheryteChildLinks[aetheryteId];
menuChoice = callClientFunction(player, "eventAetheryteChildSelect", true, parentNode, 100, 1);
--Teleport
if (menuChoice == 2) then
printf("%ud", parentNode);
destination = aetheryteTeleportPositions[parentNode];
if (destination ~= nil) then
randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5);
rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]);
GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation);
end
--Init Levequest
elseif (menuChoice == -1) then
doLevequestInit(player, aetheryte);

View file

@ -25,6 +25,7 @@ eventGLJoin () - Ask to join party leader's leve
require ("global")
require ("aetheryte")
require ("utils")
function init(npc)
return false, false, 0, 0;
@ -38,25 +39,27 @@ function onEventStarted(player, aetheryte, triggerName)
local listPosition = 1;
local activeChildNodes = {0, 0, 0, 0, 0};
if (player:HasAetheryteNodeUnlocked(childNodes[1])) then
activeChildNodes[listPosition] = childNodes[1];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[2])) then
activeChildNodes[listPosition] = childNodes[2];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[3])) then
activeChildNodes[listPosition] = childNodes[3];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[4])) then
activeChildNodes[listPosition] = childNodes[4];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[5])) then
activeChildNodes[listPosition] = childNodes[5];
listPosition = listPosition+1;
if (childNodes ~= nil) then
if (player:HasAetheryteNodeUnlocked(childNodes[1])) then
activeChildNodes[listPosition] = childNodes[1];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[2])) then
activeChildNodes[listPosition] = childNodes[2];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[3])) then
activeChildNodes[listPosition] = childNodes[3];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[4])) then
activeChildNodes[listPosition] = childNodes[4];
listPosition = listPosition+1;
end
if (player:HasAetheryteNodeUnlocked(childNodes[5])) then
activeChildNodes[listPosition] = childNodes[5];
listPosition = listPosition+1;
end
end
local showTeleportOptions = true;
@ -82,6 +85,12 @@ function onEventStarted(player, aetheryte, triggerName)
player:SendGameMessage(player, aetheryte, 127, 0x20, 3, 5);
--Teleport to Gate
elseif (choice > 0) then
destination = aetheryteTeleportPositions[activeChildNodes[choice]];
if (destination ~= nil) then
randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5);
rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]);
GetWorldManager():DoZoneChange(player, destination[1], nil, 0, 2, randoPos.x, destination[3], randoPos.y, rotation);
end
end
end