Page 1 of 2
Bastok Mission 9-1
Posted: Mon Jul 21, 2014 8:08 pm
by myteethareshiny
I noticed that this mission wasn't working, so I examined the script for Alois, and I noticed that the scripting for this mission was missing entirely. It's also missing from Dancing Wolf in Rabao. Am I just missing an update or something? I'm not sure how to script this myself, and I can't seem to find it on here, so I figured I'd ask. I know the basics, but the main thing I'm lacking is the event values. How do I find them?
Re: Bastok Mission 9-1
Posted: Mon Jul 21, 2014 8:27 pm
by Signature
Re: Bastok Mission 9-1
Posted: Mon Jul 21, 2014 9:27 pm
by myteethareshiny
This could take a while for me to figure out, but I think I'd rather do it myself and learn to script on my own. Thanks for pointing me in the right direction.
Re: Bastok Mission 9-1
Posted: Mon Jul 21, 2014 10:45 pm
by kjLotus
you really don't want to try and find IDs yourself
Re: Bastok Mission 9-1
Posted: Tue Jul 22, 2014 4:57 am
by gedads
Hi , i made a script for those some time ago, you can use them to get cs id, they're in the old format for tortoise but you can still edit with wordpad or any text editor.
Re: Bastok Mission 9-1
Posted: Tue Jul 22, 2014 12:36 pm
by myteethareshiny
I tried your script, but it's not working. Alois doesn't react at all, and the map server keeps giving me this error:
[Error] luautils::OnTrigger: scripts/zones/Metalworks/npcs/Alois.lua:34: ')' expected near 'then'
I checked the script for errors, but I don't see any. Here's the script after it patched.
-----------------------------------
-- Area: Metalworks
-- NPC: Alois
-- Involved in Missions: Wading Beasts, The Salt of the Earth
-- @pos 96 -20 14 237
-----------------------------------
package.loaded["scripts/zones/Metalworks/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/missions");
require("scripts/zones/Metalworks/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
if(player:getCurrentMission(BASTOK) == WADING_BEASTS and trade:hasItemQty(4362,1) and trade:getItemCount() == 1)then -- Trade Lizard Egg
if(player:hasCompletedMission(BASTOK,WADING_BEASTS) == false) then
player:startEvent(0x0174);
else
player:startEvent(0x0175);
end
end
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if(player:getCurrentMission(BASTOK) == THE_SALT_OF_THE_EARTH and player:getVar("BASTOK91" == 0)then
player:startEvent (0x0305);
elseif(player:getCurrentMission(BASTOK) == THE_SALT_OF_THE_EARTH and player:getVar("BASTOK91") == 1)then
player:startEvent(0x0306);
elseif(player:getVar("BASTOK91") == 10)then
player:startEvent(0x0307);
elseif(player:getVar("BASTOK91") == 11)then
player:startEvent(0x0308);
else
player:startEvent(0x0172);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
--printf("CSID: %u",csid);
--printf("RESULT: %u",option);
if(csid == 0x0174 or csid == 0x0175)then
finishMissionTimeline(player,1,csid,option);
elseif(csid == 0x0305)then
player:setVar("BASTOK91",1);
elseif(csid == 0x0308)then
player:setVar("BASTOK91",0);
player:delKeyItem(MIRACLESALT);
player:completeMission(BASTOK,THE_SALT_OF_THE_EARTH);
end
end;
Re: Bastok Mission 9-1
Posted: Tue Jul 22, 2014 1:55 pm
by gedads
hi, try adding an end in ontrigger after player:startEvent(0x0172);
Re: Bastok Mission 9-1
Posted: Tue Jul 22, 2014 4:58 pm
by myteethareshiny
Nope, same thing.
Re: Bastok Mission 9-1
Posted: Tue Jul 22, 2014 11:10 pm
by TeoTwawki
Why no code tags?
Code: Select all
function onTrigger(player,npc)
if (player:getCurrentMission(BASTOK) == THE_SALT_OF_THE_EARTH and player:getVar("BASTOK_9_1") == 0) then
You missed a ) on that var.
You have
and need
Re: Bastok Mission 9-1
Posted: Wed Jul 23, 2014 2:10 am
by kjLotus
myteethareshiny wrote:I checked the script for errors, but I don't see any
tells you exactly what line it's on: line 34