Farming Error

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Farming Error

#1 Post by BeyondNames »

Ok im back xD
when i run the bot while im farming i tried to make it check my inventory and if i had a certain amount of the stuff to switch waypoints to a logout WP and change Chars and repeat
the bot acts like the other instructions arnt even there
i copied the check inventory part of the script from another WP that worked
pls help
also if i shouldnt use another WP to logout and change chars please help me with the 2
I will link the two WPs
Attachments
DogMeatNotBlyads.xml
(406 Bytes) Downloaded 337 times
Logout.xml
(375 Bytes) Downloaded 333 times
evenhasawatermark
Posts: 6
Joined: Sat Jul 27, 2013 11:17 am

Re: Farming Error

#2 Post by evenhasawatermark »

Make the code into a function, stick it into your onLoad, then call the function at the waypoint.
BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Farming Error

#3 Post by BeyondNames »

I dont know how to create a function or how to call the function at the waypoint so please explain :)
evenhasawatermark
Posts: 6
Joined: Sat Jul 27, 2013 11:17 am

Re: Farming Error

#4 Post by evenhasawatermark »

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

Re: Farming Error

#5 Post by rock5 »

When you type

Code: Select all

function functionname()
    -- your code here
end
it 'creates' the function but it doesn't run it. To 'use' the function you would then type

Code: Select all

functionname()
We could make the logout.xml file work but the right way to do it is to put the relog function in the onload of the first file (so it 'creates the function when the file is loaded) and then 'use' the function at the appropriate place, eg.

Code: Select all

if inventory:itemTotalCount("Guard Dog Meat") > 1 then relog() end
  • 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
BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Farming Error

#6 Post by BeyondNames »

My Wp is like this now and i got this error

Code: Select all

The game client did not crash.
4:13pm - .../ROM PVP/micromacro/scripts/rom/classes/waypointlist.lua:83: Failed
to compile and run Lua code for waypointlist onLoad event.


AL lib: FreeContext: (02BBCCC8) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Attachments
DogMeatLONG.xml
(6.81 KiB) Downloaded 326 times
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Farming Error

#7 Post by rock5 »

You missed the relog functions 'end'. Add an 'end' between these 2 lines.

Code: Select all

		loadPaths("DogMeatLONG");
	setwindow("Guard Dog Meat")
  • 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
BeyondNames
Posts: 104
Joined: Thu Jun 27, 2013 7:39 pm

Re: Farming Error

#8 Post by BeyondNames »

i got it to work thank you so much
Post Reply