Bastok Mission 9-1

User avatar
myteethareshiny
Posts: 18
Joined: Sun Jun 29, 2014 10:11 pm

Bastok Mission 9-1

Post by myteethareshiny » Mon Jul 21, 2014 8:08 pm

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?

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: Bastok Mission 9-1

Post by Signature » Mon Jul 21, 2014 8:27 pm


User avatar
myteethareshiny
Posts: 18
Joined: Sun Jun 29, 2014 10:11 pm

Re: Bastok Mission 9-1

Post by myteethareshiny » Mon Jul 21, 2014 9:27 pm

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. :)

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Bastok Mission 9-1

Post by kjLotus » Mon Jul 21, 2014 10:45 pm

you really don't want to try and find IDs yourself

gedads
Developer
Posts: 171
Joined: Fri Jan 04, 2013 7:48 pm

Re: Bastok Mission 9-1

Post by gedads » Tue Jul 22, 2014 4:57 am

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 245 times

User avatar
myteethareshiny
Posts: 18
Joined: Sun Jun 29, 2014 10:11 pm

Re: Bastok Mission 9-1

Post by myteethareshiny » Tue Jul 22, 2014 12:36 pm

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;

gedads
Developer
Posts: 171
Joined: Fri Jan 04, 2013 7:48 pm

Re: Bastok Mission 9-1

Post by gedads » Tue Jul 22, 2014 1:55 pm

hi, try adding an end in ontrigger after player:startEvent(0x0172);

User avatar
myteethareshiny
Posts: 18
Joined: Sun Jun 29, 2014 10:11 pm

Re: Bastok Mission 9-1

Post by myteethareshiny » Tue Jul 22, 2014 4:58 pm

Nope, same thing.
Don't sweat the petty things, and don't pet the sweaty things.

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Bastok Mission 9-1

Post by TeoTwawki » Tue Jul 22, 2014 11:10 pm

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

Code: Select all

player:getVar("BASTOK91" == 0
and need

Code: Select all

player:getVar("BASTOK91") == 0
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Bastok Mission 9-1

Post by kjLotus » Wed Jul 23, 2014 2:10 am

myteethareshiny wrote:I checked the script for errors, but I don't see any
tells you exactly what line it's on: line 34

Post Reply