AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

4 Game Automation: FUNCTIONS(e.g. random click) and TOOLS

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Zed Gecko



Joined: 23 Sep 2006
Posts: 149

PostPosted: Fri Jul 06, 2007 6:45 am    Post subject: 4 Game Automation: FUNCTIONS(e.g. random click) and TOOLS Reply with quote

I have created some basic stuff for the game automation fraction.

Itīs nothing new or special, just some basic stuff,
but it covers some FAQs in the help-section of the forum.

I made some functions (just below), you can use in your own scripts
and some little tools:

A Click-Recorder/Script-Writer to record mouseclicks into ahk-scripts.

A SendMode/KeyDelay-Tester to quickly test different SendModes and KeyDelays with your own mouse-clicking and key-pressing hotkey or subroutine.


The folowing 7 functions are all independend of each other,
so you can copy only the needed ones:
There are two functions to let the user select a position or area on the screen.
    definescreenarea
    definescreenposition

There are four functions to randomly click/right-click in a certain screen-area.
    randomclick
    randomclickinarea
    randomrightclick
    randomrightclickinarea

The last function sleeps for a random time
    randomsleep


Code:
code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795


Attention: these are only functions, you need to incorporate them in your own script to get any result

check out the functions in the following posts, too ...

Keywords:
auto-mine , auto-click , auto-buy , automine , autoclick , autobuy , click , drag , randomly , random-click , random-sleep , random , auto , click , mouse , move , game , browsergame, automation , drag and drop , click-recorder , record , script-writer , script , writer


Last edited by Zed Gecko on Sat Jan 28, 2012 2:18 am; edited 8 times in total
Back to top
View user's profile Send private message
BoBoĻ
Guest





PostPosted: Fri Jul 06, 2007 8:41 am    Post subject: Reply with quote

Thx for your effort & sharing this. Would you mind to finaly add a WriteMeAScript() function Wink
Back to top
Z Gecko
Guest





PostPosted: Fri Jul 06, 2007 4:46 pm    Post subject: Reply with quote

^^
Roger, iīm trying really hard, but
i still have some trouble with the FindOutWhatTheUserReallyWants() function Rolling Eyes
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Fri Jul 06, 2007 5:37 pm    Post subject: Reply with quote

this is like DWIM(x)
http://ars.userfriendly.org/cartoons/?id=20011121&mode=classic
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
Z Gecko
Guest





PostPosted: Sat Jul 07, 2007 1:44 pm    Post subject: Reply with quote

very cool,
i think DWIM(x) is so essential,
Chris should introduce this to autohotkey as soon as possible.
I canīt live without it anymore Laughing
Back to top
polyethene



Joined: 11 Aug 2004
Posts: 5246
Location: UK

PostPosted: Sat Jul 07, 2007 2:05 pm    Post subject: Reply with quote

I also have some functions for stealthy game macroing, here are two of them:

Code:
Click(x, y, p = "", e = 5) {
   Random, r, 5, 30
   SetDefaultMouseSpeed, r
   Random, r, -e, e
   x += r
   Random, r, -e, e
   y += r
   Click %p% %x% %y%
   Sleep, 10
}

Sleep(d, e = 0.4) {
   Random, r, d * (1 - e), d * (1 + e)
   Sleep, r
}

_________________
GitHub • Scripts • IronAHK • Contact by email not private message.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zed Gecko



Joined: 23 Sep 2006
Posts: 149

PostPosted: Wed Jul 11, 2007 5:39 am    Post subject: Reply with quote

similar to the randomclick()-function i made the

randomclickdrag()-function
Code:
code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795



Last edited by Zed Gecko on Sat Jan 28, 2012 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
trik



Joined: 15 Jul 2007
Posts: 1320

PostPosted: Wed Aug 01, 2007 6:49 pm    Post subject: Reply with quote

I've also made some functions. dieomclick() dieomsleep()

Code:
; dieomclick
; Example dieomclick(100, 100, 10) Clicks X90-110 Y90-110
dieomclick(xcoord, ycoord, offset = 0)
{
   Random, diex, -%offset%, %offset%
   Random, diey, -%offset%, %offset%
   xcoord += %diex%
   ycoord += %diey%
   Click, Left, %xcoord%, %ycoord%
}


Code:
; dieomsleep
; example dieomsleep(1000, 100) Waits 900-1100 Milliseconds
dieomsleep(sleep, rsleep = 0)
{
   Random, dies, -%rsleept%, %rsleep%
   sleep += %dies%
   Sleep, %sleep%
}

_________________
Religion is false. >_>
Back to top
View user's profile Send private message
Zed Gecko



Joined: 23 Sep 2006
Posts: 149

PostPosted: Sat May 31, 2008 9:12 pm    Post subject: Simple Click-Recorder Reply with quote

I made a little Click-Recorder,
it records Left/Middle/Right-MouseClicks and displays them as an ahk-script, so you can include them in your scripts.
The functionality is limited:
    you can record MouseClicks,
    and you can change the CoordMode for clicks from relative to screen and back.

Usage: after the script is started, it shows a MsgBox which tells you all usable hotkeys:
Press "Pause" to start/stop the click-recording.
Press "Escape" to show/update the GUI!
Press "Ctrl+Alt+M" to toggle the CoordMode.
Press "Ctrl+Alt+T" enable/disable a Tooltip showing your last action.

Code:
code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795


Last edited by Zed Gecko on Sat Jan 28, 2012 2:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group