Thursday, August 20, 2009

SWG Auto RE Macro!




Hey there, found a new automatic Reverse Engineering macro... Works super, ofcourse.
Try it out, should compensate for all lag!

Quick instructions:

Put SWG into windowed mode (Press Control+Enter or set it in the game options from launher)
  • Turn off "Allow object rotation" from the interface option.

  • Turn on "Dragging onto containers puts items into containers".

  • Cover your entire screen with an empty backpack.

  • Open the backpack where you put the completed 35s in.

  • Open the backpack with unfinished powerbits.

  • Open your inventory with I, and arrange them in your screen.

  • Activate the script and set it up.


  • HotKeySet("{ESC}", "Terminate")
    Opt("MouseClickDragDelay", 100)
    #include
    #include
    $i = 0
    $count = 0

    $xy = splash("Click somewhere where the screen turns dark with attach SEA popup")

    $darkX = $xy[0]
    $darkY = $xy[1]

    $xy = splash("Click on the +35 powerbit in inventory (Left blue side)")
    $inf1X = $xy[0]
    $inf1Y = $xy[1]

    $xy = splash("Click on the middle of 35 in title bar")
    $titleX = $xy[0]
    $titleY = $xy[1]

    $xy = splash("Leftclick on the spot right of the +35 in inventory, so you'll touch the item you use for grinding")
    $inf2X = $xy[0]
    $inf2Y = $xy[1]

    $xy = splash("Leftclick on the +35 Powerbit storage")
    $35StorageX = $xy[0]
    $35StorageY = $xy[1]

    $xy = splash("Leftclick on the crate of items you use for grinding")
    $crateX = $xy[0]
    $crateY = $xy[1]

    $xy = splash("Rightclick on the junktool", '02')
    $junkX = $xy[0]
    $junkY = $xy[1]

    splash("Press Cntrl when the Create Powerup option appears",'11')
    $junkRadialX = $junkX - 125
    $junkRadialY = $junkY
    $junkRadial = PixelChecksum($junkRadialX-5,$junkRadialY-5,$junkRadialX+5,$junkRadialY+5)
    MouseClick("left",$junkX,$junkY,1,3)

    $xy = splash("Rightclick on the RE tool", '02')
    $reX = $xy[0]
    $reY = $xy[1]

    splash("Press Cntrl when the Create Powerup option appears",'11')
    $reRadialX = $reX - 125
    $reRadialY = $reY
    $reRadial = PixelChecksum($reRadialX-5,$reRadialY-5,$reRadialX+5,$reRadialY+5)
    MouseClick("left",$reX,$reY,1,3)

    $xy = splash("Leftclick on the unfinished powerbit (storage)")
    $unfinishedX = $xy[0]
    $unfinishedY = $xy[1]

    MouseClick("left", $inf1X, $inf1Y, 1, 3) ; Click the +35 powerbit
    sleep(1500)
    $is35 = PixelChecksum($titleX-7, $titleY-5, $titleX+7, $titleY+5)
    $popupCheck = PixelGetColor($darkX,$darkY)

    MouseClickDrag("left",$inf1X,$inf1Y,$35StorageX,$3 5StorageY, 3) ; +35 to storage
    sleep(500)
    $inf1Empty = PixelChecksum($inf1X-5,$inf1Y-5,$inf1X+5,$inf1Y+5)
    $inf2Empty = PixelChecksum($inf2X-5,$inf2Y-5,$inf2X+5,$inf2Y+5)

    Do
    sleep(100)
    Until Inf1Empty()

    MouseClickDrag("left",$unfinishedX,$unfinishedY,$i nf1X,$inf1Y, 3) ; Unfinished Bit to inventory
    Do
    sleep(100)
    Until Not Inf1Empty()

    Do
    MouseClick("left",$inf1X,$inf1Y,1,3)
    sleep(100)
    if(check35()) then
    MouseClickDrag("left",$inf1X,$inf1Y,$35StorageX,$3 5StorageY, 3) ; +35 to storage
    $times = 0
    Do
    $times=$times+1
    if($times>50) then
    $times = 0
    MouseClickDrag("left",$inf1X,$inf1Y,$35StorageX,$3 5StorageY, 3)
    EndIf
    sleep(100)
    Until Inf1Empty()
    $times = 0
    MouseClickDrag("left",$unfinishedX,$unfinishedY,$i nf1X,$inf1Y,3)
    $times = 0
    Do
    $times=$times+1
    if($times>50) then
    $times = 0
    MouseClickDrag("left",$unfinishedX,$unfinishedY,$i nf1X,$inf1Y,3)
    EndIf
    sleep(100)
    Until not Inf1Empty()
    $times = 0
    EndIf
    MouseClickDrag("left",$inf1X,$inf1Y,$reX,$reY,3)
    Do
    sleep(100)
    Until Inf1Empty()

    MouseClick("right",$junkX,$junkY,1,3)
    Do
    sleep(100)
    Until junkRadial()
    Send("5")

    Do
    sleep(100)
    Until not Inf1Empty()
    MouseClickDrag("left",$inf1X,$inf1Y,$reX,$reY,3)

    Do
    sleep(100)
    Until Inf1Empty()

    MouseClick("right",$reX,$reY,1,3)
    Do
    sleep(100)
    Until reRadial()
    send("6")

    Do
    sleep(100)
    Until not Inf1Empty()

    MouseClick("left",$crateX,$crateY,2,3)
    Do
    sleep(100)
    Until not Inf2Empty()

    MouseClickDrag("left",$inf1X,$inf1Y,$inf2X,$inf2Y, 3)
    Do
    sleep(100)
    Until darkscreen()
    send("{enter}")
    Do
    sleep(100)
    Until not darkscreen()
    Do
    sleep(100)
    Until Inf2Empty()
    sleep(250)
    MouseClickDrag("left",$inf1X,$inf1Y,$reX,$reY,3)
    Do
    sleep(100)
    Until inf1Empty()

    MouseClick("right",$reX,$reY,1,3)
    Do
    sleep(100)
    Until reRadial()
    send("5")

    Do
    sleep(100)
    until not inf1Empty()
    until 1=0 ; Infinite loop

    Func Inf1Empty()
    return $inf1Empty == PixelChecksum($inf1X-5,$inf1Y-5,$inf1X+5,$inf1Y+5)
    EndFunc

    Func Inf2Empty()
    return $inf2Empty == PixelChecksum($inf2X-5,$inf2Y-5,$inf2X+5,$inf2Y+5)
    EndFunc

    Func reRadial()
    return $reRadial == PixelChecksum($reRadialX-5,$reRadialY-5,$reRadialX+5,$reRadialY+5)
    EndFunc

    Func junkRadial()
    return $junkRadial == PixelChecksum($junkRadialX-5,$junkRadialY-5,$junkRadialX+5,$junkRadialY+5)
    EndFunc

    Func darkScreen()
    return $popupCheck <> PixelGetColor($darkX,$darkY)
    EndFunc

    Func check35()
    return $is35 == PixelChecksum($titleX-7, $titleY-5, $titleX+7, $titleY+5)
    EndFunc

    Func splash($Text , $keyCode='01')
    SplashTextOn("Setup", $Text, 400, 100, -1, -1, 1, "Ariel", 14)
    While 1
    Sleep(100)
    If _IsPressed($keyCode) Then
    $pos = MouseGetPos()
    ExitLoop
    EndIf
    WEnd
    SplashOff()
    sleep(200)
    return $pos
    EndFunc

    ;Terminate Script
    Func Terminate()
    Exit 0
    EndFunc ;==>Terminate

    3 comments:

    Unknown on August 31, 2009 at 12:15 PM said...

    What kind of macro is this? Doesnt compile in autoit.

    Wook on September 1, 2009 at 10:02 AM said...

    same here...no way to get this script running. i am also using AutoIt3. Any hints?

    sQren on September 2, 2009 at 6:06 AM said...

    Something is buggy.
    It is for autoit.
    I will make a new one and post it within the next few days.

    sorry all, but thanks for letting me know it was bugged.

    Post a Comment

     

    Star Wars Gaming news

    Master of World of Warcraft

    Aion Guides | Aion Strategies

    Star Wars Gaming © 2009