144 lines
4.6 KiB
Text
144 lines
4.6 KiB
Text
-----------------------------------
|
|
-- Unlocking a Myth (Most Jobs)
|
|
-- Zalsuhm
|
|
-- !pos -33 6 -117
|
|
-----------------------------------
|
|
local ID = zones[xi.zone.LOWER_JEUNO]
|
|
-----------------------------------
|
|
|
|
quest = quest or {}
|
|
quest.unlockingMyth = quest.unlockingMyth or {}
|
|
|
|
-- There are several "Unlocking a Myth" quests. 1 per job, except GEO and RUN.
|
|
-- Possible TODO: This was not made with GEO and RUN in mind. Clamp may be needed.
|
|
function quest.unlockingMyth.getQuestId(mainJobId)
|
|
return (xi.quest.id.jeuno.UNLOCKING_A_MYTH_WARRIOR - 1 + mainJobId)
|
|
end
|
|
|
|
function quest.unlockingMyth.onTrade(player, npc, trade)
|
|
for jobID, wepId in pairs(xi.nyzul.baseWeapons) do
|
|
if npcUtil.tradeHasExactly(trade, wepId) then
|
|
local unlockingAMyth = player:getQuestStatus(xi.questLog.JEUNO, quest.unlockingMyth.getQuestId(jobID))
|
|
if unlockingAMyth == xi.questStatus.QUEST_ACCEPTED then
|
|
local wsPoints = trade:getItem(0):getWeaponskillPoints()
|
|
|
|
-- player:printToPlayer(string.format('points Accumulated: %s', wsPoints))
|
|
|
|
if wsPoints <= 50 then
|
|
player:startEvent(10091)
|
|
elseif wsPoints <= 250 then
|
|
player:startEvent(10092)
|
|
elseif wsPoints <= 8000 then
|
|
player:startEvent(10093)
|
|
elseif wsPoints >= 16000 then
|
|
player:startEvent(10088, jobID)
|
|
end
|
|
end
|
|
|
|
return
|
|
end
|
|
end
|
|
end
|
|
|
|
function quest.unlockingMyth.onTrigger(player, npc)
|
|
local mainJobId = player:getMainJob()
|
|
local unlockingAMyth = player:getQuestStatus(xi.questLog.JEUNO, quest.unlockingMyth.getQuestId(mainJobId))
|
|
local nyzulWeaponMain = xi.nyzul.isBaseWeapon(player:getEquipID(xi.slot.MAIN))
|
|
local nyzulWeaponRanged = xi.nyzul.isBaseWeapon(player:getEquipID(xi.slot.RANGED))
|
|
|
|
if unlockingAMyth == xi.questStatus.QUEST_AVAILABLE then
|
|
if player:needToZone() and player:getVar('Quest[3][102]Prog') > 0 then
|
|
player:startEvent(10090)
|
|
else
|
|
if player:getVar('Quest[3][102]Prog') > 0 then
|
|
player:setVar('Quest[3][102]Prog', 0)
|
|
end
|
|
|
|
if nyzulWeaponMain or nyzulWeaponRanged then
|
|
player:startEvent(10086, mainJobId)
|
|
else
|
|
player:startEvent(10085)
|
|
end
|
|
end
|
|
elseif unlockingAMyth == xi.questStatus.QUEST_ACCEPTED then
|
|
player:startEvent(10087)
|
|
else
|
|
player:startEvent(10089)
|
|
end
|
|
end
|
|
|
|
function quest.unlockingMyth.onEventFinish(player, csid, option, npc)
|
|
local questId = quest.unlockingMyth.getQuestId(option)
|
|
if csid == 10086 then
|
|
if option == 53 then
|
|
player:setVar('Quest[3][102]Prog', 1)
|
|
player:needToZone(true)
|
|
elseif option <= xi.job.SCH then
|
|
player:addQuest(xi.questLog.JEUNO, questId)
|
|
end
|
|
elseif csid == 10088 and option <= xi.job.SCH then
|
|
local jobs =
|
|
{
|
|
[xi.job.WAR] = xi.wsUnlock.KINGS_JUSTICE,
|
|
[xi.job.MNK] = xi.wsUnlock.ASCETICS_FURY,
|
|
[xi.job.WHM] = xi.wsUnlock.MYSTIC_BOON,
|
|
[xi.job.BLM] = xi.wsUnlock.VIDOHUNIR,
|
|
[xi.job.RDM] = xi.wsUnlock.DEATH_BLOSSOM,
|
|
[xi.job.THF] = xi.wsUnlock.MANDALIC_STAB,
|
|
[xi.job.PLD] = xi.wsUnlock.ATONEMENT,
|
|
[xi.job.DRK] = xi.wsUnlock.INSURGENCY,
|
|
[xi.job.BST] = xi.wsUnlock.PRIMAL_REND,
|
|
[xi.job.BRD] = xi.wsUnlock.MORDANT_RIME,
|
|
[xi.job.RNG] = xi.wsUnlock.TRUEFLIGHT,
|
|
[xi.job.SAM] = xi.wsUnlock.TACHI_RANA,
|
|
[xi.job.NIN] = xi.wsUnlock.BLADE_KAMU,
|
|
[xi.job.DRG] = xi.wsUnlock.DRAKESBANE,
|
|
[xi.job.SMN] = xi.wsUnlock.GARLAND_OF_BLISS,
|
|
[xi.job.BLU] = xi.wsUnlock.EXPIACION,
|
|
[xi.job.COR] = xi.wsUnlock.LEADEN_SALUTE,
|
|
[xi.job.PUP] = xi.wsUnlock.STRINGING_PUMMEL,
|
|
[xi.job.DNC] = xi.wsUnlock.PYRRHIC_KLEOS,
|
|
[xi.job.SCH] = xi.wsUnlock.OMNISCIENCE,
|
|
}
|
|
local skill = jobs[option]
|
|
|
|
player:completeQuest(xi.questLog.JEUNO, questId)
|
|
player:messageSpecial(ID.text.MYTHIC_LEARNED, player:getMainJob())
|
|
player:addLearnedWeaponskill(skill)
|
|
end
|
|
end
|
|
|
|
--[[
|
|
Floor Point
|
|
100 250
|
|
|
|
80-99 : 500 + 20(99 - x)
|
|
95 580
|
|
90 680
|
|
85 780
|
|
80 880
|
|
|
|
60-79 : 1000 + 40(79 - x)
|
|
75 1160
|
|
70 1360
|
|
65 1560
|
|
60 1760
|
|
|
|
40-59 : 2000 + 80(59 - x)
|
|
55 2320
|
|
50 2720
|
|
45 3120
|
|
40 3520
|
|
|
|
20-39 : 4000 + 160(39 - x)
|
|
35 4640
|
|
30 5440
|
|
25 6240
|
|
20 7040
|
|
|
|
01-19 : 8000 + 320 * (19 - x)
|
|
15 9280
|
|
10 10880
|
|
5 12480
|
|
0 16000
|
|
]]
|