mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Implemented the ending portion of the guildleve.
This commit is contained in:
parent
cd0bb10ef6
commit
e5afe8791b
7 changed files with 88 additions and 0 deletions
43
data/scripts/base/chara/npc/object/GuildleveWarpPoint.lua
Normal file
43
data/scripts/base/chara/npc/object/GuildleveWarpPoint.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
--[[
|
||||
|
||||
GuildleveWarpPoint Script
|
||||
|
||||
Functions:
|
||||
|
||||
eventGuildleveReward(glId, completionTimeSec, completeReward, difficultyBonus, faction, gil???, factionBonus, RewardId1, RewardAmount1, RewardId2, RewardAmount2, difficulty) - Open Reward Dialog
|
||||
eventTalkGuildleveWarp(returnAetheryteID1, returnAetheryte2) - Opens choice menu
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
require ("aetheryte")
|
||||
require ("utils")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc, triggerName)
|
||||
local currentGLDirector = player:GetGuildleveDirector();
|
||||
local glData = currentGLDirector.guildleveData;
|
||||
|
||||
callClientFunction(player, "eventGuildleveReward", currentGLDirector.guildleveId, 0x26, 24, 24, 0, 0, 0, 0, 0, 0, 0, 4);
|
||||
|
||||
local choice = callClientFunction(player, "eventTalkGuildleveWarp", glData.aetheryte, 0);
|
||||
|
||||
if (choice == 3) then
|
||||
local destination = aetheryteTeleportPositions[glData.aetheryte];
|
||||
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);
|
||||
currentGLDirector:EndDirector();
|
||||
end
|
||||
elseif (choice == 4) then
|
||||
currentGLDirector:EndDirector();
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
--50023: GL COMPLETE!
|
||||
--50132: You earn faction credits from X
|
|
@ -28,5 +28,10 @@ function main(thisDirector)
|
|||
thisDirector:UpdateAimNumNow(0, 2);
|
||||
wait(3);
|
||||
thisDirector:UpdateAimNumNow(0, 3);
|
||||
wait(3);
|
||||
thisDirector:UpdateAimNumNow(0, 4);
|
||||
|
||||
wait(2);
|
||||
thisDirector:EndGuildleve(true);
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue