This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # sql/zone_settings.sql
- Loading branch information
Showing
18 changed files
with
568 additions
and
551 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
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,59 +1,52 @@ | ||
----------------------------------- | ||
-- Area: Crawlers Nest | ||
-- NPC: ??? | ||
-- Involved in Quest: The Crimson Trial | ||
-- NPC: ??? | ||
-- Finishes Quest: Enveloped in Darkness | ||
-- !pos 59 0.1 66 197 | ||
----------------------------------- | ||
require("scripts/globals/settings") | ||
require("scripts/globals/keyitems") | ||
require("scripts/globals/quests") | ||
require("scripts/globals/npc_util") | ||
local ID = require("scripts/zones/Crawlers_Nest/IDs") | ||
----------------------------------- | ||
|
||
function onTrade(player, npc, trade) | ||
end | ||
|
||
function onTrigger(player, npc) | ||
|
||
local cprog = player:getCharVar("theCrimsonTrial_prog") | ||
local cdate = player:getCharVar("theCrimsonTrial_date") | ||
local realday = tonumber(os.date("%j")) -- %M for next minute, %j for next day | ||
|
||
if (player:hasKeyItem(tpz.ki.CRAWLER_BLOOD) == true and player:hasKeyItem(tpz.ki.OLD_BOOTS) == true) then | ||
player:startEvent(4) | ||
elseif (cprog == 1 and cdate == realday) then | ||
player:messageSpecial(ID.text.EQUIPMENT_COMPLETELY_PURIFIED) | ||
elseif (cprog == 1 and cdate ~= realday) then | ||
player:startEvent(5) | ||
-- Enveloped in Darkness | ||
if player:getQuestStatus(SANDORIA, tpz.quest.id.sandoria.ENVELOPED_IN_DARKNESS) == QUEST_ACCEPTED then | ||
local timeout = player:getCharVar("envelopedInDarkness_timer") | ||
if player:hasKeyItem(tpz.ki.CRAWLER_BLOOD) and player:hasKeyItem(tpz.ki.OLD_BOOTS) then | ||
player:startEvent(4) -- Ask to take key items | ||
elseif timeout ~= 0 and timeout > os.time() then | ||
player:messageSpecial(ID.text.EQUIPMENT_NOT_PURIFIED) -- Stagger quest retrieval | ||
elseif timeout ~= 0 and timeout <= os.time() then | ||
player:startEvent(5) -- Finish quest | ||
else | ||
player:messageSpecial(ID.text.SOMEONE_HAS_BEEN_DIGGING_HERE) -- Player misses key item(s) | ||
end | ||
-- Default | ||
else | ||
player:messageSpecial(ID.text.SOMEONE_HAS_BEEN_DIGGING_HERE) | ||
end | ||
|
||
end | ||
|
||
function onEventUpdate(player, csid, option) | ||
end | ||
|
||
function onEventFinish(player, csid, option) | ||
|
||
if (csid == 4 and option == 1) then | ||
if csid == 4 and option == 1 then | ||
player:delKeyItem(tpz.ki.CRAWLER_BLOOD) | ||
player:delKeyItem(tpz.ki.OLD_BOOTS) | ||
player:setCharVar("theCrimsonTrial_date", os.date("%j")) -- %M for next minute, %j for next day | ||
player:setCharVar("theCrimsonTrial_prog", 1) | ||
player:setCharVar("envelopedInDarkness_timer", os.time() + 30) -- Set timer | ||
player:messageSpecial(ID.text.YOU_BURY_THE, tpz.ki.OLD_BOOTS, tpz.ki.CRAWLER_BLOOD) | ||
elseif (csid == 5) then | ||
if (player:getFreeSlotsCount() == 0) then | ||
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, 14093) -- Warlock's Boots | ||
else | ||
player:addItem(14093) | ||
player:messageSpecial(ID.text.ITEM_OBTAINED, 14093) -- Warlock's Boots | ||
player:setCharVar("theCrimsonTrial_date", 0) | ||
player:setCharVar("theCrimsonTrial_prog", 0) | ||
player:setCharVar("needs_crawler_blood", 2) -- Fixed being unable start next quest | ||
player:addFame(SANDORIA, 40) | ||
player:completeQuest(SANDORIA, tpz.quest.id.sandoria.ENVELOPED_IN_DARKNESS) | ||
end | ||
elseif csid == 5 then | ||
npcUtil.completeQuest(player, SANDORIA, tpz.quest.id.sandoria.ENVELOPED_IN_DARKNESS, { | ||
item = 14093, -- Warlock's Boots | ||
fame = 40, | ||
var = {"envelopedInDarkness_timer", "needs_crawler_blood"} | ||
}) | ||
end | ||
|
||
end |
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
Oops, something went wrong.