Log in

View Full Version : Cavebot isn't working? Scripts fault?



svennn
12-14-2013, 12:17 PM
So I am using this (http://pastebin.com/FBiGC66P) script. When I start the walker, the walker IS ON but it doesn't do anything. The first waypoint is "OpenBP". The character just stands there while doing nothing. The backpack setup is correct, it seems like the walker just wont execute the label or waypoint when I have this script loaded.

Any suggestions on what might be wrong?

EDIT: I do not get any errors when executing the script.

SEBEKPAN
12-14-2013, 12:37 PM
i dont undestand :D

svennn
12-14-2013, 01:35 PM
i dont undestand :D

I have the linked script above running. When I start the walker, it doesn't do anything, even though it should start by opening my backpacks.

Messed Around
12-14-2013, 01:39 PM
1). Are the backpack names correct and in quotations? e.g "Backpack of Holding"
2). Is XenoBot paused? (top left corner, pause/break key on keyboard)
3). Have you tried asking the author for help?

Biesje Team
12-14-2013, 02:02 PM
Who's script is this? Some of the coding, like the StartAnywhere feature is copied from our scripts. Please don't deny it. I don't really mind, I'm just curious.

svennn
12-14-2013, 09:13 PM
Who's script is this? Some of the coding, like the StartAnywhere feature is copied from our scripts. Please don't deny it. I don't really mind, I'm just curious.

Yeah I copied that from your script. I also copied from other scripts. I only plan to use this for personal usage though... If that makes it okay... I don't know. Otherwise i'll simply have to write my own code :)

EDIT: My script doesn't currently use that part of the code, it mostly serves as a reminder that it is something that I should add to my script. Will however gladly remove it if you do not agree with my usage of it.

svennn
12-14-2013, 09:19 PM
1). Are the backpack names correct and in quotations? e.g "Backpack of Holding"
2). Is XenoBot paused? (top left corner, pause/break key on keyboard)
3). Have you tried asking the author for help?

1) The backpacks are named correctly and in quotations.
2) Xenobot is not paused.
3) Well since i've put together most of the script myself (although I have copypasted parts from various scripts) that would be kind of hard. I'll probably try to remove parts of the code and see what it is that is causing it to fail.

svennn
12-14-2013, 09:39 PM
Alright, after some testing I came to the conclusion that when I am using the following code:

if (PotionSort == true) then
local moveItems = {236, 237, 238, 239, 266, 268, 283, 284, 285, 7439, 7440, 7443, 7642, 7643, 7644, 7876, 3147, 3148, 3149, 3152, 3153, 3155, 3156, 3158, 3160, 3161, 3164, 3165, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3182, 3188, 3189, 3190, 3191, 3192, 3195, 3197, 3198, 3200, 3202, 3203} -- works with item names or ids.
Module.New('PotionSorter', function(module)
local MainBP = Container.GetFirst()
for _, i in pairs(moveItems) do
if ( Self.ItemCount(i, MainBP, false) > 0 ) then
for spot = 0, MainBP:ItemCount() do
local item = MainBP:GetItemData(spot)
if ( item.id == Item.GetID(i) or item.id == i ) then
module:Delay(300, 500)
MainBP:MoveItemToContainer(spot, Container.GetByName(PotBP):Index(), 0)
module:Delay(600, 800)
break
end
end
end
module:Delay(300, 500)
end
module:Delay(600, 900)
end)
end

The walker does not work. Without this part, it works fine. Any idea why? Or how I can fix it? I still want the script to have a built-in potion sorter.

To come to this conclusion i first removed the built-in sceenshot taker. Then I got the following error:

22:35 XenoScript Error:
Script: Y U NO WORK.lua
Line #: 1112
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to compare number with table
This is an error with user-input and should not be reported as a bug with XenoBot.

After that I removed the built-in potion sorter. After that the error disappeared and the walker started working again.