From d410e1bdec31c284bff944395accc80d872932f9 Mon Sep 17 00:00:00 2001 From: hookstar Date: Fri, 17 May 2024 12:53:36 -0500 Subject: [PATCH] [Quest]Implement A question of faith [Quest]Implement A question of faith [Quest]Implement A question of faith [Quest]Implement A question of faith [Quest]Implement A question of faith [Quest]Implement A question of faith [Quest]Implement A question of faith Co-Authored-By: Abdiah <62350957+dallano@users.noreply.github.com> --- scripts/actions/mobskills/bionic_boost.lua | 19 +++ scripts/quests/bastok/A_Question_of_Faith.lua | 121 ++++++++++++++++++ .../Oldton_Movalpolos/DefaultActions.lua | 5 + scripts/zones/Oldton_Movalpolos/IDs.lua | 5 + .../zones/Oldton_Movalpolos/mobs/Bugallug.lua | 19 +++ .../zones/Oldton_Movalpolos/npcs/Rakorok.lua | 3 - sql/mob_groups.sql | 2 +- sql/mob_pools.sql | 2 +- sql/mob_skills.sql | 2 +- sql/mob_spawn_points.sql | 2 +- 10 files changed, 173 insertions(+), 7 deletions(-) create mode 100644 scripts/actions/mobskills/bionic_boost.lua create mode 100644 scripts/quests/bastok/A_Question_of_Faith.lua create mode 100644 scripts/zones/Oldton_Movalpolos/DefaultActions.lua create mode 100644 scripts/zones/Oldton_Movalpolos/mobs/Bugallug.lua diff --git a/scripts/actions/mobskills/bionic_boost.lua b/scripts/actions/mobskills/bionic_boost.lua new file mode 100644 index 00000000000..ba506d35abd --- /dev/null +++ b/scripts/actions/mobskills/bionic_boost.lua @@ -0,0 +1,19 @@ +----------------------------------- +-- Bionic Boost +-- Description: +-- Gives the user the effect of counterstance +----------------------------------- +local mobskillObject = {} + +mobskillObject.onMobSkillCheck = function(target, mob, skill) + return 0 +end + +mobskillObject.onMobWeaponSkill = function(target, mob, skill) + local typeEffect = xi.effect.COUNTERSTANCE + + skill:setMsg(xi.mobskills.mobBuffMove(mob, typeEffect, 1, 0, 60)) + return typeEffect +end + +return mobskillObject diff --git a/scripts/quests/bastok/A_Question_of_Faith.lua b/scripts/quests/bastok/A_Question_of_Faith.lua new file mode 100644 index 00000000000..0d9530e5916 --- /dev/null +++ b/scripts/quests/bastok/A_Question_of_Faith.lua @@ -0,0 +1,121 @@ +----------------------------------- +-- A Question of Faith +----------------------------------- +-- Area: Metalworks +-- NPC: Ayame !pos 132 -18 33 237 +-- NPC: Virnage !pos 0.7 -0.0 49 234 +-- NPC: Rakorok !pos 158 13 -42 11 +----------------------------------- +local ID = zones[xi.zone.OLDTON_MOVALPOLOS] +----------------------------------- +local quest = Quest:new(xi.questLog.BASTOK, xi.quest.id.bastok.A_QUESTION_OF_FAITH) + +quest.reward = +{ + fame = 50, + fameArea = xi.fameArea.BASTOK, + gil = 3000, +} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_AVAILABLE and + player:getFameLevel(xi.fameArea.BASTOK) >= 4 and + player:hasCompletedQuest(xi.questLog.BASTOK, xi.quest.id.bastok.OUT_OF_THE_DEPTHS) + end, + + [xi.zone.METALWORKS] = + { + ['Ayame'] = quest:progressEvent(875), + + onEventFinish = + { + [875] = function(player, csid, option, npc) + quest:begin(player) + end, + }, + }, + }, + + { + check = function(player, status, vars) + return status == xi.questStatus.QUEST_ACCEPTED + end, + + [xi.zone.BASTOK_MINES] = + { + ['Virnage'] = + { + onTrigger = function(player, npc) + if + not player:hasKeyItem(xi.ki.DAWN_TALISMAN) and + quest:getVar(player, 'Prog') == 0 + then + return quest:progressEvent(239, 0, xi.ki.DAWN_TALISMAN) + elseif player:hasKeyItem(xi.ki.DAWN_TALISMAN) then + return quest:event(242, 0, xi.ki.DAWN_TALISMAN) + elseif quest:getVar(player, 'Prog') == 1 then + return quest:progressEvent(241) + end + end, + }, + + onEventFinish = + { + [239] = function(player, csid, option, npc) + if option == 1 then + npcUtil.giveKeyItem(player, xi.ki.DAWN_TALISMAN) + end + end, + + [241] = function(player, csid, option, npc) + quest:complete(player) + end, + }, + }, + + [xi.zone.OLDTON_MOVALPOLOS] = + { + ['Rakorok'] = + { + onTrigger = function(player, npc) + if + player:hasKeyItem(xi.ki.DAWN_TALISMAN) and + quest:getVar(player, 'Prog') == 0 + then + if npcUtil.popFromQM(player, npc, ID.mob.BUGALLUG, { claim = true, hide = 0 }) then + player:messageSpecial(ID.text.ALTANA_DIE) + return quest:messageSpecial(ID.text.MONSTER_APPEARED) + end + elseif + quest:getVar(player, 'Prog') == 1 and + player:hasKeyItem(xi.ki.DAWN_TALISMAN) + then + return quest:progressEvent(6, 11, xi.ki.DAWN_TALISMAN) + end + end, + }, + + ['Bugallug'] = + { + onMobDeath = function(mob, player, optParams) + if quest:getVar(player, 'Prog') == 0 then + quest:setVar(player, 'Prog', 1) + end + end, + }, + + onEventFinish = + { + [6] = function(player, csid, option, npc) + player:delKeyItem(xi.ki.DAWN_TALISMAN) + return quest:messageSpecial(ID.text.WAS_TAKEN_FROM_YOU, 0, xi.ki.DAWN_TALISMAN) + end, + }, + }, + }, +} + +return quest diff --git a/scripts/zones/Oldton_Movalpolos/DefaultActions.lua b/scripts/zones/Oldton_Movalpolos/DefaultActions.lua new file mode 100644 index 00000000000..5f5ba8add28 --- /dev/null +++ b/scripts/zones/Oldton_Movalpolos/DefaultActions.lua @@ -0,0 +1,5 @@ +local ID = zones[xi.zone.OLDTON_MOVALPOLOS] + +return { + ['Rakorok'] = { text = ID.text.RAKOROK_DIALOGUE }, +} diff --git a/scripts/zones/Oldton_Movalpolos/IDs.lua b/scripts/zones/Oldton_Movalpolos/IDs.lua index 4f925c11bd8..16ff7b0d371 100644 --- a/scripts/zones/Oldton_Movalpolos/IDs.lua +++ b/scripts/zones/Oldton_Movalpolos/IDs.lua @@ -11,20 +11,25 @@ zones[xi.zone.OLDTON_MOVALPOLOS] = ITEM_OBTAINED = 6390, -- Obtained: . GIL_OBTAINED = 6391, -- Obtained gil. KEYITEM_OBTAINED = 6393, -- Obtained key item: . + KEYITEM_LOST = 6394, -- Key item lost: . FELLOW_MESSAGE_OFFSET = 6419, -- I'm ready. I suppose. CARRIED_OVER_POINTS = 7001, -- You have carried over login point[/s]. LOGIN_CAMPAIGN_UNDERWAY = 7002, -- The [/January/February/March/April/May/June/July/August/September/October/November/December] Login Campaign is currently underway! LOGIN_NUMBER = 7003, -- In celebration of your most recent login (login no. ), we have provided you with points! You currently have a total of points. MEMBERS_LEVELS_ARE_RESTRICTED = 7023, -- Your party is unable to participate because certain members' levels are restricted. CONQUEST_BASE = 7064, -- Tallying conquest results... + WAS_TAKEN_FROM_YOU = 7752, -- The Dawn Talisman was taken from you... FISHING_MESSAGE_OFFSET = 7583, -- You can't fish here. MINING_IS_POSSIBLE_HERE = 7714, -- Mining is possible here if you have . + ALTANA_DIE = 7740, -- Aaaltaaanaaa...Diiieee!!! RAKOROK_DIALOGUE = 7738, -- Nsy pipul. Gattohre! I bisynw! + MONSTER_APPEARED = 7753, -- A monster has appeared! CHEST_UNLOCKED = 7762, -- You unlock the chest! COMMON_SENSE_SURVIVAL = 8120, -- It appears that you have arrived at a new survival guide provided by the Adventurers' Mutual Aid Network. Common sense dictates that you should now be able to teleport here from similar tomes throughout the world. }, mob = { + BUGALLUG = GetFirstID('Bugallug'), BUGBEAR_STRONGMAN = GetTableOfIDs('Bugbear_Strongman'), GOBLIN_WOLFMAN = GetFirstID('Goblin_Wolfman'), }, diff --git a/scripts/zones/Oldton_Movalpolos/mobs/Bugallug.lua b/scripts/zones/Oldton_Movalpolos/mobs/Bugallug.lua new file mode 100644 index 00000000000..ca21b1c0166 --- /dev/null +++ b/scripts/zones/Oldton_Movalpolos/mobs/Bugallug.lua @@ -0,0 +1,19 @@ +----------------------------------- +-- Area: Oldton Movalpolos +-- Mob: Bugallug +-- Note: NM for quest: A Question of Faith +----------------------------------- +local entity = {} + +entity.onMobSpawn = function(mob) + -- Immediately uses Bionic Boost and Heavy Whisk + mob:useMobAbility(359) + mob:queue(2000, function(mobArg) + mobArg:useMobAbility(358) + end) +end + +entity.onMobDeath = function(mob, player, isKiller) +end + +return entity diff --git a/scripts/zones/Oldton_Movalpolos/npcs/Rakorok.lua b/scripts/zones/Oldton_Movalpolos/npcs/Rakorok.lua index 4193b096abd..f93941dde6f 100644 --- a/scripts/zones/Oldton_Movalpolos/npcs/Rakorok.lua +++ b/scripts/zones/Oldton_Movalpolos/npcs/Rakorok.lua @@ -2,15 +2,12 @@ -- Area: Oldton Movalpolos -- NPC: Rakorok ----------------------------------- -local ID = zones[xi.zone.OLDTON_MOVALPOLOS] ------------------------------------ local entity = {} entity.onTrade = function(player, npc, trade) end entity.onTrigger = function(player, npc) - npc:showText(npc, ID.text.RAKOROK_DIALOGUE) end entity.onEventUpdate = function(player, csid, option, npc) diff --git a/sql/mob_groups.sql b/sql/mob_groups.sql index bdfd8271d20..cd86433914b 100644 --- a/sql/mob_groups.sql +++ b/sql/mob_groups.sql @@ -491,7 +491,7 @@ INSERT INTO `mob_groups` VALUES (31,566,11,'Bugbear_Strongman',0,32,378,4800,0,5 INSERT INTO `mob_groups` VALUES (32,1712,11,'Goblin_Shovelman',924,0,1157,0,0,42,44,0); INSERT INTO `mob_groups` VALUES (33,1663,11,'Goblin_Freelance',924,0,1061,0,0,45,47,0); INSERT INTO `mob_groups` VALUES (34,2685,11,'Moblin_Ashman',924,0,3078,0,0,45,45,0); -INSERT INTO `mob_groups` VALUES (35,556,11,'Bugallug',0,128,0,0,0,45,50,0); +INSERT INTO `mob_groups` VALUES (35,556,11,'Bugallug',0,128,0,6000,0,45,50,0); INSERT INTO `mob_groups` VALUES (36,2696,11,'Moblin_Gurneyman',924,0,1711,0,0,46,47,0); INSERT INTO `mob_groups` VALUES (37,1746,11,'Goblin_Wolfman',0,128,1189,7400,0,50,55,0); INSERT INTO `mob_groups` VALUES (38,1703,11,'Goblin_Preceptor',0,128,0,0,0,45,49,0); diff --git a/sql/mob_pools.sql b/sql/mob_pools.sql index ada4b335d71..0aab274a9a6 100644 --- a/sql/mob_pools.sql +++ b/sql/mob_pools.sql @@ -609,7 +609,7 @@ INSERT INTO `mob_pools` VALUES (552,'Buburimboo','Buburimboo',197,0x00005C010000 INSERT INTO `mob_pools` VALUES (553,'Buffalo','Buffalo',57,0x00004D0500000000000000000000000000000000,1,1,7,360,100,0,1,0,0,0,0,0,452,131,0,0,0,0,0,57,57); INSERT INTO `mob_pools` VALUES (554,'Buffrix_Eargone','Buffrix_Eargone',373,0x00003F0400000000000000000000000000000000,7,7,3,240,100,0,1,0,1,2,0,32,0,159,0,0,4,0,0,373,373); INSERT INTO `mob_pools` VALUES (555,'Bugaboo','Bugaboo',121,0x0000700100000000000000000000000000000000,4,4,12,240,100,0,1,0,0,2,0,0,4859,131,0,0,28,0,0,121,121); -INSERT INTO `mob_pools` VALUES (556,'Bugallug','Bugallug',59,0x00004B0500000000000000000000000000000000,2,2,1,480,100,0,1,0,1,2,0,32,0,157,0,0,0,0,0,59,59); +INSERT INTO `mob_pools` VALUES (556,'Bugallug','Bugallug',59,0x00004B0500000000000000000000000000000000,2,2,1,480,100,0,1,0,1,2,2,32,0,157,0,0,0,0,0,59,59); INSERT INTO `mob_pools` VALUES (557,'Bugard','Bugard',58,0x0000470500000000000000000000000000000000,1,1,3,300,100,0,1,0,0,0,0,0,1379,131,0,0,0,0,0,58,58); INSERT INTO `mob_pools` VALUES (558,'Bugard-X','Bugard-X',58,0x0000470500000000000000000000000000000000,1,1,5,300,100,0,1,1,1,16,0,0,0,3,0,0,0,0,0,58,58); INSERT INTO `mob_pools` VALUES (559,'Bugbby','Bugbby',59,0x00004B0500000000000000000000000000000000,1,1,5,240,100,0,1,0,1,18,1,32,4045,155,0,0,0,0,0,59,59); diff --git a/sql/mob_skills.sql b/sql/mob_skills.sql index a4b6fc5381a..345103013f9 100644 --- a/sql/mob_skills.sql +++ b/sql/mob_skills.sql @@ -372,7 +372,7 @@ INSERT INTO `mob_skills` VALUES (355,99,'earth_pounder',1,15.0,2000,1500,4,0,0,0 INSERT INTO `mob_skills` VALUES (356,100,'sharp_strike',0,7.0,2000,1500,1,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (357,825,'heavy_blow',0,7.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (358,826,'heavy_whisk',0,7.0,2000,1500,4,0,0,2,0,0,0); --- INSERT INTO `mob_skills` VALUES (359,103,'bionic_boost',0,7.0,2000,1500,4,0,0,0,0,0,0); +INSERT INTO `mob_skills` VALUES (359,827,'bionic_boost',0,7.0,2000,1500,1,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (360,828,'flying_hip_press',1,7.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (361,829,'earth_shock',1,10.0,2000,1500,4,0,0,0,0,0,0); INSERT INTO `mob_skills` VALUES (362,830,'double_claw',0,7.0,2000,1500,4,0,0,0,0,0,0); diff --git a/sql/mob_spawn_points.sql b/sql/mob_spawn_points.sql index a99a0d91eeb..424cef8b6db 100644 --- a/sql/mob_spawn_points.sql +++ b/sql/mob_spawn_points.sql @@ -2478,7 +2478,7 @@ INSERT INTO `mob_spawn_points` VALUES (16822452,'Earth_Elemental','Earth Element INSERT INTO `mob_spawn_points` VALUES (16822453,'Dark_Bats','Dark Bats',6,179.462,7.394,-92.602,62); INSERT INTO `mob_spawn_points` VALUES (16822454,'Thunder_Elemental','Thunder Elemental',21,179.684,7.504,-97.948,63); INSERT INTO `mob_spawn_points` VALUES (16822455,'Earth_Elemental','Earth Elemental',17,179.121,7.520,-103.613,69); -INSERT INTO `mob_spawn_points` VALUES (16822456,'Bugallug','Bugallug',35,161.234,13.473,-42.652,8); +INSERT INTO `mob_spawn_points` VALUES (16822456,'Bugallug','Bugallug',35,161.97,13.98,-42.19,142); INSERT INTO `mob_spawn_points` VALUES (16822457,'Moblin_Gurneyman','Moblin Gurneyman',36,-30.020,7.399,98.798,131); INSERT INTO `mob_spawn_points` VALUES (16822458,'Moblin_Gurneyman','Moblin Gurneyman',36,24.439,9.393,-87.126,132); INSERT INTO `mob_spawn_points` VALUES (16822459,'Goblin_Wolfman','Goblin Wolfman',37,-150.910,7.499,-251.817,57);