Page 1 of 2

SWG Autoattack Patcher (Single Client) - Updated 3/24

Posted: March 1st, 2011, 2:32 pm
by tnok85
EDIT: Updated 3/24 - working on live. If you're just here for the new offset, it's 1C3F094

Changelog: Simplified the UI. Attach/Detach/Quit.

Written in AutoIt using NomadMemory to access/write to addresses.

What does it do:
Enables auto attack - as soon as you target an enemy, you start autofiring.

What it doesn't do:
No multi-client support (yet). If there's enough interest I'll add this (and more) features.

What's it for:
AFK combat grinding, AFK foraging (utilize this to kill the worms/npcs that attack - my 90 Mando Frontman has no problem killing any of them with auto attacks from just a 1326/216 lava cannon)


How to use it:
- Unzip anywhere you like.
- For safety, rename the EXE - I do not believe SOE scans for processes but better safe than sorry.
- Start SWG.
- Start SWGAutoAttack.exe.
- Click "Attach"
- Leave the SWGAutoAttack running, since it's basically locking the address by running a very short loop.
- Now anything hostile that gets targeted, you'll start auto attacking.
- Click "Detach" to disable auto attacking (will take a few seconds)

*TESTED ON WINDOWS 7 X64 - WORKING AS OF 3/24*

NOTE: This is for TaultUnleashed use ONLY. This is NOT TO BE POSTED ANYWHERE ELSE. You are free to modify the source code FOR PERSONAL OR TAULTUNLEASHED USE ONLY.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 1st, 2011, 2:42 pm
by tnok85
Adding source so you can run it/compile it yourself if you want - understandable if people don't want to run EXE's. Adapted from a tutorial by darkjohn20 over on the Cheat Engine forums.

Updated source 3/24


Requires NomadMemory.au3, found here: http://www.autoitscript.com/forum/index ... h_id=31611

Code: Select all

#RequireAdmin
#include <NomadMemory.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global $hMemory
Global $checker = 0
Global $AutoAttack = Dec("1C3F094")
Global $BaseAddress = _MemoryGetBaseAddress($hMemory, 1)

#Region ### START Koda GUI section ###
$hGUI = GUICreate("tNok85's SWG Autoattack Patcher for TaultUnleashed", 259, 40, 192, 104)
$hAttach = GUICtrlCreateButton("Attach", 8, 8, 75, 25, $WS_GROUP)
$hDetach = GUICtrlCreateButton("Detach", 88, 8, 83, 25, $WS_GROUP)
GUICtrlSetState($hDetach, $GUI_DISABLE)
$hQuit = GUICtrlCreateButton("Quit", 176, 8, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
   Switch GUIGetMsg()
      Case $hAttach
         $hMemory = _MemoryOpen(ProcessExists("SwgClient_r.exe"))
         GUICtrlSetState($hDetach,$GUI_ENABLE)
         GUICtrlSetState($hAttach,$GUI_DISABLE)
		 _Patch()
      Case $hDetach
         _StopLoop()
		 _MemoryClose($hMemory)
         GUICtrlSetState($hAttach,$GUI_ENABLE)
         GUICtrlSetState($hDetach,$GUI_DISABLE)       
      Case $hQuit
         Exit
      Case $GUI_EVENT_CLOSE
         Exit
    EndSwitch
   
   If $checker=1 Then
      $Write = _MemoryWrite($AutoAttack, $hMemory, "1")
      Sleep(250)
   EndIf

WEnd

Func _Patch()
   If $BaseAddress = 0 Then
      Select
         Case @error = 1
            MsgBox(0, "Error", "Error getting base address: " & @CRLF & "Invalid handle to open process")
         Case @error = 2
            MsgBox(0, "Error", "Error getting base address: " & @CRLF & "Failed to find correct allocation address")
         Case @error = 3
            MsgBox(0, "Error", "Error getting base address: " & @CRLF & "Failed to read from the specified process")
      EndSelect
   EndIf
   $checker=1
EndFunc

Func _StopLoop()
   $checker=0
   $Write = _MemoryWrite($AutoAttack, $hMemory, "0")
EndFunc

Re: SWG Autoattack Patcher (Single Client)

Posted: March 1st, 2011, 2:53 pm
by heration
Tried it just now, works perfectly.

/yay

Thanks for it.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 1st, 2011, 4:40 pm
by tnok85
heration wrote:Tried it just now, works perfectly.

/yay

Thanks for it.
No problem. Are you on Windows 7 64 as well? It should work fine on 32 bit 7/vista (and XP) but I don't have a 32 bit/XP install on any of my computers so I can't verify.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 1st, 2011, 10:25 pm
by vinnyboy32
Need some more feedback from premium members please?

Re: SWG Autoattack Patcher (Single Client)

Posted: March 2nd, 2011, 8:06 am
by heration
tnok85 wrote:
heration wrote:Tried it just now, works perfectly.

/yay

Thanks for it.
No problem. Are you on Windows 7 64 as well? It should work fine on 32 bit 7/vista (and XP) but I don't have a 32 bit/XP install on any of my computers so I can't verify.
On windows 7, cant help with the XP or Vista sorry!

Re: SWG Autoattack Patcher (Single Client)

Posted: March 3rd, 2011, 2:20 am
by _obelix_
I confirm the trainer working on a WinXP Professional.

/yay


Basically this trainer does the same as Cheat Engine when it locks the memory adress. But yes - nice work.

You should at least add a version check, since the offset may change with any SWG-Client update. And writing a value at a wrong offset in memory usually crashes the client. ;)

Re: SWG Autoattack Patcher (Single Client)

Posted: March 3rd, 2011, 4:14 am
by tnok85
_obelix_ wrote:I confirm the trainer working on a WinXP Professional.

/yay


Basically this trainer does the same as Cheat Engine when it locks the memory adress. But yes - nice work.

You should at least add a version check, since the offset may change with any SWG-Client update. And writing a value at a wrong offset in memory usually crashes the client. ;)
Yep - this is pretty much what all memory type hacks do, unless you're actually code injecting. Then that's still just something CE can do.

A lot of people don't have Cheat Engine or don't want to use it - there are a number of people here that just want to download something that works without fooling around. That's all this is. :D

And yeah I'll toss a version check in next time I update it. Might add multi-client support.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 4th, 2011, 7:26 pm
by cuervogold
I think as my final release that I'll end up posting a tut on AA offsets, how I find them and the source to my trainer so anyone, someone can keep it updated. I just don't have the time to do it.

I always wanted to write a mem patch tut for autoit, but I just never found the time.

This post is a great first step to others modding the game.

I didn't test so I can't yah or nay.


I tired to post an update on my old stuff but TU was down again.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 4th, 2011, 8:11 pm
by tnok85
cuervogold wrote:I think as my final release that I'll end up posting a tut on AA offsets, how I find them and the source to my trainer so anyone, someone can keep it updated. I just don't have the time to do it.

I always wanted to write a mem patch tut for autoit, but I just never found the time.

This post is a great first step to others modding the game.

I didn't test so I can't yah or nay.


I tired to post an update on my old stuff but TU was down again.
Any of your old source code would be the ultimate help for everybody here, including me. :D

Re: SWG Autoattack Patcher (Single Client)

Posted: March 13th, 2011, 10:46 am
by tnok85
This section is really dead... probably won't be updating this, very little interest. Source code is there for anybody interested.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 22nd, 2011, 7:51 pm
by tnok85
Updated... 2 yays... need one more!

Re: SWG Autoattack Patcher (Single Client)

Posted: March 22nd, 2011, 7:55 pm
by vinnyboy32
Can we please get some more confirmation on this?

Re: SWG Autoattack Patcher (Single Client)

Posted: March 23rd, 2011, 12:22 pm
by spagetiokillers
hey tnok how did you use this with the forager, like moving wise/macros? i use the /dance and pet one but i hate having the pet setup and would like to try this one out.

Re: SWG Autoattack Patcher (Single Client)

Posted: March 23rd, 2011, 4:41 pm
by vad0r
yay