Skip to content

Commit

Permalink
Merge pull request #4787 from Flibe-XI/amk6-minor
Browse files Browse the repository at this point in the history
[AMK][Lua] Added check and reminder text to AMK 6, enabled repeatability
  • Loading branch information
zach2good authored Dec 3, 2023
2 parents 40b4841 + bf89ae9 commit 10f79a1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
20 changes: 16 additions & 4 deletions scripts/missions/amk/06_An_Errand_The_Professors_Price.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mission.sections =
-- Go get the Starfruit
{
check = function(player, currentMission, missionStatus, vars)
return currentMission == mission.missionId and not player:hasKeyItem(xi.ki.RIPE_STARFRUIT)
return currentMission >= mission.missionId and not player:hasKeyItem(xi.ki.RIPE_STARFRUIT)
end,

[xi.zone.WINDURST_WALLS] =
Expand All @@ -111,14 +111,27 @@ mission.sections =
{
['qm1'] =
{
-- Only need one KI orb to start fight
onTrigger = function(player, npc)
return mission:progressEvent(100)
if
player:hasKeyItem(xi.ki.ORB_OF_SWORDS) or
player:hasKeyItem(xi.ki.ORB_OF_CUPS) or
player:hasKeyItem(xi.ki.ORB_OF_BATONS) or
player:hasKeyItem(xi.ki.ORB_OF_COINS)
then
-- Prompt to start the fight
return mission:progressEvent(100)
else
-- Remind that orbs are needed
return mission:messageSpecial(horutotoID.text.IF_HAD_ORBS, xi.ki.ORB_OF_SWORDS, xi.ki.ORB_OF_CUPS, xi.ki.ORB_OF_BATONS, xi.ki.ORB_OF_COINS)
end
end,
},

onEventFinish =
{
[100] = function(player, csid, option, npc)
-- Violence was chosen, start fight
if option == 1 then
beginCardianFight(player, npc)
end
Expand All @@ -130,7 +143,7 @@ mission.sections =
-- Got the Starfruit
{
check = function(player, currentMission, missionStatus, vars)
return currentMission == mission.missionId and
return currentMission >= mission.missionId and
player:hasKeyItem(xi.ki.RIPE_STARFRUIT) and
not player:needToZone()
end,
Expand Down Expand Up @@ -164,7 +177,6 @@ mission.sections =
{
['qm1'] =
{
-- TODO: Reminder about the orbs
onTrigger = function(player, npc)
return mission:messageSpecial(horutotoID.text.CANNOT_ENTER_BATTLEFIELD, xi.ki.RIPE_STARFRUIT):setPriority(1000)
end,
Expand Down
3 changes: 2 additions & 1 deletion scripts/zones/Outer_Horutoto_Ruins/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ zones[xi.zone.OUTER_HORUTOTO_RUINS] =
DOOR_FIRMLY_SHUT = 7265, -- The door is firmly shut.
ALL_G_ORBS_ENERGIZED = 7268, -- The six Mana Orbs have been successfully energized with magic!
CHEST_UNLOCKED = 7291, -- You unlock the chest!
CANNOT_ENTER_BATTLEFIELD = 7352, -- You cannot enter this battlefield with the key item: <keyitem> in your possession.
IF_HAD_ORBS = 7350, -- You sense that if you had <keyitem>, <keyitem>, <keyitem>, or <keyitem>, something might happen.
CANNOT_ENTER_BATTLEFIELD = 7353, -- You cannot enter this battlefield with the key item: <keyitem> in your possession.
PLAYER_OBTAINS_ITEM = 8268, -- <name> obtains <item>!
UNABLE_TO_OBTAIN_ITEM = 8269, -- You were unable to obtain the item.
PLAYER_OBTAINS_TEMP_ITEM = 8270, -- <name> obtains the temporary item: <item>!
Expand Down

0 comments on commit 10f79a1

Please sign in to comment.