[GUIDE] How To Create Ur Own Memory Bot!

06/21/2009 22:02 Palmatex#1
I made this bot for me so this is configured for elementalist!

1. Download autohotkey installer [Only registered and activated users can see links. Click Here To Register...]
2. Create a new .ahk
3. Open it with notepad or something like that.
4. Copy & paste the example code

Example bot futures:
- Multiclient support
- Use skills, buffs

Example Bot:
Code:
ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%

VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

;----------- START -> CHANGE TITLE & GOSUB -----------
INSERT::
WinWaitActive, Archlord
WinSetTitle, Example Bot 1   ; Change window title
GoSub, Default
GoSub, Core
Return
;----------- END -> CHANGE TITLE & GOSUB -----------

;----------- START -> RESET COUNTERS -----------
Default:
FineStaffReuse = 0
FrostArmorReuse = 0
FairyBlessReuse = 0
Return
;----------- END -> RESET COUNTERS -----------

Core:
Loop
{
{
HP := ReadMemory(0xF165C58,"Example Bot 1")
If HP = 0
	ControlSend,, {TAB}, Example Bot 1
}
	If (1 < HP && FrostArmorReuse = 0)
	{
		Sleep, 1000
		GoSub, RebuffFrostArmor
	}
	If (1 < HP && FineStaffReuse = 0)
	{
		Sleep, 1000
		GoSub, RebuffFineStaff
	}
	If (1 < HP && FairyBlessReuse = 0)
	{
		Sleep, 1000
		GoSub, RebuffFairyBless
	}
	If (1 < HP && FrostArmorReuse = 1 && FineStaffReuse = 1 && FairyBlessReuse = 1)
	{
		ControlSend,, 4, Example Bot 1
		Sleep, 1000
	If (1 < HP && FrostArmorReuse = 1 && FineStaffReuse = 1 && FairyBlessReuse = 1)
		ControlSend,, 5, Example Bot 1
		Sleep, 1000
	If (1 < HP && FrostArmorReuse = 1 && FineStaffReuse = 1 && FairyBlessReuse = 1)
		ControlSend,, 6, Example Bot 1
		Sleep, 1000
	}
}
Return

;----------- START -> USE | BUFFS & SKILLS -----------
RebuffFrostArmor:
ControlSend,, 9, Example Bot 1
Sleep, 3000
FrostArmorReuse ++
SetTimer, FrostArmorReuse, 528000   ; Reuse Time
Return

RebuffFineStaff:
ControlSend,, 8, Example Bot 1
Sleep, 4000
FineStaffReuse ++
SetTimer, FineStaffReuse, 576000   ; Reuse Time
Return

RebuffFairyBless:
ControlSend,, 7, Example Bot 1
Sleep, 3000
FairyBlessReuse ++
SetTimer, FairyBlessReuse, 432000   ; Reuse Time
Return
;----------- END -> USE | BUFFS & SKILLS -----------

;----------- START -> TIMERS | BUFFS & SKILLS -----------
FrostArmorReuse:
Sleep, 3000
FrostArmorReuse = 0
Return

FineStaffReuse:
Sleep, 3000
FineStaffReuse = 0
Return

FairyBlessReuse:
Sleep, 3000
FairyBlessReuse = 0
Return
;----------- END -> TIMERS | BUFFS & SKILLS -----------

;----------- START -> CHANGE TITLE & RELOAD -----------
DELETE::
WinWaitActive, Example Bot 1
WinSetTitle, Archlord   ; Change back the title
Sleep, 2000
Reload
Return
;----------- END -> CHANGE TITLE & RELOAD -----------
Hotkeys:
INSERT: Start bot
DELETE: Stop bot

5. U need cheat engine to get the current Target HP address and paste here
HP := ReadMemory(0xF165C58,"Example Bot 1") 0xF165C58 <- Need to change the current address every time when u open archlord client! ATM dont work with pointers!

If u dont know how to use cheat engine just use CE tutorial or use google

The source code is simple i think so u can change for ur char.
06/21/2009 22:06 Newbb#2
ill see if i can make annything out of it after the weekend^^

thx in advance, it might be relay usefull since were in need of new bots..
06/22/2009 09:50 Drakonis#3
you got me interested, can you please explain how does it work more closely?
06/22/2009 13:07 Palmatex#4
U can check all commands in here: [Only registered and activated users can see links. Click Here To Register...]

I upload the .ahk file u can edit with notepad or other editors. This is easy only for getting hp i use memory reading then use key sending like a macro.

Edit:
If somebody can send me the current pointers of the game like HP, pots, weapon durabiliti it would be nice