Permalink
Browse files

Merge pull request #5113 from KnowOne134/Degen

Degenhard rewrite
  • Loading branch information...
TeoTwawki committed Jul 19, 2018
2 parents 4fd4b25 + 92bc623 commit 7da27b2fdba1f6cad72b9175d075d65873c93904
Showing with 24 additions and 32 deletions.
  1. +24 −32 scripts/zones/Bastok_Markets/npcs/Degenhard.lua
@@ -5,49 +5,41 @@
-- Involved in Quests: Beat Around the Bushin
-- !pos -175 2 -135 235
-----------------------------------
package.loaded["scripts/zones/Bastok_Markets/TextIDs"] = nil;
package.loaded["scripts/zones/Bastok_Markets/TextIDs"] = nil
-----------------------------------
require("scripts/zones/Bastok_Markets/TextIDs");
require("scripts/globals/keyitems");
require("scripts/globals/settings");
require("scripts/globals/quests");
require("scripts/zones/Bastok_Markets/TextIDs")
require("scripts/globals/keyitems")
require("scripts/globals/npc_util")
require("scripts/globals/quests")
-----------------------------------

function onTrade(player,npc,trade)
local count = trade:getItemCount();
local BoneChip = trade:hasItemQty(880,1);
if (BoneChip == true and count == 1) then
local BareBones = player:getQuestStatus(BASTOK,THE_BARE_BONES);
if (BareBones == 1) then
player:tradeComplete();
player:completeQuest(BASTOK,THE_BARE_BONES);
player:startEvent(258);
end
if player:getQuestStatus(BASTOK,THE_BARE_BONES) == QUEST_ACCEPTED and npcUtil.tradeHas(trade, 880) then
player:startEvent(258)
end
end;
end

function onTrigger(player,npc)
local BareBones = player:getQuestStatus(BASTOK,THE_BARE_BONES);
if (player:getVar("BeatAroundTheBushin") == 3) then
player:startEvent(342);
elseif (BareBones == 0) then
player:startEvent(256);
if player:getVar("BeatAroundTheBushin") == 3 then
player:startEvent(342)
elseif player:getQuestStatus(BASTOK,THE_BARE_BONES) == QUEST_AVAILABLE then
player:startEvent(256)
else
player:startEvent(255);
player:startEvent(255)
end
end;
end

function onEventUpdate(player,csid,option)
end;
end

function onEventFinish(player,csid,option)
if (csid == 342) then
player:setVar("BeatAroundTheBushin",4);
elseif (csid == 256) then
player:addQuest(BASTOK,THE_BARE_BONES);
elseif (csid == 258) then
player:addKeyItem(dsp.ki.MAP_OF_THE_DANGRUF_WADI);
player:messageSpecial(KEYITEM_OBTAINED,dsp.ki.MAP_OF_THE_DANGRUF_WADI);
player:addFame(BASTOK,60);
if csid == 342 then
player:setVar("BeatAroundTheBushin",4)
elseif csid == 256 then
player:addQuest(BASTOK,THE_BARE_BONES)
elseif csid == 258 then
if (npcUtil.completeQuest(player, BASTOK, THE_BARE_BONES, {keyItem = dsp.ki.MAP_OF_THE_DANGRUF_WADI, fame = 60})) then
player:confirmTrade()
end
end
end;
end

0 comments on commit 7da27b2

Please sign in to comment.