Log in

View Full Version : [Macro] Afk-Macro - Deploy & Die Macro



Loader88
January 17th, 2012, 12:54 AM
Hi,

im looking for a macro making programme like AutoIT, ez Macro 5 which works with Battlefield 3. Maybe im just stupid but all my tries arent working. I tried this, with AutoIT:

$fenstername = "Battlefield 3™" ;hier kommt der fenster titel hin.

While 1
ControlSend($fenstername,"","","{ESC}");das ist die 1. taste die gedrückt werden soll
SLeep(500);Das ist die pause in millisec
ControlSend($fenstername,"","","{Enter}");das ist die 2. taste die gedrückt werden soll
SLeep(500);Das ist die pause in millisec
ControlSend($fenstername,"","","{Enter}");das ist die 3. taste die gedrückt werden soll
SLeep(5000);Das ist die pause in millisec
ControlSend($fenstername,"","","{Enter}");das ist die 4. taste die gedrückt werden soll
sleep(500);
WEnd;

And with ez Macro 5:
<ESC><Delay (500)><EINGABE><Delay (500)><EINGABE><Delay (5000)><EINGABE><Delay (1000)>

It should be easy, but it wont work. Just "Escape" to join menu (already tried another key), then press two time "Enter" to choose Suicide and press "OK". 5Seconds to Deploy menu and then push "Enter" again to spawn. This in and neverending loop...but shit. I think Punkbuster blocks it -.- all kinds of script.


Any idea? Because no commands are sending to Battlefield 3 after i started the macro(s). Maybe Punkbuster blocks it.

Klapklap88
January 17th, 2012, 01:05 AM
I doubt it is punkbuster. As far as i know DX Games are kind of different and mostly they're blocking the "Send" commands from windows. That's why it doesn't work.

To avoid this problem you need to get something like a low level keyboard hook which is working very well on DX games. Just google about "low level keyboard hook tool" something like that and you will find something useful.

Thank-You
January 17th, 2012, 01:41 AM
Have you tried autohotkey?

Loader88
January 17th, 2012, 09:54 AM
Hi,

its working so far. But i need a delay command. Dont find the right one in help.

That is working, but to fast and always press the wrong option "not suicide":

WinWait, Battlefield 3™,
IfWinNotActive, Battlefield 3™, , WinActivate, Battlefield 3™,
WinWaitActive, Battlefield 3™,
Loop
{
Send, {ESC}
Send, {ENTER}
Send, {ENTER}
Send, {ENTER}
}That isnt working:

WinWait, Battlefield 3™,
IfWinNotActive, Battlefield 3™, , WinActivate, Battlefield 3™,
WinWaitActive, Battlefield 3™,
Loop
{
Send, {ESC}
Sleep, 500
Send, {ENTER}
Sleep, 500
Send, {ENTER}
Sleep, 7000
Send, {ENTER}
}So i need a working "delay" command between the "send" commands and maybe a command to exit the script (hotkey Ctrl+S).


Im not that smart to code a LowLevelKeyboardhook in AutoIt :x


Edit: I changed this "suicide" thing. Now the soldier deploy, choose C4, press right mouse, left mouse and then he is dead. Same way as suicide and i dont need any delays. But now i dont understand how i can end the neverending loop :x I always need to restart my pc.

Thank-You
January 17th, 2012, 11:54 AM
I'll help you later loader when I'm at my pc, posting off my phone at the moment :)

Loader88
January 17th, 2012, 12:59 PM
I'll help you later loader when I'm at my pc, posting off my phone at the moment :)

Alright :D ill be here

Thank-You
January 17th, 2012, 03:43 PM
Right i'm at PC, what do you have so far for the C4 Throw?

Loader88
January 17th, 2012, 04:11 PM
U got any instant messenger?


WinWait, Battlefield 3™,
IfWinNotActive, Battlefield 3™, , WinActivate, Battlefield 3™,
WinWaitActive, Battlefield 3™,
Loop
{
Send, {3}
MouseClick, right, 432, 148
MouseClick, left, 432, 148
Send, {ENTER}
}Need a Hotkey to exit script...right now

For example: Ctrl+A

ANd need to know what is the wait command.

Thank-You
January 17th, 2012, 09:37 PM
That script doesn't do anything for me ingame?
Sleep is the wait command?

Loader88
January 17th, 2012, 10:37 PM
Its working...choose Supporter with C4...and the C4 button must be number 3 (i changed them ingame settings).

Then he will choose C4, drop it, click it boom...Enter will deploy u. And this in a loop.

Sleep isnt working between the commands lik

"Sleep, 500"

then the script isnt working.

Just say me how i can toggle that script with Hotkeys. Please and write form of "Sleep" between 2 send commands.

Loader88
January 18th, 2012, 02:45 PM
Okay i did it with my own brain. Because you werent online yesterday.



WinWait, Battlefield 3™,
IfWinNotActive, Battlefield 3™, , WinActivate, Battlefield 3™,
WinWaitActive, Battlefield 3™,
z::
If (lo := !lo)
SetTimer, loopen , -500
Else
Reload
Return

loopen:
Loop
{
if !lo
Break
Send, {3}
if !lo
Break
MouseClick, right, 432, 148
if !lo
Break
MouseClick, left, 432, 148
if !lo
Break
Send, {ENTER}
}
Return

esc::ExitAppJust need a "Wait/Sleep/Delay" command. Because "Sleep, 500" isnt working. Dont know why. The script wont continue.


"z" ist the toggle button, to turn if off and on. Now i dont need to restart my pc and then canceling the restart :D

http://www.abload.de/img/0_80wbav8.jpg