ByLetsFeeL Admin
Mesaj Sayısı : 161 Puanlar : 145801386 REP : 94 Kayıt tarihi : 02/02/10 Nerden : Nereyee...
| Konu: ByLetsFeeL - Ayrıntılı Koxp Yapımı - Ders 6 Başlat Butonu Yapımı Çarş. Şub. 03, 2010 3:36 pm | |
| Selamün Aleyküm Arkadaşlar Burada Size Koxp Başlat Yapımı Kodlarını vericem.
Bu Bölüm Çok Önemli Onun İçin Dikkatli Okuyun...
Gerekenler : 2 Adet TextBox 1 Adet CommandButton 1 Adet Modüle
Kodları :
Text1'in Text'ini Knight Online Client yapın. Command1'in Captionunu Başlat Yapın ve Kod Kısmına şunu yazın. Kod: LoadOffsets If AttachKO = False Then Unload Me Exit Sub OtoSND KO_SND_FNC = Text2.Text End If KO_ADR_CHR = ReadLong(KO_PTR_CHR) KO_ADR_DLG = ReadLong(KO_PTR_DLG) PotionTimer = Now Command1.Enabled = False Text1.Enabled = False
Formun Üst Kısmına Bu Kodu Ekleyin. Oto SND_FNC için. Kod:
Public Sub OtoSND() Dim X As Long Dim a As Long ADDR_PKT = ReadLong(KO_PTR_PKT) Select Case ReadByte(KO_SNDX) Case &H16 X = 0 Case &H17 X = 1 Case &H14 X = 2 Case &H15 X = 3 Case &H12 X = 4 Case &H13 X = 5 Case &H10 X = 6 Case &H1E X = 8 Case &H11 X = 7 Case &H1F X = 9 Case Else End End Select
a = ReadLong(ADDR_PKT + &H40064 + (X * 4))
sHexString = a lHexValue = CLng(sHexString) Form1.Text2.Text = "&H" + Hex(lHexValue) End Sub
Modülün İsmini Yeni Yapın. Kod Kısmına Bunu Yazın ( Bu Ana Modül herşeyde kullanıcaksınız ) Kod:
Option Explicit Public keyboard As Long Private Type SECURITY_ATTRIBUTES nLength As Long lpSecurityDescriptor As Long bInheritHandle As Long End Type Private Const MEM_COMMIT = &H1000 Private Const MEM_RELEASE = &H8000& Private Const PAGE_READWRITE = &H4& Private Const INFINITE = &HFFFF Public Const MAILSLOT_NO_MESSAGE As Long = (-1) Public Declare Function GetTickCount Lib "kernel32" () As Long 'apidir bunu ekle modulde yukarıya Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Public Declare Function WriteProcessMem Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, lpOverlapped As Long) As Long Private Declare Function CreateMailslot Lib "kernel32" Alias "CreateMailslotA" (ByVal lpName As String, ByVal nMaxMessageSize As Long, ByVal lReadTimeout As Long, lpSecurityAttributes As Any) As Long Private Declare Function GetMailslotInfo Lib "kernel32" (ByVal hMailSlot As Long, lpMaxMessageSize As Long, lpNextSize As Long, lpMessageCount As Long, lpReadTimeout As Long) As Long Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Long, lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal dwStackSize As Long, lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadID As Long) As Long Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As Long, lpAddress As Any, ByVal dwSize As Long, ByVal dwFreeType As Long) As Long Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long Private Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long Private Declare Function WritePrivateProfileSection Lib "kernel32" Alias "WritePrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String, ByVal lpFileName As String) As Long Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Public Declare Function GetModuleInformation Lib "PSAPI.DLL" (ByVal hProcess As Long, ByVal hModule As Long, lpmodinfo As MODULEINFO, ByVal cb As Long) As Long Public Declare Function EnumProcessModules Lib "PSAPI.DLL" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long Public Declare Function GetModuleFileNameExA Lib "PSAPI.DLL" (ByVal hProcess As Long, ByVal hModule As Long, ByVal ModuleName As String, ByVal nSize As Long) As Long Public hexword As String Private Const PROCESS_ALL_ACCESS = &H1F0FFF Public Const SWP_NOMOVE = 2 Public Const SWP_NOSIZE = 1 Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE Public Const HWND_TOPMOST = -1 Public Const HWND_NOTOPMOST = -2 Public Const LWA_COLORKEY = 1 Public Const LWA_ALPHA = 2 Public ko As Long Public Const LWA_BOTH = 3 Public Const WS_EX_LAYERED = &H80000 Public Const GWL_EXSTYLE = -20 Public Timer As Date Public Diff As Long Public UseOtocanPot Public Hook Public CurrentNation As String Public class As String Public UseTimed As Boolean Public PotionTimer As Date Public Char As Long Public TimedTimer As Date Public AttackTimer As Long Public AttackDiff As Long Public TargetTimer As Date Public TargetDiff As Long Public TimedDiff As Long Public PotionDiff As Long Public PublicWolf As Long Public UseAutoWolf Public UseOtomanapot Public UseAutoAttack Public UseManaSave Public Started Public HealPercent As Long Public ManaPercent As Long Public HealType As Long Public ManaType As Long Public AttackALL As String Public mob As Long Public SellAll As Long Public BonusFilter As Long Public MSName Public MSHandle Public UseSitAutoAttack Public UseWallHack Public durab As Long Public UseLupineEyes Public UseAutoSwift Public UseAutoSell Public UseAutoLoot Public CurrentMobHP As Long Public BoxID Public itemID Public AttackNow Public SecondID Public ThirdID Public FourthID Public FifthID Public SixthID Public BoxOpened Public Exp As Long Public outack Public Looting Public ChatTipi As String Public RepairID As String Public ItemSlot As String Public RecvID As String Public LastBoxID As Long Public OpenNextBox As Boolean Public LastRepair As Date Public RepairDiff As Long Public LootBuffer As String 'start declaring autoattack log Public LastID Public TargetID As Long Public MaxEXP As Long 'stop declaring autoattack log Public ChatTipi1 As Long Public KO_RCVFNC As Long Public KO_TITLE As String Public KO_HANDLE As Long Public KO_PID As Long Public KO_PTR_CHR As Long Public KO_PTR_CHR1 As Long Public KO_PTR_DLG As Long Public KO_PTR_PKT As Long Public KO_SND_FNC As Long Public KO_RECVHK As Long Public KO_RCVHKB As Long Public KO_ADR_CHR As Long Public KO_ADR_DLG As Long Public KO_OFF_RTM As Long Public KO_OFF_NT As Long Public KO_OFF_CLASS As Long Public KO_OFF_SWIFT As Long Public KO_OFF_HP As Long Public KO_SNDX As Long Public KO_OFF_MAXHP As Long Public KO_OFF_MP As Long Public KO_OFF_MAXMP As Long Public KO_OFF_MOB As Long Public KO_OFF_WH As Long Public KO_OFF_SIT As Long Public KO_OFF_LUP As Long Public KO_OFF_LUP2 As Long Public KO_OFF_Y As Long Public KO_OFF_ID As Long Public KO_OFF_HD As Long Public KO_OFF_X As Long Public KO_OFF_Z As Long Public KO_OFF_SEL As Long Public KO_OFF_LUPINE As Long Public KO_OFF_EXP As Long Public KO_OFF_MAXEXP As Long Public KO_OFF_AP As Long Public KO_OFF_GOLD As Long Public nation As Long Public KO_TITLE1 As String Public DINPUT_Handle As Long Public DINPUT_lpBaseOfDLL As Long Public DINPUT_SizeOfImage As Long Public DINPUT_EntryPoint As Long Public DINPUT_KEYDMA As Long Public DINPUT_K_1 As Long Public DINPUT_K_2 As Long Public DINPUT_K_3 As Long Public DINPUT_K_4 As Long Public DINPUT_K_5 As Long Public DINPUT_K_6 As Long Public DINPUT_K_7 As Long Public DINPUT_K_8 As Long Public DINPUT_K_Z As Long Public DINPUT_K_C As Long Public DINPUT_K_S As Long Public DINPUT_K_R As Long Public KO_CHR As Long Public MP1 As Long Public Type MODULEINFO lpBaseOfDLL As Long SizeOfImage As Long EntryPoint As Long
End Type ' dll inject komutları Public Function HookDI8() As Boolean Dim Ret As Long Dim lmodinfo As MODULEINFO DINPUT_Handle = 0
DINPUT_Handle = FindModuleHandle("dinput8.dll")
Ret = GetModuleInformation(KO_HANDLE, DINPUT_Handle, lmodinfo, Len(lmodinfo)) If Ret <> 0 Then With lmodinfo DINPUT_EntryPoint = .EntryPoint DINPUT_lpBaseOfDLL = .lpBaseOfDLL DINPUT_SizeOfImage = .SizeOfImage End With Else Exit Function End If SetupDInput HookDI8 = True End Function
Public Function FindModuleHandle(ModuleName As String) As Long Dim hModules(1 To 256) As Long Dim BytesReturned As Long Dim ModuleNumber As Byte Dim TotalModules As Byte Dim FileName As String * 128 Dim ModName As String EnumProcessModules KO_HANDLE, hModules(1), 1024, BytesReturned TotalModules = BytesReturned / 4 For ModuleNumber = 1 To TotalModules GetModuleFileNameExA KO_HANDLE, hModules(ModuleNumber), FileName, 128 ModName = Left(FileName, InStr(FileName, Chr(0)) - 1) If UCase(Right(ModName, Len(ModuleName))) = UCase(ModuleName) Then FindModuleHandle = hModules(ModuleNumber) End If Next End Function
Sub SetupDInput() DINPUT_KEYDMA = FindDInputKeyPtr If DINPUT_KEYDMA <> 0 Then DINPUT_K_1 = DINPUT_KEYDMA + 2 DINPUT_K_2 = DINPUT_KEYDMA + 3 DINPUT_K_3 = DINPUT_KEYDMA + 4 DINPUT_K_4 = DINPUT_KEYDMA + 5 DINPUT_K_5 = DINPUT_KEYDMA + 6 DINPUT_K_6 = DINPUT_KEYDMA + 7 DINPUT_K_7 = DINPUT_KEYDMA + 8 DINPUT_K_8 = DINPUT_KEYDMA + 9 DINPUT_K_Z = DINPUT_KEYDMA + 44 DINPUT_K_C = DINPUT_KEYDMA + 46 DINPUT_K_S = DINPUT_KEYDMA + 31 DINPUT_K_R = DINPUT_KEYDMA + 19 End If End Sub
Function FindDInputKeyPtr() As Long Dim pBytes() As Byte Dim psize As Long Dim X As Long psize = DINPUT_SizeOfImage ReDim pBytes(1 To psize) ReadByteArray DINPUT_lpBaseOfDLL, pBytes, psize For X = 1 To psize - 10 If pBytes(X) = &H57 And pBytes(X + 1) = &H6A And pBytes(X + 2) = &H40 And pBytes(X + 3) = &H33 And pBytes(X + 4) = &HC0 And pBytes(X + 5) = &H59 And pBytes(X + 6) = &HBF Then FindDInputKeyPtr = Val("&H" & IIf(Len(Hex(pBytes(X + 10))) = 1, "0" & Hex(pBytes(X + 10)), Hex(pBytes(X + 10))) & IIf(Len(Hex(pBytes(X + 9))) = 1, "0" & Hex(pBytes(X + 9)), Hex(pBytes(X + 9))) & IIf(Len(Hex(pBytes(X + )) = 1, "0" & Hex(pBytes(X + ), Hex(pBytes(X + )) & IIf(Len(Hex(pBytes(X + 7))) = 1, "0" & Hex(pBytes(X + 7)), Hex(pBytes(X + 7)))) Exit For End If Next End Function ' Buraya ben yolla yazdım sizde istediğinizi yaza bilir siniz. 'ama prejedeki Bütün Yolla yazan yerleri değiştirmelisiniz. Function yolla(pKey As String) As Long pKey = Strings.UCase(pKey) Select Case pKey Case "S" yolla = DINPUT_K_S Case "Z" yolla = DINPUT_K_Z Case "1" yolla = DINPUT_K_1 Case "2" yolla = DINPUT_K_2 Case "3" yolla = DINPUT_K_3 Case "4" yolla = DINPUT_K_4 Case "5" yolla = DINPUT_K_5 Case "6" yolla = DINPUT_K_6 Case "7" yolla = DINPUT_K_7 Case "8" yolla = DINPUT_K_8 Case "C" yolla = DINPUT_K_C Case "R" yolla = DINPUT_K_R End Select End Function Sub WriteByte(Addr As Long, pVal As Byte) Dim pbw As Long WriteProcessMem KO_HANDLE, Addr, pVal, 1, pbw End Sub
' Buraya ben TUS yazdım sizde istediğinizi yaza bilir siniz. 'ama prejedeki Bütün TUS yazan yerleri değiştirmelisiniz. Sub Tuş(pKey As Long, Optional pTimeMS As Long = 50) WriteByte pKey, 128 f_Sleep pTimeMS, True WriteByte pKey, 0 End Sub
Sub f_Sleep(pMS As Long, Optional pDoevents As Boolean = False) Dim pTime As Long pTime = GetTickCount Do While pMS + pTime > GetTickCount If pDoevents = True Then DoEvents Loop End Sub
Public Function ReadLong(Addr As Long) As Long 'read a 4 byte value Dim Value As Long ReadProcessMem KO_HANDLE, Addr, Value, 4, 0& ReadLong = Value End Function
Public Function ReadFloat(Addr As Long) As Long 'read a float value Dim Value As Single ReadProcessMem KO_HANDLE, Addr, Value, 4, 0& ReadFloat = Value End Function
Public Function WriteFloat(Addr As Long, Val As Single) 'write a float value WriteProcessMem KO_HANDLE, Addr, Val, 4, 0& End Function
Public Function WriteLong(Addr As Long, Val As Long) ' write a 4 byte value WriteProcessMem KO_HANDLE, Addr, Val, 4, 0& End Function
Public Function SetTopMostWindow(hWnd As Long, Topmost As Boolean) As Long If Topmost = True Then 'Make the window topmost SetTopMostWindow = SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS) Else SetTopMostWindow = SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS) SetTopMostWindow = False End If End Function
Public Function ReadIni(FileName As String, Section As String, Key As String) As String Dim RetVal As String * 255, v As Long v = GetPrivateProfileString(Section, Key, "", RetVal, 255, FileName) ReadIni = Left(RetVal, v) End Function
'writes an Ini string Public Function WriteIni(FileName As String, Section As String, Key As String, Value As String) WritePrivateProfileString Section, Key, Value, FileName End Function Public Function ConvHEX2ByteArray(pStr As String, pByte() As Byte) Dim i As Long Dim j As Long ReDim pByte(1 To Len(pStr) / 2)
j = LBound(pByte) - 1 For i = 1 To Len(pStr) Step 2 j = j + 1 pByte(j) = CByte("&H" & Mid(pStr, i, 2)) Next End Function
Public Function WriteByteArray(pAddy As Long, pmem() As Byte, psize As Long) WriteProcessMem KO_HANDLE, pAddy, pmem(LBound(pmem)), psize, 0& End Function
'start packet handling Function ExecuteRemoteCode(pCode() As Byte, Optional WaitExecution As Boolean = False) As Long Dim FuncPtr As Long Dim hThread As Long, ThreadID As Long, Ret As Long Dim SE As SECURITY_ATTRIBUTES
SE.nLength = Len(SE) SE.bInheritHandle = False
ExecuteRemoteCode = 0 FuncPtr = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) If FuncPtr <> 0 Then WriteByteArray FuncPtr, pCode, UBound(pCode) - LBound(pCode) + 1 hThread = CreateRemoteThread(ByVal KO_HANDLE, SE, 0, ByVal FuncPtr, 0&, 0&, ThreadID) If hThread Then Ret = WaitForSingleObject(hThread, INFINITE) ExecuteRemoteCode = ThreadID End If CloseHandle hThread Ret = VirtualFreeEx(KO_HANDLE, FuncPtr, 0, MEM_RELEASE) End If
End Function
Function SendPackets(pPacket() As Byte) Dim BytesAddr As Long Dim psize As Long Dim pCode() As Byte '60 PUSHAD 'A1 84898100 MOV EAX,DWORD PTR DS:[818984] '8B0D 84898100 MOV ECX,DWORD PTR DS:[818984] '68 dword(packet size) '68 dword(BytesAddr) 'call packetsize 'BF C0184500 MOV EDI,_KnightO.004518C0 -> entry address 'FFD7 '61 'C3 'KO_PTR_PKT = &H818984 'packet function 'KO_SND_FNC = &H451B80 'entry adress psize = UBound(pPacket) - LBound(pPacket) + 1 BytesAddr = VirtualAllocEx(KO_HANDLE, 0, 1024, MEM_COMMIT, PAGE_READWRITE) If BytesAddr <> 0 Then WriteByteArray BytesAddr, pPacket, psize ConvHEX2ByteArray "60A1" & AlignDWORD(KO_PTR_PKT) & "8B0D" & AlignDWORD(KO_PTR_PKT) & "68" & AlignDWORD(psize) & "68" & AlignDWORD(BytesAddr) & "BF" & AlignDWORD(KO_SND_FNC) & "FFD761C3", pCode ExecuteRemoteCode pCode, True End If VirtualFreeEx KO_HANDLE, BytesAddr, 0, MEM_RELEASE& End Function ' alttaymıs zate:d Function AlignDWORD(pParam As Long) As String Dim HiW As Integer Dim LoW As Integer
Dim HiBHiW As Byte Dim HiBLoW As Byte
Dim LoBHiW As Byte Dim LoBLoW As Byte
HiW = HiWord(pParam) LoW = LoWord(pParam)
HiBHiW = HiByte(HiW) HiBLoW = HiByte(LoW)
LoBHiW = LoByte(HiW) LoBLoW = LoByte(LoW)
AlignDWORD = IIf(Len(Hex(LoBLoW)) = 1, "0" & Hex(LoBLoW), Hex(LoBLoW)) & _ IIf(Len(Hex(HiBLoW)) = 1, "0" & Hex(HiBLoW), Hex(HiBLoW)) & _ IIf(Len(Hex(LoBHiW)) = 1, "0" & Hex(LoBHiW), Hex(LoBHiW)) & _ IIf(Len(Hex(HiBHiW)) = 1, "0" & Hex(HiBHiW), Hex(HiBHiW)) End Function 'sansa bak 8 miş zate:D1:D Function AlignDWORD8(pParam As Long) As String Dim HiW As Integer Dim LoW As Integer
Dim HiBHiW As Byte Dim HiBLoW As Byte
Dim LoBHiW As Byte Dim LoBLoW As Byte
HiW = HiWord(pParam) LoW = LoWord(pParam)
HiBHiW = HiByte(HiW) HiBLoW = HiByte(LoW)
LoBHiW = LoByte(HiW) LoBLoW = LoByte(LoW)
AlignDWORD8 = IIf(Len(Hex(LoBLoW)) = 1, "0" & Hex(LoBLoW), Hex(LoBLoW)) & _ IIf(Len(Hex(HiBLoW)) = 1, "0" & Hex(HiBLoW), Hex(HiBLoW)) & _ IIf(Len(Hex(LoBHiW)) = 1, "0" & Hex(LoBHiW), Hex(LoBHiW)) & _ IIf(Len(Hex(HiBHiW)) = 1, "0" & Hex(HiBHiW), Hex(HiBHiW)) & _ IIf(Len(Hex(LoBLoW)) = 1, "0" & Hex(LoBLoW), Hex(LoBLoW)) & _ IIf(Len(Hex(HiBLoW)) = 1, "0" & Hex(HiBLoW), Hex(HiBLoW)) & _ IIf(Len(Hex(LoBHiW)) = 1, "0" & Hex(LoBHiW), Hex(LoBHiW)) & _ IIf(Len(Hex(HiBHiW)) = 1, "0" & Hex(HiBHiW), Hex(HiBHiW)) End Function
Public Function HiByte(ByVal wParam As Integer) As Byte
HiByte = (wParam And &HFF00&) \ (&H100)
End Function
Public Function LoByte(ByVal wParam As Integer) As Byte
LoByte = wParam And &HFF&
End Function
Function LoWord(DWord As Long) As Integer If DWord And &H8000& Then ' LoWord = DWord Or &HFFFF0000 Else LoWord = DWord And &HFFFF& End If End Function
Function HiWord(DWord As Long) As Integer HiWord = (DWord And &HFFFF0000) \ &H10000 End Function
Public Function LogFile(sStr As String) Open CurDir & "\Log.txt" For Append As #1 Print #1, ";==> " & Time & " " & sStr & " ;<==" Close #1 End Function
Public Function AttachKO() As Boolean Dim inject As Boolean If FindWindow(vbNullString, KO_TITLE) Then MSName = "\\.\mailslot\ByS0x" & Hex(GetTickCount) GetWindowThreadProcessId FindWindow(vbNullString, KO_TITLE), KO_PID KO_HANDLE = OpenProcess(PROCESS_ALL_ACCESS, False, KO_PID) If KO_HANDLE = 0 Then MsgBox ("Cannot get handle from KO(" & KO_PID & ").") AttachKO = False End If Hook = HookDI8 'HooKDI8 dinput8.dll değerini kontrol ettiriyoruz If Hook = False Then 'eğer hook false ise AttachKO = False 've attachko muzu false ediyoruz. MsgBox "Dinput8.dll Yüklenemiyor.Koxpun Bulundupu Klasöre Dinput8.dll atiniz.", vbDefaultButton2, "Dikkat" End If MSHandle = EstablishMailSlot(MSName) 'mail slotumuzu açıyoruz If MSHandle = 0 Then End 'eğer MSHandle eşitse sıfır a demekki mesaj gelmiyor Ko dan sonlandır diyoruz. If KO_PID = 0 Then End 'Ko nun pid değeride 0 a eşitse gene sonlandırıyoruz programımızı 'Evet işte burası çok önemli mail slotu için ko nun exe sinde bazı değişiklik yapıyor 'MsgBox (KO_PID) 'prevent iexplore to be launched on exit 'Dim pBytess() As Byte '00670A23 E9 09010000 JMP KnightOn.00670B31 '00670A28 90 NOP 'ConvHEX2ByteArray "E90901000090", pBytess ' patch hackshield 'WriteByteArray &H670A23, pBytess, UBound(pBytess) - LBound(pBytess) + 1 AttachKO = True Else MsgBox "Programın Çalışabilmesi İçin Oyunda Olmanız Gerekir", vbDefaultButton1, "Dikkat" End If End Function
Public Function EstablishMailSlot(ByVal MailSlotName As String, Optional MaxMessageSize As Long = 0, Optional ReadTimeOut As Long = 50) As Long EstablishMailSlot = CreateMailslot(MailSlotName, MaxMessageSize, ReadTimeOut, ByVal 0&) End Function Function LoadOffsets() KO_TITLE = Form1.Text1.Text KO_PTR_CHR = &HC06FC0 KO_PTR_DLG = &HC0729C KO_PTR_PKT = &HC0727C KO_RECVHK = &HC02C64 KO_RCVHKB = &HC06E34
KO_SNDX = &HBFC788 KO_OFF_CLASS = &H5D8 KO_OFF_ID = &H5B3 KO_OFF_SWIFT = &H62A KO_OFF_NT = &H584 KO_OFF_HP = &H5E4 KO_OFF_MAXHP = &H5E0 KO_OFF_MP = &H9A8 KO_OFF_MAXMP = &H9A4 KO_OFF_SIT = &HAE6 KO_OFF_WH = &H598 KO_OFF_Y = &HBC KO_OFF_X = &HB4 KO_OFF_Z = &HB8 KO_OFF_LUP = &HC84 KO_OFF_LUP2 = &HAF0 KO_OFF_EXP = &H948 KO_OFF_MAXEXP = &H940 KO_OFF_AP = &H988 KO_OFF_GOLD = &H810 KO_OFF_HD = &H514 KO_OFF_MOB = &H580 End Function
Sub Skill(skillid As String)
Dim ID As String Dim ID1 As String Dim ID2 As String Dim IDs As Long Dim skillid1 Dim skillid2 Dim skillid3 Dim skillhex As String Dim skillid4 As String
skillhex = Hex(skillid) skillid1 = Mid$(skillhex, 4, 6) skillid2 = Mid$(skillhex, 2, 2) skillid3 = Mid$(skillhex, 1, 1)
IDs = ReadLong(KO_ADR_CHR + KO_OFF_ID) ID = AlignDWORD(IDs) ID1 = Strings.Mid(ID, 3, 2) ID2 = Strings.Mid(ID, 5, 2) Dim pBytes(1 To 18) As Byte pBytes(1) = &H31 pBytes(2) = &H3 pBytes(3) = "&H" & skillid1 pBytes(4) = "&H" & skillid2 pBytes(5) = "&H" & skillid3 pBytes(6) = &H0 pBytes(7) = "&H" & ID1 pBytes( = "&H" & ID2 pBytes(9) = "&H" & ID1 pBytes(10) = "&H" & ID2 pBytes(11) = &H0 pBytes(12) = &H0 pBytes(13) = &H0 pBytes(14) = &H0 pBytes(15) = &H0 pBytes(16) = &H0 pBytes(17) = &H0 pBytes(18) = &H0 SendPackets pBytes PotionTimer = Now End Sub
Private Function ReadMessage(MailMessage As String, MessagesLeft As Long) Dim lBytesRead As Long Dim lNextMsgSize As Long Dim lpBuffer As String ReadMessage = False Call GetMailslotInfo(MSHandle, ByVal 0&, lNextMsgSize, MessagesLeft, ByVal 0&) If MessagesLeft > 0 And lNextMsgSize <> MAILSLOT_NO_MESSAGE Then lBytesRead = 0 lpBuffer = String$(lNextMsgSize, Chr$(0)) Call ReadFile(MSHandle, ByVal lpBuffer, Len(lpBuffer), lBytesRead, ByVal 0&) If lBytesRead <> 0 Then MailMessage = Left(lpBuffer, lBytesRead) ReadMessage = True Call GetMailslotInfo(MSHandle, ByVal 0&, lNextMsgSize, MessagesLeft, ByVal 0&) End If End If End Function Sub ReadByteArray(Addr As Long, pmem() As Byte, psize As Long) Dim Value As Byte ReDim pmem(1 To psize) As Byte ReadProcessMem KO_HANDLE, Addr, pmem(1), psize, 0& End Sub Private Function CheckForMessages(MessageCount As Long) Dim lMsgCount As Long Dim lNextMsgSize As Long CheckForMessages = False GetMailslotInfo MSHandle, ByVal 0&, lNextMsgSize, lMsgCount, ByVal 0& MessageCount = lMsgCount CheckForMessages = True End Function Private Function HexString(EvalString As String) As String Dim intStrLen As Integer Dim intLoop As Integer Dim strHex As String
EvalString = Trim(EvalString) intStrLen = Len(EvalString) For intLoop = 1 To intStrLen strHex = strHex & Hex(Asc(Mid(EvalString, intLoop, 1))) Next hexword = strHex End Function Function ReadByte(pAddy As Long, Optional pHandle As Long) As Byte Dim Value As Byte If pHandle <> 0 Then ReadProcessMem pHandle, pAddy, Value, 1, 0& Else ReadProcessMem KO_HANDLE, pAddy, Value, 1, 0& End If ReadByte = Value
End Function Bu Kadar Koxpumuzu Oyuna Bağlamış Olduk.
Örnek Source : [Linkleri görebilmek için üye olun veya giriş yapın.]
İstek olursa devam ederim. Arkadaşlar : , , gibi görünen yerler kopyalayınca düzelmez ise yerine [ iki nokta ve D] - yerine [8 ve ) işareti] - yerine de [ ; ve ) işareti ] koyunuz !!!!ByLetsFeeL Bi Teşekkür... | |
|