Rock5's Millers Ranch Scripts

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
stob
Posts: 4
Joined: Wed Sep 14, 2011 4:24 am

Re: Rock5's Millers Ranch Scripts

#501 Post by stob » Mon Sep 26, 2011 5:13 am

Hello,

first of all I want to thank you all for this work you are doing for all of us. It is really very helpful.

I have a problem with starting the MillersRanchMilk.xml:

Script> rom/bot.lua path:MillersRanchMilk.xml
Opening bot.lua...
Welcome to rom bot! press END to quit
RoM Bot Version 3.29, Revision 644
The macro is currently not running. Press the start key (ENTF) to begin.
You may use (ENDE) key to stop/pause the script.
Resumed.
RoM windows size is 800x600, upper left corner at 4,23
Loading profile XXXXXXXX.xml
...s/admin/Documents/micromacro2/scripts/rom/macros.lua:68: No valid action keys
available for the command macro. Please supply an empty action key with a hotke
y and no modifier.


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.

I used the same directory on another PC but with less AddOns where it works.
Are there Addons which will the script stop starting?
What am I doing wrong?
Thanks for any help.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Millers Ranch Scripts

#502 Post by lisa » Mon Sep 26, 2011 6:13 am

macros and action bar is saved per PC, so issue is actually with the macro or your skill bar.

Remove any macros from action bar.
Make sure to have atleast 1 free space in action bar, 0 is the prefered default.
Delete and macros from the macro menu
Start bot again
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

stob
Posts: 4
Joined: Wed Sep 14, 2011 4:24 am

Re: Rock5's Millers Ranch Scripts

#503 Post by stob » Mon Sep 26, 2011 6:33 am

I had deleted 2 Macros named RB and RB Command. After starting the bot, they are back again. Are they provided by an AddOn? I do not know what they are doing. I have never tried to play with macros.
Thanks again

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

Re: Rock5's Millers Ranch Scripts

#504 Post by rock5 » Mon Sep 26, 2011 6:46 am

The idea was to delete them so they could be recreated properly by the bot.

Did it work after the bot recreated those macros?
  • 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

stob
Posts: 4
Joined: Wed Sep 14, 2011 4:24 am

Re: Rock5's Millers Ranch Scripts

#505 Post by stob » Mon Sep 26, 2011 7:04 am

No, it did not work afterwards.
I deleted 3-4 times and it was always recreated.

P.S.: I just make Place 0 in actionbar empty and now it works. Before there were place 13-16 free, but this was not enough.

Thank you

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

Re: Rock5's Millers Ranch Scripts

#506 Post by rock5 » Mon Sep 26, 2011 8:06 am

That's because the bot needs an action bar button that has a hotkey but no modifier. So that's normally any of the first 12 keys that have hotkey values of 0 to 9, '-' and '='.

Just like the error message said

Code: Select all

Please supply an empty action key with a hotkey and no modifier.
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#507 Post by bobdole » Thu Sep 29, 2011 5:53 pm

I just got a chance to test the new scripting and it logs out and back in but the script ends so it's not reloading the waypoint.
rock5 wrote:I never did that because relogging causes the clients to use more and more memory until it crashes.

You could still add it if you like. All you need to do is change what it does when all hens are stuck. At the moment it just keeps retrying every now and then until they become unstuck (if they do).

So around line 339 of the MRC_Optimized script you will see

Code: Select all

		if #ignoredHens == 3 and inventory:itemTotalCount(204789) > 0 then
Just replace everything in that 'if' statement with what you want it to do, so.

Code: Select all

		if #ignoredHens == 3 and inventory:itemTotalCount(204789) > 0 then
			-- Set relog option
			RoMScript("} fastLoginRelog=true a={")
			-- Logout
			player:logout(false)
			waitForLoadingScreen()
			-- Restore relog option
			RoMScript("} fastLoginRelog=false a={")
			-- Reload path
			loadPaths("MRC_Optimized")
		end
That is untested but should work

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

Re: Rock5's Millers Ranch Scripts

#508 Post by rock5 » Thu Sep 29, 2011 10:02 pm

Are you saying you tried the change above but it didn't do the "loadPath"? How did the script end? What message did it print last?
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#509 Post by bobdole » Thu Sep 29, 2011 11:28 pm

It just turned it self off during the character logging out. Even with the script off the character logged back in to the game. I will have to wait for it to happen again if you need the exact information.

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

Re: Rock5's Millers Ranch Scripts

#510 Post by rock5 » Thu Sep 29, 2011 11:43 pm

Looks like "player:logout(false)" exits the scipt. Sorry.

Try this instead.

Code: Select all

RoMScript("Logout()")
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#511 Post by bobdole » Sat Oct 01, 2011 2:20 pm

The new logout code works like a dream. Now please help resolve my next issue:

For some reason I sometimes get delays at waypoints that cause the character to run past the waypoint for a couple of seconds and then the character gets stuck behind something and will eventually auto logout. I know there used to be a eggpet crafting bug but I have eggpet crafting disabled and think you fixed the bug as well. From what I can tell it appears to always begin with a clearing target, so my question is I am sure it has a lot to do with lag but what is my best way to resolve this? Can you suggest a fix for the clearing target to resolve the moving past the waypoints or would this code work and be my best resolution?

Code: Select all

<onUnstickFailure><![CDATA[
         -- Set relog option
         RoMScript("} fastLoginRelog=true a={")
         -- Logout
         RoMScript("Logout()")
         waitForLoadingScreen()
         -- Restore relog option
         RoMScript("} fastLoginRelog=false a={")
         -- Reload path
         loadPaths("MRC_Optimized")
      end
   ]]></onUnstickFailure>

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

Re: Rock5's Millers Ranch Scripts

#512 Post by rock5 » Sat Oct 01, 2011 10:11 pm

Is it only certain waypoints that it runs past?

Try setting WP_NO_STOP to false in your profile under the options section.

Code: Select all

<option name="WP_NO_STOP" 			value="false" />
Or you could set it in the waypoint file onload section like this

Code: Select all

settings.profile.options.WP_NO_STOP = false
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#513 Post by bobdole » Sun Oct 02, 2011 11:28 pm

Added the following to my waypoint onload section:

Code: Select all

settings.profile.options.WP_NO_STOP = false
It appears they are still over running/over porting waypoints and its always following a "Clearing target". I looked in the classes/player.lua file and a see several codes using:

Code: Select all

self:clearTarget();


Any idea which one of those are being used with this script? I would like to comment it out and see if that resolves the issue.

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

Re: Rock5's Millers Ranch Scripts

#514 Post by rock5 » Sun Oct 02, 2011 11:32 pm

It could be anything. Do you have any userfunctions being used in the profile events, such as the onload or onleavecombat?
  • 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

yoyodoggg
Posts: 34
Joined: Mon Aug 22, 2011 8:54 pm

Re: Rock5's Millers Ranch Scripts

#515 Post by yoyodoggg » Sun Oct 02, 2011 11:34 pm

id like to share my waypoint additions to this script. THIS WILL WORK IN LOGAR ONLY

For This Waypoint you will need
1. Rock5 Mail addon and userfunction found at viewtopic.php?f=27&t=1561
2. you will need to copy /rom/devtools/ingamefunctions to your /runesofmagic/Interface/Addons folder.
3. You will need FastLogin Revisted add found at viewtopic.php?f=27&t=1245
4. I also suggest GM detection for its log out feature if a GM(lvl 0 player) is nearby. found at viewtopic.php?f=27&t=2516
5. you will need the setwindow userfunction found at viewtopic.php?f=27&t=2924
6. you will need to change the name of your Millers Ranch Script to eggs.xml

i added

Code: Select all

<OnLoad>
setwindow(204792)
changeProfileOption("WAYPOINT_DEVIATION", 0) 
changeProfileOption("HARVEST_DISTANCE", 150)
local goldeggs = inventory:itemTotalCount(204792)
local goodcake = inventory:itemTotalCount(204791)

<!-- Were you just a Farmer, do you have golden eggs to mail -->
function eggchecks()
	if goldeggs >= 70 then
	 printf("I have Golden Eggs to Dump!\n");
	  loadPaths("maildumpranch");
	 else
	 __WPL:setWaypointIndex(__WPL:findWaypointTag("Main"))
	end
end
	
local zoneid = RoMScript("GetZoneID()")

<!-- Are we in Logar -->	
if (zoneid == 1) or (zoneid == 1001) then
	printf("We are in Logar, Moving to the Ranch\n");
	__WPL:setWaypointIndex(__WPL:findWaypointTag("logar"))
end
</OnLoad>
and i EDITED OUT THE

Code: Select all

<!--if zoneid ~= 304 then  not at Miller's Ranch
		 Try to find Sorrun and teleport in
		if player:target_NPC("Sorrun") then
			sendMacro("ChoiceOption(3)") yrest(1000)
			sendMacro("ChoiceOption(1)")
			waitForLoadingScreen()
			yrest(1000)
			__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z))
		else
			error("You are too far from Miller's Ranch")
		end
	end-->
next i taged

Code: Select all

<!-- #  1 --><waypoint x="4026" z="3400" tag="start">
then the very bottom of your Ranch script should look like

Code: Select all

		portTo(3926,3198);
		if 1 > inventory:itemTotalCount(204789) then yrest(LagTime+1000) end --if he gooes directly to feed he is rubberbanded!
	</waypoint>
	<!-- # 10 --><waypoint x="3926" z="3198">
		printf("Checking to See if we have enough Golden Eggs to Mail\n");
		eggchecks()
		</waypoint>
	
<!-- We are in Logar -->	
	<!-- #  1 --><waypoint x="-797" z="-5971" y="31" tag="logar"> </waypoint>
	<!-- #  2 --><waypoint x="-884" z="-5941" y="35">	</waypoint>
	<!-- #  3 --><waypoint x="-894" z="-5881" y="44">		
		player:target_NPC("Matt Sorrun"); yrest(2000);
		RoMScript("ChoiceOption(3)"); yrest(2000);
		RoMScript("ChoiceOption(1)"); yrest(4000);
		waitForLoadingScreen();	yrest(2000);
	</waypoint>
	<!-- #  7 --><waypoint x="4033" z="3405" y="-3">
	player:update();
	inventory:update();
	__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
	</waypoint>

</waypoints>
	
FINALLY make a NEW file and call it maildumpranch.xml

and add this code to it

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<OnLoad>
<!-- Settings -->
	local bearclaw = inventory:itemTotalCount(200609)
	local boartusk = inventory:itemTotalCount(200624)
<!-- Combat Options -->	
	changeProfileOption("COMBAT_DISTANCE", 50)
	changeProfileOption("COMBAT_RANGED_PULL", false)
	changeProfileOption("WAYPOINT_DEVIATION", 0) 
<!-- Merchant Options -->	
	changeProfileOption("INV_AUTOSELL_ENABLE", true)
	changeProfileOption("INV_AUTOSELL_FROMSLOT", 1)
	changeProfileOption("INV_AUTOSELL_TOSLOT", 90)
	changeProfileOption("INV_AUTOSELL_QUALITY", "white,green")
	changeProfileOption("INV_AUTOSELL_IGNORE", "Pfeil,Element,III,Hero,Spirit,Meat,Pie,Source,Activ,Card,Potion,Formula,Candy")
	<!--changeProfileOption("INV_AUTOSELL_TYPES", "Weapons,Armor,Recipes,Others") -->
	changeProfileOption("INV_AUTOSELL_TYPES_NOSELL", "Accessories,Amulets")
	changeProfileOption("INV_AUTOSELL_STATS_NOSELL", "X,XI,V")
</OnLoad>
	<!-- #  1 --><waypoint x="3955" z="3163" y="0">	</waypoint>
	<!-- #  2 --><waypoint x="4014" z="3147" y="-5">	</waypoint>
	<!-- #  3 --><waypoint x="4032" z="3221" y="-4">	</waypoint>
	<!-- #  4 --><waypoint x="4039" z="3352" y="-4">	</waypoint>
	<!-- #  5 --><waypoint x="4009" z="3419" y="0">	
		player:target_NPC("Pykesile");yrest(2000);
		RoMScript("ChoiceOption(4)"); yrest(2000);
		RoMScript("ChoiceOption(1)"); yrest(4000);
		waitForLoadingScreen();	yrest(2000);
	</waypoint>
	<!-- #  6 --><waypoint x="-893" z="-5932" y="36">	</waypoint>
	<!-- #  7 --><waypoint x="-738" z="-5948" y="32">	</waypoint>
	<!-- #  8 --><waypoint x="-578" z="-5948" y="25">	</waypoint>
	<!-- #  9 --><waypoint x="-423" z="-5982" y="21">
<!-- Check the Mail and Dump Our Phats -->	
local goldeggs = inventory:itemTotalCount(204792)
local goodcake = inventory:itemTotalCount(204791)
local cgold = RoMScript('GetPlayerMoney("copper");')
	 player:target_Object("Logar mailbox",2000);
	 RoMScript("ChoiceOption(1)"); yrest(4000);
		UMM_TakeMail(); yrest(4000);
		inventory:update(); yrest(2000);
	 printf("Sending Cards, %s Gold, %s Eggs and %s Cakes\n", cgold, goldeggs, goodcake);
	 <!-- Send Gold -->
	  if (cgold >= 10000) then
	  UMM_SendMoney("MAILTO", "all"); yrest(4000);
	  end
     <!-- Send Golden Eggs and Cakes -->
	  UMM_SendByNameOrId("MAILTO", 204792); yrest(4000);
	  UMM_SendByNameOrId("MAILTO", 204791); yrest(4000);
	<!-- Send Other Junk -->
	 printf("Sending Any Other Junk we have in Bags\n");
	  UMM_SendAdvanced("MAILTO", nil,nil,nil,nil, "Cards"); yrest(4000);
	  UMM_SendByQuality("MAILTO", 3); yrest(4000);
	  UMM_SendByStatNumber("MAILTO", 2); yrest(4000);
	  <!-- Sending any Runes Left -->
	  if (player.Name ~= "MAILTO") then
	  UMM_SendAdvanced("MAILTO", nil,nil,nil,nil, "Runes"); yrest(4000);
	  end
	</waypoint>
	<!-- # 15 --><waypoint x="-499" z="-5979" y="21">	
	player:update(); yrest(1000);
	inventory:update(); yrest(1000);
	printf("I am Empty now\n"); yrest(1000);
	</waypoint>
	<!-- # 16 --><waypoint x="-630" z="-5976" y="26">	</waypoint>
	<!-- # 17 --><waypoint x="-802" z="-5952" y="31">	
		sendMacro("}LoginNextToon=true;a={")
        sendMacro("Logout();"); yrest(500)
        waitForLoadingScreen(); yrest(4000)
		printf("Loading Next Farmer..")
        loadPaths("eggs"); yrest(4000)
	</waypoint>
</waypoints>
now your bot will mail you eggs when u reach 70+ and switch to next character, and then enter the ranch again. and continue.

YOU WILL NEED TO CHANGE THE MAILTO text to the name of your character you want the eggs sent to.

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#516 Post by bobdole » Sun Oct 02, 2011 11:37 pm

Let me look, 2 question about:

Code: Select all

settings.profile.options.WP_NO_STOP = false
1) What does that change?
2) Based on other code I see in your script shouldn't the format be:

Code: Select all

changeProfileOption("WP_NO_STOP", false)
I checked and none of that code is in the profiles, I use the generic profile so I figured it would be blank.

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

Re: Rock5's Millers Ranch Scripts

#517 Post by rock5 » Mon Oct 03, 2011 12:35 am

They are basically the same thing. Probably would be easier to use the function instead of changing the value directly.

By default the bot will keep running after reaching a waypoint and change direction on the fly. Usually if you have high lag issues it will run past waypoints and then run back before continuing to the next waypoint. By setting that value to false, it will stop, change direction, then continue.

Probably this is not the issue in this case as most of the waypoints in this file have code in them so it should stop anyway.

I think this may have been reported before. I don't know if it was ever resolved.
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#518 Post by bobdole » Mon Oct 03, 2011 12:58 am

I think this works:

Code: Select all

<onUnstickFailure><![CDATA[
         -- Set relog option
         RoMScript("} fastLoginRelog=true a={")
         -- Logout
         RoMScript("Logout()")
         waitForLoadingScreen()
         -- Restore relog option
         RoMScript("} fastLoginRelog=false a={")
         -- Reload path
         loadPaths("MRC_Optimized")
]]></onUnstickFailure>
Question is can I load it from the waypoint script so I don't have to edit each profile?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Rock5's Millers Ranch Scripts

#519 Post by lisa » Mon Oct 03, 2011 1:10 am

add this to WP onload

Code: Select all

function unStick9()
         -- Set relog option
         RoMScript("} fastLoginRelog=true a={")
         -- Logout
         RoMScript("Logout()")
         waitForLoadingScreen()
         -- Restore relog option
         RoMScript("} fastLoginRelog=false a={")
         -- Reload path
         loadPaths("MRC_Optimized")
end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Rock5's Millers Ranch Scripts

#520 Post by bobdole » Mon Oct 03, 2011 11:44 am

I commented out the clear target code in bot.lua and it seems to be helping with the over running but I still am getting some where its either over running or over porting. Its clearly due to the game lagging due to running many times. Can you suggest any more ideas that can help with this?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest