 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Zed Gecko
Joined: 23 Sep 2006 Posts: 149
|
Posted: Fri Jul 06, 2007 6:45 am Post subject: 4 Game Automation: FUNCTIONS(e.g. random click) and TOOLS |
|
|
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
| 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 |
|
 |
BoBoĻ Guest
|
Posted: Fri Jul 06, 2007 8:41 am Post subject: |
|
|
Thx for your effort & sharing this. Would you mind to finaly add a WriteMeAScript() function  |
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Fri Jul 06, 2007 4:46 pm Post subject: |
|
|
^^
Roger, iīm trying really hard, but
i still have some trouble with the FindOutWhatTheUserReallyWants() function  |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Sat Jul 07, 2007 1:44 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5246 Location: UK
|
Posted: Sat Jul 07, 2007 2:05 pm Post subject: |
|
|
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 |
|
 |
Zed Gecko
Joined: 23 Sep 2006 Posts: 149
|
Posted: Wed Jul 11, 2007 5:39 am Post subject: |
|
|
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 |
|
 |
trik
Joined: 15 Jul 2007 Posts: 1320
|
Posted: Wed Aug 01, 2007 6:49 pm Post subject: |
|
|
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 |
|
 |
Zed Gecko
Joined: 23 Sep 2006 Posts: 149
|
Posted: Sat May 31, 2008 9:12 pm Post subject: Simple Click-Recorder |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|