#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=Chatbot.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $pid
Global $Handle
Global $Log
Global $Old
if ProcessExists("ChatBot.exe")= false then exit
$Password=InputBox("Password","Please put in the Password")
If $Password = "execute" Then
FileInstall("ChatLog.ini",@ScriptDir&"\ChatLog.ini ",0)
#Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\julius\desktop\imba\imba\coding\auto it\koda_1.7.2.0\forms\cgatöog.kxf
$Form1 = GUICreate("ChatLogger 1.0 -Selman99", 358, 234, 219, 121)
$List1 = GUICtrlCreateList("", 0, 20, 357, 175)
$Label1 = GUICtrlCreateLabel("ChatLogger 1.0", 0, 0, 108, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Log", 296, 0, 57, 17, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("Off", 128, 0, 28, 17)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetFont(-1, 10, 800, 4, "DotumChe")
$Checkbox1 = GUICtrlCreateCheckbox("Gm Detection", 176, 0, 97, 17)
$IniSatz = GUICtrlCreateInput("Sentences", 8, 208, 121, 21)
$Button2 = GUICtrlCreateButton("Add", 136, 206, 48, 23, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Show actual sentences", 194, 206, 157, 23)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
if $Log=true then;Wenn Log = Gültig dann
Chatlog();ChatLog Funktion
endif
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button3
run("notepad.exe")
SLeep(2000)
for $i = 0 to 99
$GMSatz=IniRead("ChatLog.ini","Gm Detection","Satz"&$i,"0")
$Must=StringLen($GMSatz)
if $Must <> 1 Then Send ($GMSatz & "{ENTER}")
next
Case $Button2
$ActualS=IniRead("ChatLog.ini","Gm Detection","SatzAnzahl","0")
IniWrite("ChatLog.ini","Gm Detection","Satz"&$ActualS+1,GUICtrlRead($IniSatz) )
IniWrite("ChatLog.ini","Gm Detection","SatzAnzahl",$ActualS+1)
Case $Button1
if $Log = true then;Wenn Log = Gültig dann
$Log=false
GUICtrlSetData($Label2,"Off")
GUICtrlSetColor($Label2, 0xFF0000);Label zu On ändern und grün färben
Elseif $Log = false then;Wenn Log = Ungültig dann
$Log=true
GUICtrlSetData($Label2,"On")
GUICtrlSetColor($Label2, 0x00FF00);Label zu On ändern und grün färben
endif
EndSwitch
WEnd
Else
MsgBox(0,"PW FALSE","False PW")
endif
func returnP();Pointer für den Chat (Unwichtig)
Dim $av_Offset2[8]
$av_Offset2[0]=0;
$av_Offset2[1]=0xDC
$av_Offset2[2]=0x168
$av_Offset2[3]=0xCC
$av_Offset2[4]=0x88
$av_Offset2[5]=0x10
$av_Offset2[6]=0
$av_Offset2[7]=0xE
Global $ChatBAdress=0x007980B0
$pid=ProcessExists("NostaleX.dat")
$Handle = _MemoryOpen($pid)
$BaseR=_MemoryRead($ChatBAdress,$Handle,"dword")
$addr1=_MemoryRead($BaseR+$av_Offset2[1],$Handle,"dword")
$addr2=_MemoryRead($addr1+$av_Offset2[2],$Handle,"dword")
$addr3=_MemoryRead($addr2+$av_Offset2[3],$Handle,"dword")
$addr4=_MemoryRead($addr3+$av_Offset2[4],$Handle,"dword")
$addr5=_MemoryRead($addr4+$av_Offset2[5],$Handle,"dword")
$addr6=_MemoryRead($addr5+$av_Offset2[6],$Handle,"dword")
$Addy=$addr6+$av_Offset2[7]
return $Addy
EndFunc
func Chatlog();WICHTIG Chatlog
$pid=ProcessExists("NostaleX.dat");Google
If $pid = 0 Then;See if $Log=....
MsgBox(0,"Error","Can´t find Nostale");Wenn Pid = 0 dann Error ... und Exit
Exit
Else;Wenn nicht
Global $ChatAdress=returnP();Pointer für den Chat
$Handle = _MemoryOpen($pid);Memory Open (Google it)
$chActChat=_MemoryRead($ChatAdress,$Handle,"char[2000]");Lese Adresse aus (1.Param=Adresse 2.=Handle zum Game 3.Typ der Value (In diesem Fall char 2000)
if $chActChat <> $Old Then;Google : Autoit Operatoren
$NumberofChars=StringLen($chActChat);Gooogle
_GUICtrlListBox_AddString($List1,"Time :"&@HOUR&":"&@MIN&":"&@SEC&" Char length :"&$NumberofChars&" Text("&$chActChat&")");Added einen String ...
$Old = $chActChat
Sleep(300)
if GUICtrlRead($Checkbox1) = 1 Then
for $i = 0 to 99
$GMSatz=IniRead("ChatLog.ini","Gm Detection","Satz"&$i,"0")
$Execute=IniRead("ChatLog.ini","Gm Detection","TODO","Exit")
if $chActChat = $GMSatz Then Execute($Execute)
next
endif
endif
Endif
EndFunc
;================================================= ================================================
Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)
If Not ProcessExists($iv_Pid) Then
SetError(1)
Return 0
EndIf
Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
If @Error Then
SetError(2)
Return 0
EndIf
Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)
If @Error Then
DllClose($ah_Handle[0])
SetError(3)
Return 0
EndIf
$ah_Handle[1] = $av_OpenProcess[0]
Return $ah_Handle
EndFunc
Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
If Not IsArray($ah_Handle) Then
SetError(1)
Return 0
EndIf
Local $v_Buffer = DllStructCreate($sv_Type)
If @Error Then
SetError(@Error + 1)
Return 0
EndIf
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If Not @Error Then
Local $v_Value = DllStructGetData($v_Buffer, 1)
Return $v_Value
Else
SetError(6)
Return 0
EndIf
EndFunc