Farming Kalin bot its off when sell bags

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Ghost
Posts: 6
Joined: Thu Oct 04, 2012 2:50 am

Farming Kalin bot its off when sell bags

#1 Post by Ghost » Thu Oct 04, 2012 3:21 am

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Farming Kalin bot its off when sell bags

#2 Post by rock5 » Thu Oct 04, 2012 4:05 am

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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Ghost
Posts: 6
Joined: Thu Oct 04, 2012 2:50 am

Re: Farming Kalin bot its off when sell bags

#3 Post by Ghost » Fri Oct 05, 2012 7:25 pm

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Farming Kalin bot its off when sell bags

#4 Post by rock5 » Sat Oct 06, 2012 6:19 am

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

Code: Select all

print(text)
Then the next time it happens, show me what it printed.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Ghost
Posts: 6
Joined: Thu Oct 04, 2012 2:50 am

Re: Farming Kalin bot its off when sell bags

#5 Post by Ghost » Sat Oct 06, 2012 6:09 pm

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>

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Farming Kalin bot its off when sell bags

#6 Post by rock5 » Sat Oct 06, 2012 11:13 pm

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?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Ghost
Posts: 6
Joined: Thu Oct 04, 2012 2:50 am

Re: Farming Kalin bot its off when sell bags

#7 Post by Ghost » Sun Oct 07, 2012 4:59 pm

file where I have to add this command ?

Sota
Posts: 13
Joined: Sun Feb 19, 2012 4:24 pm

Re: Farming Kalin bot its off when sell bags

#8 Post by Sota » Sun Oct 14, 2012 4:32 am

Where should I copy it?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Farming Kalin bot its off when sell bags

#9 Post by rock5 » Sun Oct 14, 2012 4:41 am

Copy what?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Ghost
Posts: 6
Joined: Thu Oct 04, 2012 2:50 am

Re: Farming Kalin bot its off when sell bags

#10 Post by Ghost » Sun Oct 14, 2012 7:56 am

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Farming Kalin bot its off when sell bags

#11 Post by rock5 » Sun Oct 14, 2012 10:00 am

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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Ghost
Posts: 6
Joined: Thu Oct 04, 2012 2:50 am

Re: Farming Kalin bot its off when sell bags

#12 Post by Ghost » Mon Oct 15, 2012 6:25 pm

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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 25 guests