Working on WOTG missions
Posted: Mon Mar 09, 2015 11:49 am
Okay, as the topic says, I am working on WOTG missions. But, this being my first time making a quest/mission, I hit a point and got stuck.
I need to figure out what I am missing. I can get the CS I want (At this point, just working on the first step), I can check for key item, get the new key item, increment the mission counter so the cs doesn't keep going, but, I cannot get the quest to flag.
Here is what I have:
Now I realize there is more I will need to add, like his after quest acceptance speech, etc. I could use the WotgStatus flag, but it seems like it should be tied to the quest right now, not the mission, but I don't see "The fighting fourth" anywhere. Can anyone tell me what I have done wrong? Because it doesn't make sense to keep going if I can't get this stage to work right.
I need to figure out what I am missing. I can get the CS I want (At this point, just working on the first step), I can check for key item, get the new key item, increment the mission counter so the cs doesn't keep going, but, I cannot get the quest to flag.
Here is what I have:
Code: Select all
-----------------------------------
-- Area: Bastok Markets (S)
-- NPC: Adelbrecht
-- Starts Quests: The Fighting Fourth
-- Involved in Missions: Back to the Beginning
-----------------------------------
package.loaded["scripts/zones/Bastok_Markets_[S]/TextIDs"] = nil;
package.loaded["scripts/globals/missions"] = nil;
-----------------------------------
require("scripts/globals/titles");
require("scripts/globals/missions");
require("scripts/globals/quests");
require("scripts/zones/Bastok_Markets_[S]/TextIDs");
require("scripts/globals/keyitems");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if (player:getCurrentMission(WOTG) == BACK_TO_THE_BEGINNING and player:getVar("WotgStatus")==12) then
player:startEvent(0x008b,0,922);--WOTG event
end
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
if(csid == 0x008b and option == 1) then
player:addKeyItem(BATTLE_RATIONS);
player:messageSpecial(KEYITEM_OBTAINED,BATTLE_RATIONS);
player:addQuest(THE_FIGHTING_FOURTH);
player:setVar("WotgStatus",13);
end
end;