-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6932 from KnowOne134/Quest-Die_Cast
[Quest][lua][sql] The Die is Cast
- Loading branch information
Showing
13 changed files
with
240 additions
and
12 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,34 @@ | ||
----------------------------------- | ||
-- ID: 15770 | ||
-- Item: Random Ring | ||
-- Item Effect: Enchantment Dex + math.random(1, 8) | ||
-- Duration: 30 Mins | ||
----------------------------------- | ||
---@type TItem | ||
local itemObject = {} | ||
|
||
itemObject.onItemCheck = function(target, item, param, caster) | ||
if target:getStatusEffectBySource(xi.effect.ENCHANTMENT, xi.effectSourceType.EQUIPPED_ITEM, xi.item.RANDOM_RING) ~= nil then | ||
target:delStatusEffect(xi.effect.ENCHANTMENT, nil, xi.effectSourceType.EQUIPPED_ITEM, xi.item.RANDOM_RING) | ||
end | ||
|
||
return 0 | ||
end | ||
|
||
itemObject.onItemUse = function(target) | ||
if target:hasEquipped(xi.item.RANDOM_RING) then | ||
local power = math.random(1, 8) | ||
|
||
target:addStatusEffect(xi.effect.ENCHANTMENT, power, 0, 3600, 0, 0, 0, xi.effectSourceType.EQUIPPED_ITEM, xi.item.RANDOM_RING) | ||
end | ||
end | ||
|
||
itemObject.onEffectGain = function(target, effect) | ||
target:addMod(xi.mod.DEX, effect:getPower()) | ||
end | ||
|
||
itemObject.onEffectLose = function(target, effect) | ||
target:delMod(xi.mod.DEX, effect:getPower()) | ||
end | ||
|
||
return itemObject |
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,159 @@ | ||
----------------------------------- | ||
-- The Die is Cast | ||
-- Random Ring | ||
----------------------------------- | ||
-- Log ID: 6, Quest ID: 16 | ||
-- Ratihb: !pos 75.225 -6.000 -137.203 50 | ||
-- Ekhu Pesshyadha: !pos -13.043 0.999 103.423 50 | ||
-- Jijiroon: !pos 15.913 0.000 -32.676 53 | ||
-- qm9: !pos 311.088 -3.674 170.124 54 | ||
----------------------------------- | ||
|
||
local ID = zones[xi.zone.ARRAPAGO_REEF] | ||
local quest = Quest:new(xi.questLog.AHT_URHGAN, xi.quest.id.ahtUrhgan.THE_DIE_IS_CAST) | ||
|
||
quest.reward = | ||
{ | ||
item = xi.item.RANDOM_RING, | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE | ||
end, | ||
|
||
[xi.zone.AHT_URHGAN_WHITEGATE] = | ||
{ | ||
['Ratihb'] = quest:progressEvent(591), | ||
|
||
onEventFinish = | ||
{ | ||
[591] = function(player, csid, option, npc) | ||
quest:begin(player) | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
vars.Prog == 0 | ||
end, | ||
|
||
[xi.zone.AHT_URHGAN_WHITEGATE] = | ||
{ | ||
['Ekhu_Pesshyadha'] = quest:progressEvent(592), | ||
|
||
onEventFinish = | ||
{ | ||
[592] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 1) | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
vars.Prog == 1 | ||
end, | ||
|
||
[xi.zone.NASHMAU] = | ||
{ | ||
['Jijiroon'] = quest:progressEvent(245), | ||
|
||
onEventFinish = | ||
{ | ||
[245] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 2) | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
vars.Prog == 2 | ||
end, | ||
|
||
[xi.zone.ARRAPAGO_REEF] = | ||
{ | ||
['qm9'] = quest:progressEvent(212), | ||
|
||
onEventFinish = | ||
{ | ||
[212] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 3) | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
vars.Prog == 3 | ||
end, | ||
|
||
[xi.zone.ARRAPAGO_REEF] = | ||
{ | ||
['qm9'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if npcUtil.popFromQM(player, npc, ID.mob.BUKKI, { hide = 0 }) then | ||
return quest:messageSpecial(ID.text.SPINE_CHILL) | ||
end | ||
end, | ||
}, | ||
|
||
['Bukki'] = | ||
{ | ||
onMobDeath = function(mob, player, optParams) | ||
quest:setVar(player, 'Prog', 4) | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
vars.Prog == 4 | ||
end, | ||
|
||
[xi.zone.ARRAPAGO_REEF] = | ||
{ | ||
['qm9'] = quest:progressEvent(213), | ||
|
||
onEventFinish = | ||
{ | ||
[213] = function(player, csid, option, npc) | ||
quest:setVar(player, 'Prog', 5) | ||
npcUtil.giveKeyItem(player, xi.ki.BAG_OF_GOLD_PIECES) | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED and | ||
vars.Prog == 5 | ||
end, | ||
|
||
[xi.zone.AHT_URHGAN_WHITEGATE] = | ||
{ | ||
['Ratihb'] = quest:progressEvent(593), | ||
|
||
onEventFinish = | ||
{ | ||
[593] = function(player, csid, option, npc) | ||
if quest:complete(player) then | ||
player:delKeyItem(xi.ki.BAG_OF_GOLD_PIECES) | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
local ID = zones[xi.zone.ARRAPAGO_REEF] | ||
|
||
return { | ||
['qm1'] = { messageSpecial = ID.text.SLIMY_TOUCH }, | ||
['qm2'] = { messageSpecial = ID.text.GLITTERING_FRAGMENTS }, | ||
['qm3'] = { messageSpecial = ID.text.FLUTTERY_OBJECTS }, | ||
['qm4'] = { messageSpecial = ID.text.STIFLING_STENCH }, | ||
['qm10'] = { messageSpecial = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm1'] = { special = ID.text.SLIMY_TOUCH }, | ||
['qm2'] = { special = ID.text.GLITTERING_FRAGMENTS }, | ||
['qm3'] = { special = ID.text.FLUTTERY_OBJECTS }, | ||
['qm4'] = { special = ID.text.STIFLING_STENCH }, | ||
['qm9'] = { special = ID.text.NOTHING_OUT_OF_ORDINARY }, | ||
['qm10'] = { special = 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
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
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