diff --git a/scripts/globals/mobskills/reprobation.lua b/scripts/globals/mobskills/reprobation.lua new file mode 100644 index 00000000000..05b6169ea36 --- /dev/null +++ b/scripts/globals/mobskills/reprobation.lua @@ -0,0 +1,31 @@ +--------------------------------------------- +-- Reprobation +-- +-- Description: Dispels all buffs from targets in area of effect, including food. +-- Type: Enfeebling +-- Utsusemi/Blink absorb: Dispels shadows +-- Range: Area of Effect +-- Notes: +--------------------------------------------- +require("scripts/globals/monstertpmoves") +require("scripts/globals/settings") +require("scripts/globals/status") +require("scripts/globals/msg") +--------------------------------------------- + +function onMobSkillCheck(target,mob,skill) + return 0 +end + +function onMobWeaponSkill(target, mob, skill) + local dispel = target:dispelAllStatusEffect(bit.bor(tpz.effectFlag.DISPELABLE, tpz.effectFlag.FOOD)) + local msg = tpz.msg.basic.SKILL_NO_EFFECT + + if dispel > 0 then + msg = tpz.msg.basic.DISAPPEAR_NUM + end + + skill:setMsg(msg) + + return dispel +end diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index 5419fc26142..b738a193228 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -656,7 +656,7 @@ tpz.quest.id = ROCK_BOTTOM = 20, BEGINNINGS = 21, -- + -- OMENS = 22, -- + -- - TRANSFORMATIONS = 23, + TRANSFORMATIONS = 23, -- + -- EQUIPPED_FOR_ALL_OCCASIONS = 24, -- + -- NAVIGATING_THE_UNFRIENDLY_SEAS = 25, -- + -- AGAINST_ALL_ODDS = 26, diff --git a/scripts/zones/Aht_Urhgan_Whitegate/IDs.lua b/scripts/zones/Aht_Urhgan_Whitegate/IDs.lua index 8bf9f335c14..79a11e9cf1e 100644 --- a/scripts/zones/Aht_Urhgan_Whitegate/IDs.lua +++ b/scripts/zones/Aht_Urhgan_Whitegate/IDs.lua @@ -21,6 +21,7 @@ zones[tpz.zone.AHT_URHGAN_WHITEGATE] = HOMEPOINT_SET = 1366, -- Home point set! IMAGE_SUPPORT_ACTIVE = 1405, -- You have to wait a bit longer before asking for synthesis image support again. IMAGE_SUPPORT = 1407, -- Your [fishing/woodworking/smithing/goldsmithing/clothcraft/leatherworking/bonecraft/alchemy/cooking] skills went up [a little/ever so slightly/ever so slightly]. + GATE_IS_FIRMLY_CLOSED = 1424, -- The gate is firmly closed... ITEM_OBTAINEDX = 1497, -- You obtain ! RUNIC_PORTAL = 4584, -- You cannot use the runic portal without the Empire's authorization. UGRIHD_PURCHASE_DIALOGUE = 4645, -- Salaheem's Sentinels values your contribution to the success of the company. Please come again! diff --git a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Imperial_Whitegate.lua b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Imperial_Whitegate.lua index 44af7ca588a..9ee17219f85 100644 --- a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Imperial_Whitegate.lua +++ b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Imperial_Whitegate.lua @@ -16,36 +16,41 @@ function onTrade(player,npc,trade) end function onTrigger(player,npc) - if player:getEquipID(tpz.slot.MAIN) == 0 and player:getEquipID(tpz.slot.SUB) == 0 then - if player:getCurrentMission(TOAU) == tpz.mission.id.toau.GUESTS_OF_THE_EMPIRE and player:getCharVar("AhtUrganStatus") == 1 and - doRoyalPalaceArmorCheck(player) == true then - player:startEvent(3078,0,1,0,0,0,0,0,1,0) - elseif player:getCurrentMission(TOAU) == tpz.mission.id.toau.SEAL_OF_THE_SERPENT then - player:startEvent(3111) - elseif player:getCurrentMission(TOAU) == tpz.mission.id.toau.IMPERIAL_CORONATION and - doRoyalPalaceArmorCheck(player) == true then - player:startEvent(3140,tpz.besieged.getMercenaryRank(player),player:getTitle(),0,0,0,0,0,0,0) - elseif player:getCurrentMission(TOAU) >= tpz.mission.id.toau.IMPERIAL_CORONATION and - doRoyalPalaceArmorCheck(player) == true then - local ring = player:getCharVar("TOAU_RINGTIME") - local standard = player:hasItem(129) + local noWeapons = player:getEquipID(tpz.slot.MAIN) == 0 and player:getEquipID(tpz.slot.SUB) == 0 + if player:getCurrentMission(TOAU) == tpz.mission.id.toau.GUESTS_OF_THE_EMPIRE and player:getCharVar("AhtUrganStatus") == 1 and + doRoyalPalaceArmorCheck(player) and noWeapons then + player:startEvent(3078,0,1,0,0,0,0,0,1,0) + elseif player:getCurrentMission(TOAU) == tpz.mission.id.toau.SEAL_OF_THE_SERPENT and noWeapons then + player:startEvent(3111) + elseif player:getCurrentMission(TOAU) == tpz.mission.id.toau.IMPERIAL_CORONATION and + doRoyalPalaceArmorCheck(player) and noWeapons then + player:startEvent(3140,tpz.besieged.getMercenaryRank(player),player:getTitle(),0,0,0,0,0,0,0) + elseif player:getCurrentMission(TOAU) >= tpz.mission.id.toau.IMPERIAL_CORONATION and + doRoyalPalaceArmorCheck(player) and noWeapons then + local ring = player:getCharVar("TOAU_RINGTIME") + local standard = player:hasItem(129) - local ringParam = 0 + local ringParam = 0 - if ring == 0 then - ringParam = 1 - end + if ring == 0 then + ringParam = 1 + end - local standardParam = 0 + local standardParam = 0 - if standard == false then - standardParam = 1 - end + if standard == false then + standardParam = 1 + end - if ringParam > 0 or standardParam > 0 then - player:startEvent(3155,standardParam,ringParam,0,0,0,0,0,0,0) - end + if ringParam > 0 or standardParam > 0 then + player:startEvent(3155,standardParam,ringParam,0,0,0,0,0,0,0) end + + -- TRANSFORMATIONS + elseif player:getCharVar("TransformationsProgress") == 1 then + player:startEvent(722) + else + player:messageSpecial(ID.text.GATE_IS_FIRMLY_CLOSED) end end @@ -85,5 +90,9 @@ function onEventFinish(player,csid,option) player:setCharVar("TOAU_RINGRECV", 0) elseif csid == 3155 and option == 6 then npcUtil.giveItem(player,129) + elseif csid == 722 then + player:addQuest(AHT_URHGAN, tpz.quest.id.ahtUrhgan.TRANSFORMATIONS) + player:setCharVar("TransformationsProgress", 2) + player:setCharVar("[BLUAF]Remaining", 7) -- Player can now craft BLU armor end end diff --git a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Lathuya.lua b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Lathuya.lua index 54438aea112..91705a3bc67 100644 --- a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Lathuya.lua +++ b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Lathuya.lua @@ -1,4 +1,4 @@ ------------------------------------ + ----------------------------------- -- Area: Aht Urhgan Whitegate -- NPC: Lathuya -- Standard Info NPC @@ -9,37 +9,142 @@ require("scripts/globals/quests") require("scripts/globals/npc_util") ----------------------------------- +local craftingItems = { + [1] = -- magus bazubands + { + materials = {754, 828, 879, 4158}, + currency = 2186, + currencyAmt = 2, + result = 14928 + }, + [2] = -- magus shalwar + { + materials = {761, 828, 2175, 2340}, + currency = 2186, + currencyAmt = 2, + result = 15600 + }, + [3] = -- magus jubbah + { + materials = {828, 2229, 2288, 2340}, + currency = 2186, + currencyAmt = 4, + result = 14521 + } +} + function onTrade(player, npc, trade) + local remainingBLUAF = player:getCharVar("[BLUAF]Remaining") -- Bitmask of AF the player has NOT crafted + if remainingBLUAF >= 1 then + local craftingStage = player:getCharVar("[BLUAF]CraftingStage") + local totalCraftedPieces = 3 - player:countMaskBits(remainingBLUAF) + local AFoffset = 8 * totalCraftedPieces + + local item = craftingItems[player:getCharVar("[BLUAF]Current")] + if item then + if craftingStage == 0 and npcUtil.tradeHasExactly(trade, item.materials) then + player:startEvent(732 + AFoffset, item.result, item.currency, item.currencyAmt) + elseif craftingStage == 1 and npcUtil.tradeHasExactly(trade, {{item.currency, item.currencyAmt}}) then + player:startEvent(734 + AFoffset, 0, item.currency, item.currencyAmt) + end + end + end end function onTrigger(player, npc) local omensProgress = player:getCharVar("OmensProgress") local omens = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.OMENS) + local transformations = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.TRANSFORMATIONS) -- OMENS - if omens >= QUEST_ACCEPTED then + if omens == QUEST_ACCEPTED then if omensProgress == 3 then player:startEvent(714) -- Tells Master location elseif omensProgress == 4 then player:startEvent(715) -- Reminder of master location elseif omensProgress == 5 then player:startEvent(716) -- Master spoken to - elseif omens == QUEST_COMPLETED then - player:startEvent(771) -- Default dialog end - -- DEFAULT DIALOG + -- CRAFTING OTHER 3 BLUE MAGE ARMOR PIECES + elseif transformations >= QUEST_ACCEPTED then + local remainingBLUAF = player:getCharVar("[BLUAF]Remaining") -- Bitmask of AF the player has NOT crafted + local totalCraftedPieces = 3 - player:countMaskBits(remainingBLUAF) + local currentTask = player:getCharVar("[BLUAF]Current") + local craftingStage = player:getCharVar("[BLUAF]CraftingStage") + local AFoffset = 8 * totalCraftedPieces + + if currentTask == 0 and totalCraftedPieces ~= 3 then + if vanaDay() > player:getCharVar("[BLUAF]RestingDay") then + if totalCraftedPieces == 2 then + currentTask = math.floor(remainingBLUAF / 2) + 1 + player:startEvent(746, 0, 0, 0, 0, 0, 0, 0, currentTask) + else + -- Will prompt for choosing which armor to work on + player:startEvent(730 + AFoffset, 7 - player:getCharVar("[BLUAF]Remaining")) + end + else + player:startEvent(737 + (AFoffset - 8)) -- Asleep message, wait until 1 day passes + end + elseif currentTask > 0 then + local pickupReady = vanaDay() > player:getCharVar("[BLUAF]PaymentDay") + local item = craftingItems[currentTask] + if craftingStage == 0 then + player:startEvent(731 + AFoffset, 0, item.currency, item.currencyAmt) + elseif craftingStage == 1 then + player:startEvent(733 + AFoffset, item.result, item.currency, item.currencyAmt) + elseif craftingStage == 2 and not pickupReady then + player:startEvent(735 + AFoffset) + elseif craftingStage == 2 and pickupReady then + player:startEvent(736 + AFoffset, item.result) + end + elseif totalCraftedPieces == 3 then + player:startEvent(753) -- Dialogue after crafting all BLU AF + end + + elseif omens == QUEST_COMPLETED then + player:startEvent(718) else - player:startEvent(770) + player:startEvent(770) -- Default dialogue end end function onEventUpdate(player, csid, option) + local remainingBLUAF = player:getCharVar("[BLUAF]Remaining") -- Bitmask of AF the player has NOT crafted + local totalCraftedPieces = 3 - player:countMaskBits(remainingBLUAF) + local AFoffset = 8 * totalCraftedPieces + + if csid == 730 + AFoffset then + if option >= 2 and option <= 9 then + local currentTask = player:getCharVar("[BLUAF]Current") + local updateType = option % 3 + if updateType == 2 then + -- Choosing a piece + local piece = math.floor(option / 4) + 1 + local pieceMask = math.pow(2, (piece - 1)) + -- Make sure the player isn't trying to cheat somehow + if bit.band(pieceMask, player:getCharVar("[BLUAF]Remaining")) > 0 then + player:setCharVar("[BLUAF]Current", piece) + local item = craftingItems[piece] + player:updateEvent(0, unpack(item.materials)) + end + else + -- Needs payment + local item = craftingItems[currentTask] + player:updateEvent(0, item.currency, item.currencyAmt) + end + end + end end function onEventFinish(player, csid, option) local omensProgress = player:getCharVar("OmensProgress") + local remainingBLUAF = player:getCharVar("[BLUAF]Remaining") -- Bitmask of AF the player has NOT crafted + local totalCraftedPieces = 3 - player:countMaskBits(remainingBLUAF) + local currentTask = player:getCharVar("[BLUAF]Current") + local AFoffset = 8 * totalCraftedPieces + -- OMENS if csid == 714 and omensProgress == 3 then player:setCharVar("OmensProgress", 4) @@ -50,5 +155,32 @@ function onEventFinish(player, csid, option) var = { OmensProgress } }) player:delKeyItem(tpz.ki.SEALED_IMMORTAL_ENVELOPE) + + -- BLU AF CRAFTING + elseif csid == 732 + AFoffset then + player:setCharVar("[BLUAF]CraftingStage", 1) + player:confirmTrade() + elseif csid == 734 + AFoffset then + player:confirmTrade() + player:setCharVar("[BLUAF]CraftingStage", 2) + player:setCharVar("[BLUAF]PaymentDay", vanaDay()) + npcUtil.giveKeyItem(player, tpz.ki.MAGUS_ORDER_SLIP) + elseif csid == 736 + AFoffset then + if npcUtil.giveItem(player, craftingItems[currentTask].result) then + remainingBLUAF = remainingBLUAF - math.pow(2, (currentTask - 1)) + player:setCharVar("[BLUAF]Remaining", remainingBLUAF) + player:setCharVar("[BLUAF]PaymentDay", 0) + player:setCharVar("[BLUAF]CraftingStage", 0) + player:setCharVar("[BLUAF]Current", 0) + + if player:getCharVar("[BLUAF]Remaining") == 0 then + -- Player is finished with Lathuya + player:setCharVar("[BLUAF]RestingDay", 0) + else + player:setCharVar("[BLUAF]RestingDay", vanaDay()) + end + + player:delKeyItem(tpz.ki.MAGUS_ORDER_SLIP) + end end end \ No newline at end of file diff --git a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Waoud.lua b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Waoud.lua index e67099c3558..aa753f5486d 100644 --- a/scripts/zones/Aht_Urhgan_Whitegate/npcs/Waoud.lua +++ b/scripts/zones/Aht_Urhgan_Whitegate/npcs/Waoud.lua @@ -30,10 +30,13 @@ function onTrigger(player, npc) local divinationReady = vanaDay() > player:getCharVar("LastDivinationDay") local beginnings = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.BEGINNINGS) local omens = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.OMENS) + local transformations = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.TRANSFORMATIONS) + local transformationsProgress = player:getCharVar("TransformationsProgress") + local currentJob = player:getMainJob() local waoudNeedToZone = player:getLocalVar("WaoudNeedToZone") -- AN EMPTY VESSEL - if ENABLE_TOAU == 1 and anEmptyVessel == QUEST_AVAILABLE and anEmptyVesselProgress <= 1 and player:getMainLvl() >= ADVANCED_JOB_LEVEL then + if anEmptyVessel == QUEST_AVAILABLE and anEmptyVesselProgress <= 1 and player:getMainLvl() >= ADVANCED_JOB_LEVEL then if divinationReady then player:startEvent(60, player:getGil()) -- you must answer these 10 questions else @@ -54,13 +57,15 @@ function onTrigger(player, npc) -- BEGINNINGS elseif anEmptyVessel == QUEST_COMPLETED and beginnings == QUEST_AVAILABLE and player:getCurrentMission(TOAU) > tpz.mission.id.toau.IMMORTAL_SENTRIES - and player:getMainJob() == tpz.job.BLU and player:getMainLvl() >= AF1_QUEST_LEVEL then - if not divinationReady then - player:startEvent(63) - elseif waoudNeedToZone == 1 then - player:startEvent(78, player:getGil()) -- dummy questions, costs you 1000 gil + and currentJob == tpz.job.BLU and player:getMainLvl() >= AF1_QUEST_LEVEL then + if divinationReady then + if waoudNeedToZone == 1 then + player:startEvent(78, player:getGil()) -- dummy questions, costs you 1000 gil + else + player:startEvent(705) -- start Beginnings + end else - player:startEvent(705, player:getGil()) -- start AF1 quest + player:startEvent(63) end elseif beginnings == QUEST_ACCEPTED then local brand1 = player:hasKeyItem(tpz.ki.BRAND_OF_THE_SPRINGSERPENT) @@ -75,13 +80,15 @@ function onTrigger(player, npc) end -- OMENS - elseif beginnings == QUEST_COMPLETED and omens == QUEST_AVAILABLE and player:getMainJob() == tpz.job.BLU and player:getMainLvl() >= AF2_QUEST_LEVEL then - if not divinationReady then - player:startEvent(63) - elseif waoudNeedToZone == 1 then - player:startEvent(78, player:getGil()) -- dummy questions, costs you 1000 gil + elseif beginnings == QUEST_COMPLETED and omens == QUEST_AVAILABLE and currentJob == tpz.job.BLU and player:getMainLvl() >= AF2_QUEST_LEVEL then + if divinationReady then + if waoudNeedToZone == 1 then + player:startEvent(78, player:getGil()) -- dummy questions, costs you 1000 gil + else + player:startEvent(710) -- start Omens + end else - player:startEvent(710) -- start AF2 quest + player:startEvent(63) end elseif omens == QUEST_ACCEPTED then if player:getCharVar("OmensProgress") == 1 then @@ -92,7 +99,28 @@ function onTrigger(player, npc) player:startEvent(713, player:getGil()) -- clue about location of armour piece, costs you 1000 gil end + -- TRANSFORMATIONS + elseif omens == QUEST_COMPLETED and transformations == QUEST_AVAILABLE and currentJob == tpz.job.BLU then + if divinationReady then + if waoudNeedToZone == 1 then + player:startEvent(78, player:getGil()) -- dummy questions, costs you 1000 gil + elseif transformationsProgress == 1 then + player:startEvent(721, player:getGil()) + else + player:startEvent(720, player:getGil()) -- starts Transformations + end + else + player:startEvent(63) + end + elseif transformations == QUEST_ACCEPTED then + player:startEvent(723, player:getGil()) -- clue about possible route to take, costs you 1000 gil -- DEFAULT DIALOG + elseif anEmptyVessel == QUEST_COMPLETED then + if divinationReady then + player:startEvent(78, player:getGil()) -- dummy questions, costs you 1000 gil + else + player:startEvent(63) + end else player:startEvent(61) end @@ -144,7 +172,9 @@ end function onEventFinish(player, csid, option) local beginnings = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.BEGINNINGS) + local omens = player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.OMENS) local omensProgress = player:getCharVar("OmensProgress") + local transformationsProgress = player:getCharVar("TransformationsProgress") -- AN EMPTY VESSEL if csid == 60 then @@ -195,5 +225,16 @@ function onEventFinish(player, csid, option) elseif csid == 713 and option == 1 and omensProgress == 3 and player:getGil() >= 1000 then player:delGil(1000) player:messageSpecial(ID.text.PAY_DIVINATION) -- You pay 1000 gil for the divination. + + -- TRANSFORMATIONS + elseif (csid == 720 or csid == 721) and option == 1 and player:getGil() >= 1000 then + if csid == 720 then + player:setCharVar("TransformationsProgress", 1) + end + player:delGil(1000) + player:messageSpecial(ID.text.PAY_DIVINATION) -- You pay 1000 gil for the divination. + elseif csid == 723 and option == 1 and TransformationsProgress == 2 and player:getGil() >= 1000 then + player:delGil(1000) + player:messageSpecial(ID.text.PAY_DIVINATION) -- You pay 1000 gil for the divination. end end \ No newline at end of file diff --git a/scripts/zones/Alzadaal_Undersea_Ruins/IDs.lua b/scripts/zones/Alzadaal_Undersea_Ruins/IDs.lua index 14b95d794e6..790fc846221 100644 --- a/scripts/zones/Alzadaal_Undersea_Ruins/IDs.lua +++ b/scripts/zones/Alzadaal_Undersea_Ruins/IDs.lua @@ -21,6 +21,7 @@ zones[tpz.zone.ALZADAAL_UNDERSEA_RUINS] = CANNOT_LEAVE = 7220, -- You cannot leave this area while in the possession of . RESPONSE = 7229, -- There is no response... DEVICE_MALFUNCTIONING = 7245, -- The device appears to be malfunctioning... + NOTHING_OUT_OF_ORDINARY = 7425, -- There is nothing out of the ordinary here. CANNOT_ENTER = 7441, -- You cannot enter at this time. Please wait a while before trying again. AREA_FULL = 7442, -- This area is fully occupied. You were unable to enter. MEMBER_NO_REQS = 7446, -- Not all of your party members meet the requirements for this objective. Unable to enter area. @@ -34,6 +35,7 @@ zones[tpz.zone.ALZADAAL_UNDERSEA_RUINS] = }, mob = { + NEPIONIC_SOULFLAYER = 17072129, COOKIEDUSTER_LIPIROON_PH = { [17072142] = 17072150, @@ -43,11 +45,13 @@ zones[tpz.zone.ALZADAAL_UNDERSEA_RUINS] = CHEESE_HOARDER_GIGIROON = 17072172, ARMED_GEARS = 17072178, WULGARU = 17072179, + }, npc = { RUNIC_PORTAL_NORTH = 17072236, RUNIC_PORTAL_SOUTH = 17072237, + NEPIONIC_QM = 17072271, }, } diff --git a/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua b/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua index b95b2c24f80..030c33889b5 100644 --- a/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua +++ b/scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua @@ -34,7 +34,9 @@ function onInitialize(zone) zone:registerRegion(20, 550, -2, 522, 557, 0, 529) -- map 11 west porter (white) zone:registerRegion(21,-556, -2,-489,-550, 0,-483) -- map 12 east porter (white) zone:registerRegion(22,-610, -2,-489,-603, 0,-483) -- map 12 west porter (blue) - zone:registerRegion(23,382, -1,-582,399, 1,-572) -- mission 9 TOAU + zone:registerRegion(23, 382, -1,-582, 399, 1,-572) -- mission 9 TOAU + zone:registerRegion(24, 52, -1, 774, 67, 1, 778) -- transformations (quest) + zone:registerRegion(25, 134, -1,-584, 146, 1,-577) -- transformations (quest) end function onZoneIn(player,prevZone) @@ -63,6 +65,7 @@ function afterZoneIn(player) end function onRegionEnter(player,region) + switch (region:GetRegionID()): caseof { [1] = function (x) @@ -136,6 +139,16 @@ function onRegionEnter(player,region) player:startEvent(1, tpz.besieged.getMercenaryRank(player)) end end, + [24] = function (x) + if player:getCharVar("TransformationsProgress") == 2 then + player:startEvent(2) + end + end, + [25] = function (x) + if player:getCharVar("TransformationsProgress") == 3 then + player:startEvent(3) + end + end, } end @@ -158,11 +171,17 @@ function onEventUpdate(player,csid,option) end function onEventFinish(player,csid,option) + local transformationsProgress = player:getCharVar("TransformationsProgress") + if csid == 1 then player:addKeyItem(tpz.ki.ASTRAL_COMPASS) player:completeMission(TOAU,tpz.mission.id.toau.UNDERSEA_SCOUTING) player:addMission(TOAU,tpz.mission.id.toau.ASTRAL_WAVES) player:messageSpecial(ID.text.KEYITEM_OBTAINED,tpz.ki.ASTRAL_COMPASS) + elseif csid == 2 then + player:setCharVar("TransformationsProgress", 3) + elseif csid == 3 then + player:setCharVar("TransformationsProgress", 4) elseif csid == 7 then player:completeMission(TOAU,tpz.mission.id.toau.PATH_OF_DARKNESS) player:setTitle(tpz.title.NAJAS_COMRADEINARMS) diff --git a/scripts/zones/Alzadaal_Undersea_Ruins/mobs/Nepionic_Soulflayer.lua b/scripts/zones/Alzadaal_Undersea_Ruins/mobs/Nepionic_Soulflayer.lua index 872a05100eb..6ca8c749312 100644 --- a/scripts/zones/Alzadaal_Undersea_Ruins/mobs/Nepionic_Soulflayer.lua +++ b/scripts/zones/Alzadaal_Undersea_Ruins/mobs/Nepionic_Soulflayer.lua @@ -2,7 +2,18 @@ -- Area: Alzadaal Undersea Ruins (72) -- Mob: Nepionic Soulflayer ----------------------------------- -mixins = {require("scripts/mixins/job_special")}; +mixins = {require("scripts/mixins/job_special")} +----------------------------------- + +--TODO: Immortal Shield - Magic Shield (Only prevents direct damage from spells) +--TODO: Immortal Mind - Magic Atk Boost + +function onMobInitialize(mob) + mob:setMobMod(tpz.mobMod.IDLE_DESPAWN, 180) +end function onMobDeath(mob, player, isKiller) -end; + if player:getCharVar("TransformationsProgress") == 4 then + player:setCharVar("TransformationsProgress", 5) + end +end diff --git a/scripts/zones/Alzadaal_Undersea_Ruins/npcs/21.lua b/scripts/zones/Alzadaal_Undersea_Ruins/npcs/21.lua new file mode 100644 index 00000000000..1a4ef92dcf8 --- /dev/null +++ b/scripts/zones/Alzadaal_Undersea_Ruins/npcs/21.lua @@ -0,0 +1,37 @@ +----------------------------------- +-- Area: Alzadaal Undersea Ruins +-- NPC: 21 (no name) +----------------------------------- +local ID = require("scripts/zones/Alzadaal_Undersea_Ruins/IDs") +require("scripts/globals/npc_util") +----------------------------------- + +function onTrade(player,npc,trade) +end; + +function onTrigger(player,npc) + local transformationsProgress = player:getCharVar("TransformationsProgress") + -- TRANSFORMATIONS + if transformationsProgress == 4 then + player:startEvent(4) + elseif transformationsProgress == 5 then + player:startEvent(5) + else + player:messageSpecial(ID.text.NOTHING_OUT_OF_ORDINARY) + end +end + +function onEventUpdate(player,csid,option) +end + +function onEventFinish(player,csid,option) + if csid == 4 then + npcUtil.popFromQM(player, GetNPCByID(ID.npc.NEPIONIC_QM), ID.mob.NEPIONIC_SOULFLAYER, {hide = 1}) + elseif csid == 5 then + npcUtil.completeQuest(player, AHT_URHGAN, TRANSFORMATIONS, { + item = 15265, + title = tpz.title.PARAGON_OF_BLUE_MAGE_EXCELLENCE, + var = {"TransformationsProgress"} + }) + end +end \ No newline at end of file diff --git a/sql/mob_pools.sql b/sql/mob_pools.sql index d53bc277147..3806951a3fa 100644 --- a/sql/mob_pools.sql +++ b/sql/mob_pools.sql @@ -2891,7 +2891,7 @@ INSERT INTO `mob_pools` VALUES (2830,'Nephiyl_Pinnacletosser','Nephiyl_Pinnaclet INSERT INTO `mob_pools` VALUES (2831,'Nephiyl_Rampartbreacher','Nephiyl_Rampartbreacher',126,0x0000BF0200000000000000000000000000000000,1,1,5,240,100,0,1,1,1,18,0,0,4216,131,0,0,0,1,0,126); INSERT INTO `mob_pools` VALUES (2832,'Nepionic_Bladmall','Nepionic_Bladmall',251,0x0000510500000000000000000000000000000000,1,1,7,290,100,0,1,1,1,0,0,0,3253,129,0,0,0,1,0,251); INSERT INTO `mob_pools` VALUES (2833,'Nepionic_Parata','Nepionic_Parata',251,0x0000510500000000000000000000000000000000,1,1,7,290,100,0,1,1,1,0,0,0,1247,129,0,0,0,1,0,251); -INSERT INTO `mob_pools` VALUES (2834,'Nepionic_Soulflayer','Nepionic_Soulflayer',233,0x0000EF0600000000000000000000000000000000,4,4,5,240,100,0,1,1,1,2,0,0,0,131,0,0,28,1,0,233); +INSERT INTO `mob_pools` VALUES (2834,'Nepionic_Soulflayer','Nepionic_Soulflayer',233,0x0000EF0600000000000000000000000000000000,4,4,5,240,100,0,1,1,1,2,0,0,0,131,0,0,28,1,0,234); INSERT INTO `mob_pools` VALUES (2835,'Nest_Beetle','Nest_Beetle',49,0x0000980100000000000000000000000000000000,7,7,8,240,100,0,0,0,1,0,0,0,344,129,0,0,0,1,0,49); INSERT INTO `mob_pools` VALUES (2836,'Nguruvilu','Nguruvilu',198,0x0000D00600000000000000000000000000000000,1,4,6,240,100,0,0,0,0,2,0,0,0,0,0,0,0,1,0,823); INSERT INTO `mob_pools` VALUES (2837,'Nickel_Quadav_both','Nickel_Quadav_both',202,0x00004F0800000000000000000000000000000000,7,7,3,265,100,0,1,0,1,0,0,0,1,131,0,0,4,1,0,202); diff --git a/sql/mob_skill_lists.sql b/sql/mob_skill_lists.sql index 0bf1552a835..f127325662b 100644 --- a/sql/mob_skill_lists.sql +++ b/sql/mob_skill_lists.sql @@ -1060,6 +1060,7 @@ INSERT INTO `mob_skill_lists` VALUES ('Soulflayer',233,1967); INSERT INTO `mob_skill_lists` VALUES ('Soulflayer',233,1968); INSERT INTO `mob_skill_lists` VALUES ('Spheroid',234,561); INSERT INTO `mob_skill_lists` VALUES ('Spheroid',234,984); +-- INSERT INTO `mob_skill_lists` VALUES ('Soulflayer_NM',234,1969); INSERT INTO `mob_skill_lists` VALUES ('Spider',235,810); INSERT INTO `mob_skill_lists` VALUES ('Spider',235,811); INSERT INTO `mob_skill_lists` VALUES ('Spider',235,812); @@ -3461,3 +3462,4 @@ INSERT INTO `mob_skill_lists` VALUES ('Siren',1010,3512); -- Sonic Buffet INSERT INTO `mob_skill_lists` VALUES ('Siren',1010,3513); -- Entice INSERT INTO `mob_skill_lists` VALUES ('Siren',1010,3514); -- Hysteric Assault INSERT INTO `mob_skill_lists` VALUES ('Siren',1010,3515); -- Clarsach Call + diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index 5730f633c16..a497f2495b1 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -1789,7 +1789,7 @@ INSERT INTO `mob_skills` VALUES (1965,1329,'immortal_shield',0,7.0,2000,1500,1,0 INSERT INTO `mob_skills` VALUES (1966,1330,'mind_purge',0,7.0,2000,1000,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (1967,1331,'tribulation',1,15.0,2000,1000,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (1968,1332,'immortal_anathema',1,15.0,2000,1000,4,0,0,0,0,0,0); --- INSERT INTO `mob_skills` VALUES (1969,1713,'reprobation',0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (1969,1713,'reprobation',1,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1970,1714,'eclosion',0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1971,1715,'.',0,7.0,2000,1500,4,0,0,0,0,0,0); -- INSERT INTO `mob_skills` VALUES (1972,1716,'.',0,7.0,2000,1500,4,0,0,0,0,0,0);