-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Lua, Fishing, Quest] The Sand Charm converted to IF format (#6393)
* The Sand Charm added * Added some more flavor text, tagged quests as converted
- Loading branch information
Showing
5 changed files
with
152 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
----------------------------------- | ||
-- The Sand Charm | ||
----------------------------------- | ||
-- Log ID: 4, Quest ID: 8 | ||
-- !addquest 4 8 | ||
-- Blandine : !pos 23 -7 41 249 | ||
-- Zexu : !pos 31.511 -9.001 23.496 249 | ||
-- Celestina : !pos -37.624 -16.050 75.681 249 | ||
----------------------------------- | ||
|
||
local quest = Quest:new(xi.questLog.OTHER_AREAS, xi.quest.id.otherAreas.THE_SAND_CHARM) | ||
|
||
quest.reward = | ||
{ | ||
exp = 2000, | ||
gil = 2000, | ||
ki = xi.ki.MAP_OF_BOSTAUNIEUX_OUBLIETTE, | ||
fameArea = xi.fameArea.WINDURST, | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE and | ||
player:getFameLevel(xi.fameArea.WINDURST) >= 4 and | ||
xi.settings.map.FISHING_ENABLE == true | ||
end, | ||
|
||
[xi.zone.MHAURA] = | ||
{ | ||
['Blandine'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
local xPos = player:getXPos() | ||
local zPos = player:getZPos() | ||
|
||
-- Cutscenes won't start in the docking area. Must be on town side. | ||
if zPos <= 29 or zPos >= 38 or xPos <= 16 or xPos >= 32 then | ||
if quest:getVar(player, 'Prog') == 0 then | ||
return quest:progressEvent(125) -- I know he's out there | ||
elseif quest:getVar(player, 'Prog') == 2 then | ||
return quest:progressEvent(124) -- Celestina doesn't want to hear it anymore | ||
end | ||
end | ||
end, | ||
}, | ||
|
||
['Zexu'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if quest:getVar(player, 'Prog') == 1 then | ||
return quest:progressEvent(123) -- Word is, pirates got 'im | ||
end | ||
end, | ||
}, | ||
|
||
['Celestina'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if quest:getVar(player, 'Prog') == 3 then | ||
return quest:progressEvent(126, xi.item.SAND_CHARM) -- Go get back the sand charm | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[123] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 2) | ||
end, | ||
|
||
[124] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 3) | ||
end, | ||
|
||
[125] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 1) | ||
end, | ||
|
||
[126] = function(player, csid, option, npc) | ||
quest:begin(player) | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED | ||
end, | ||
|
||
[xi.zone.MHAURA] = | ||
{ | ||
['Celestina'] = | ||
{ | ||
onTrade = function(player, npc, trade) | ||
if npcUtil.tradeHas(trade, xi.item.SAND_CHARM) then | ||
return quest:progressEvent(127, 0, xi.item.SAND_CHARM) -- hes dead, but he'll be back soon I'm sure | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[127] = function(player, csid, option, npc) | ||
if quest:complete(player) then | ||
player:tradeComplete() | ||
player:setCharVar('SmallDialogByBlandine', 1) | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_COMPLETED | ||
end, | ||
|
||
[xi.zone.MHAURA] = | ||
{ | ||
['Blandine'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if player:getCharVar('SmallDialogByBlandine') == 1 then | ||
return quest:progressEvent(128) -- I stand here and pray for sailors now | ||
else | ||
return quest:event(129):replaceDefault() -- May the sea be kind... | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[128] = function(player, csid, option, npc) | ||
player:setCharVar('SmallDialogByBlandine', 0) | ||
end, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
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