-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Quest] Implement You Call That a Knife Quest #6372
base: base
Are you sure you want to change the base?
[Quest] Implement You Call That a Knife Quest #6372
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comments, this PR looks great to me
[28] = function(player, csid, option, npc) | ||
player:confirmTrade() | ||
if os.time() >= npc:getLocalVar('cooldown') then | ||
spawnCooks(player, npc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There exists a command for this in npcUtil:
npcUtil.popFromQM(player, npc, { TABLE_OF_MOD_IDS }, {claim = boolean, hide = integer}) etc. etc.
if npcUtil.tradeHasExactly(trade, { xi.item.TONBERRY_BOARD }) then | ||
return quest:progressEvent(27) | ||
else | ||
npcUtil.confirmTradedItems(trade) -- Take all items traded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why create a function for this? You should be able to just use player:confirmTrade()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding player:confirmTrade()
works on items that have been confirmed (such as through npcUtil.tradeHasExactly), I did not see a utility that would accept all items regardless of confirmation so I made this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave that discretion with LSB mods.
quest:complete(player) | ||
player:delKeyItem(xi.ki.NONBERRYS_KNIFE) | ||
quest:setMustZone(player) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a safe practice to get into. If there's an error when trying to complete the quest, the player won't lose their key item. This is more common and useful with quests that have items in their rewards
quest:complete(player) | |
player:delKeyItem(xi.ki.NONBERRYS_KNIFE) | |
quest:setMustZone(player) | |
if quest:complete(player) then | |
player:delKeyItem(xi.ki.NONBERRYS_KNIFE) | |
quest:setMustZone(player) | |
end |
xi.mix.jobSpecial.config(mob, { | ||
specials = | ||
{ | ||
{ id = xi.jsa.ASTRAL_FLOW }, | ||
}, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't required. It's done by loading the mixin above like you've done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, gotcha. Thanks for the explanation!
xi.mix.jobSpecial.config(mob, { | ||
specials = | ||
{ | ||
{ id = xi.jsa.MIJIN_GAKURE }, | ||
}, | ||
}) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same goes for the others
end | ||
|
||
local function spawnCooks(player, npc) | ||
if not isFightInProgress() then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got distracted by the QM
part 😅
Appreciate the review here! Removed the other bits as they're no longer necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for the quick responses here.
a6ca7d0
to
af73a26
Compare
af73a26
to
d7b0abd
Compare
I affirm:
What does this pull request do?
Implements quest
You Call That a Knife?
Steps to test these changes
Setup:
Pre-Requisites:
Quest:
Sandfish
toMhebi Juhbily
(!pos 40 -11 -159 250)Shed
to trigger CS withMhebi Juhbily
-- Quest StartVah Keshura
(!pos 30 -8.5 -105 250)Tonberry Board
toChef Nonberry
(!additem 1145) (!pos -136 0.0 -91 159)Mhebi Juhbily
with Key ItemNonberry's Knife
-- Quest CompleteNotes:
Chef Nonberry
, you can trade the correct item at any time to get the Key ItemShed
does not seem to have a post quest + zone eventMehbi Juhbily
post quest and zoneCapture