Page 34 of 39
Re: Rock5's Millers Ranch Scripts
Posted: Sat Jan 21, 2012 1:32 pm
by D4nte
rock5 wrote:Ah I understand now. Did you try copy and pasting then?
I think it should look like this.
Code: Select all
function coopHenEvalFunc(address)
-- Don't target hens in the ignore list
for k,v in pairs(ignoredHens) do
if v.address == address then
if Timeout == 0 or (Timeout > 0 and Timeout > (os.time() - v.time)) then
return false
end
end
end
local hen = CObject(address)
-- Only target coop Hens
if 3240 > CObject(address).Z then return false end
-- Don't target moving hens
local oldX, oldZ = hen.X, hen.Z
yrest(100)
hen:update()
if distance(hen.X,hen.Z,oldX,oldZ) > 2 then return false end
return true
end
exactly
btw this is what causes the bot gettig stuck at the barn collumn (at least i think so cause it got stuck before and doesnt now)
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 22, 2012 8:58 am
by rock5
Ok I'm happy to add that to the next time I update. Not sure if it will be soon though.
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 22, 2012 11:55 am
by bobdole
I tried the new code for the hens and it does work but it really slows the process down. At times the bot will stop and look/rotate around and hesitate for 5+ seconds until it finally finds a new hen.
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 22, 2012 12:24 pm
by rock5
i just tested it and realised it's imposible to target a hen leaving the coop. After it encourages the hen it picks up the egg. By the time it picks up the egg. the hen is long gone.
How exactly is it targeting a moving hen?
BTW I din't see any 5 second hesitations.
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 22, 2012 5:22 pm
by D4nte
i dont know how but it does sometimes (like once in 1k hens) run after a leaving one and crash into that column...where it gets stuck 4 a while...
more often the bot dont crashes the column but runs after a leaving hen feeding it and returns into the barn just to leave it again to go feeding hens...
i know this may sound stupid but i saw the bot do so more than twiche before i added those lines, and now he behaves...
i dont have any 5sec lag either...
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 22, 2012 8:34 pm
by rock5
How do you watch it for 1k hens to see if it does it again? You must have great patience.
Re: Rock5's Millers Ranch Scripts
Posted: Mon Jan 23, 2012 12:03 am
by bobdole
So I have ended up using:
Code: Select all
local currchar = RoMScript("CHARACTER_SELECT.selectedIndex")
ChangeChar(currchar)
The other code worked but it would every now and then crash the client, so far the above one hasn't yet (knock on wood). I also noticed what was happening was the bot eventually would get stuck and use the code to log out, then back in, and then the bots would get stuck walking back to the farming area. So I added 8 way points with ports to get the bot to the farming area and so far its helped a lot. The one question is, is the code for stuck eggs working? I appears my bots just stop once they can't find a egg.
So after 2 days running the above code and I am seeing something I have not seen in the past, every once in a while one of two things happens: 1) The chat window is open and full of QQQQ's. 2) Its at the login screen with a bunch of QQQ's in the account name. Any idea why this would happen?
Re: Rock5's Millers Ranch Scripts
Posted: Thu Jan 26, 2012 8:58 am
by D4nte
rock5 wrote:How do you watch it for 1k hens to see if it does it again? You must have great patience.
and a television on the same screen

Re: Rock5's Millers Ranch Scripts
Posted: Thu Jan 26, 2012 9:33 am
by rock5
bobdole wrote:The one question is, is the code for stuck eggs working? I appears my bots just stop once they can't find a egg.
The original code shouldn't stop if it can't find an egg but it does stop if all the hens are on the ignore list. It waits for some time, I don't remember if it's 5 or 10 minutes, then tries again.
bobdole wrote:So I have ended up using:
Code: Select all
local currchar = RoMScript("CHARACTER_SELECT.selectedIndex")
ChangeChar(currchar)
Do you have to reload the file again here so that it enters Millers again?
bobdole wrote:1) The chat window is open and full of QQQQ's
That would happen if it's trying to turn with the 'q' key. Are you using "quickturn"? The chat box might be openning because you pressed the shift key while doing something else and when the bot presses 's' to move back, it becomes a SHFT-S which opens chat for "say". Try changing the hotkey in the key bindings in the game system menu for "Say".
bobdole wrote:2) Its at the login screen with a bunch of QQQ's in the account name
Probably you had a loss of communication so it dropped to the log in screen and the bot didn't realise it and kept pressing 'q' to try to turn you.
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 29, 2012 12:20 pm
by ezio97
I can't seem to get it to harvest. It is running the path fine, teleporting fine, and detecting feedbags and chickens fine, but it just keeps saying "Feedback/Ranch Hen founnd. Will attempt to harvest now." Or something like that. But it doesn't actually harvest it! Why is this, and how can I fix it?
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 29, 2012 7:37 pm
by lisa
Have you tried the instructions in my signature yet??
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 29, 2012 9:26 pm
by ezio97
Yes I did, i fooled around with it...thank you for those. Still it doesnt harvest though, and yes, the window is active.
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 29, 2012 10:02 pm
by rock5
Do other waypoint files work? Does it attack mobs and target other objects?
Re: Rock5's Millers Ranch Scripts
Posted: Sun Jan 29, 2012 10:33 pm
by kiff
Well it seems to be the simple case that you haven't selected "Click To Move" in the game options.
Cause character moves everywhere using the "W" key, but to harvest it clicks to move, so probably you don't have that option on.
Check it out.
Re: Rock5's Millers Ranch Scripts
Posted: Mon Jan 30, 2012 2:17 pm
by ezio97
No, I had that selected. It seemed that once I installed the teleport userfunction and turned that on in the MRC_optimized waypoints, it started working. o.O weird, but I am just glad it works
Re: Rock5's Millers Ranch Scripts
Posted: Mon Feb 06, 2012 9:04 pm
by bobdole
I am having real big problems with running bots on my laptop as of late. They do great for a while and then hens are getting stuck in the house. This doesn't happen on my desktop so I am confused why it would happen. I know the script keeps track of stuck hens while feeding but does it keep track of the stuck ones in the hen house? I come back a lot to the bot just standing at the hen house doing nothing and would love some suggestions how to fix it.
Thanks in advance.
Re: Rock5's Millers Ranch Scripts
Posted: Mon Feb 06, 2012 9:53 pm
by rock5
We don't really know what causes stuck hens and eggs so can't say why you are getting stuck hens in the coop. We didn't used to get stuck hens in the coop, that's why there is no check for it.
The only thing I noticed is when I was running a few millers eggs at once, I would occationally get stuck eggs. But now that I only ever run one at a time, I never get anything stuck. I suspect it has something to do with running too many millers at once even though it seems like your pc can easily handle the cpu and memory load. Try running fewer and see if that help. I don't know if this will help as every time I suggest this no one ever comes back to say if it worked or not.

Re: Rock5's Millers Ranch Scripts
Posted: Mon Feb 06, 2012 10:02 pm
by bobdole
I stopped using my model file and I think that's brought back of lag on the bots so test with model back on. My other issue is I always have one bot that gets stuck trying to feed a hen and wont go back to the feed, any setting I can make a longer delay or something to try and resolve that?
Thanks as always.
Re: Rock5's Millers Ranch Scripts
Posted: Wed Feb 08, 2012 9:48 pm
by bobdole
Now several bots are getting stuck trying to feed the hens and wont go back to the feed, any setting I can make a longer delay or something to try and resolve that?
Re: Rock5's Millers Ranch Scripts
Posted: Tue Feb 14, 2012 8:45 am
by Golbez
no to be off topic. just wondering if anyone has made a mail feature for millers.