Page 1 of 1
Farming Kalin bot its off when sell bags
Posted: Thu Oct 04, 2012 3:21 am
by Ghost
hello
i have a problem with a bot, when i go to npc sell items bot its off ( rom/classes/inventory.lua:571: Macro text too long by 10 ). Earlier i have a problem with bot because all time press the "ESC" buton
but i reapair this problem using this
Line 684 of functions.lua is
Code:
RoMScript("GetKeyboardFocus():ClearFocus()")
Change it to
Code:
RoMScript("} a = GetKeyboardFocus(); if a then a:ClearFocus() end a={")
and line 57 of player.lua is
Code:
RoMScript("GetKeyboardFocus():ClearFocus()")
Change it to
Code:
RoMScript("} a = GetKeyboardFocus(); if a then a:ClearFocus() end a={")
Sorry to my terrible English and please help me
Re: Farming Kalin bot its off when sell bags
Posted: Thu Oct 04, 2012 4:05 am
by rock5
I don't see how that error is possible with the current bot. It very carefully adds items to sell to a "sellstring" but checks that it's not too long before adding it. So I don't see how it could end up with a string that is 10 characters too long. Unless you have slot items that have bagid that are more than 10 characters long, but bagids only go up to 270 or your macro strings are shorter than everyone else and are only 244 characters long instead of the usual 254.
My best advice is check for corrupted files. There should be no bot files with red icons unless you edited the file yourself and there should be no files with yellow icons.
Re: Farming Kalin bot its off when sell bags
Posted: Fri Oct 05, 2012 7:25 pm
by Ghost
A friend sent me your version of the bot, which works well with her, but when I use it on my hardware still throws me that error, also checked the file and do not have any of the red exclamation mark
Re: Farming Kalin bot its off when sell bags
Posted: Sat Oct 06, 2012 6:19 am
by rock5
I think maybe I need to know what the string actually holds. Open functions.lua. Search for
Code: Select all
error("Macro text too long by "..(len - 254), 2)
Just before that line, enter
Then the next time it happens, show me what it printed.
Re: Farming Kalin bot its off when sell bags
Posted: Sat Oct 06, 2012 6:09 pm
by Ghost
I did as you said, this is the result
Przemieszczenie się do punktu nawigacyjnego #216, (-16614, 11362)
Przemieszczenie się do punktu nawigacyjnego #217, (-16618, 11346)
Zmieniliśmy opcję 'HARVEST_DISTANCE' z '120' na '200'.
Próbujemy znaleźć NPC (BN) Pancer:
Pomyślnie namierzyliśmy NPC (BN) Pancer i próbujemy otworzyć okno dialogowe.
} local U=UseBagItem; if StoreFrame:IsVisible() then a={true};U(150);U(125);U(13
9);U(137);U(134);U(142);U(157);U(165);U(178);U(174);U(161);U(164);U(162);U(156);
U(170);U(176);U(155);U(169);U(168);U(154);U(179);U(175);U(172);U(166);U(167);U(1
53);end;z={U(160);end;z={
Did not find any crashed game clients.
0:55am - ...micromacro/scripts/rom-bot/rom/classes/inventory.lua:571: Macro text
too long by 11
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Re: Farming Kalin bot its off when sell bags
Posted: Sat Oct 06, 2012 11:13 pm
by rock5
I can see what it has done. It closed the string but then added an extra item and an extra 'end'. "U(160);end;z={" shouldn't be on the end of that string. Neither the original or beta versions has any error that would do that. It's as if you are missing the line that resets the string,
Code: Select all
sellstring = sellstartstring -- Reset for more
I'd say you have corrupt files but how could this have happened again if you used a different version? Did you use the first version again by mistake? Did you merge them instead?
Re: Farming Kalin bot its off when sell bags
Posted: Sun Oct 07, 2012 4:59 pm
by Ghost
file where I have to add this command ?
Re: Farming Kalin bot its off when sell bags
Posted: Sun Oct 14, 2012 4:32 am
by Sota
Where should I copy it?
Re: Farming Kalin bot its off when sell bags
Posted: Sun Oct 14, 2012 4:41 am
by rock5
Copy what?
Re: Farming Kalin bot its off when sell bags
Posted: Sun Oct 14, 2012 7:56 am
by Ghost
hello it's me again, I did like you said , I found the file and I wanted to add that command but he was already there
Re: Farming Kalin bot its off when sell bags
Posted: Sun Oct 14, 2012 10:00 am
by rock5
Ghost wrote:I found the file and I wanted to add that command but he was already there
It should have been there. I didn't expect that it would be missing. I said it behaved like it was missing but there shouldn't be any way for a line to just go missing.
Ok I carefully looked at the code and I think I figured out how it's possible what happened to you. This is the code I'm referring to. It's in the autosell function in inventory.lua.
Code: Select all
if RoMScript(sellstring) then
yrest(100)
hf_wesell = true;
sellstring = sellstartstring -- Reset for more
else
break
end
When it goes to sell with "RoMScript(sellstring)" if it is successful then it resets the sellstring but if it is not successful then it breaks without resetting the sellstring. I think the "break" was supposed to stop it trying to sell but all it does is go to the next item in the bag. If you change it to "return" then it should stop trying to sell as soon as it fails to sell instead of adding another item to the end of a already too long sellstring.
So to recap, find the above code in inventory.lua and change the "break" to "return" and see if that help.
Of course you still have the issue that it fails to sell. You probably need to be watching when it sells to see why it fails. It might be because the shops closed or it's going to fast or who knows. You could probably make some sort of loop to make sure everything sells.
Re: Farming Kalin bot its off when sell bags
Posted: Mon Oct 15, 2012 6:25 pm
by Ghost
I did like you said, now the sale of one hand pressed esc, and stops further selling (but not crashed my client now) just continues to work