Skip to content
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][Assault] Promotion Corporal #6883

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/globals/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ xi.quest.id =
PROMOTION_PRIVATE_FIRST_CLASS = 90, -- + Converted
PROMOTION_SUPERIOR_PRIVATE = 91, -- + Converted
PROMOTION_LANCE_CORPORAL = 92,
PROMOTION_CORPORAL = 93,
PROMOTION_CORPORAL = 93, -- + Converted
PROMOTION_SERGEANT = 94, -- + Converted
PROMOTION_SERGEANT_MAJOR = 95, -- + Converted
PROMOTION_CHIEF_SERGEANT = 96,
Expand Down
122 changes: 122 additions & 0 deletions scripts/quests/ahtUrhgan/Promotion_Corporal.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
-----------------------------------
-- Promotion: Corporal
-- Naja Salaheem !pos 26 -8 -45.5 50
-- LogID: 6 QuestID: 93
-----------------------------------

local quest = Quest:new(xi.questLog.AHT_URHGAN, xi.quest.id.ahtUrhgan.PROMOTION_CORPORAL)

quest.reward =
{
keyItem = xi.ki.C_WILDCAT_BADGE,
}

quest.sections =
{
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_AVAILABLE and
player:getCharVar('AssaultPromotion') >= 25 and
player:getQuestStatus(xi.questLog.AHT_URHGAN, xi.quest.id.ahtUrhgan.PROMOTION_LANCE_CORPORAL) == xi.questStatus.QUEST_COMPLETED
end,

[xi.zone.AHT_URHGAN_WHITEGATE] =
{
['Naja_Salaheem'] = quest:progressEvent(5045, { text_table = 0 }),

onEventFinish =
{
[5045] = function(player, csid, option, npc)
quest:begin(player)
npcUtil.giveKeyItem(player, xi.ki.QUARTZ_TRANSMITTER)
end,
},
},
},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
player:hasKeyItem(xi.ki.QUARTZ_TRANSMITTER)
end,

[xi.zone.AHT_URHGAN_WHITEGATE] =
{
['Naja_Salaheem'] = quest:progressEvent(5047, { text_table = 0 }):oncePerZone(),
},

[xi.zone.BHAFLAU_THICKETS] =
{
['Warhorse_Hoofprint'] =
{
onTrigger = function(player, npc)
player:delKeyItem(xi.ki.QUARTZ_TRANSMITTER)
quest:setVar(player, 'Prog', 2)
return quest:messageSpecial(zones[player:getZoneID()].text.WARHORSE_HOOFPRINT + 1, xi.ki.QUARTZ_TRANSMITTER)
end,
},
},
[xi.zone.CAEDARVA_MIRE] =
{
['Warhorse_Hoofprint'] =
{
onTrigger = function(player, npc)
player:delKeyItem(xi.ki.QUARTZ_TRANSMITTER)
quest:setVar(player, 'Prog', 4)
return quest:messageSpecial(zones[player:getZoneID()].text.WARHORSE_HOOFPRINT + 1, xi.ki.QUARTZ_TRANSMITTER)
end,
},
},
[xi.zone.MOUNT_ZHAYOLM] =
{
['Warhorse_Hoofprint'] =
{
onTrigger = function(player, npc)
player:delKeyItem(xi.ki.QUARTZ_TRANSMITTER)
quest:setVar(player, 'Prog', 3)
return quest:messageSpecial(zones[player:getZoneID()].text.WARHORSE_HOOFPRINT + 1, xi.ki.QUARTZ_TRANSMITTER)
end,
},
},
[xi.zone.WAJAOM_WOODLANDS] =
{
['Warhorse_Hoofprint'] =
{
onTrigger = function(player, npc)
player:delKeyItem(xi.ki.QUARTZ_TRANSMITTER)
quest:setVar(player, 'Prog', 1)
return quest:messageSpecial(zones[player:getZoneID()].text.WARHORSE_HOOFPRINT + 1, xi.ki.QUARTZ_TRANSMITTER)
end,
},
},

},
{
check = function(player, status, vars)
return status == xi.questStatus.QUEST_ACCEPTED and
not player:hasKeyItem(xi.ki.QUARTZ_TRANSMITTER)
end,

[xi.zone.AHT_URHGAN_WHITEGATE] =
{
['Naja_Salaheem'] =
{
onTrigger = function(player, npc)
local hoofprintZone = quest:getVar(player, 'Prog')
return quest:progressEvent(5046, { [0] = hoofprintZone, text_table = 0 })
end,
},

onEventFinish =
{
[5046] = function(player, csid, option, npc)
if quest:complete(player) then
player:setVar('AssaultPromotion', 0)
player:delKeyItem(xi.ki.LC_WILDCAT_BADGE)
end
end,
},
},
},
}

return quest
3 changes: 2 additions & 1 deletion scripts/zones/Bhaflau_Thickets/DefaultActions.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local ID = zones[xi.zone.BHAFLAU_THICKETS]

return {
['qm4'] = { special = ID.text.NOTHING_HAPPENS },
['qm4'] = { special = ID.text.NOTHING_HAPPENS },
['Warhorse_Hoofprint'] = { special = ID.text.WARHORSE_HOOFPRINT },
}
1 change: 1 addition & 0 deletions scripts/zones/Bhaflau_Thickets/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ zones[xi.zone.BHAFLAU_THICKETS] =
ITEM_OBTAINED = 6390, -- Obtained: <item>.
GIL_OBTAINED = 6391, -- Obtained <number> gil.
KEYITEM_OBTAINED = 6393, -- Obtained key item: <keyitem>.
WARHORSE_HOOFPRINT = 6400, -- You find the hoofprint of a gigantic warhorse...
FELLOW_MESSAGE_OFFSET = 6419, -- I'm ready. I suppose.
CARRIED_OVER_POINTS = 7001, -- You have carried over <number> login point[/s].
LOGIN_CAMPAIGN_UNDERWAY = 7002, -- The [/January/February/March/April/May/June/July/August/September/October/November/December] <number> Login Campaign is currently underway!
Expand Down
11 changes: 6 additions & 5 deletions scripts/zones/Caedarva_Mire/DefaultActions.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
local ID = zones[xi.zone.CAEDARVA_MIRE]

return {
['_27b'] = { event = 305 },
['Jazaraats_Headstone'] = { messageSpecial = ID.text.JAZARAATS_HEADSTONE }, -- Overwritten In scripts/missions/toau/13_Lost_Kingdom.lua
['qm5'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY },
['qm12'] = { messageSpecial = ID.text.NOTHING_HAPPENS },
['Seaprinces_Tombstone'] = { messageSpecial = ID.text.SEAPRINCES_TOMBSTONE },
['_27b'] = { event = 305 },
['Jazaraats_Headstone'] = { special = ID.text.JAZARAATS_HEADSTONE }, -- Overwritten In scripts/missions/toau/13_Lost_Kingdom.lua
['qm5'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY },
['qm12'] = { special = ID.text.NOTHING_HAPPENS },
['Seaprinces_Tombstone'] = { special = ID.text.SEAPRINCES_TOMBSTONE },
['Warhorse_Hoofprint'] = { special = ID.text.WARHORSE_HOOFPRINT },
}
1 change: 1 addition & 0 deletions scripts/zones/Caedarva_Mire/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ zones[xi.zone.CAEDARVA_MIRE] =
ITEM_OBTAINED = 6390, -- Obtained: <item>.
GIL_OBTAINED = 6391, -- Obtained <number> gil.
KEYITEM_OBTAINED = 6393, -- Obtained key item: <keyitem>.
WARHORSE_HOOFPRINT = 6400, -- You find the hoofprint of a gigantic warhorse...
NOTHING_OUT_OF_ORDINARY = 6404, -- There is nothing out of the ordinary here.
FELLOW_MESSAGE_OFFSET = 6419, -- I'm ready. I suppose.
CARRIED_OVER_POINTS = 7001, -- You have carried over <number> login point[/s].
Expand Down
2 changes: 1 addition & 1 deletion scripts/zones/Mount_Zhayolm/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ return {
['_1p7'] = { event = 13 },
['blank11'] = { special = ID.text.NOTHING_HAPPENS },
['Sprightly_Footsteps'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY },
['Withered_Petals'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY },
['Warhorse_Hoofprint'] = { special = ID.text.WARHORSE_HOOFPRINT },
}
1 change: 1 addition & 0 deletions scripts/zones/Mount_Zhayolm/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ zones[xi.zone.MOUNT_ZHAYOLM] =
ITEM_OBTAINED = 6390, -- Obtained: <item>.
GIL_OBTAINED = 6391, -- Obtained <number> gil.
KEYITEM_OBTAINED = 6393, -- Obtained key item: <keyitem>.
WARHORSE_HOOFPRINT = 6400, -- You find the hoofprint of a gigantic warhorse...
FELLOW_MESSAGE_OFFSET = 6419, -- I'm ready. I suppose.
CARRIED_OVER_POINTS = 7001, -- You have carried over <number> login point[/s].
LOGIN_CAMPAIGN_UNDERWAY = 7002, -- The [/January/February/March/April/May/June/July/August/September/October/November/December] <number> Login Campaign is currently underway!
Expand Down
5 changes: 3 additions & 2 deletions scripts/zones/Wajaom_Woodlands/DefaultActions.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local ID = zones[xi.zone.WAJAOM_WOODLANDS]

return {
['_1f2'] = { event = 515 },
['Giwahb_Watchtower'] = { special = ID.text.GIWAHB_WATCHTOWER_LOCKED },
['_1f2'] = { event = 515 },
['Giwahb_Watchtower'] = { special = ID.text.GIWAHB_WATCHTOWER_LOCKED },
['Warhorse_Hoofprint'] = { special = ID.text.WARHORSE_HOOFPRINT },
}
1 change: 1 addition & 0 deletions scripts/zones/Wajaom_Woodlands/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ zones[xi.zone.WAJAOM_WOODLANDS] =
ITEM_OBTAINED = 6390, -- Obtained: <item>.
GIL_OBTAINED = 6391, -- Obtained <number> gil.
KEYITEM_OBTAINED = 6393, -- Obtained key item: <keyitem>.
WARHORSE_HOOFPRINT = 6400, -- You find the hoofprint of a gigantic warhorse...
ITEM_RETURNED = 6402, -- A <item ID> is returned to you.
FELLOW_MESSAGE_OFFSET = 6419, -- I'm ready. I suppose.
CARRIED_OVER_POINTS = 7001, -- You have carried over <number> login point[/s].
Expand Down