Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

BF2: Drop Cartillery on USMC artillery as MEC on Karkand 90%


  • Please log in to reply
11 replies to this topic
Harmor
  • Members
  • 182 posts
  • Last active: Sep 20 2007 05:09 AM
  • Joined: 06 Nov 2005
The following will drop Cartillery on USMC artillery, as MEC on the Strike at Karkand map 90% of the time in x1 commander view in 1024x768 view (you don't have to zoom in).
;
; AutoHotkey      Version: 1.x
; Language:       English
; Platform:       Win9x/NT
;
; Press 7 on the Keypad to drop on the Left USMC artillery
; Press 9 on the Keypad to drop on the Right USMC artillery
;
; Only run this script when bf2.exe is running in the foreground
;
#SingleInstance force
#InstallKeybdHook 


SetTimer, KeepRunning
return

KeepRunning:

  ; Get the process name of the active window (i.e. Notepad.exe)
  WinGet, szProcessName, ProcessName, A
  if szProcessName = bf2.exe
  {
    Suspend, off
  }
  else
  {
    Suspend, on
  }
return

;
; Disable the Window's keys so they don't switch to desktop while in-game
;
$LWin::	; Left Windows Button
$RWin::	; Right Windows Button
	; Do nothing
return

$^CapsLock::
   ExitApp
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Pressing Ctrl+V while BF2 is active
$^v::
	Sleep 200
   SetKeyDelay, 30, 30
	Send,  {Space}%clipboard%
   SetKeyDelay, 0
return

MouseEvent(a_xpos, a_ypos)
{
   DllCall("mouse_event", uint,1, int,a_xpos, int,a_ypos, uint,0, int,0 )
}

DropCartillery(a_xPos,a_yPos,a_yMenuPos = 92, a_xMenuPos = 20)
{
   MouseEvent(-2000,-2000)
   sleep 100
   MouseEvent(a_xPos,a_yPos)
   sleep 20
   MouseClick, Right, , , , , D
   sleep 40
   MouseClick, Right, , , , , U
   MouseEvent(a_xMenuPos,a_yMenuPos)
   sleep 40
   MouseClick, Left, , , , , D
   sleep 40
   MouseClick, Left, , , , , U
   sleep 100
}

;
; Cartillery: USMC Left artillery - Karkand
;
$Numpad7::
$NumpadHome:
   DropCartillery(332,342,42)
return
;
; Cartillery: USMC Right artillery - Karkand
;
$Numpad9::
$NumpadPgUp:
   DropCartillery(379,328,58)
return

I tried dropping cartillery on MEC artillery with a HUMVEE, but literially the direction the artillery is facing will determine where to drop it (artillery is slanted towards its last target). Therefore its not reliable.

If curious, the x1 zoom for the MEC artillery is: (535, 175) and (568, 117). I tried creating a script that zooms in and then drops artillery to get better accuracy, but it doesn't matter because of the angle of the artillery. Vodiks just have a larger area...

EDIT: Added the DropCartillery and MouseEvent functions to make it easier to read and modify
EDIT: I updated the coordinates for the Right USMC artillery from 378x328 to 379x329
EDIT: I tested this script using 1280x1024 and I didn't have to change the coordinates
//TODO: Create kewl sig...

Lshink
  • Guests
  • Last active:
  • Joined: --
You wouldn't happen to know what the coordinates are for 1280x1024 would you? :)

slomz
  • Guests
  • Last active:
  • Joined: --
Try to find that out. Open up windowspy and then scroll to where those coordinates are then open upbf2 and keep mouse there.

Harmor
  • Members
  • 182 posts
  • Last active: Sep 20 2007 05:09 AM
  • Joined: 06 Nov 2005

You wouldn't happen to know what the coordinates are for 1280x1024 would you? :)


I tested this using 1280x1024 and I didn't have to change the coordinates. I updated the script to make it easier to read and modify.


Here are some other coordinates that I tested, but all failed except for Wake Island 2007 - USMC - Top Artillery: that one works like 30% of the time


; Sharqi Peninsula - USMC - Left Artillery: DropCartillery(461,244) ; [Failed @ x1 zoom: actual (461.5, 224) ]
; Sharqi Peninsula - USMC - Right Artillery: DropCartillery(473,253) ; [Failed @ x1 zoom: actual (473.3, 253) ]
; Wake Island - China - Top Artillery: DropCartillery(498,300,85) ; [Failed @ x1 zoom: actual (497.7, 300)]
; Wake Island - China - Middle Artillery: DropCartillery(502,298,85) ; [Failed @ x1 zoom: actual (501.7,298.5)]
; Wake Island - China - Bottom Artillery: DropCartillery(503,294) ; [Failed @ x1 zoom: actual (503.2,294)]
; Wake Island - USMC - Right Artillery: DropCartillery(342,171) ; [Failed @ x1 zoom: actual (341.9,171)]
; Wake Island - USMC - Middle Artillery: DropCartillery(340,176) ; [Failed @ x1 zoom: actual (340.9,175.7)]
; Wake Island - USMC - Left Artillery: DropCartillery(338,181) ; [Failed @ x1 zoom: actual (338,181.5)]
//TODO: Create kewl sig...

Lshink
  • Guests
  • Last active:
  • Joined: --

Try to find that out. Open up windowspy and then scroll to where those coordinates are then open upbf2 and keep mouse there.


Ok, cool....will do :) I'll post my results here. Thanks!

BF2_Hkr
  • Guests
  • Last active:
  • Joined: --
Does this work Online, is it Undectable??

AHK grouppie
  • Guests
  • Last active:
  • Joined: --
if you do not compile it, you will have no problem with it...

AHK grouppie
  • Guests
  • Last active:
  • Joined: --

You wouldn't happen to know what the coordinates are for 1280x1024 would you? :)


And for 800x600, has anyone got coordinates ?

BF2_HAcker
  • Guests
  • Last active:
  • Joined: --
Ok, Just one more question, How do U use it??

p0ppabear
  • Guests
  • Last active:
  • Joined: --
can someone tell me how to like download these macros or how to use them.......my xfire is p0ppab34r and thats a zero for p0p :D :D :D :D :D :D :D :D

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005

can someone tell me how to like download these macros or how to use them.......my xfire is p0ppab34r and thats a zero for p0p :D :D :D :D :D :D :D :D


try reading the tutorial in the help file. if you don't know what help file I mean, click on the logo on the top of tha page and read about the scripting language. there's a download link on the main page.

Undefined Parameter
  • Members
  • 1 posts
  • Last active: Nov 30 2007 02:35 AM
  • Joined: 30 Nov 2007
i dunno what im doing wrong, but i can only drop one car at a time, isnt it supposed to be unlimited car drops?

thanks.