-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement You Call That a Knife Quest
- Loading branch information
1 parent
e42ac25
commit af73a26
Showing
15 changed files
with
282 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
----------------------------------- | ||
-- You Call That a Knife | ||
----------------------------------- | ||
-- Log ID: 5, Quest ID: 6 | ||
-- Mhebi Juhbily : !pos 40 -11 -159 250 | ||
-- Vah Keshura : !pos 30 -8.5 -105 250 | ||
-- Chef Nonberry : !pos -136 0.0 -91 159 | ||
-- Pula Rhatti : !pos -18.5 -4 -38 250 | ||
----------------------------------- | ||
local templeID = zones[xi.zone.TEMPLE_OF_UGGALEPIH] | ||
----------------------------------- | ||
|
||
---@type TQuest | ||
local quest = Quest:new(xi.questLog.OUTLANDS, xi.quest.id.outlands.YOU_CALL_THAT_A_KNIFE) | ||
|
||
local cookMobs = { | ||
templeID.mob.COOK_OFFSET, | ||
templeID.mob.COOK_OFFSET + 1, | ||
templeID.mob.COOK_OFFSET + 2, | ||
templeID.mob.COOK_OFFSET + 3 | ||
} | ||
|
||
quest.reward = | ||
{ | ||
fame = 75, | ||
fameArea = xi.fameArea.WINDURST, | ||
gil = 7200, | ||
title = xi.title.YA_DONE_GOOD | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE and | ||
player:getFameLevel(xi.fameArea.WINDURST) >= 6 | ||
end, | ||
|
||
[xi.zone.KAZHAM] = | ||
{ | ||
['Mhebi_Juhbily'] = | ||
{ | ||
onTrade = function(player, npc, trade) | ||
if | ||
quest:getVar(player, 'Prog') == 0 and | ||
npcUtil.tradeHasExactly(trade, { xi.item.SANDFISH }) | ||
then | ||
return quest:progressEvent(127, 0, xi.item.SANDFISH) | ||
end | ||
end, | ||
|
||
onTrigger = function(player, npc) | ||
if quest:getVar(player, 'Prog') == 1 then | ||
return quest:event(318) | ||
end | ||
end | ||
}, | ||
|
||
['Pula_Rhatti'] = quest:event(269, 0, xi.item.SANDFISH):replaceDefault(), | ||
|
||
['_6y9'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if quest:getVar(player, 'Prog') == 1 then | ||
return quest:progressEvent(128) | ||
end | ||
end | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[127] = function(player, csid, option, npc) | ||
if option == 511 then | ||
quest:setVar(player, 'Prog', 1) | ||
player:confirmTrade() | ||
end | ||
end, | ||
|
||
[128] = function(player, csid, option, npc) | ||
if option == 1 then | ||
quest:begin(player) | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
not player:hasKeyItem(xi.ki.NONBERRYS_KNIFE) | ||
end, | ||
|
||
[xi.zone.KAZHAM] = | ||
{ | ||
['Mhebi_Juhbily'] = quest:event(129):replaceDefault(), | ||
|
||
['Pula_Rhatti'] = quest:event(269, 0, xi.item.SANDFISH):replaceDefault(), | ||
|
||
['Vah_Keshura'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if quest:getVar(player, 'Prog') == 1 then | ||
return quest:progressEvent(130) | ||
else | ||
return quest:event(131):replaceDefault() | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[130] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 2) | ||
end | ||
}, | ||
}, | ||
|
||
[xi.zone.TEMPLE_OF_UGGALEPIH] = | ||
{ | ||
['Chef_Nonberry'] = | ||
{ | ||
onTrade = function(player, npc, trade) | ||
if npcUtil.tradeHasExactly(trade, { xi.item.TONBERRY_BOARD }) then | ||
return quest:progressEvent(27) | ||
else | ||
npcUtil.confirmTradedItems(trade) -- Take all items traded | ||
return quest:progressEvent(28) | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[27] = function(player, csid, option, npc) | ||
player:confirmTrade() | ||
npcUtil.giveKeyItem(player, xi.ki.NONBERRYS_KNIFE) | ||
end, | ||
|
||
[28] = function(player, csid, option, npc) | ||
player:confirmTrade() | ||
if | ||
os.time() >= npc:getLocalVar('cooldown') and | ||
npcUtil.popFromQM(player, npc, cookMobs, { claim = true, hide = 0 }) then | ||
npc:setLocalVar('cooldown', os.time() + 600) -- 10 minutes between repops | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
player:hasKeyItem(xi.ki.NONBERRYS_KNIFE) | ||
end, | ||
|
||
[xi.zone.KAZHAM] = | ||
{ | ||
['Mhebi_Juhbily'] = quest:progressEvent(133), | ||
|
||
['Vah_Keshura'] = quest:event(132):replaceDefault(), | ||
|
||
onEventFinish = | ||
{ | ||
[133] = function(player, csid, option, npc) | ||
if quest:complete(player) then | ||
player:delKeyItem(xi.ki.NONBERRYS_KNIFE) | ||
quest:setMustZone(player) | ||
end | ||
end | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_COMPLETED and | ||
quest:getMustZone(player) | ||
end, | ||
|
||
[xi.zone.KAZHAM] = | ||
{ | ||
['Mhebi_Juhbily'] = quest:event(134):replaceDefault(), | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_COMPLETED and | ||
not quest:getMustZone(player) | ||
end, | ||
|
||
[xi.zone.KAZHAM] = | ||
{ | ||
['Mhebi_Juhbily'] = quest:event(135):replaceDefault(), | ||
}, | ||
}, | ||
} | ||
|
||
return quest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
local ID = zones[xi.zone.TEMPLE_OF_UGGALEPIH] | ||
|
||
return { | ||
['_4fx'] = { messageSpecial = ID.text.DOOR_LOCKED }, | ||
['qm9'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm11'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm12'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm13'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm16'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['_4fx'] = { messageSpecial = ID.text.DOOR_LOCKED }, | ||
['Chef_Nonberry'] = { text = ID.text.NOTHING_I_CANT_CUT }, | ||
['qm9'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm11'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm12'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm13'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm16'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
----------------------------------- | ||
-- Area: Temple of Uggalepih | ||
-- NM: Cook Fulberry | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/job_special') } | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
entity.onMobSpawn = function(mob) | ||
end | ||
|
||
return entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
----------------------------------- | ||
-- Area: Temple of Uggalepih | ||
-- NM: Cook Minberry | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/job_special') } | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
entity.onMobSpawn = function(mob) | ||
end | ||
|
||
return entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
----------------------------------- | ||
-- Area: Temple of Uggalepih | ||
-- NM: Cook Nalberry | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/job_special') } | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
entity.onMobSpawn = function(mob) | ||
end | ||
|
||
return entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
----------------------------------- | ||
-- Area: Temple of Uggalepih | ||
-- NM: Cook Solberry | ||
----------------------------------- | ||
mixins = { require('scripts/mixins/job_special') } | ||
----------------------------------- | ||
---@type TMobEntity | ||
local entity = {} | ||
|
||
entity.onMobSpawn = function(mob) | ||
end | ||
|
||
return entity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters