Skip to content

Commit

Permalink
Quest The Die is Cast
Browse files Browse the repository at this point in the history
  • Loading branch information
KnowOne134 committed Feb 3, 2025
1 parent f8e7396 commit a501252
Show file tree
Hide file tree
Showing 9 changed files with 200 additions and 9 deletions.
1 change: 1 addition & 0 deletions scripts/enum/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5707,6 +5707,7 @@ xi.item =
EMPRESS_BAND = 15762,
EMPEROR_BAND = 15763,
OLDUUM_RING = 15769,
RANDOM_RING = 15770,
IMPERIAL_RING = 15773,
STORM_RING = 15774,
UNFETTERED_RING = 15775,
Expand Down
2 changes: 1 addition & 1 deletion scripts/globals/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ xi.quest.id =
SUCH_SWEET_SORROW = 13, -- + Converted
FEAR_OF_THE_DARK_II = 14, -- + Converted
COOK_A_ROON = 15, -- + Converted
THE_DIE_IS_CAST = 16,
THE_DIE_IS_CAST = 16, -- + Converted
TWO_HORN_THE_SAVAGE = 17,
TOTOROONS_TREASURE_HUNT = 18,
WHAT_FRIENDS_ARE_FOR = 19, -- + Converted
Expand Down
159 changes: 159 additions & 0 deletions scripts/quests/ahtUrhgan/The_Die_is_Cast.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
-----------------------------------
-- The Die is Cast
-- Random Ring
-----------------------------------
-- Log ID: 6, Quest ID: 16
-- Ratihb: !pos 75.225 -6.000 -137.203 50
-- Ekhu Pesshyadha: !pos -13.043 0.999 103.423 50
-- Jijiroon: !pos 15.913 0.000 -32.676 53
-- qm9: !pos 311.088 -3.674 170.124 54
-----------------------------------

local ID = zones[xi.zone.ARRAPAGO_REEF]
local quest = Quest:new(xi.questLog.AHT_URHGAN, xi.quest.id.ahtUrhgan.THE_DIE_IS_CAST)

quest.reward =
{
item = xi.item.RANDOM_RING,
}

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE
end,

[xi.zone.AHT_URHGAN_WHITEGATE] =
{
['Ratihb'] = quest:progressEvent(591),

onEventFinish =
{
[591] = function(player, csid, option, npc)
quest:begin(player)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
vars.Prog == 0
end,

[xi.zone.AHT_URHGAN_WHITEGATE] =
{
['Ekhu_Pesshyadha'] = quest:progressEvent(592),

onEventFinish =
{
[592] = function(player, csid, option, npc)
quest:setVar(player, 'Prog', 1)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
vars.Prog == 1
end,

[xi.zone.NASHMAU] =
{
['Jijiroon'] = quest:progressEvent(245),

onEventFinish =
{
[245] = function(player, csid, option, npc)
quest:setVar(player, 'Prog', 2)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
vars.Prog == 2
end,

[xi.zone.ARRAPAGO_REEF] =
{
['qm9'] = quest:progressEvent(212),

onEventFinish =
{
[212] = function(player, csid, option, npc)
quest:setVar(player, 'Prog', 3)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
vars.Prog == 3
end,

[xi.zone.ARRAPAGO_REEF] =
{
['qm9'] =
{
onTrigger = function(player, npc)
if npcUtil.popFromQM(player, npc, ID.mob.BUKKI, { hide = 0 }) then
return quest:messageSpecial(ID.text.SPINE_CHILL)
end
end,
},

['Bukki'] =
{
onMobDeath = function(mob, player, isKiller, noKiller)
quest:setVar(player, 'Prog', 4)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
vars.Prog == 4
end,

[xi.zone.ARRAPAGO_REEF] =
{
['qm9'] = quest:progressEvent(213),

onEventFinish =
{
[213] = function(player, csid, option, npc)
quest:setVar(player, 'Prog', 5)
npcUtil.giveKeyItem(player, xi.ki.BAG_OF_GOLD_PIECES)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
vars.Prog == 5
end,

[xi.zone.AHT_URHGAN_WHITEGATE] =
{
['Ratihb'] = quest:progressEvent(593),

onEventFinish =
{
[593] = function(player, csid, option, npc)
if quest:complete(player) then
player:delKeyItem(xi.ki.BAG_OF_GOLD_PIECES)
end
end,
},
},
},
}

return quest
1 change: 1 addition & 0 deletions scripts/zones/Aht_Urhgan_Whitegate/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ return {
['Burnished_Bones'] = { event = 228 },
['Cacaroon'] = { event = 248 },
['Dhima_Polevhia'] = { event = 788 },
['Ekhu_Pesshyadha'] = { event = 532 },
['Esoteric_Hound'] = { event = 229 },
['Fari-Wari'] = { event = 831 },
['Furious_Boulder'] = { event = 230 },
Expand Down
11 changes: 6 additions & 5 deletions scripts/zones/Arrapago_Reef/DefaultActions.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
local ID = zones[xi.zone.ARRAPAGO_REEF]

return {
['qm1'] = { messageSpecial = ID.text.SLIMY_TOUCH },
['qm2'] = { messageSpecial = ID.text.GLITTERING_FRAGMENTS },
['qm3'] = { messageSpecial = ID.text.FLUTTERY_OBJECTS },
['qm4'] = { messageSpecial = ID.text.STIFLING_STENCH },
['qm10'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY },
['qm1'] = { special = ID.text.SLIMY_TOUCH },
['qm2'] = { special = ID.text.GLITTERING_FRAGMENTS },
['qm3'] = { special = ID.text.FLUTTERY_OBJECTS },
['qm4'] = { special = ID.text.STIFLING_STENCH },
['qm9'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY },
['qm10'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY },
}
2 changes: 2 additions & 0 deletions scripts/zones/Arrapago_Reef/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ zones[xi.zone.ARRAPAGO_REEF] =
THE_PARTY_WILL_BE_REMOVED = 7903, -- If all party members' HP are still zero after # minute[/s], the party will be removed from the battlefield.
YOU_NO_REQS = 7907, -- You do not meet the requirements to enter the battlefield with your party members. Access is denied.
YOUR_IMPERIAL_STANDING = 7923, -- Your Imperial Standing has increased!
SPINE_CHILL = 8391, -- You feel a chill run down your spine!
HAND_OVER_TO_IMMORTAL = 8449, -- You hand over the % to the Immortal.
CANNOT_ENTER = 8468, -- You cannot enter at this time. Please wait a while before trying again.
AREA_FULL = 8469, -- This area is fully occupied. You were unable to enter.
Expand All @@ -51,6 +52,7 @@ zones[xi.zone.ARRAPAGO_REEF] =
{
APKALLU_NPC = GetFirstID('Arrapago_Apkallu'),
BLOODY_BONES = GetFirstID('Bloody_Bones'),
BUKKI = GetFirstID('Bukki'),
MEDUSA = GetFirstID('Medusa'),
LIL_APKALLU = GetFirstID('Lil_Apkallu'),
VELIONIS = GetFirstID('Velionis'),
Expand Down
29 changes: 28 additions & 1 deletion scripts/zones/Arrapago_Reef/mobs/Bukki.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,38 @@
-- Area: Arrapago Reef
-- NM: Bukki
-----------------------------------
mixins = { require('scripts/mixins/families/imp') }
mixins =
{
require("scripts/mixins/job_special"),
require("scripts/mixins/families/imp"),
}
-----------------------------------
---@type TMobEntity
local entity = {}

entity.onMobSpawn = function(mob)
xi.mix.jobSpecial.config(mob, {
specials =
{
{ id = xi.jsa.MANAFONT, hpp = math.random(10, 50) },
},
})

mob:setTP(3000)
mob:setMobSkillAttack(0)
mob:setMagicCastingEnabled(true)
mob:setMobMod(xi.mobMod.IDLE_DESPAWN, 300)
mob:setMobMod(xi.mobMod.GIL_MAX, -1)
mob:setLocalVar("tp_spam", math.random(5, 15))
mob:addListener("COMBAT_TICK", "BUKKI_TICK", function(mob)
if mob:getHPP() <= mob:getLocalVar("tp_spam") and mob:getLocalVar("tp_spam") > 0 then
mob:setLocalVar("tp_spam", 0)
mob:setMagicCastingEnabled(false)
mob:setMobSkillAttack(3002)
end
end)
end

entity.onMobDeath = function(mob, player, optParams)
end

Expand Down
2 changes: 1 addition & 1 deletion sql/mob_groups.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2765,7 +2765,7 @@ INSERT INTO `mob_groups` VALUES (73,5203,54,'Ephramadian_Shade_mnk',960,0,786,0,
INSERT INTO `mob_groups` VALUES (74,5202,54,'Ephramadian_Shade_rdm',960,0,786,0,0,68,70,0);
INSERT INTO `mob_groups` VALUES (75,5204,54,'Ephramadian_Shade_rng',960,0,786,0,0,68,70,0);
INSERT INTO `mob_groups` VALUES (76,5205,54,'Ephramadian_Shade_cor',960,0,786,0,0,68,70,0);
INSERT INTO `mob_groups` VALUES (77,573,54,'Bukki',0,128,0,0,0,70,70,0);
INSERT INTO `mob_groups` VALUES (77,573,54,'Bukki',0,128,0,7500,0,72,72,0);
INSERT INTO `mob_groups` VALUES (78,2339,54,'Lamia_No11',0,128,0,0,0,80,85,0);
INSERT INTO `mob_groups` VALUES (79,2348,54,'Lamia_No24',0,128,0,0,0,80,80,0);
INSERT INTO `mob_groups` VALUES (80,2344,54,'Lamia_No18',0,128,0,0,0,80,85,0);
Expand Down
2 changes: 1 addition & 1 deletion sql/mob_spawn_points.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12543,7 +12543,7 @@ INSERT INTO `mob_spawn_points` VALUES (16998830,'Ephramadian_Shade','Ephramadian
INSERT INTO `mob_spawn_points` VALUES (16998831,'Ephramadian_Shade','Ephramadian Shade',74,-428.033,-4.640,-379.461,29);
INSERT INTO `mob_spawn_points` VALUES (16998832,'Ephramadian_Shade','Ephramadian Shade',75,-456.876,-4.398,-350.909,79);
INSERT INTO `mob_spawn_points` VALUES (16998833,'Ephramadian_Shade','Ephramadian Shade',76,-443.369,-4.463,-343.948,121);
INSERT INTO `mob_spawn_points` VALUES (16998834,'Bukki','Bukki',77,0.000,0.000,0.000,0);
INSERT INTO `mob_spawn_points` VALUES (16998834,'Bukki','Bukki',77,311,-3.674,170.124,0);

-- Lamia Reprisal
INSERT INTO `mob_spawn_points` VALUES (16998835,'Lamia_No11','Lamia No.11',78,0.000,0.000,0.000,0);
Expand Down

0 comments on commit a501252

Please sign in to comment.