Bastok Mission 9-1
- myteethareshiny
- Posts: 18
- Joined: Sun Jun 29, 2014 10:11 pm
Bastok Mission 9-1
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?
- myteethareshiny
- Posts: 18
- Joined: Sun Jun 29, 2014 10:11 pm
Re: Bastok Mission 9-1
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
you really don't want to try and find IDs yourself
Re: Bastok Mission 9-1
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.
- Attachments
-
- oldbastok91.rar
- (2.55 KiB) Downloaded 482 times
- myteethareshiny
- Posts: 18
- Joined: Sun Jun 29, 2014 10:11 pm
Re: Bastok Mission 9-1
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;
[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
hi, try adding an end in ontrigger after player:startEvent(0x0172);
- myteethareshiny
- Posts: 18
- Joined: Sun Jun 29, 2014 10:11 pm
Re: Bastok Mission 9-1
Nope, same thing.
Don't sweat the petty things, and don't pet the sweaty things.
Re: Bastok Mission 9-1
Why no code tags?
You missed a ) on that var.
You have
and need
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 have
Code: Select all
player:getVar("BASTOK91" == 0
Code: Select all
player:getVar("BASTOK91") == 0
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: Bastok Mission 9-1
tells you exactly what line it's on: line 34myteethareshiny wrote:I checked the script for errors, but I don't see any