ArcheAge Anti-idle script

http://www.archeagegame.com/en/
ArcheAge NA/EU
Message
Author
User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: ArcheAge Anti-idle script

#21 Post by Administrator » Mon Oct 13, 2014 2:37 am

That does seem odd. The keypresses seem to work find everywhere else. Care to share your script?

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

Re: ArcheAge Anti-idle script

#22 Post by Micke » Mon Oct 13, 2014 2:42 am

if u set focus on chat input Lisa, MM also only write the first key ? i've seen it can be usefull for debug incoming
Last edited by Micke on Mon Oct 13, 2014 7:38 am, edited 1 time in total.

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

Re: ArcheAge Anti-idle script

#23 Post by lisa » Mon Oct 13, 2014 5:23 am

I'll do some testing with the chat box but I only tested with the interaction which is by default F.

I did it on my other PC, I will post it later.

My testing of mouse clicks seemed to work ok but you would need to make it search for the plants because people can just give you a push and then the coords would be off and not work anymore, the F key however can harvest the plants as long as they are still within range. Obviously this would be easier if we coulod get coords from the game lol
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

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

Re: ArcheAge Anti-idle script

#24 Post by lisa » Mon Oct 13, 2014 9:24 am

So I tried with
keyboard.press(key.VK_F);
and
keyboard.virtualPress(win, key.VK_F)

both had the same results when it came to the interaction with "F", I even tried alternating them but same results.
Would do first time and no other UNLESS I physically pressed a key myself between the MM key presses. Being focus and not focus made no difference.
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

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

Re: ArcheAge Anti-idle script

#25 Post by Administrator » Tue Oct 14, 2014 7:47 pm

I don't think this is related, but I did have a minor issue today with a new script I started working on. It made the press() act like a hold(), and so only was recognizing the first input. The cause was due to async input. Remember, using the press() functions in async mode (default) doesn't cause a rest and release right away, but instead queues up the release for later. As such, it was actually just holding and never really getting around to the release. So, if you are spamming the key fast, before it can release, it might not be generating a full press.

I'm sorry that was explained in such a confusing way, but I'm not really sure how to put it.

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

Re: ArcheAge Anti-idle script

#26 Post by lisa » Tue Oct 14, 2014 10:52 pm

hmm that does make things a clearer with other things I had too.

When I was doing mouse clicks and then moving the mouse it would do the click but then would move the screen just a little, as if mouse button was down when it did the mouse move.

Any way to make it release it straight away (both key and mouse click) or should I just do a rest/pause

On a side note I really miss yrest() function, so many times I just want a 1sec rest before doing something and returning to the main "loop" each time for what I want is silly =(
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

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

Re: ArcheAge Anti-idle script

#27 Post by Administrator » Tue Oct 14, 2014 11:10 pm

There's two things you can do. You could just not use the asyncronous press (just pass false as the second parameter), which will cause it to press, rest 50ms, then release before continuing. You can also just call hold() and release() right away, which might work (depends on how the game handles input).

system.rest() has superseeded yrest(). It causes the script to pause for that amount of time, but does not do anything with coroutines or threads. It is still advised to avoid it where possible, but the functionality is still there when it is needed.

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

Re: ArcheAge Anti-idle script

#28 Post by lisa » Wed Oct 15, 2014 2:12 am

Ok I worked out a little test so you can see what it is doing, it really is holding down the key.
Place an item in the shortcut bar that can be refined to something else, example potatoes.
Then get MM to do the keypress for the number that the item is in.
You can see the white outer edge square go in smaller and stay there, this only happens when you hold down the key.
So the key press seems to be holding the key down, for archeage anyway.

I will test doing hold and release and using false for second arg and then post my finding, waiting for new crops to finish.


-- false as second arg,
worked for the shortcut key and also harvesting with "F"

So yeah I think it is pretty clear the press is being held down in game and not released unless you physically do something to release it. Like your own key press or I changed windows when it was doing a non virtual press and this also released the key.

I can also confirm doing a release straight after the usual press works fine.

Code: Select all

Command> system.rest(5000) for i = 1,3 do keyboard.press(key.VK_F) keyboard.release(key.VK_F)  print("F pressed") system.rest(12000) end
that was my test, the 5 second at start was just to get focus on game.

So
keyboard.press(key.VK_F,false)
and
keyboard.press(key.VK_F) keyboard.release(key.VK_F)
works
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

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

Re: ArcheAge Anti-idle script

#29 Post by Administrator » Wed Oct 15, 2014 2:38 am

The async key releases will only be happen directly before the main function is re-called. If you're not using the main loop, that key release would never happen.

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

Re: ArcheAge Anti-idle script

#30 Post by lisa » Wed Oct 15, 2014 2:55 am

so it's working as intended, I was just using it wrong.
I can live with that =)
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

redemption94
Posts: 2
Joined: Thu Oct 02, 2014 3:18 am

Re: ArcheAge Anti-idle script

#31 Post by redemption94 » Wed Oct 15, 2014 8:06 am

Thank you for this script. Do you think on working on a hunting bot also ?

markd
Posts: 17
Joined: Sat Dec 03, 2011 6:28 pm

Re: ArcheAge Anti-idle script

#32 Post by markd » Wed Oct 15, 2014 4:53 pm

How amazing it would be if we could use the rom createpath in this game for the long trade treks. :) You guys turned me on to this game and I love it. I also want to thank for all the support you gave and still give to rom.

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

Re: ArcheAge Anti-idle script

#33 Post by lisa » Wed Oct 15, 2014 10:45 pm

markd wrote:How amazing it would be if we could use the rom createpath in this game for the long trade treks. :) You guys turned me on to this game and I love it. I also want to thank for all the support you gave and still give to rom.
We would need to get around hackshield to be able to do anything like that.
I have been doing some research and I have tried a few things but nothing that has been successful yet.
Even found a programme that is completely in russian for extracting files from the game, little tricky to work out what buttons do what but it does seem to work atleast.
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

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

Re: ArcheAge Anti-idle script

#34 Post by Micke » Thu Oct 16, 2014 4:54 am

if there are further russian translation questions e.g. youtube based guids .... ask.

saucy
Posts: 5
Joined: Sat Oct 25, 2014 5:44 pm

Re: ArcheAge Anti-idle script

#35 Post by saucy » Sat Oct 25, 2014 5:55 pm

Hi I have been using your anti-idle script for a good while now and it works great for me. My friends wanted to try it but when they do it just errors out.

The first computer we tried it on complained about something being nil, don't have the exact error for that one.

But the second one:

2014-10-25 18:37:09 : MicroMacro version 1.9.20.275 (Alpha)
2014-10-25 18:37:09 : AMD A10-5800K APU with Radeon(tm) HD Graphics @3800MHz, Windows 7
2014-10-25 18:37:09 : User privilege: Administrator
-------------------------------------------------------------------------------


2014-10-25 18:37:11 : Failed to run init function, err code: 7 (Runtime error)
aaa.lua:12: bad argument #2 to 'printf' (not a non-negative number in proper range)
stack traceback:
[C]: in function 'printf'
aaa.lua:12: in function 'searchForWindow'
aaa.lua:22: in function <aaa.lua:18>
2014-10-25 18:37:21 : Process forcefully terminated (Win32 callback)


Now I was curious because I play the game in directx 9 and have not had any issues. Both my friends default to directx 11, out of curiosity i changed the directx 11 to directx 9 on the second computer, the one with this error and voila it loaded without any issues.


As soon as my other friend logs in I'm going to have him test it again under directx 9 to see if it also loads. I was wondering if there is a simple fix for this issue, as they both want to use this but also play under directx 11.

I got the version, and the two scripts from the links at the top of this forum page.

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

Re: ArcheAge Anti-idle script

#36 Post by lisa » Sat Oct 25, 2014 8:02 pm

I changed mine to Dx11 and tested it and it still worked fine.

The error seems to be about finding the game window, so I doubt testing MM against other programmes would help discover the issue.

I think Admin will have to help you on this 1.
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

saucy
Posts: 5
Joined: Sat Oct 25, 2014 5:44 pm

Re: ArcheAge Anti-idle script

#37 Post by saucy » Sun Oct 26, 2014 2:10 am

So interesting still on another computer we loaded it, and used the default dx11 and it worked. It seems to just randomly not find the window on some computers.

Also why does it sometimes complain about a sound error? Why does the software care about the soundcard or sound in game at all?

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

Re: ArcheAge Anti-idle script

#38 Post by lisa » Mon Oct 27, 2014 12:26 am

saucy wrote:Also why does it sometimes complain about a sound error? Why does the software care about the soundcard or sound in game at all?
nothing to do with game sound, MM itself uses sounds if told to.

Are they in windowed mode or full screen?
If windowed then check the actual name of the window on the top bar.
If full screen then try minimizing it and seeing name on the task bar.
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

saucy
Posts: 5
Joined: Sat Oct 25, 2014 5:44 pm

Re: ArcheAge Anti-idle script

#39 Post by saucy » Tue Oct 28, 2014 5:16 pm

lisa wrote:
saucy wrote:Also why does it sometimes complain about a sound error? Why does the software care about the soundcard or sound in game at all?
nothing to do with game sound, MM itself uses sounds if told to.

Are they in windowed mode or full screen?
If windowed then check the actual name of the window on the top bar.
If full screen then try minimizing it and seeing name on the task bar.
The window name is the standard name and it doesn't change from client to client that we can tell. It works perfectly for me. Works on one other machine that I have seen but errors on two others and they are all exactly the same, the only difference is when running in dx11 mode DX11 is added to the window title.

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

Re: ArcheAge Anti-idle script

#40 Post by Administrator » Wed Oct 29, 2014 3:04 am

On the topic of not finding the window, are you (or your friends) running the game first, or MicroMacro and starting the script first? When you say "randomly" does this mean it sometimes works and sometimes doesn't for those same people? Is there any sort of anti-virus or firewall software that could be interfering? Are you running it with administrator privileges?

And, on the topic of a sound error you mentioned, make sure you get an exact copy of the error message next time you see it. Without even knowing what the error is, I couldn't even begin to guess what's wrong.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests