{"action":"closed","issue":{"url":"https://api.github.com/repos/DarkstarProject/darkstar/issues/1032","labels_url":"https://api.github.com/repos/DarkstarProject/darkstar/issues/1032/labels{/name}","comments_url":"https://api.github.com/repos/DarkstarProject/darkstar/issues/1032/comments","events_url":"https://api.github.com/repos/DarkstarProject/darkstar/issues/1032/events","html_url":"https://github.com/DarkstarProject/darkstar/issues/1032","id":60047186,"number":1032,"title":"Sandy Mission 2-3, Halver Doesn't Do Anything","user":{"login":"LordKaT","id":1979210,"avatar_url":"https://avatars.githubusercontent.com/u/1979210?v=3","gravatar_id":"","url":"https://api.github.com/users/LordKaT","html_url":"https://github.com/LordKaT","followers_url":"https://api.github.com/users/LordKaT/followers","following_url":"https://api.github.com/users/LordKaT/following{/other_user}","gists_url":"https://api.github.com/users/LordKaT/gists{/gist_id}","starred_url":"https://api.github.com/users/LordKaT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordKaT/subscriptions","organizations_url":"https://api.github.com/users/LordKaT/orgs","repos_url":"https://api.github.com/users/LordKaT/repos","events_url":"https://api.github.com/users/LordKaT/events{/privacy}","received_events_url":"https://api.github.com/users/LordKaT/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-06T01:51:17Z","updated_at":"2015-04-07T09:42:37Z","closed_at":"2015-04-07T09:42:37Z","body":"Halver is somewhat retarded. I had to clean up his onTrigger code to figure out what the heck was going on and why we couldn't finish Sandy Mission 2-3 and get our Adventurer's Certificate.\r\n\r\nSo, the code itself only checks if currentMission == JOURNEY_ABROAD\r\nBut the mission itself is advanced to JOURNEY_TO_WINDURST2\r\nSomewhere along the way there was a check for MissionStatus == 11.\r\nI don't know where this comes from. MissionStatus is set to 10 on completion.\r\n\r\nI also cleaned up the code a bit. There were a few sections where Halver could fall through to multiple cutscenes if you were doing a couple of things at once. This makes it so that you're forced to talk to him multiple times.\r\n\r\n    --onTrigger\r\n    function onTrigger(player,npc)\r\n    local pNation = player:getNation();\r\n    local currentMission = player:getCurrentMission(pNation);\r\n    local WildcatSandy = player:getVar(\"WildcatSandy\");\r\n    local MissionStatus = player:getVar(\"MissionStatus\");\r\n\r\n\t-- Lure of the wildcat\r\n\tif (player:getQuestStatus(SANDORIA, LURE_OF_THE_WILDCAT_SAN_D_ORIA) == QUEST_ACCEPTED and player:getMaskBit(WildcatSandy, 16) == false) then\r\n\t\tplayer:startEvent(0x022e);\r\n\t\treturn;\r\n\tend\r\n\r\n\t-- \"Flagsando\"??????\r\n\tif (player:getVar(\"Flagsando\") == 1) then\r\n\t\tif (player:getFreeSlotsCount() == 0) then\r\n\t\t\tplayer:messageSpecial(ITEM_CANNOT_BE_OBTAINED, 181);\r\n\t\telse\r\n\t\t\tplayer:setVar(\"Flagsando\",0);\r\n\t\t\tplayer:addItem(181);\r\n\t\t\tplayer:messageSpecial(ITEM_OBTAINED, 181);\r\n\t\tend\r\n\t\treturn;\r\n\tend\r\n\r\n\t-- Blackmail quest\r\n\tif (player:getQuestStatus(SANDORIA, BLACKMAIL) == QUEST_ACCEPTED and player:hasKeyItem(SUSPICIOUS_ENVELOPE)) then\r\n\t\tplayer:startEvent(0x0225);\r\n\t\tplayer:setVar(\"BlackMailQuest\", 1);\r\n\t\tplayer:delKeyItem(SUSPICIOUS_ENVELOPE);\r\n\t\treturn;\r\n\tend\r\n\r\n\t-- Heir to the Light\r\n\tif (player:hasCompletedMission(SANDORIA,THE_HEIR_TO_THE_LIGHT)) then\r\n\t\tplayer:startEvent(0x001f);\r\n\t\treturn;\r\n\tend\r\n\r\n\tif (player:getCurrentMission(SANDORIA) == THE_HEIR_TO_THE_LIGHT and player:getVar(\"SANDO92\") >= 2 and player:getVar(\"SANDO92\") <=5) then\r\n\t\tplayer:startEvent(0x001d);\r\n\t\treturn;\r\n\tend\r\n\r\n\tif (player:getCurrentMission(SANDORIA) == THE_HEIR_TO_THE_LIGHT and player:getVar(\"SANDO92\") == 6) then\r\n\t\tplayer:startEvent(0x001e);\r\n\t\treturn;\r\n\tend\r\n\r\n\tif (player:getCurrentMission(SANDORIA) == THE_HEIR_TO_THE_LIGHT and player:getVar(\"SANDO92\") == 7) then\r\n\t\tplayer:startEvent(0x0009);\r\n\t\treturn;\r\n\tend\r\n\r\n\t-- Nation Missions\r\n\tif (pNation == SANDORIA) then\r\n\t\tif (currentMission == JOURNEY_ABROAD) then\r\n\t\t\tif (MissionStatus == 0) then\r\n\t\t\t\tplayer:startEvent(0x01f9);\r\n\t\t\telseif (MissionStatus == 11) then\r\n\t\t\t\tplayer:startEvent(0x01fb);\r\n\t\t\telse\r\n\t\t\t\tplayer:startEvent(0x0214);\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\r\n\t\t-- JOURNEY_ABROAD's final scene\r\n\t\tif (currentMission == JOURNEY_TO_WINDURST2) then\r\n\t\t\tif (MissionStatus == 10) then\r\n\t\t\t\tplayer:startEvent(0x01fb);\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\r\n\t\tif (currentMission == APPOINTMENT_TO_JEUNO) then\r\n\t\t\tif (MissionStatus == 0) then\r\n\t\t\t\tplayer:startEvent(0x01fc);\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\r\n\t\tif (currentMission == THE_RUINS_OF_FEI_YIN) then\r\n\t\t\tif (MissionStatus == 9) then\r\n\t\t\t\tplayer:startEvent(0x0215);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 10) then\r\n\t\t\t\tplayer:showText(npc, HALVER_OFFSET+334);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 12) then\r\n\t\t\t\tif (player:hasKeyItem(BURNT_SEAL)) then\r\n\t\t\t\t\tplayer:startEvent(0x0216);\r\n\t\t\t\tend\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\r\n\t\tif (currentMission == THE_SHADOW_LORD) then\r\n\t\t\tif (MissionStatus == 0) then\r\n\t\t\t\tplayer:startEvent(0x0222);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 4) then\r\n\t\t\t\tif (player:hasKeyItem(SHADOW_FRAGMENT)) then\r\n\t\t\t\t\tplayer:startEvent(0x0224);\r\n\t\t\t\tend\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 5) then\r\n\t\t\t\tplayer:showText(npc,HALVER_OFFSET+471);\t\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\r\n\t\t-- Mission 255???\r\n\t\tif (currentMission == 255) then\r\n\t\t\tif (player:hasCompletedMission(SANDORIA, THE_SHADOW_LORD)) then\r\n\t\t\t\tplayer:showText(npc, HALVER_OFFSET+500);\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\r\n\t\tif (currentMission == LEAUTE_S_LAST_WISHES) then\r\n\t\t\tif (MissionStatus == 0) then\r\n\t\t\t\tplayer:startEvent(0x0019);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 1) then\r\n\t\t\t\tplayer:startEvent(0x0017);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 2) then\r\n\t\t\t\tplayer:startEvent(0x0018);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 3) then\r\n\t\t\t\tplayer:startEvent(0x0016);\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\t\t\r\n\r\n\t\t-- Mission 8-1\r\n\t\tif (currentMission == COMING_OF_AGE) then\r\n\t\t\tif (MissionStatus == 1) then\r\n\t\t\t\tplayer:startEvent(0x003A);\r\n\t\t\tend\r\n\t\t\tif (MissionStatus == 3) then\r\n\t\t\t\tif (player:hasKeyItem(DROPS_OF_AMNIO)) then\r\n\t\t\t\t\tplayer:startEvent(0x0066);\r\n\t\t\t\tend\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\t\treturn;\r\n\tend\r\n\r\n\tif (pNation == BASTOK) then\r\n\t\tif (currentMission == THE_EMISSARY) then\r\n\t\t\tif (MissionStatus == 3) then\r\n\t\t\t\tplayer:startEvent(0x01f5);\r\n\t\t\tend\r\n\t\tend\r\n\r\n\t\tif (currentMission == THE_EMISSARY_SANDORIA) then\r\n\t\t\tplayer:showText(npc, HALVER_OFFSET+279);\r\n\t\tend\r\n\r\n\t\tif (currentMission == THE_EMISSARY_SANDORIA2) then\r\n\t\t\tMissionStatus = MissionStatus;\r\n\t\t\tif (MissionStatus == 8) then\r\n\t\t\t\tplayer:startEvent(0x01f7);\r\n\t\t\telseif (MissionStatus <= 10) then\r\n\t\t\t\tplayer:showText(npc, HALVER_OFFSET+279);\r\n\t\t\tend\r\n\t\telse\r\n\t\t\tplayer:showText(npc, HALVER_OFFSET+1092);\r\n\t\tend\r\n\t\treturn;\r\n\tend\r\n\r\n\tif (pNation == WINDURST) then\r\n\t\tif (currentMission == THE_THREE_KINGDOMS) then\r\n\t\t\tif (MissionStatus < 3) then\r\n\t\t\t\tplayer:startEvent(0x0214);\r\n\t\t\tend\r\n\t\t\treturn;\r\n\t\tend\r\n\t\tif (currentMission == THE_THREE_KINGDOMS_SANDORIA or currentMission == THE_THREE_KINGDOMS_SANDORIA2) then\r\n\t\t\tif (MissionStatus == 3) then\r\n\t\t\t\tplayer:startEvent(0x01F6);\r\n\t\t\telseif (MissionStatus == 8) then\r\n\t\t\t\tplayer:startEvent(0x01F8);\r\n\t\t\telse\r\n\t\t\t\tplayer:showText(npc, HALVER_OFFSET+279);\r\n\t\t\tend\r\n\t\tend\r\n\t\treturn;\r\n\tend\r\n\tplayer:showText(npc, HALVER_OFFSET+1092);\r\n    end;\r\n"}}