optimizing golden eggs profit

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
T_Zero
Posts: 10
Joined: Thu Nov 18, 2010 3:08 pm

Re: optimizing golden eggs profit

#21 Post by T_Zero » Tue Dec 21, 2010 4:23 am

I think you should pick up the fresh eggs but don't complete the quest.
Just outsource that to an extra script. So the 1st script just collects golden and normal eggs and the other completes the quest. Could save some time and there's the option to not run the 2nd one.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#22 Post by jduartedj » Tue Dec 21, 2010 5:13 am

At the moment that's what I do T0.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#23 Post by jduartedj » Tue Dec 21, 2010 5:14 am

fobsause,

What do you mean rubber banded? I've never seen heard of it b4.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#24 Post by fobsauce » Tue Dec 21, 2010 8:30 am

Urban dictionary put it into words best for me.

This occurs in online gaming when latency is relatively high. Players (or yourself) will appear to move in one direction, and then suddenly be teleported back several feet where they once were a few seconds ago.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#25 Post by jduartedj » Tue Dec 21, 2010 9:36 am

Now I understand the concept but i don't see how can that be used to "appear" in places. I supposed that everytime you move there is a server check to 'control' you movements and be sure you simply don't use a hack to place you somewhere else on the client side.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#26 Post by fobsauce » Tue Dec 21, 2010 9:51 am

you're exactly right! The server will check to make sure you haven't moved too far. However, in your house, these controls don't exist. You can change your movement speed and teleport freely. I think I'm just going to go ahead and test it out.

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#27 Post by fobsauce » Tue Dec 21, 2010 10:18 am

So with a bit of testing, you do get rubber banded in the ranch.
However, it will only rubber band you if you try to teleport beyond the maximum distance of 128.

1 <waypoint x="3940" z="3055" tag="Get Feed">
2 <waypoint x="3948" z="3107" tag="Main">
3 <waypoint x="3928" z="3185" tag="Get Eggs">
4 <waypoint x="3929" z="3261"> (actual egg gathering spot)

Notice that these waypoints are less than 128 units away from each other so you could teleport between these waypoints without getting rubber banded.

So you could basically feed a chicken, teleport to get more feed, teleport back to feed the chicken again.

The only issue is that point 2 and point 4 are too far apart so you would instead have to port from 2 to 3, then walk to 4.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#28 Post by jduartedj » Tue Dec 21, 2010 10:44 am

fobsauce wrote:So with a bit of testing, you do get rubber banded in the ranch.
However, it will only rubber band you if you try to teleport beyond the maximum distance of 128.

1 <waypoint x="3940" z="3055" tag="Get Feed">
2 <waypoint x="3948" z="3107" tag="Main">
3 <waypoint x="3928" z="3185" tag="Get Eggs">
4 <waypoint x="3929" z="3261"> (actual egg gathering spot)

Notice that these waypoints are less than 128 units away from each other so you could teleport between these waypoints without getting rubber banded.

So you could basically feed a chicken, teleport to get more feed, teleport back to feed the chicken again.

The only issue is that point 2 and point 4 are too far apart so you would instead have to port from 2 to 3, then walk to 4.
mmm maybe you could have it teleport from 2 to 3 and then 4 or from 2 to a 5th and then 4.
Anyway how exactly do you do that? memory edit?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#29 Post by fobsauce » Tue Dec 21, 2010 11:20 pm

Been looking to see if micromacro has any functions for editing memory...
please refer me to it if you find it before I do :)

User avatar
Administrator
Site Admin
Posts: 5331
Joined: Sat Jan 05, 2008 4:21 pm

Re: optimizing golden eggs profit

#30 Post by Administrator » Tue Dec 21, 2010 11:58 pm

fobsauce wrote:Been looking to see if micromacro has any functions for editing memory...
please refer me to it if you find it before I do :)
See the memoryWrite* functions in the wiki.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#31 Post by jduartedj » Wed Dec 22, 2010 12:25 am

Wait you mean to say that if we simply edit memory to the place we can teleport within 128 radius! WOOT
well MM is loaded for that like Admin said... Do you know the position addresses already?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#32 Post by fobsauce » Wed Dec 22, 2010 1:16 am

Ty for the reference admin.

jduartedj, I don't know where they are exactly but you can start with the getpos script

local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);

let's see how this goes...

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#33 Post by fobsauce » Wed Dec 22, 2010 2:53 am

it works! I'll see what I can do within a day. Gonna be gone for a week.
Also, how would I use:

memoryWriteFloatPtr(myProcess, 0x0D2E0F90, 0xA8, myData);

for multi level pointers? Or should I just find the address, then write to it thereafter...

Edit:
I think it uses the same data in the getpos function.
local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);

Client.exe+5B8364, offset 0x598
address, offset 0x4
address,0xB0 (for x) 0xB8 (for y)

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#34 Post by jduartedj » Wed Dec 22, 2010 8:13 am

I think you want these from CPawn:

Code: Select all

	self.X = debugAssert(memoryReadFloat(proc, self.Address + addresses.pawnX_offset), memerrmsg);
	self.Y = debugAssert(memoryReadFloat(proc, self.Address + addresses.pawnY_offset), memerrmsg);
	self.Z = debugAssert(memoryReadFloat(proc, self.Address + addresses.pawnZ_offset), memerrmsg);
and the respective addresses from addresses.lua:

Code: Select all

	pawnX_offset = 0x28,
	pawnY_offset = 0x2C,
	pawnZ_offset = 0x30,
given that self.address is the player's address. (CPlayer is an extrension of CPAwn).

so I think writing would be:

Code: Select all

memoryWriteFloat(proc, player.Address+addresses.pawnX_offset,  value_of_X);
Also the Y coordinate is not really necessary unless you have a mountain in front of you... it's just X,Z
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#35 Post by jduartedj » Wed Dec 22, 2010 8:27 am

Hmmm it seems whatever code/address I use nothing works for me. I've tried all the usual suspects but as I can't even reproduce it I'm stuck here. Could you post some steps so I can at least reproduce how you did it the first time?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#36 Post by fobsauce » Wed Dec 22, 2010 10:26 am

Using Cheat Engine...

Attach to Client.exe
click on the button "Add Address Manually" to open a new window

click the box "Pointer"

click "Add Pointer" twice

Then enter the pointer information.

Image

fobsauce
Posts: 46
Joined: Wed Dec 15, 2010 3:40 pm

Re: optimizing golden eggs profit

#37 Post by fobsauce » Wed Dec 22, 2010 11:16 am

Insert this into in your first waypoint to teleport to your second waypoint (replace 9999 with your x and z)
offsets = {0x598, 0x4, 0xB0};
memoryWriteFloatPtr(getProc(), 0x9B8364, offsets, 9999); -- x value
offsets = {0x598, 0x4, 0xB8};
memoryWriteFloatPtr(getProc(), 0x9B8364, offsets, 9999); -- z value

For example, at the end of your "Main" waypoint you can insert:

Code: Select all

if 1 > inventory:itemTotalCount(204789) then -- Get more feed
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Get Feed"));
	offsets = {0x598, 0x4, 0xB0};
	memoryWriteFloatPtr(getProc(), 0x9B8364, offsets, 3940); -- x value
	offsets = {0x598, 0x4, 0xB8};
	memoryWriteFloatPtr(getProc(), 0x9B8364, offsets, 3000); -- z value
else
	__WPL:setWaypointIndex(__WPL:findWaypointTag("Get Eggs"))
	offsets = {0x598, 0x4, 0xB0};
	memoryWriteFloatPtr(getProc(), 0x9B8364, offsets, 3928); -- x value
	offsets = {0x598, 0x4, 0xB8};
	memoryWriteFloatPtr(getProc(), 0x9B8364, offsets, 3185); -- z value
end
You would also add these to when you're returning to the "Main" waypoint.

I'm also trying to figure out how to teleport on top the of chickens that still need to be fed so you don't have to walk up to them to harvest them. If anyone knows a solution, let me know.

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: optimizing golden eggs profit

#38 Post by swietlowka » Wed Dec 22, 2010 1:20 pm

writing memory like that will get someones attention for sure...

in not into it, beside i rather to keep the miller's cake, it gets me less money but i belive it will be enough for the lack of ekstra golden eggs there

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: optimizing golden eggs profit

#39 Post by jduartedj » Wed Dec 22, 2010 2:38 pm

I believe that writing memory won't draw attention since it is checked by the game and it is not allowed if you cross any lines, p/e you cannot do this outside the ranch at all!

Also this doesn't mean you have to give up your miller's cakes, au contraire it just makes the gathering of seed/chickens/eggs faster, you may then choose to pick up the fresh eggs or not, BUT as i recommended you SHOULD pick them up because it causes a memory flood.

This could DRASTICALLY improve the speed of the script and who knows it may be also used in instances!

I think (and this is just my opinion!) that rock5 should put an option in the script to use this or not. OFC I'm assuming this can be used with no apparent problem.

AND thank you fobsauce for all the help so far, atm i'm at work but will test that when i get home.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

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

Re: optimizing golden eggs profit

#40 Post by rock5 » Thu Dec 23, 2010 12:52 am

jduartedj wrote:I think (and this is just my opinion!) that rock5 should put an option in the script to use this or not.
I have no interest in hacking the game which is basically what this does. I'm only interested in using the bot to do what already can be done manually.

I'll probably eventually add an option to choose if you want to complete the quest or not but probably not for collecting fresh eggs as, has been pointed out, you can collect them while you wait to be able to click the next hen. Although I might add an option to drop the fresh eggs.
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests