|
You last visited: Today at 11:43
Advertisement
PWI - Real Chat Filters - Remove red / system spam etc. AutoIt Code included
Discussion on PWI - Real Chat Filters - Remove red / system spam etc. AutoIt Code included within the PW Hacks, Bots, Cheats, Exploits forum part of the Perfect World category.
10/30/2011, 23:29
|
#31
|
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 325
|
As far as I remember faction was an extra struct, and some offset in player struct pointed to ID which in turn referenced a certain faction in that struct - cant remember exactly, but im fairly certain that player and faction struct where two different things.
Cheers
|
|
|
10/31/2011, 05:00
|
#32
|
elite*gold: 0
Join Date: Sep 2008
Posts: 24
Received Thanks: 0
|
thanks to swoosh for you explaining.
this is my code dumfck. first I build player around me in array. like what you said before.
Code:
$playerCount = _MemoryPointerRead($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_PLAYERCOUNT)
If $playerCount[1] <> 0 Then
ReDim $array[$playerCount[1]][7]
For $p=0 To ($playerCount[1] - 1)
$playerPointer = _MemoryRead($PLAYER_DATA_BASE[1] + $p * 4, $PROCESS_INFORMATION)
$array[$p][0] = _MemoryRead($playerPointer + $OFFSET_PLAYERID, $PROCESS_INFORMATION) ;ID
$array[$p][1] = _MemoryRead(_MemoryRead($playerPointer + $OFFSET_PLAYERNAME + 0x0, $PROCESS_INFORMATION), $PROCESS_INFORMATION, 'wchar[30]') ;Name
$array[$p][2] = _MemoryRead($playerPointer + $OFFSET_PLAYERCLASS, $PROCESS_INFORMATION) ;Class
$array[$p][3] = _MemoryRead($playerPointer + $OFFSET_PLAYERX, $PROCESS_INFORMATION, 'float') ;X
$array[$p][4] = _MemoryRead($playerPointer + $OFFSET_PLAYERY, $PROCESS_INFORMATION, 'float') ;Y
$array[$p][5] = _MemoryRead($playerPointer + $OFFSET_PLAYERZ, $PROCESS_INFORMATION, 'float') ;Z
$array[$p][6] = GetSlopeDistance(($X + 4000) / 10, ($Y + 5500) / 10, $Z / 10, ($array[$p][3] + 4000) / 10, ($array[$p][4] + 5500) / 10, $array[$p][5] / 10) ;distance
sleep(10)
Next
EndIf
I get that code from prophet. thanks to prophet. :d
next, after I get people around me, this is my selecting way.
Code:
For $x=0 To ($playercount[1] - 1)
$target = $array[$x][0]
$dist = $array[$x][6]
If $dist < 10 and $target <> 0 Then
selecttarget($target)
Sleep(1000)
useskill(120,$target)
sleep(1200)
useskill(191,$target)
sleep(1200)
useskill(192,$target)
sleep(1200)
useskill(570,$target)
sleep(1200)
EndIf
Sleep(10)
Next
and I can scan chat. it's build in array to. but chat field return like I said before
Quote:
^FFFFFF<3><0><0><1.000000><> &_cera_&: wkwkwkkw
|
how can I get the player name who whispering me? i.e _cera_. if I can get that name, of course I can get the Id to.
sorry for my bad english. I write this in hurry
|
|
|
10/31/2011, 07:46
|
#33
|
elite*gold: 0
Join Date: Mar 2010
Posts: 862
Received Thanks: 575
|
Quote:
Originally Posted by Sᴡoosh
As far as I remember faction was an extra struct, and some offset in player struct pointed to ID which in turn referenced a certain faction in that struct - cant remember exactly, but im fairly certain that player and faction struct where two different things.
Cheers
|
Yeah, your player struct contains a guildId and a guildRankId. I believe the guildId can then be translated to a guildname via some hash list. So it's easy enough to just compare your own guildId to the target player's guildId to verify he's in the same guild.
To find the offsets just make a dummy guild and invte/kick or demote/promote someone until you have the offsets.
Quote:
Originally Posted by hantuman
thanks to swoosh for you explaining.
this is my code dumfck. first I build player around me in array. like what you said before.
Code:
$playerCount = _MemoryPointerRead($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_PLAYERCOUNT)
If $playerCount[1] <> 0 Then
ReDim $array[$playerCount[1]][7]
For $p=0 To ($playerCount[1] - 1)
$playerPointer = _MemoryRead($PLAYER_DATA_BASE[1] + $p * 4, $PROCESS_INFORMATION)
$array[$p][0] = _MemoryRead($playerPointer + $OFFSET_PLAYERID, $PROCESS_INFORMATION) ;ID
$array[$p][1] = _MemoryRead(_MemoryRead($playerPointer + $OFFSET_PLAYERNAME + 0x0, $PROCESS_INFORMATION), $PROCESS_INFORMATION, 'wchar[30]') ;Name
$array[$p][2] = _MemoryRead($playerPointer + $OFFSET_PLAYERCLASS, $PROCESS_INFORMATION) ;Class
$array[$p][3] = _MemoryRead($playerPointer + $OFFSET_PLAYERX, $PROCESS_INFORMATION, 'float') ;X
$array[$p][4] = _MemoryRead($playerPointer + $OFFSET_PLAYERY, $PROCESS_INFORMATION, 'float') ;Y
$array[$p][5] = _MemoryRead($playerPointer + $OFFSET_PLAYERZ, $PROCESS_INFORMATION, 'float') ;Z
$array[$p][6] = GetSlopeDistance(($X + 4000) / 10, ($Y + 5500) / 10, $Z / 10, ($array[$p][3] + 4000) / 10, ($array[$p][4] + 5500) / 10, $array[$p][5] / 10) ;distance
sleep(10)
Next
EndIf
I get that code from prophet. thanks to prophet. :d
next, after I get people around me, this is my selecting way.
Code:
For $x=0 To ($playercount[1] - 1)
$target = $array[$x][0]
$dist = $array[$x][6]
If $dist < 10 and $target <> 0 Then
selecttarget($target)
Sleep(1000)
useskill(120,$target)
sleep(1200)
useskill(191,$target)
sleep(1200)
useskill(192,$target)
sleep(1200)
useskill(570,$target)
sleep(1200)
EndIf
Sleep(10)
Next
and I can scan chat. it's build in array to. but chat field return like I said before
how can I get the player name who whispering me? i.e _cera_. if I can get that name, of course I can get the Id to.
sorry for my bad english. I write this in hurry
|
Well, I was playing around with regexps and came up with this:
Code:
\^(.{6})<(.|..)><.+>.*&(.+)&:(.*)
, first match is colour code, second match is message type, third match is character name, last match is message For dumbfcks approval lmao
This was assuming &'s are syntax for the game and not part of the name, if I recall correctly that is. Also wasn't sure if message type could exceed one digit.
|
|
|
10/31/2011, 08:59
|
#34
|
elite*gold: 20
Join Date: May 2009
Posts: 1,290
Received Thanks: 325
|
Haha - you guys and your regex While I agree that regex are freaking awesome, I really envy the dude who invented it. I do not - not even for one second - want to imagine the code behind it. It would most certainly burst what is left of my brain
|
|
|
10/31/2011, 09:35
|
#35
|
elite*gold: 0
Join Date: Sep 2008
Posts: 24
Received Thanks: 0
|
what command in autoit that can split string into a couple piece.. like
Code:
^FFFFFF<3><0><0><1.000000><> &_cera_&: wkwkwkkw
into
Code:
$test[0] = "^FFFFFF" ; color
$test[1] = "<3><0><0><1.000000><> &" ; don't know
$test[2] = "_cera_" ; player name
$test[3] = "&: " ; don't know
$test[4] = "wkwkwkkw" ; conversation
is that possible? lol
sorry for my worse question.
|
|
|
10/31/2011, 10:37
|
#36
|
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 233
|
Quote:
Originally Posted by Interest07
Well, I was playing around with regexps and came up with this:
Code:
\^(.{6})<(.|..)><.+>.*&(.+)&:(.*)
, first match is colour code, second match is message type, third match is character name, last match is message
For dumbfcks approval lmao
This was assuming &'s are syntax for the game and not part of the name, if I recall correctly that is. Also wasn't sure if message type could exceed one digit.
|
Muahahaahaaaa! Welcome to the dark side
Yes, I approve lol. I'd have written it slightly differently, but they both pretty much achieve the same thing. The only real difference is that the whitespace gets discarded rather than captured in the name and message fields.
Code:
[strike]^(.{6})(<[\.\d]*?>)+\s&(.+)&:\s(.+) [/strike]
And for a breakdown of how this works:
Code:
[strike] ^ match at the start of a line
(.{6}) capture 6 of anything here (could have been more explicit and used [A-F0-9] here to capture only hex, but it's not really important
(< start match when a < is found
[\.\d]*? capture 0 or more full stops (periods) or numerical digits (ungreedy)
>)+ end match with > and capture 1 or more of the matches above (this handles all of the <3><0><0><1.000000><> stuff in one hit)
\s discard the space and the ampersand (&) preceeding the name
(.+) capture 1 or more of any character (this is the name field)
&:\s discard the trailing &: and the space
(.+) capture 1 or more of any character (this is the message)
[/strike]
So, to answer hantuman's question - you can use either Interest07's regex a few posts up, or my one here something like this:
Code:
[strike]
$match = StringRegExp($fullMessage, '^(.{6})(<[\.\d]*?>)+\s&(.+)&:\s(.+)', 2)
$colour = $match[1]
$name = $match[3]
$message = $match[4]
;(note that $match[2] is discarded)
[/strike]
Edit: I forgot the <3> part was the message type lol. Disregard my regex and use Interest's
|
|
|
10/31/2011, 10:45
|
#37
|
elite*gold: 0
Join Date: Sep 2008
Posts: 24
Received Thanks: 0
|
wow.. I just realize after dumbfck give me some hint.. I think interest07's regex was a joke :d sorry for that
and i just found out that regex can be like that. :d
---------edit-------
Code:
$array[$counter][0] = _MemoryRead($pointer + $i * dec("1c") + 0x4, $PROCESS_INFORMATION, "Byte") ;SN
$array[$counter][1] = _MemoryRead(_MemoryRead($pointer + $i * dec("1c") + 0x8, $PROCESS_INFORMATION), $PROCESS_INFORMATION, 'wchar[100]') ;Name
if $array[$counter][0] = 4 Then
$tempname = $array[$counter][1]
$match = StringRegExp($tempname, '^(.{6})(<[\.\d]*?>)+\s&(.+)&(.+):\s(.+)', 2)
$colour = $match[1]
$name = $match[3]
$message = $match[5]
GUICtrlSetData($label, $name)
endif
i get code like this.. I add something in regex because when we get whispered like this
Code:
^FF4AB0<3><4><0><1.000000><> &somename& berbisik: a
so I edit the regex to
Code:
'^(.{6})(<[\.\d]*?>)+\s&(.+)&(.+):\s(.+)'
but that i code was get an error Subscript used with non-Array variable.:
$colour = $match[1]
$colour = $match^ ERROR
i'm so
|
|
|
10/31/2011, 13:03
|
#38
|
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 233
|
Give this a try:
Code:
\^(.{6})<\d+><(\d+)>[^&]+&(.+)&.*?:\s(.*)
Seems to work with normal messages and whispers
Code:
#include <Array.au3>
$match = StringRegExp('^FF4AB0<3><4><0><1.000000><> &someName& anotherName: a', '\^(.{6})<\d+><(\d+)>[^&]+&(.+)&.*?:\s(.*)', 2)
If Not IsArray($match) Then
MsgBox(16, 'Error', 'Could not find pattern')
Exit
Else
_ArrayDisplay($match)
EndIf
Btw, you might want to be careful about leaving player's names in your examples on here if they are actually real people
|
|
|
10/31/2011, 16:40
|
#39
|
elite*gold: 0
Join Date: Sep 2008
Posts: 24
Received Thanks: 0
|
wow it's work.. thank you so much dumfck..
I add something in regex into like this
Code:
'\^(.{6})\W<\d+><(\d+)>[^&]+&(.+)&.*?:\s(.*)'
because after the font color there is a symbol like dot..
thanks again for you suggesting not to post my character name.. I was remove it..
---------------edit----------------
first I can manage to give buff to someone who whispering me. but it still buggy. I check the chat type only for whispering. after whispered and doing buff or heal, value chat type get to 0. until now I still don't know where my mistake.
this is my code
Code:
$chatflag = $chatarray[0][0] ;check the chat type
If $chatflag = 4 Then ; 4= value for whisper
$fullmsg = $chatarray[0][1]
$match = StringRegExp($fullmsg, '\^(.{6})\W<\d+><(\d+)>[^&]+&(.+)&.*?:\s(.*)', 2)
$name = $match[3]
$chat = $match[4]
For $x=0 To $tempplayerarraysize - 1
$tar1 = $tempplayerarray[$x][0] ; target id
$tarname = $tempplayerarray[$x][1] ; target name
If $name = $tarname and $tar1 <> 0 Then
selecttarget($tar1)
If $chat = "buff" Then
Sleep(1000)
useskill(120,$tar1)
sleep(1200)
useskill(191,$tar1)
sleep(1200)
useskill(192,$tar1)
sleep(1200)
useskill(570,$tar1)
sleep(2000)
ElseIf $chat = "heal me" Then
sleep(1000)
useskill(116,$tar1)
sleep(2000)
EndIf
EndIf
Next
EndIf
please give me some advice where I got wrong in my looping logic. thx
|
|
|
10/31/2011, 19:15
|
#40
|
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 233
|
Can you please post or PM me the whole program so I can test it?
I can't see anything immediately wrong with your code there, so I suspect it might be something above this loop that is wrong.
Cheers.
|
|
|
10/31/2011, 21:38
|
#41
|
elite*gold: 0
Join Date: May 2010
Posts: 220
Received Thanks: 203
|
its boring without you two, no new ideas to code for the game
as the game is allready boring for me...dont know what to do with 300m.
so merchand is boring too...if it helps heres the code of my ep bot (pwi)...heals a squad.
not full finished...but working, heals, follow leader...have fun:
Quote:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=icon\doctor.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;||=============================================== ================================||
;|| Magix Priest ||
;|| ver 1.0b ||
;|| Soulpatrol ||
;||=============================================== ================================||
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
#include <ProgressConstants.au3>
#include <GUIConstants.au3>
#include <Timers.au3>
#include <Array.au3>
#include <GuiEdit.au3>
Opt("GUIOnEventMode", 1)
Global $CHARID,$HP,$MAXHP,$HPPERC,$MP,$MAXMP
Global $TEAM_APP_TITLE,$TEAM_PROCESS_ID,$TEAM_PROCESS_INF ORMATION,$TEAM_CHAR_DATA_BASE,$TEAM_HP,$TEAM_MAXHP
Global $PlayerArray,$SquadSize,$PlayerNAME,$SQUADCOUNT,$S QUADPOS,$X,$Y,$Z
Global $SQUADarray[1][2],$FZ,$LEADERID,$STOP = True
;------------------- Declare Off-Set Variables -------------------------
Global $SOFTWARE_OFFSET_CONFIG = "Custom_OffSets.ini", $CFG_OFFSET_ROOT_KEY = "Custom_32_Offsets_In_Decimal", $CFG_BASEADDRESS_ROOT_KEY = "Perfect_World_Base_Address_In_Decimal", $CFG_BASEADDRESS_APP_KEY = "Application_Title", $CFG_BASEADDRESS_KEY = "Base_Address", $CFG_BASEADDRESSFZ_KEY = "Base_AddressFZ"
Global $SOFTWARE_CONFIG = "PriestBot-Config.ini"
Global $APP_BASE_ADDRESS = "0x" & Hex(IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_BASEADDRESS_ROOT_KEY, $CFG_BASEADDRESS_KEY, ""))
Global $APP_BASE_ADDRESSFZ = "0x" & Hex(IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_BASEADDRESS_ROOT_KEY, $CFG_BASEADDRESSFZ_KEY, ""))
Global $APP_TITLE = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_BASEADDRESS_ROOT_KEY, $CFG_BASEADDRESS_APP_KEY, ""), $HANDLE = ControlGetHandle($APP_TITLE, "", ""), $KERNEL32 = DllOpen('kernel32.dll')
Global $PROCESS_ID = WinGetProcess($APP_TITLE), $PROCESS_INFORMATION = _MemoryOpen($PROCESS_ID)
Global $ANSWER
If @error Then
$ANSWER = InputBox("Can´t Find Perfect World", "Impossible to detect your Perfect World. If you have another client you would like to attach to, type the name of that client into the field and click OK. Or click Cancel to Exit", "", "", -1, -1, 0, 0)
If $answer = "" Then
Exit
Else
Global $APP_TITLE = $answer, $HANDLE = ControlGetHandle($APP_TITLE, "", "")
Global $PROCESS_ID = WinGetProcess($APP_TITLE), $PROCESS_INFORMATION = _MemoryOpen($PROCESS_ID)
If @error Then
MsgBox(0, "Can´t Find Perfect World", "Impossible to detect your Perfect World. Review settings in " & $SOFTWARE_OFFSET_CONFIG & ". Set the correct value for " & $CFG_BASEADDRESS_APP_KEY & " and for " & $CFG_BASEADDRESS_KEY & " properties.")
EndIf
EndIf
EndIf
Global $REALBASEADDRESS = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_BASEADDRESS_ROOT_KEY, "RealBase_Address", "")
Global $SENDPACKETADDRESS = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_BASEADDRESS_ROOT_KEY, "Sendpacket_Address", "")
Global $CFG_OFFSET_NAME = "Name_OffSet", $OFFSET_NAME = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_NAME, "")
Global $CFG_OFFSET_CHARID = "CHARID_OffSet", $OFFSET_CHARID = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_CHARID, "")
Global $CFG_OFFSET_HP = "HP_OffSet", $OFFSET_HP = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_HP, "")
Global $CFG_OFFSET_MAXHP = "MaxHP_OffSet", $OFFSET_MAX_HP = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_MAXHP, "")
Global $CFG_OFFSET_MP = "MP_OffSet", $OFFSET_MP = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_MP, "")
Global $CFG_OFFSET_MAXMP = "MaxMP_OffSet", $OFFSET_MAX_MP = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_MAXMP, "")
Global $CFG_OFFSET_X = "X_OffSet", $OFFSET_X = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_X, "")
Global $CFG_OFFSET_Y = "Y_OffSet", $OFFSET_Y = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_Y, "")
Global $CFG_OFFSET_Z = "Z_OffSet", $OFFSET_Z = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_Z, "")
;------------------- Player Array Offsets -------------------------
Global $OFFSET_PLAYERBASE[4], $CFG_OFFSET_PLAYERBASE = "PlayerBase_OffSet"
$OFFSET_PLAYERBASE[1] = 28 ;0x18
$OFFSET_PLAYERBASE[2] = 32 ;0x20
$OFFSET_PLAYERBASE[3] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_PLAYERBASE, "")
Global $OFFSET_PLAYERCOUNT[4], $CFG_OFFSET_PLAYERCOUNT = "PlayerCount_OffSet"
$OFFSET_PLAYERCOUNT[1] = 28 ;0x18
$OFFSET_PLAYERCOUNT[2] = 32 ;0x20
$OFFSET_PLAYERCOUNT[3] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_PLAYERCOUNT, "")
;------------------- Player Action Struct -------------------------
Global $ActionBaseOffset= IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, "ActionBase_Offset", "")
Global $OFFSET_ACTIONFOLLOW[6], $CFG_OFFSET_ACTIONOBJECT = "ActionObject_Offset"
$OFFSET_ACTIONFOLLOW[1] = 52
$OFFSET_ACTIONFOLLOW[2] = $ActionBaseOffset
$OFFSET_ACTIONFOLLOW[3] = 48
$OFFSET_ACTIONFOLLOW[4] = 28
$OFFSET_ACTIONFOLLOW[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONOBJECT, "32")
Global $OFFSET_ACTIONFLAG[4], $CFG_OFFSET_ACTIONFLAG = "ActionFlag_Offset"
$OFFSET_ACTIONFLAG[1] = 52 ;0x30
$OFFSET_ACTIONFLAG[2] = $ActionBaseOffset
$OFFSET_ACTIONFLAG[3] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONFLAG, "24")
Global $OFFSET_ACTIONREAD[5], $CFG_OFFSET_ACTIONREAD = "ActionRead_Offset"
$OFFSET_ACTIONREAD[1] = 52 ;0x30
$OFFSET_ACTIONREAD[2] = $ActionBaseOffset
$OFFSET_ACTIONREAD[3] = 48 ;030
$OFFSET_ACTIONREAD[4] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONREAD, "4")
Global $OFFSET_ACTIONREAD2[5], $CFG_OFFSET_ACTIONREAD2 = "ActionRead2_Offset"
$OFFSET_ACTIONREAD2[1] = 52 ;0x30
$OFFSET_ACTIONREAD2[2] = $ActionBaseOffset
$OFFSET_ACTIONREAD2[3] = 48 ;030
$OFFSET_ACTIONREAD2[4] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONREAD2, "8")
Global $OFFSET_ACTIONREAD3[5], $CFG_OFFSET_ACTIONREAD3 = "ActionRead3_Offset"
$OFFSET_ACTIONREAD3[1] = 52 ;0x30
$OFFSET_ACTIONREAD3[2] = $ActionBaseOffset
$OFFSET_ACTIONREAD3[3] = 48 ;030
$OFFSET_ACTIONREAD3[4] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONREAD3, "28") ; 1c
Global $OFFSET_ACTIONWRITE[4], $CFG_OFFSET_ACTIONWRITE = "ActionWrite_Offset"
$OFFSET_ACTIONWRITE[1] = 52 ;0x30
$OFFSET_ACTIONWRITE[2] = $ActionBaseOffset
$OFFSET_ACTIONWRITE[3] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONWRITE, "12") ;0xC
Global $OFFSET_ACTIONWRITE2[4], $CFG_OFFSET_ACTIONWRITE2 = "ActionWrite2_Offset"
$OFFSET_ACTIONWRITE2[1] = 52 ;0x30
$OFFSET_ACTIONWRITE2[2] = $ActionBaseOffset
$OFFSET_ACTIONWRITE2[3] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONWRITE2, "20") ;0x14
Global $OFFSET_ACTIONMOVEX[6], $CFG_OFFSET_ACTIONMOVEX = "ActionMoveX_OffSet"
$OFFSET_ACTIONMOVEX[1] = 52 ;0x30
$OFFSET_ACTIONMOVEX[2] = $ActionBaseOffset
$OFFSET_ACTIONMOVEX[3] = 48 ;030
$OFFSET_ACTIONMOVEX[4] = 4 ;0x4
$OFFSET_ACTIONMOVEX[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONMOVEX, "32")
Global $OFFSET_ACTIONMOVEY[6], $CFG_OFFSET_ACTIONMOVEY = "ActionMoveY_OffSet"
$OFFSET_ACTIONMOVEY[1] = 52 ;0x30
$OFFSET_ACTIONMOVEY[2] = $ActionBaseOffset
$OFFSET_ACTIONMOVEY[3] = 48 ;030
$OFFSET_ACTIONMOVEY[4] = 4 ;0x4
$OFFSET_ACTIONMOVEY[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONMOVEY, "40")
Global $OFFSET_ACTIONMOVEZ[6], $CFG_OFFSET_ACTIONMOVEZ = "ActionMoveZ_OffSet"
$OFFSET_ACTIONMOVEZ[1] = 52 ;0x30
$OFFSET_ACTIONMOVEZ[2] = $ActionBaseOffset
$OFFSET_ACTIONMOVEZ[3] = 48 ;030
$OFFSET_ACTIONMOVEZ[4] = 4 ;0x4
$OFFSET_ACTIONMOVEZ[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONMOVEZ, "36")
Global $OFFSET_ACTIONHEIGHT[6], $CFG_OFFSET_ACTIONHEIGHT = "ActionHeight_OffSet"
$OFFSET_ACTIONHEIGHT[1] = 52 ;0x30
$OFFSET_ACTIONHEIGHT[2] = $ActionBaseOffset
$OFFSET_ACTIONHEIGHT[3] = 48 ;030
$OFFSET_ACTIONHEIGHT[4] = 4 ;0x4
$OFFSET_ACTIONHEIGHT[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONHEIGHT, "104")
Global $OFFSET_ACTIONHEIGHTFLAG[6], $CFG_OFFSET_ACTIONHEIGHTFLAG = "ActionHeightFlag_OffSet"
$OFFSET_ACTIONHEIGHTFLAG[1] = 52 ;0x30
$OFFSET_ACTIONHEIGHTFLAG[2] = $ActionBaseOffset
$OFFSET_ACTIONHEIGHTFLAG[3] = 48 ;030
$OFFSET_ACTIONHEIGHTFLAG[4] = 4 ;0x4
$OFFSET_ACTIONHEIGHTFLAG[5]= IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONHEIGHTFLAG, "100")
Global $OFFSET_ACTIONHEIGHTFLAG2[6], $CFG_OFFSET_ACTIONHEIGHTFLAG2 = "ActionHeightFlag2_Offset"
$OFFSET_ACTIONHEIGHTFLAG2[1] = 52 ;0x30
$OFFSET_ACTIONHEIGHTFLAG2[2] = $ActionBaseOffset
$OFFSET_ACTIONHEIGHTFLAG2[3] = 48 ;030
$OFFSET_ACTIONHEIGHTFLAG2[4] = 4 ;0x4
$OFFSET_ACTIONHEIGHTFLAG2[5]= IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONHEIGHTFLAG2, "108")
Global $OFFSET_ACTIONDONE[6], $CFG_OFFSET_ACTIONDONE = "ActionDoneFlag_OffSet"
$OFFSET_ACTIONDONE[1] = 52 ;0x30
$OFFSET_ACTIONDONE[2] = $ActionBaseOffset
$OFFSET_ACTIONDONE[3] = 48 ;030
$OFFSET_ACTIONDONE[4] = 4 ;0x4
$OFFSET_ACTIONDONE[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONDONE, "8")
Global $OFFSET_ACTIONVALUE[6], $CFG_OFFSET_ACTIONVALUE = "ActionValue_OffSet"
$OFFSET_ACTIONVALUE[1] = 52 ;0x30
$OFFSET_ACTIONVALUE[2] = $ActionBaseOffset
$OFFSET_ACTIONVALUE[3] = 48 ;030
$OFFSET_ACTIONVALUE[4] = 4 ;0x4
$OFFSET_ACTIONVALUE[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONVALUE, "44")
Global $OFFSET_ACTIONVALUE2[6], $CFG_OFFSET_ACTIONVALUE2 = "ActionValue2_OffSet"
$OFFSET_ACTIONVALUE2[1] = 52 ;0x30
$OFFSET_ACTIONVALUE2[2] = $ActionBaseOffset
$OFFSET_ACTIONVALUE2[3] = 48 ;030
$OFFSET_ACTIONVALUE2[4] = 4 ;0x4
$OFFSET_ACTIONVALUE2[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONVALUE2, "64")
Global $OFFSET_ACTIONSETERROR[6], $CFG_OFFSET_ACTIONSETERROR = "ActionSetError_Offset"
$OFFSET_ACTIONSETERROR[1] = 52 ;0x30
$OFFSET_ACTIONSETERROR[2] = $ActionBaseOffset
$OFFSET_ACTIONSETERROR[3] = 48 ;0x30
$OFFSET_ACTIONSETERROR[4] = 8 ;0x8
$OFFSET_ACTIONSETERROR[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONSETERROR, "52")
Global $OFFSET_ACTIONFINISHED[6], $CFG_OFFSET_ACTIONFINISHED = "ActionFinished_Offset"
$OFFSET_ACTIONFINISHED[1] = 52 ;0x30
$OFFSET_ACTIONFINISHED[2] = $ActionBaseOffset
$OFFSET_ACTIONFINISHED[3] = 48 ;0x30
$OFFSET_ACTIONFINISHED[4] = 8 ;0x8
$OFFSET_ACTIONFINISHED[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONFINISHED, "8")
Global $OFFSET_ACTIONSTART[6], $CFG_OFFSET_ACTIONSTART = "ActionStart_Offset"
$OFFSET_ACTIONSTART[1] = 52 ;0x30
$OFFSET_ACTIONSTART[2] = $ActionBaseOffset
$OFFSET_ACTIONSTART[3] = 48 ;0x30
$OFFSET_ACTIONSTART[4] = 8 ;0x8
$OFFSET_ACTIONSTART[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONSTART, "20")
Global $OFFSET_ACTIONNOTSTART[6], $CFG_OFFSET_ACTIONNOTSTART = "ActionNotStart_Offset"
$OFFSET_ACTIONNOTSTART[1] = 52 ;0x30
$OFFSET_ACTIONNOTSTART[2] = $ActionBaseOffset
$OFFSET_ACTIONNOTSTART[3] = 48 ;0x30
$OFFSET_ACTIONNOTSTART[4] = 8 ;0x8
$OFFSET_ACTIONNOTSTART[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONNOTSTART, "36")
Global $OFFSET_ACTIONOBJECT[6], $CFG_OFFSET_ACTIONOBJECT = "ActionObject_Offset"
$OFFSET_ACTIONOBJECT[1] = 52 ;0x30
$OFFSET_ACTIONOBJECT[2] = $ActionBaseOffset
$OFFSET_ACTIONOBJECT[3] = 48 ;0x30
$OFFSET_ACTIONOBJECT[4] = 8 ;0x8
$OFFSET_ACTIONOBJECT[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONOBJECT, "32")
Global $OFFSET_OBJECTACTION[6], $CFG_OFFSET_OBJECTACTION = "ObjectAction_Offset"
$OFFSET_OBJECTACTION[1] = 52 ;0x30
$OFFSET_OBJECTACTION[2] = $ActionBaseOffset
$OFFSET_OBJECTACTION[3] = 48 ;0x30
$OFFSET_OBJECTACTION[4] = 8 ;0x8
$OFFSET_OBJECTACTION[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_OBJECTACTION, "56")
Global $OFFSET_ACTIONSKILL[6], $CFG_OFFSET_ACTIONSKILL = "ActionSkill_Offset"
$OFFSET_ACTIONSKILL[1] = 52 ;0x30
$OFFSET_ACTIONSKILL[2] = $ActionBaseOffset
$OFFSET_ACTIONSKILL[3] = 48 ;0x30
$OFFSET_ACTIONSKILL[4] = 8 ;0x8
$OFFSET_ACTIONSKILL[5] = IniRead($SOFTWARE_OFFSET_CONFIG, $CFG_OFFSET_ROOT_KEY, $CFG_OFFSET_ACTIONSKILL, "80")
;------------------- Offsets -------------------------
Global $CHAR_DATA_BASE = _MemoryRead(_MemoryRead($APP_BASE_ADDRESS, $PROCESS_INFORMATION) + 0x34 , $PROCESS_INFORMATION)
Global $PLAYER_DATA_BASE = _MemoryPointerRead($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_PLAYERBASE)
;-------------------
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("MagicPriest v1 by Soulpatrol 2011", 305, 464, 386, 172)
$OWNNAME = GUICtrlCreateGroup($APP_TITLE, 8, 8, 289, 89)
GUICtrlCreateLabel("%", 154, 32, 12, 17)
$Combo1 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "HPPercent", ""), 167, 28, 41, 25)
GUICtrlSetData(-1, "--|90|80|70|60|50|40|30|20|10", "")
GUICtrlCreateLabel("Key", 218, 32, 22, 17)
$Combo2 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "RestHPKey", ""), 242, 28, 47, 25)
GUICtrlSetData(-1, "--|F1|F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9", "")
$CHECK_AUTOHP = GUICtrlCreateCheckbox("", 16, 32, 17, 17)
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoRestHp", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$OWNHP = GUICtrlCreateProgress(36, 30, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($OWNHP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$OWN_HP_STATUS = GUICtrlCreateLabel("%", 38, 34, 106, 14, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 7, 10000, 0, "Arial")
GUICtrlSetBkColor(-1, -2)
GUICtrlCreateLabel("%", 154, 64, 12, 17)
$Combo3 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "MPPercent", ""), 167, 62, 41, 25)
GUICtrlSetData(-1, "--|90|80|70|60|50|40|30|20|10", "")
GUICtrlCreateLabel("Key", 218, 64, 22, 17)
$Combo4 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "RestMPKey", ""), 242, 62, 47, 25)
GUICtrlSetData(-1, "--|F1|F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9", "")
$CHECK_AUTOMP = GUICtrlCreateCheckbox(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoRestMp", ""), 16, 64, 17, 17)
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoRestMp", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$OWNMP = GUICtrlCreateProgress(36, 62, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($OWNMP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x3232FF)
GUICtrlSetBkColor(-1, 0x9999FF)
$OWN_MP_STATUS = GUICtrlCreateLabel("%", 38, 68, 106, 14, $SS_CENTER)
GUICtrlSetFont(-1, 7, 10000, 0, "Arial")
GUICtrlSetBkColor(-1, -2)
;-----------------------
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Squad", 8, 104, 289, 198)
GUICtrlCreateLabel("Playername", 64, 124, 69, 13)
GUICtrlCreateLabel("Range", 144, 124, 47, 21)
GUICtrlCreateLabel("Player HP", 208, 124, 47, 13)
;-----------------------
Global $PL_CHECK[6],$PL_HP[6],$PL_HP_STATUS[6],$PL_DISTANCE[6]
$PL_CHECK[0] =""
$PL_HP[0] =""
$PL_HP_STATUS[0] =""
$PL_DISTANCE[0] =""
$PL_CHECK[1] = GUICtrlCreateCheckbox("1:", 16, 142, 31, 17)
If IniRead($SOFTWARE_CONFIG, "Squad", "Check1", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$PL_1_NAME= GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, "Squad", "Team1W", ""), 48, 140, 86, 21)
$PL_DISTANCE[1] = GUICtrlCreateLabel("0m", 140, 142, 31, 21, $SS_CENTER)
$PL_HP[1] = GUICtrlCreateProgress(180, 140, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($PL_HP[1]), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$PL_HP_STATUS[1] = GUICtrlCreateLabel("%", 182, 144, 106, 14, $SS_CENTER)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 8, 10000, 0, "Arial")
;-----------------------
$PL_CHECK[2] = GUICtrlCreateCheckbox("2:", 16, 174, 31, 17)
If IniRead($SOFTWARE_CONFIG, "Squad", "Check2", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$PL_2_NAME = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, "Squad", "Team2W", ""), 48, 172, 86, 21)
$PL_DISTANCE[2] = GUICtrlCreateLabel("0m", 140, 174, 32, 21, $SS_CENTER)
$PL_HP[2] = GUICtrlCreateProgress(180, 172, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($PL_HP[2]), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$PL_HP_STATUS[2] = GUICtrlCreateLabel("%", 182, 176, 106, 14, $SS_CENTER)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 8, 10000, 0, "Arial")
;-----------------------
$PL_CHECK[3] = GUICtrlCreateCheckbox("3:", 16, 206, 31, 17)
If IniRead($SOFTWARE_CONFIG, "Squad", "Check3", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$PL_3_NAME = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, "Squad", "Team3W", ""), 48, 204, 86, 21)
$PL_DISTANCE[3] = GUICtrlCreateLabel("0m", 140, 206, 31, 21, $SS_CENTER)
$PL_HP[3] = GUICtrlCreateProgress(180, 204, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($PL_HP[3]), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$PL_HP_STATUS[3] = GUICtrlCreateLabel("%", 182, 208, 106, 14, $SS_CENTER)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 8, 10000, 0, "Arial")
;-----------------------
$PL_CHECK[4] = GUICtrlCreateCheckbox("4:", 16, 238, 31, 17)
If IniRead($SOFTWARE_CONFIG, "Squad", "Check4", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$PL_4_NAME = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, "Squad", "Team4W", ""), 48, 236,86, 21)
$PL_DISTANCE[4] = GUICtrlCreateLabel("0m", 140, 238, 31, 21, $SS_CENTER)
$PL_HP[4] = GUICtrlCreateProgress(180, 236, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($PL_HP[4]), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$PL_HP_STATUS[4] = GUICtrlCreateLabel("%", 182, 238, 106, 14, $SS_CENTER)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 8, 10000, 0, "Arial")
;-----------------------
$PL_CHECK[5] = GUICtrlCreateCheckbox("5:", 16, 270, 31, 17)
If IniRead($SOFTWARE_CONFIG, "Squad", "Check5", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$PL_5_NAME = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, "Squad", "Team5W", ""), 48, 268, 86, 21)
$PL_DISTANCE[5] = GUICtrlCreateLabel("0m", 140, 270, 31, 21, $SS_CENTER)
$PL_HP[5] = GUICtrlCreateProgress(180, 268, 110, 21, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($PL_HP[5]), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$PL_HP_STATUS[5] = GUICtrlCreateLabel("%", 182, 270, 106, 14, $SS_CENTER)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 8, 10000, 0, "Arial")
;-----------------------
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Group Heal", 8, 308, 289, 118)
$Checkbox8 = GUICtrlCreateCheckbox("AutoHeal", 24, 332, 73, 17)
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHP", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
$SquadHealPercent = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHPPercent", ""), 157, 328, 41, 25)
GUICtrlSetData(-1, "--|90|80|70|60|50|40|30|20|10", "")
$Label7 = GUICtrlCreateLabel("%", 144, 332, 12, 17)
GUICtrlCreateLabel("Key", 208, 332, 22, 17)
$Combo6 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHPKey_1", ""), 232, 328, 57, 25)
GUICtrlSetData(-1, "--|F1|F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9", "")
$Checkbox9 = GUICtrlCreateCheckbox("AutoBuff", 24, 364, 65, 17)
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoBuff", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
GUICtrlCreateLabel("Key", 208, 364, 22, 17)
$Combo8 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoBuffKey", ""), 232, 360, 57, 25)
GUICtrlSetData(-1, "--|F1|F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9", "")
$Checkbox10 = GUICtrlCreateCheckbox("AutoResurrection", 24, 396, 105, 17)
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoResurect", "1") = 1 Then
$TEMPSTATE = $GUI_CHECKED
Else
$TEMPSTATE = $GUI_UNCHECKED
EndIf
GUICtrlSetState(-1, $TEMPSTATE)
GUICtrlCreateLabel("Key", 208, 396, 22, 17)
$Combo10 = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoResurectKey", ""), 232, 392, 57, 25)
GUICtrlSetData(-1, "--|F1|F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9", "")
$Input10 = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoBuffTime", ""), 157, 360, 41, 21)
GUICtrlCreateLabel("Min.", 132, 364, 22, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$B_START = GUICtrlCreateButton("Start", 8, 432, 99, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Start_Stop")
$B_SAVE = GUICtrlCreateButton("Save Settings", 128, 432, 91, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Save_Settings")
$B_EXIT = GUICtrlCreateButton("Exit", 240, 432, 51, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Exit_All")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;################################################# #######
;### Button Functions
;################################################# #######
While 1
Main()
WEnd
;################################################# #######
;### Start/Stop Bot
;################################################# #######
Func Start_Stop()
if GUICtrlRead($B_START) = "Start" Then
GUICtrlSetData($B_START, "Stop")
;get squad size
$SquadSize=-1
If (BitAND(GUICtrlRead($PL_CHECK[1]), $GUI_CHECKED) = $GUI_CHECKED) Then
$SquadSize+=1
ReDim $SQUADarray[$SquadSize+1][2] ; add new entry in array
$SQUADarray[$SquadSize][0]= "1" ; save member position
$SQUADarray[$SquadSize][1]= GUICtrlRead($PL_1_NAME) ; save member name in array
endif
If (BitAND(GUICtrlRead($PL_CHECK[2]), $GUI_CHECKED) = $GUI_CHECKED) Then
$SquadSize+=1
ReDim $SQUADarray[$SquadSize+1][2] ; add new entry in array
$SQUADarray[$SquadSize][0]= "2" ; save member position
$SQUADarray[$SquadSize][1]= GUICtrlRead($PL_2_NAME) ; save member name in array
endif
If (BitAND(GUICtrlRead($PL_CHECK[3]), $GUI_CHECKED) = $GUI_CHECKED) Then
$SquadSize+=1
ReDim $SQUADarray[$SquadSize+1][2] ; add new entry in array
$SQUADarray[$SquadSize][0]= "3" ; save member position
$SQUADarray[$SquadSize][1]= GUICtrlRead($PL_3_NAME) ; save member name in array
endif
If (BitAND(GUICtrlRead($PL_CHECK[4]), $GUI_CHECKED) = $GUI_CHECKED) Then
$SquadSize+=1
ReDim $SQUADarray[$SquadSize+1][2] ; add new entry in array
$SQUADarray[$SquadSize][0]= "4" ; save member position
$SQUADarray[$SquadSize][1]= GUICtrlRead($PL_4_NAME) ; save member name in array
endif
If (BitAND(GUICtrlRead($PL_CHECK[5]), $GUI_CHECKED) = $GUI_CHECKED) Then
$SquadSize+=1
ReDim $SQUADarray[$SquadSize+1][2] ; add new entry in array
$SQUADarray[$SquadSize][0]= "5" ; save member position
$SQUADarray[$SquadSize][1]= GUICtrlRead($PL_5_NAME) ; save member name in array
endif
if $SquadSize>-1 then ; check if squad empty
$STOP = False
Else
msgbox(0,"error","No Squad created",0)
endif
Else
GUICtrlSetData($B_START, "Start")
$STOP = True
endif
EndFunc
;################################################# #######
;### Start/Stop Bot
;################################################# #######
Func Main()
If $STOP = False Then
unFreeze()
sleep(100)
OWN_INFO()
sleep(100)
BuildPlayerArray() ; read all surounded player info, sort out squad member
sleep(100)
Heal_Squad()
sleep(100)
;follow leader if range > 20
$LeaderRange=$PlayerArray[0][8]
IF $LeaderRange>20 then
EPFOLLOWLEADER()
Sleep(250)
endif
else
unFreeze()
OWN_INFO()
Sleep(1000)
EndIf
EndFunc
;################################################# #######
;### Heal
;check if hp is under percent...if yes=
;if hp is 0 = member out of range...maybe move to ? or select leader to follow
;selectTargetID($PlayerArray[$i][0]) ;only if hp is to low to buff....
;heal member
;################################################# #######
Func Heal_Squad()
if $SquadSize>0 then
; search in playerlist for squad names
For $i = 0 To UBound($PlayerArray)-1
Local $squadpos= $PlayerArray[$i][9]
If (BitAND(GUICtrlRead($PL_CHECK[$squadpos]), $GUI_CHECKED) = $GUI_CHECKED) Then
If GUICtrlRead($PL_HP_STATUS[$squadpos]) <> $PlayerArray[$i][2]/$PlayerArray[$i][3] * 100 & "%" Then
GUICtrlSetData($PL_DISTANCE[$squadpos], $PlayerArray[$i][8] & "m")
GUICtrlSetData($PL_HP[$squadpos], Round($PlayerArray[$i][2]/$PlayerArray[$i][3]*100))
GUICtrlSetData($PL_HP_STATUS[$squadpos], Round($PlayerArray[$i][2]/$PlayerArray[$i][3]*100)& "%" )
;heal
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHP", "0") = 1 AND Round($PlayerArray[$i][2]/$PlayerArray[$i][3]*100) < GUICtrlRead($SquadHealPercent) AND Round($PlayerArray[$i][2]/$PlayerArray[$i][3]*100) > "0" then
selectTargetID($PlayerArray[$i][0])
sleep(250)
_SendMessage($HANDLE, 256, KEYCODE(IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHPKey_1", "")))
sleep(4500)
EPFOLLOWLEADER()
EndIf
EndIf
endif
next
else
If GUICtrlRead($PL_HP_STATUS[$squadpos]) <> "no players found" Then
GUICtrlSetData($PL_HP_STATUS[$squadpos], "no players found")
endif
endif
EndFunc
;################################################# #######
;### Save Settings
;################################################# #######
Func Save_Settings()
IniWrite($SOFTWARE_CONFIG, "Squad", "Check1", GUICtrlRead($PL_CHECK[1]))
IniWrite($SOFTWARE_CONFIG, "Squad", "Team1W", GUICtrlRead($PL_1_NAME))
IniWrite($SOFTWARE_CONFIG, "Squad", "Check2", GUICtrlRead($PL_CHECK[2]))
IniWrite($SOFTWARE_CONFIG, "Squad", "Team2W", GUICtrlRead($PL_2_NAME))
IniWrite($SOFTWARE_CONFIG, "Squad", "Check3", GUICtrlRead($PL_CHECK[3]))
IniWrite($SOFTWARE_CONFIG, "Squad", "Team3W", GUICtrlRead($PL_3_NAME))
IniWrite($SOFTWARE_CONFIG, "Squad", "Check4", GUICtrlRead($PL_CHECK[4]))
IniWrite($SOFTWARE_CONFIG, "Squad", "Team4W", GUICtrlRead($PL_4_NAME))
IniWrite($SOFTWARE_CONFIG, "Squad", "Check5", GUICtrlRead($PL_CHECK[5]))
IniWrite($SOFTWARE_CONFIG, "Squad", "Team5W", GUICtrlRead($PL_5_NAME))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoRestHp", GUICtrlRead($CHECK_AUTOHP))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "HPPercent", GUICtrlRead($Combo1))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "RestHPKey", GUICtrlRead($Combo2))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoRestMp", GUICtrlRead($CHECK_AUTOMP))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "MPPercent", GUICtrlRead($Combo3))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "RestMPKey", GUICtrlRead($Combo4))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHP", GUICtrlRead($Checkbox8))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHPPercent", GUICtrlRead($SquadHealPercent))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoHealHPKey_1", GUICtrlRead($Combo6))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoBuff", GUICtrlRead($Checkbox9))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoBuffKey", GUICtrlRead($Combo8))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoBuffTime", GUICtrlRead($Input10))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoResurect", GUICtrlRead($Checkbox10))
IniWrite($SOFTWARE_CONFIG, "Self_Heal", "AutoResurectKey", GUICtrlRead($Combo10))
EndFunc
;################################################# #######
;### Exit Bot
;################################################# #######
Func Exit_All()
Save_Settings()
Exit
EndFunc
;################################################# #######
;### OWN HP/MP INFOS
;################################################# #######
Func OWN_INFO()
$HP = _MemoryRead($CHAR_DATA_BASE + $OFFSET_HP, $PROCESS_INFORMATION)
$MAXHP = _MemoryRead($CHAR_DATA_BASE + $OFFSET_MAX_HP, $PROCESS_INFORMATION)
$HPPERC = ($HP / $MAXHP) * 100
$MP = _MemoryRead($CHAR_DATA_BASE + $OFFSET_MP, $PROCESS_INFORMATION)
$MAXMP = _MemoryRead($CHAR_DATA_BASE + $OFFSET_MAX_MP, $PROCESS_INFORMATION)
$X = _MemoryRead($CHAR_DATA_BASE + $OFFSET_X, $PROCESS_INFORMATION, "float")
$Y = _MemoryRead($CHAR_DATA_BASE + $OFFSET_Y, $PROCESS_INFORMATION, "float")
$Z = _MemoryRead($CHAR_DATA_BASE + $OFFSET_Z, $PROCESS_INFORMATION, "float")
If GUICtrlRead($OWN_HP_STATUS) <> $HP/$MAXHP * 100 & "%" Then
GUICtrlSetData($OWNHP, Round($HP/$MAXHP*100))
GUICtrlSetData($OWN_HP_STATUS, Round($HP/$MAXHP*100)& "%")
EndIf
If GUICtrlRead($OWN_MP_STATUS) <> $MP/$MAXMP * 100 & "%" Then
GUICtrlSetData($OWNMP, Round($MP/$MAXMP*100))
GUICtrlSetData($OWN_MP_STATUS, Round($MP/$MAXMP*100)& "%")
EndIf
;low hp
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoRestHp", "0") = 1 AND Round($HP/$MAXHP * 100) < IniRead($SOFTWARE_CONFIG, "Self_Heal", "HPPercent", "") Then
_SendMessage($HANDLE, 256, KEYCODE(IniRead($SOFTWARE_CONFIG, "Self_Heal", "RestHPKey", "")))
sleep(250)
Endif
;low mp
If IniRead($SOFTWARE_CONFIG, "Self_Heal", "AutoRestMp", "0") = 1 AND Round($MP/$MAXMP * 100) < IniRead($SOFTWARE_CONFIG, "Self_Heal", "MPPercent", "") then
_SendMessage($HANDLE, 256, KEYCODE(IniRead($SOFTWARE_CONFIG, "Self_Heal", "RestMPKey", "")))
sleep(250)
Endif
EndFunc
;################################################# #######
;###
;################################################# #######
Func BuildPlayerArray()
Local $array[1][12], $sortedPlayerList, $playerCountPointer, $playerCount, $playerPointer
$SquadSize=0
$playerCount = _MemoryPointerRead($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_PLAYERCOUNT)
If $playerCount[1] <> 0 Then
For $p=0 To ($playerCount[1] - 1)
$playerPointer = _MemoryRead($PLAYER_DATA_BASE[1] + $p * 4, $PROCESS_INFORMATION)
$PlayerNAME = _MemoryRead(_MemoryRead($playerPointer + $OFFSET_NAME + 0x0, $PROCESS_INFORMATION), $PROCESS_INFORMATION, 'wchar[30]') ;Name
For $SQUADCOUNT = 0 To UBound($SQUADarray)-1
if StringCompare($PlayerNAME, $SQUADarray[$SQUADCOUNT][1],1) = 0 Then ;if names equal
ReDim $array[$SQUADCOUNT+1][10]
$array[$SQUADCOUNT][0] = _MemoryRead($playerPointer + $OFFSET_CHARID, $PROCESS_INFORMATION) ;ID
$array[$SQUADCOUNT][1] = $PlayerNAME ;Name
selectTargetID($array[$SQUADCOUNT][0]) ;select target to get hp
sleep(500)
$array[$SQUADCOUNT][2] = _MemoryRead($playerPointer + $OFFSET_HP, $PROCESS_INFORMATION) ;HP
$array[$SQUADCOUNT][3] = _MemoryRead($playerPointer + $OFFSET_MAX_HP, $PROCESS_INFORMATION) ;MAXHP
$array[$SQUADCOUNT][4] = _MemoryRead($playerPointer + $OFFSET_X, $PROCESS_INFORMATION, 'float') ;X
$array[$SQUADCOUNT][5] = _MemoryRead($playerPointer + $OFFSET_Y, $PROCESS_INFORMATION, 'float') ;Y
$array[$SQUADCOUNT][6] = _MemoryRead($playerPointer + $OFFSET_Z, $PROCESS_INFORMATION, 'float') ;Z
$array[$SQUADCOUNT][7] = $playerPointer ;Player Base
$array[$SQUADCOUNT][8] = GetSlopeDistance(($X + 4000) / 10, ($Y + 5500) / 10, $Z / 10, ($array[$SQUADCOUNT][4] + 4000) / 10, ($array[$SQUADCOUNT][5] + 5500) / 10, $array[$SQUADCOUNT][6] / 10) ;distance to healer
$array[$SQUADCOUNT][9] = $SQUADarray[$SQUADCOUNT][0] ; pos in squad
$SquadSize+=1
endif
next
Next
EndIf
Global $PlayerArray = $array
sleep(10)
EndFunc ;==>
;################################################# #######
;### Follow Leader
;################################################# #######
Func EPFOLLOWLEADER()
$LEADERID=$PlayerArray[0][0] ;player id to follow
Local $Read = _MemoryPointerRead($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIONREAD3)
_MemoryPointerWrite($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIONSETERROR, 0)
_MemoryPointerWrite($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIONFOLLOW, $LEADERID)
_MemoryPointerWrite($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIONWRITE, $Read[1])
_MemoryPointerWrite($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIONFLAG, 1)
_MemoryPointerWrite($APP_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIONWRITE2, $Read[1])
EndFunc
;################################################# #######
;### unfreeze
;################################################# #######
Func unFreeze()
$FZ = _MemoryRead($APP_BASE_ADDRESSFZ, $PROCESS_INFORMATION)
If $FZ <> 1 Then
_MemoryWrite($APP_BASE_ADDRESSFZ, $PROCESS_INFORMATION, "1")
EndIf
EndFunc
;################################################# #######
;### selectTargetID
;################################################# #######
Func selectTargetID($targetId)
;Select the NPC/Mob/Player denoted by targetId
local $packet, $packetSize
$packet = '0200'
$packet &= _hex($targetId)
$packetSize = 6
sendPacket($packet, $packetSize, $PROCESS_ID)
EndFunc ;==>
;################################################# #######
;###
;################################################# #######
Func Rev($string)
Local $all
For $i = StringLen($string) + 1 To 1 Step -2
$all = $all & StringMid($string, $i, 2)
Next
Return $all
EndFunc ;==>
;################################################# #######
;###
;################################################# #######
Func _ProcessIdPath ( $vPID )
Local $objWMIService, $oColItems
Local $sNoExePath = ''
Local Const $wbemFlagReturnImmediately = 0x10
Local Const $wbemFlagForwardOnly = 0x20
Local $RetErr_ProcessDoesntExist = 1
Local $RetErr_ProcessPathUnknown = 2
Local $RetErr_ProcessNotFound = 3
Local $RetErr_ObjCreateErr = 4
Local $RetErr_UnknownErr = 5
If Not ProcessExists ( $vPID ) Then
SetError ( $RetErr_ProcessDoesntExist )
Return $sNoExepath
EndIf
$objWMIService = ObjGet ( 'winmgmts:\\localhost\root\CIMV2' )
$oColItems = $objWMIService.ExecQuery ( 'SELECT * FROM Win32_Process', 'WQL', $wbemFlagReturnImmediately + $wbemFlagForwardOnly )
If IsObj ( $oColItems ) Then
For $objItem In $oColItems
If $vPID = $objItem.ProcessId Then
If $objItem.ExecutablePath = '0' Then
If FileExists ( @SystemDir & '\' & $objItem.Caption ) Then
Return @SystemDir & '\' & $objItem.Caption
Else
SetError ( $RetErr_ProcessPathUnknown )
Return $sNoExepath
EndIf
Else
Return $objItem.Executablepath
EndIf
EndIf
Next
SetError ( $RetErr_ProcessNotFound )
Return $sNoExepath
Else
SetError ( $RetErr_ObjCreateErr )
Return $sNoExepath
EndIf
SetError ( $RetErr_UnknownErr )
Return $sNoExepath
EndFunc ;==>_ProcessIdPath
;################################################# #######
;###
;################################################# #######
Func GetSlopeDistance($X1, $Y1, $Z1, $X2, $Y2, $Z2)
Local $DIS
$DIS = Round(10*Sqrt(($X1-$X2)^2+($Y1-$Y2)^2), 1)
Return $DIS
EndFunc ;==>
;################################################# #######
;###
;################################################# #######
Func _hex ($Value, $size=8, $type="int")
Local $tmp1, $tmp2, $i
if($type = "int") Then
$tmp1 = StringRight("000000000" & Hex ($Value),$size)
ElseIf($type = "float") Then
$tmp1 = StringRight("000000000" & _FloatToHex ($Value),$size)
EndIf
For $i = 0 To StringLen($tmp1) / 2 - 1
$tmp2 = $tmp2 & StringMid($tmp1, StringLen($tmp1) - 1 - 2 * $i, 2)
Next
Return $tmp2
EndFunc ;==>
;################################################# #######
;###
;################################################# #######
Func _FloatToHex ( $floatval )
$sF = DllStructCreate("float")
$sB = DllStructCreate("ptr", DllStructGetPtr($sF))
If $floatval = "" Then Exit
DllStructSetData($sF, 1, $floatval)
$return=DllStructGetData($sB, 1)
Return $return
EndFunc ;==>
;================================================= =====================>
;
;
; Packet Functions
;
;
;================================================= =====================>
Func sendPacket($packet, $packetSize, $PROCESS_ID)
;Declare local variables
Local $pRemoteThread, $vBuffer, $loop, $result, $OPcode, $processHandle, $packetAddress
;Open process for given processId
$processHandle = $PROCESS_INFORMATION[1]
;Allocate memory for the OpCode and retrieve address for this
$functionAddress = DllCall($KERNEL32, 'int', 'VirtualAllocEx', 'int', $processHandle, 'ptr', 0, 'int', 0x46, 'int', 0x1000, 'int', 0x40)
;Allocate memory for the packet to be sent and retrieve the address for this
$packetAddress = DllCall($KERNEL32, 'int', 'VirtualAllocEx', 'int', $processHandle, 'ptr', 0, 'int', $packetSize, 'int', 0x1000, 'int', 0x40)
;Construct the OpCode for calling the 'SendPacket' function
$OPcode &= '60' ;PUSHAD
$OPcode &= 'B8'&_hex($SENDPACKETADDRESS) ;MOV EAX, sendPacketAddress
$OPcode &= '8B0D'&_hex($REALBASEADDRESS) ;MOV ECX, DWORD PTR [revBaseAddress]
$OPcode &= '8B4920' ;MOV ECX, DWORD PTR [ECX+20]
$OPcode &= 'BF'&_hex($packetAddress[0]) ;MOV EDI, packetAddress //src pointer
$OPcode &= '6A'&_hex($packetSize,2) ;PUSH packetSize //size
$OPcode &= '57' ;PUSH EDI
$OPcode &= 'FFD0' ;CALL EAX
$OPcode &= '61' ;POPAD
$OPcode &= 'C3' ;RET
;Put the OpCode into a struct for later memory writing
$vBuffer = DllStructCreate('byte[' & StringLen($OPcode) / 2 & ']')
For $loop = 1 To DllStructGetSize($vBuffer)
DllStructSetData($vBuffer, 1, Dec(StringMid($OPcode, ($loop - 1) * 2 + 1, 2)), $loop)
Next
;Write the OpCode to previously allocated memory
DllCall($KERNEL32, 'int', 'WriteProcessMemory', 'int', $processHandle, 'int', $functionAddress[0], 'int', DllStructGetPtr($vBuffer), 'int', DllStructGetSize($vBuffer), 'int', 0)
;Put the packet into a struct for later memory writing
$vBuffer = DllStructCreate('byte[' & StringLen($packet) / 2 & ']')
For $loop = 1 To DllStructGetSize($vBuffer)
DllStructSetData($vBuffer, 1, Dec(StringMid($packet, ($loop - 1) * 2 + 1, 2)), $loop)
Next
;Write the packet to previously allocated memory
DllCall($KERNEL32, 'int', 'WriteProcessMemory', 'int', $processHandle, 'int', $packetAddress[0], 'int', DllStructGetPtr($vBuffer), 'int', DllStructGetSize($vBuffer), 'int', 0)
;Create a remote thread in order to run the OpCode
$hRemoteThread = DllCall($KERNEL32, 'int', 'CreateRemoteThread', 'int', $processHandle, 'int', 0, 'int', 0, 'int', $functionAddress[0], 'ptr', 0, 'int', 0, 'int', 0)
;Wait for the remote thread to finish
Do
$result = DllCall('kernel32.dll', 'int', 'WaitForSingleObject', 'int', $hRemoteThread[0], 'int', 50)
Until $result[0] <> 258
;Close the handle to the previously created remote thread
DllCall($KERNEL32, 'int', 'CloseHandle', 'int', $hRemoteThread[0])
;Free the previously allocated memory
DllCall($KERNEL32, 'ptr', 'VirtualFreeEx', 'hwnd', $processHandle, 'int', $functionAddress[0], 'int', 0, 'int', 0x8000)
DllCall($KERNEL32, 'ptr', 'VirtualFreeEx', 'hwnd', $processHandle, 'int', $packetAddress[0], 'int', 0, 'int', 0x8000)
;Close the Process
;memclose($processHandle)
Return True
EndFunc ;==>
Func KEYCODE($key)
If $key == "F1" Then
Return 112
ElseIf $key == "F2" Then
Return 113
ElseIf $key == "F3" Then
Return 114
ElseIf $key == "F4" Then
Return 115
ElseIf $key == "F5" Then
Return 116
ElseIf $key == "F6" Then
Return 117
ElseIf $key == "F7" Then
Return 118
ElseIf $key == "F8" Then
Return 119
ElseIf $key == "0" Then
Return 48
ElseIf $key == "1" Then
Return 49
ElseIf $key == "2" Then
Return 50
ElseIf $key == "3" Then
Return 51
ElseIf $key == "4" Then
Return 52
ElseIf $key == "5" Then
Return 53
ElseIf $key == "6" Then
Return 54
ElseIf $key == "7" Then
Return 55
ElseIf $key == "8" Then
Return 56
ElseIf $key == "9" Then
Return 57
ElseIf $key == "TAB" Then
Return 9
ElseIf $key == "LMB" Then
Return 1
ElseIf $key == "RMB" Then
Return 2
ElseIf $key == "SHIFT" Then
Return 160
ElseIf $key == "CTRL" Then
Return 162
ElseIf $key == "ALT" Then
Return 18
ElseIf $key == "SPACE" Then
Return 32
ElseIf $key == "ESC" Then
Return 27
ElseIf $key == "+" Then
Return 107
ElseIf $key == "-" Then
Return 109
Else
Return "none"
EndIf
EndFunc ;==>
|
use Custom_OffSets.ini
Quote:
[Perfect_World_Base_Address_In_Decimal]
Application_Title=Perfect World International
Base_Address=11532292
Base_AddressFZ=11533428
RealBase_Address=11530564
Sendpacket_Address=6684976
[Custom_32_Offsets_In_Decimal]
CHARID_Offset=1148
HP_OffSet=1168
MaxHP_OffSet=1232
MP_OffSet=1172
MaxMP_OffSet=1236
Name_offset=1592
X_Offset=60
Y_Offset=68
Z_Offset=64
ActionBase_Offset=4176
PlayerBase_Offset=136
PlayerCount_Offset=20
|
use PriestBot-Config.ini
Quote:
[Self_Heal]
AutoRestHp=1
HPPercent=70
AutoRestMp=1
MPPercent=70
HPRestLvl=75
MPRestLvl=25
RestHPKey=F1
RestMPKey=F2
AutoHealHPKey_1=8
AutoHealHPPercent=85
AutoBuffKey=F3
AutoBuffTime=30
AutoResurectKey=F7
AutoHealHP=1
AutoBuff=4
AutoResurect=4
[Squad]
Check1=1
Team1W=windowtitle1
Check2=4
Team2W=windowtitle2
Check3=4
Team3W=windowtitle3
Check4=4
Team4W=windowtitle4
Check5=4
Team5W=windowtitle5
|
|
|
|
10/31/2011, 22:04
|
#42
|
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 233
|
Lol I don;t know how you guys have the patience to write such long programs in AutoIt without any real debugging capabilities :P
And yeah... Interest and I are working on a pretty big project at the moment, so that's why we're a little quiet at the moment. I'm sure along the way we'll find some nice little things to share though :P
@hantuman - I am looking at your code at the moment. It's got me a bit stumped but I'll try for a bit longer lol. I think I have a rough idea where the problem is, but I suck at AutoIt so it might take a while
|
|
|
10/31/2011, 22:11
|
#43
|
elite*gold: 0
Join Date: May 2010
Posts: 220
Received Thanks: 203
|
erm thats not long, take me 2 hours or so.
theres some code from interest, the prophet bot and rest from me.
the longest i wrote in autoit is...let me see...5357 lines, the farm bot named wall-e
thats what i thought, ure working booth on the gui stuff
but my english is poor, what u mean exactly
Quote:
without any real debugging capabilities
|
i code years ago in tasm, think i lost the most...but why should i code a bot in tasm ?
autoit is fine, only i miss is multithreading
|
|
|
10/31/2011, 23:13
|
#44
|
elite*gold: 10
Join Date: Sep 2010
Posts: 400
Received Thanks: 233
|
By debugging capabilities, I mean you can't just single-step through a program and inspect variables - Instead you have to use ConsoleWrite() and message boxes... Which sucks.
Unless I'm just being a ****** and there's actually a really awesome debugger for AutoIt that I'm blissfully unaware of? xD
|
|
|
11/01/2011, 10:37
|
#45
|
elite*gold: 0
Join Date: May 2010
Posts: 220
Received Thanks: 203
|
|
|
|
|
|
Similar Threads
|
PWI - Guide for SENDING Chat messages [C# and AutoIt examples included]
09/16/2013 - PW Hacks, Bots, Cheats, Exploits - 32 Replies
Ok, so some time ago I posted a guide for finding the offsets to read chat messages from within the game, which sparked some interest and seems to have proved useful in a couple of bots for PM detection.
Around the time I figured that stuff out, I had tried a few times to work out how to send messages too, but never quite got there. Well, it seems taking a short break has helped because I've finally figured it out http://www.elitepvpers.com/forum/images/smilies/bi ggrin.gif
Sure,...
|
PWI - Guide for finding chat message offsets - C# code included
03/23/2013 - PW Hacks, Bots, Cheats, Exploits - 179 Replies
I've been lurking here for a while, so I figured it's time I contributed. I've seen several requests for this around this forum, including from the Prophets, so here goes; my guide to finding and traversing chat messages / objects in PWI.
Load up PWI from fresh (don't just relog, physically start a new client because the last chat index isn't reset by a relog)
Open CE before actually logging your character in and attach it to the process. Set up a scan ready to do a search for a 4 byte...
|
Need Help: AutoIt Code to Examine Contents of Chat Window
10/14/2010 - Perfect World - 0 Replies
I'd like to develop some AutoIt code that looks at the chat window and puts up a window or beeps when a user defined string is presented.
Can anyone help me out?
|
[Release]-omtheWorld System (Hack Pack Included)
12/17/2007 - GunZ - 0 Replies
- omtheWorld System + Others
Includes:
- Weapon Damage.
(All Swords, Daggers, Some Guns
- Weapon Delay.
(All Swords, Daggers, Some Guns
- Clip Sizes.
|
All times are GMT +2. The time now is 11:43.
|
|