mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-12 07:24:37 +02:00
Add equip ability functions
Fix EquipAbility SQL query
This commit is contained in:
parent
247b5ca709
commit
efdec5e472
239 changed files with 3474 additions and 1086 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, currentGLDirector.completionTime, 24, 24, 0, 0, 0, 0, 0, 0, 0, currentGLDirector.selectedDifficulty);
|
||||
|
||||
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
|
|
@ -22,16 +22,40 @@ eventGLJoin () - Ask to join party leader's leve
|
|||
require ("global")
|
||||
require ("aetheryte")
|
||||
require ("utils")
|
||||
require ("guildleve")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, aetheryte, triggerName)
|
||||
function onEventStarted(player, aetheryte, triggerName)
|
||||
|
||||
if (player:GetGuildleveDirector() ~= nil) then
|
||||
doGuildleveMenu(player, aetheryte);
|
||||
else
|
||||
doNormalMenu(player, aetheryte);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
aetheryteId = aetheryte:GetActorClassId();
|
||||
parentNode = aetheryteChildLinks[aetheryteId];
|
||||
menuChoice = callClientFunction(player, "eventAetheryteChildSelect", true, parentNode, 100, 1);
|
||||
function doGuildleveMenu(player, aetheryte)
|
||||
|
||||
local currentGLDirector = player:GetGuildleveDirector();
|
||||
local choice = callClientFunction(player, "eventGLPlay", currentGLDirector.guildleveId, true, 1, 500, 400, guardian, 8, currentGLDirector.selectedDifficulty, 2);
|
||||
|
||||
--Abandon
|
||||
if (choice == 6) then
|
||||
currentGLDirector:AbandonGuildleve();
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function doNormalMenu(player, aetheryte)
|
||||
|
||||
local aetheryteId = aetheryte:GetActorClassId();
|
||||
local parentNode = aetheryteChildLinks[aetheryteId];
|
||||
local menuChoice = callClientFunction(player, "eventAetheryteChildSelect", true, parentNode, 100, 1);
|
||||
|
||||
--Teleport
|
||||
if (menuChoice == 2) then
|
||||
|
@ -57,22 +81,36 @@ function onEventStarted(player, aetheryte, triggerName)
|
|||
player:SendGameMessage(player, aetheryte, 29, 0x20, 2, 10);
|
||||
player:SendGameMessage(player, aetheryte, 30, 0x20, 3, 5);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function doLevequestInit(player, aetheryte)
|
||||
local worldMaster = GetWorldMaster();
|
||||
::SELECT_LOOP::
|
||||
unknown, glId = callClientFunction(player, "eventGLSelect", 0x0);
|
||||
if (glId ~= 0) then
|
||||
::SELECT_DETAIL::
|
||||
unknown, begin = callClientFunction(player, "eventGLSelectDetail", glId, 0xa, 0xf4241, 1000, 0, 0, 0, true, false);
|
||||
guildleveData = GetGuildleveGamedata(glId);
|
||||
|
||||
if (guildleveData == nil) then
|
||||
player:SendMessage(0x20, "", "An error has occured... aborting.");
|
||||
return;
|
||||
end
|
||||
|
||||
unknown, begin = callClientFunction(player, "eventGLSelectDetail", glId, 0xa, 0xf4241, 1000, 0, 0, 0, true, false);
|
||||
if (begin) then
|
||||
::SELECT_DIFFICULTY::
|
||||
player:SendGameMessage(worldMaster, 50014, 0x20); --"Please select a difficulty level. This may be lowered later."
|
||||
difficulty = callClientFunction(player, "eventGLDifficulty", glId);
|
||||
if (difficulty == nil) then goto SELECT_DETAIL; end
|
||||
confirmResult = callClientFunction(player, "eventGLStart", glId, difficulty, 1, 10, 20, 0, 0, 0, 0);
|
||||
if (confirmResult == nil) then goto SELECT_DIFFICULTY; else
|
||||
|
||||
player:SendGameMessage(worldMaster, 50036, 0x20, glId, player);
|
||||
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, true));
|
||||
director = player:GetZone():CreateGuildleveDirector(glId, difficulty, player);
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(true, glId)
|
||||
|
||||
end
|
||||
else
|
||||
goto SELECT_LOOP;
|
||||
|
|
|
@ -11,9 +11,8 @@ eventGLSelect(?) - Open GL selector
|
|||
eventGLSelectDetail(glid, ?, reward, rewardQuantity, subreward, subrewardQuantity, faction, ?, completed) - Show GL details
|
||||
eventGLDifficulty() - Open difficulty selector
|
||||
eventGLStart(glId, difficulty, evaluatingFaction, areaFactionStanding, factionReward, warningBoundByDuty, warningTooFar, warningYouCannotRecieve, warningChangingClass) - Confirmation dialog
|
||||
|
||||
eventGLBoost(currentFavor, minNeeded) - Ask player for Guardian Aspect
|
||||
eventGLPlay(??) - Open Menu (GL active version)
|
||||
eventGLPlay(glId, showLeveLink, leveLinkFaction, leveLinkFactionStanding, leveLinkReward, guardianFavorAmount, guardianFavorNeeded, currentDifficulty, jobNameForChange) - Open Menu (GL active version)
|
||||
eventGLReward (glId, clearTime, missionBonus, difficultyBonus, factionNumber, factionBonus, factionCredit, reward, rewardQuantity, subreward, subrewardQuantity, difficulty) - Open reward window
|
||||
eventGLJoin () - Ask to join party leader's leve
|
||||
|
||||
|
@ -26,13 +25,37 @@ eventGLJoin () - Ask to join party leader's leve
|
|||
require ("global")
|
||||
require ("aetheryte")
|
||||
require ("utils")
|
||||
require ("guildleve")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, aetheryte, triggerName)
|
||||
|
||||
|
||||
if (player:GetGuildleveDirector() ~= nil) then
|
||||
doGuildleveMenu(player, aetheryte);
|
||||
else
|
||||
doNormalMenu(player, aetheryte);
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function doGuildleveMenu(player, aetheryte)
|
||||
|
||||
local currentGLDirector = player:GetGuildleveDirector();
|
||||
local choice = callClientFunction(player, "eventGLPlay", currentGLDirector.guildleveId, true, 1, 500, 400, guardian, 8, currentGLDirector.selectedDifficulty, 2);
|
||||
|
||||
--Abandon
|
||||
if (choice == 6) then
|
||||
currentGLDirector:AbandonGuildleve();
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function doNormalMenu(player, aetheryte)
|
||||
local aetheryteId = aetheryte:GetActorClassId();
|
||||
local childNodes = aetheryteParentLinks[aetheryteId];
|
||||
|
||||
|
@ -93,23 +116,36 @@ function onEventStarted(player, aetheryte, triggerName)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
player:EndEvent();
|
||||
|
||||
end
|
||||
|
||||
function doLevequestInit(player, aetheryte)
|
||||
local worldMaster = GetWorldMaster();
|
||||
::SELECT_LOOP::
|
||||
unknown, glId = callClientFunction(player, "eventGLSelect", 0x0);
|
||||
if (glId ~= 0) then
|
||||
::SELECT_DETAIL::
|
||||
guildleveData = GetGuildleveGamedata(glId);
|
||||
|
||||
if (guildleveData == nil) then
|
||||
player:SendMessage(0x20, "", "An error has occured... aborting.");
|
||||
return;
|
||||
end
|
||||
|
||||
unknown, begin = callClientFunction(player, "eventGLSelectDetail", glId, 0xa, 0xf4241, 1000, 0, 0, 0, true, false);
|
||||
if (begin) then
|
||||
::SELECT_DIFFICULTY::
|
||||
player:SendGameMessage(worldMaster, 50014, 0x20); --"Please select a difficulty level. This may be lowered later."
|
||||
difficulty = callClientFunction(player, "eventGLDifficulty", glId);
|
||||
if (difficulty == nil) then goto SELECT_DETAIL; end
|
||||
confirmResult = callClientFunction(player, "eventGLStart", glId, difficulty, 1, 10, 20, 0, 0, 0, 0);
|
||||
confirmResult = callClientFunction(player, "eventGLStart", glId, difficulty, 1, guildleveData.favorCount, 20, 0, 0, 0, 0);
|
||||
if (confirmResult == nil) then goto SELECT_DIFFICULTY; else
|
||||
|
||||
player:SendGameMessage(worldMaster, 50036, 0x20, glId, player);
|
||||
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, true));
|
||||
director = player:GetZone():CreateGuildleveDirector(glId, difficulty, player);
|
||||
player:AddDirector(director);
|
||||
director:StartDirector(true, glId)
|
||||
|
||||
end
|
||||
else
|
||||
goto SELECT_LOOP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue