Archage harvest, plant, spamMSG & antiAFK support script

http://www.archeagegame.com/en/
ArcheAge NA/EU
Message
Author
d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Archage harvest, plant, spamMSG & antiAFK support script

#1 Post by d003232 » Mon Oct 27, 2014 4:04 pm

HARVEST, PLANT, SPAM MESSAGE & ANTIAFK support script v1.51 for Archeage
================================================

Version 1.51 is the last update of the script. I decidedt to stop playing AA.

You need MM2 to use that script. Download MM2 here:

That script is not a BOT, it just supports some things:
- planting in rows and columns in plant mode
- spams the harvesting key in harvest mode
- spam messages to the chat
- presses an antiAFK key while in idle mode
- claim a spot by using design, place it at a spot and press confirmation button

You can toogle between different modes. In harvest mode there is a 'move forward' option to walk some steps after a spot is finished. Different options like field-size, distance between plant spots, start point, ... can be stored in plant-sets (you have to the script for that).

Default keys (edit the script to change that)
F4 - switch planting set
F5/F6 - increase/decrease x value between planting spots (columns)
F7/F8 - increase/decrease y value between planting spots (rows)
F10 - toogle mode: harvest / plant / message spam /claim spot/endless harvest&plant
F11 - start/pause
R - toogle 'move option' in harvest mode on/off
T - test key (show window/cursor information)
Y - (put your seeds to that key at the UI)
F - harvesting key

IMPORTANT:
  • In message spam mode no special characters (like %!()= etc) are supported!
  • It's not a ready to use script! You need to change the parameters to your needs. Depending from your plants, field-size, screen-size, viewpoint ...

Have Fun
Stephen

EDIT:
24.11 v1.51 add endless plant/harvest mode to just stands and plant/harvest around the character / add offset option for even&odd rows
18.11 v1.50 add claim spot mode, first test with pixel color
15.11 v1.41 add global script timer, use keyboard.virtualType to spam messages for MM2 v1.91 and higher
07.11 v1.4 add 'spam messages to chat mode', minor changes
05.11. v1.31 separate tuning factor for x & y / Test key will show cursor position / some little bugs in calcuation of distance between rows
03.11. v1.3 add new key to toggle 'move during harvest' on/off, new option to tune x/y distance depending from distance while planting
31.10. v1.2 add: anti afk, inc/dec x/y values with key, use planting sets for various fields/plants
28.10. v1.1 add an option to move forward during harvest

Credits to Lisa: I used his harvesting script as an template
Attachments
plant.lua
v1.51
(33.08 KiB) Downloaded 971 times
Last edited by d003232 on Sun Nov 23, 2014 6:52 pm, edited 17 times in total.
The RoM Bot Online Wiki needs your help!

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

Re: harvesting & planting support script

#2 Post by lisa » Mon Oct 27, 2014 6:35 pm

I haven't tested it yet.

Code: Select all

	keyboard.virtualPress(win, p_harvestKey);		
	keyboard.virtualRelease(win, p_harvestKey);	
You can use the 3rd arg for virtualPress so you don't need the release. The way admin explained it is that default usage of press will press the key and then release it at the end of macro.main() but to make it release 50ms after pressing you add 3rd arg and have the value as false.

Code: Select all

	keyboard.virtualPress(win, p_harvestKey,false);	
Some things I considered when doing my planting script is that the planting is done according to position on screen and not how the game itself looks, so in order to work effectively you need to have camera in the same position each time, ie. directly above character and fully zoomed out, any adjustment to zoom or camera angle would affect if the planting is successful or not.

I also did some testing with manually planting and having the script record the location of the mouse when it clicks, so you basically save the location where you do plant things, so it would just repeat those locations each time, handy if your hidden and planting on a non flat surface. It was working pretty well but if you get bumped by any other people then it gets messed up.

For the shortcut key what I did was change to action bar 4 and just have the seeds in the action bar and use 1,2,3,4.. for each plant.

I think though at the end of the day since we can't get any info from the game any script for planting will be good for the person creating it but others might find it problematic unless they copy the exact circumstances of the creator.
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

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting & planting support script

#3 Post by d003232 » Tue Oct 28, 2014 7:47 am

lisa wrote:

Code: Select all

	keyboard.virtualPress(win, p_harvestKey,false);	
Thx for that hint. I will test that.
lisa wrote:I think though at the end of the day since we can't get any info from the game any script for planting will be good for the person creating it but others might find it problematic unless they copy the exact circumstances of the creator.
Yes it not a ready usable script. One have to change the parameters depending from the own use. I mostly use if in open space areas. Not in my own garden. And I use small plants. One has to change all that parameters depending from the own needs.
The RoM Bot Online Wiki needs your help!

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

Re: harvesting & planting support script

#4 Post by lisa » Thu Oct 30, 2014 4:56 am

ok been testing/running it a bit and I have some suggestions you may or may not want to do, I already did them in mine =)

Have it so when harvesting if the harvest key is pressed then it resets the time, (if you move manually you can do 1 key press and it will continue efficiently instead of wasting time.

Set up some keys to increase/decrease the x y distance for planting, so if you know your on a slope you can adjust the distances without having to edit the .lua and then restart the script.

Instead of purely waiting for the pause key to be pressed to continue, have it do anti afk code, so you never get booted.
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

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting & planting support script

#5 Post by d003232 » Thu Oct 30, 2014 5:17 am

lisa wrote:Have it so when harvesting if the harvest key is pressed then it resets the time, (if you move manually you can do 1 key press and it will continue efficiently instead of wasting time.

Set up some keys to increase/decrease the x y distance for planting, so if you know your on a slope you can adjust the distances without having to edit the .lua and then restart the script.

Instead of purely waiting for the pause key to be pressed to continue, have it do anti afk code, so you never get booted.
Dmnd. I did'nt really understand what you are meaning with your first point? 'reset the time' ... One can set the parameter _move_for_harvest = false then the harvest key will always be spamed every ~300ms

Second point ok. Need 4 more key settings.

I also dont understand the third point. Isn't that the same as point one? Set parameter _move_for_harvest = false and it will be spamed endlessly.

You could post your code? :-)
The RoM Bot Online Wiki needs your help!

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

Re: harvesting & planting support script

#6 Post by lisa » Thu Oct 30, 2014 5:35 am

in macro.event()

Code: Select all

		if task == "harvest" and running and data1 == p_harvestKey then
			hf_lastActionTime = time.getNow()
		end
if you are in harvest mode and running and you press the key yourself that would harvest it resets the harvest timer.

At the moment if MM has nothing to harvest and you move then it will waste the 5 seconds because it thinks it is harvesting. With that code you can manually move and manually press harvest key, MM will continue on as is if it did the key press.

When you do this.

Code: Select all

		print("Planting finished")	
		printf("Press "..keyboard.getKeyName(pauseKey).." to restart/pause.\n");
Have it start code that is for anti idle, key presses occasionally like in Admins script.
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

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting & planting support script

#7 Post by d003232 » Thu Oct 30, 2014 1:58 pm

lisa wrote:in macro.event()

Code: Select all

		if task == "harvest" and running and data1 == p_harvestKey then
			hf_lastActionTime = time.getNow()
		end
if you are in harvest mode and running and you press the key yourself that would harvest it resets the harvest timer.
I understand what you mean. I think its not needed anymore. I now spam the harvest key every ~300 ms. So there is no waste time or need to press the key manualy. Perhaps it would be helpful to have a key to change the mode to 'no automatic move'?

lisa wrote:Have it start code that is for anti idle, key presses occasionally like in Admins script.
You mean instead to go to a totaly pause mode to go to some idle mode with anti AFK? Means to press some button every 2 minutes?
The RoM Bot Online Wiki needs your help!

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting & planting support script

#8 Post by d003232 » Thu Oct 30, 2014 7:05 pm

Add v1.2.

See first post.
The RoM Bot Online Wiki needs your help!

franek
Posts: 20
Joined: Tue Oct 18, 2011 6:47 pm

Re: harvesting & planting support script

#9 Post by franek » Fri Oct 31, 2014 2:28 am

Well, I do not know how to properly use this script. Can you make a short video or something to show? Also, I do not get how to configure the whole script for other plants, etc.

EDIT: Nevermind, I do get it ;)

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: harvesting & planting support script

#10 Post by wilifox » Mon Nov 03, 2014 11:24 am

is possible to program a script to just click left mouse? ty

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting & planting support script

#11 Post by d003232 » Mon Nov 03, 2014 12:31 pm

wilifox wrote:is possible to program a script to just click left mouse? ty
Sure. Take a look at the plant script and you will get how to click left / right mouse button.
The RoM Bot Online Wiki needs your help!

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: harvesting & planting support script

#12 Post by wilifox » Mon Nov 03, 2014 12:49 pm

ok ty very much!! ;)

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting,planting & antiAFK support script

#13 Post by d003232 » Mon Nov 03, 2014 2:44 pm

Add v1.3.

See first post.
The RoM Bot Online Wiki needs your help!

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: harvesting,planting & antiAFK support script

#14 Post by wilifox » Mon Nov 03, 2014 4:22 pm

The next update ;) "Planting House" ;) Txy very much! ;)

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: harvesting,planting & antiAFK support script

#15 Post by ZZZZZ » Mon Nov 03, 2014 9:40 pm

wilifox wrote:The next update ;) "Planting House" ;) Txy very much! ;)
I found the mouse position and just added another hotkey to admins aaa script to spam click where the confirmation screen should be. Still has nothing against all these fkers using that land hack addon though :/

Code: Select all


if spamMouse == true then
					mouse.press(key.VK_LMOUSE)
				end

----

elseif( data1 == mouseSpamPos ) then
			if spamMouse == false then
				print("Spaming mouse at X: 916 / Y: 753")
				mouse.setPosition(916, 753)
				counter = 1
				spamMouse = true
			else
				spamMouse = false
			end
		elseif ( data1 == mouseCheckPos ) then
			print("Mouse Position: ", mouse.getPosition())
		end	
^ just the parts to deal with spamming it. Would have to add it in yourself and edit the mouse position etc.

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: harvesting,planting & antiAFK support script

#16 Post by wilifox » Tue Nov 04, 2014 2:50 pm

How to know what is my mouse position? Ty

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting,planting & antiAFK support script

#17 Post by d003232 » Wed Nov 05, 2014 3:26 am

wilifox wrote:How to know what is my mouse position? Ty
See plant.lua v1.31 above. I added a test key (default T) witch will print the cursor position.

Code: Select all

hf_x, hf_y = mouse.getPosition()
			printf("window position "..wx.."/"..wy.." window size "..wwide.."/"..whigh)
			printf(" cursor position at "..hf_x.."/"..hf_y.."\n")
The RoM Bot Online Wiki needs your help!

wilifox
Posts: 86
Joined: Tue Jul 26, 2011 6:00 pm

Re: harvesting,planting & antiAFK support script

#18 Post by wilifox » Wed Nov 05, 2014 5:49 am

ty, only one question. Hackshield detect micromacro? :P

Micke
Posts: 46
Joined: Sun Aug 15, 2010 10:07 am
Location: Germany

Re: harvesting,planting & antiAFK support script

#19 Post by Micke » Fri Nov 07, 2014 4:17 am

d003232 wrote:I added a test key (default T) witch will print the cursor position.
someone know a way to open the window with the confirm button ? a call or extract it from the game_pak - to verify the button position.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: harvesting,planting, spamMSG & antiAFK support script

#20 Post by d003232 » Fri Nov 07, 2014 3:01 pm

Add v1.4.

New message spam mode.
The RoM Bot Online Wiki needs your help!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests