#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <NomadMemory.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <Inet.au3>
#include <Misc.au3>
#include <Timers.au3>
;~ Opt("TrayIconHide",1)
Global $dll = DllOpen("user32.dll")
#region ### START Koda GUI section ### Form=
Global $free = 1
;~get()
$Form1 = GUICreate("Tibia potarBot - Safe Mode v. 0.3", 373, 252, 492, 472)
GUISetBkColor(0xFFFFFF)
$Tab1 = GUICtrlCreateTab(1, 1, 369, 250)
$TabSheet1 = GUICtrlCreateTabItem("potBot - Generals")
$Button2 = GUICtrlCreateButton("HELP", 157, 186, 67, 33)
$Group1 = GUICtrlCreateGroup("Healing", 14, 32, 345, 95)
GUICtrlSetFont(-1, 8, 800, 0, "Arial")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label2 = GUICtrlCreateLabel("Heal High:", 23, 49, 75, 24)
$Input1 = GUICtrlCreateInput("0", 121, 49, 83, 22)
$Input2 = GUICtrlCreateInput("0", 121, 73, 83, 22)
GUICtrlSetState(-1, $GUI_DISABLE)
$Label3 = GUICtrlCreateLabel("Heal Medium:", 23, 73, 75, 24)
$Label4 = GUICtrlCreateLabel("Heal Low:", 23, 97, 79, 24)
$Input3 = GUICtrlCreateInput("0", 121, 97, 83, 22)
GUICtrlSetState(-1, $GUI_DISABLE)
$Label7 = GUICtrlCreateLabel("Hotkey:", 223, 97, 61, 24)
$Label6 = GUICtrlCreateLabel("Hotkey:", 223, 73, 61, 24)
$Combo1 = GUICtrlCreateCombo("", 287, 49, 57, 25)
GUICtrlSetData(-1, "F1")
GUICtrlSetData(-1, "F2")
GUICtrlSetData(-1, "F3")
GUICtrlSetData(-1, "F4")
GUICtrlSetData(-1, "F5")
GUICtrlSetData(-1, "F6")
GUICtrlSetData(-1, "F7")
GUICtrlSetData(-1, "F8")
GUICtrlSetData(-1, "F9")
GUICtrlSetData(-1, "F10")
GUICtrlSetData(-1, "F11")
GUICtrlSetData(-1, "F12")
$Label5 = GUICtrlCreateLabel("Hotkey:", 223, 49, 61, 24)
$Combo2 = GUICtrlCreateCombo("", 287, 73, 57, 25)
GUICtrlSetData(-1, "F1")
GUICtrlSetData(-1, "F2")
GUICtrlSetData(-1, "F3")
GUICtrlSetData(-1, "F4")
GUICtrlSetData(-1, "F5")
GUICtrlSetData(-1, "F6")
GUICtrlSetData(-1, "F7")
GUICtrlSetData(-1, "F8")
GUICtrlSetData(-1, "F9")
GUICtrlSetData(-1, "F10")
GUICtrlSetData(-1, "F11")
GUICtrlSetData(-1, "F12")
GUICtrlSetState(-1, $GUI_DISABLE)
$Combo3 = GUICtrlCreateCombo("", 287, 97, 57, 25)
GUICtrlSetData(-1, "F1")
GUICtrlSetData(-1, "F2")
GUICtrlSetData(-1, "F3")
GUICtrlSetData(-1, "F4")
GUICtrlSetData(-1, "F5")
GUICtrlSetData(-1, "F6")
GUICtrlSetData(-1, "F7")
GUICtrlSetData(-1, "F8")
GUICtrlSetData(-1, "F9")
GUICtrlSetData(-1, "F10")
GUICtrlSetData(-1, "F11")
GUICtrlSetData(-1, "F12")
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("START", 13, 186, 67, 33)
$Group2 = GUICtrlCreateGroup("Mana potions", 14, 128, 345, 49)
GUICtrlSetFont(-1, 8, 800, 0, "Arial")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input4 = GUICtrlCreateInput("", 121, 144, 83, 22)
$Combo4 = GUICtrlCreateCombo("", 286, 144, 57, 25)
GUICtrlSetData(-1, "F12")
$Label8 = GUICtrlCreateLabel("Hotkey:", 222, 144, 45, 24)
$Label9 = GUICtrlCreateLabel("Mana:", 23, 148, 79, 16)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label10 = GUICtrlCreateLabel("", 294, 184, 70, 18)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label11 = GUICtrlCreateLabel("", 294, 208, 70, 18)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label12 = GUICtrlCreateLabel("Your Health:", 230, 184, 64, 18)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label13 = GUICtrlCreateLabel("Your Mana:", 230, 208, 60, 18)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Button3 = GUICtrlCreateButton("REFRESH", 85, 186, 67, 33)
$Label14 = GUICtrlCreateLabel("potBot - Do not send any packets, emulate the clicking of the keyboard!", 14, 226, 345, 18)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$TabSheet2 = GUICtrlCreateTabItem("potBot - About")
$Group3 = GUICtrlCreateGroup("Terms and information about potBot", 8, 24, 353, 165)
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label33 = GUICtrlCreateLabel("Bot doesn't send any packets, emulate the clicking of the keyboard.", 12, 48, 324, 17)
$Label15 = GUICtrlCreateLabel("The author is not liable for damages resulting from the use of the program.", 12, 144, 347, 17)
$Label16 = GUICtrlCreateLabel("The author has the right to not continue working on the program.", 12, 160, 308, 17)
$Label17 = GUICtrlCreateLabel("Should not minimize the window Tibia when you have any battle in game.", 12, 64, 346, 17)
$Label18 = GUICtrlCreateLabel("Bot suspends operation when using the CTRL.", 12, 80, 224, 17)
$Label19 = GUICtrlCreateLabel("Bot suspends operation when using the SHIFT.", 12, 96, 227, 17)
$Label20 = GUICtrlCreateLabel("Bot resumes when you release the CTRL and SHIFT.", 12, 112, 255, 17)
$Label21 = GUICtrlCreateLabel("If you do not want to use low heal, mana, etc. enter into the box value 0.", 12, 128, 345, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label22 = GUICtrlCreateLabel("Registration key:", 8, 200, 83, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label23 = GUICtrlCreateLabel("Registration key:", 8, 224, 83, 17)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label24 = GUICtrlCreateLabel("Label24", 96, 201, 74, 17)
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Input6 = GUICtrlCreateInput("", 96, 224, 73, 21)
$Button4 = GUICtrlCreateButton("CHECK KEY", 176, 222, 75, 19)
$Button5 = GUICtrlCreateButton("PURCHASE", 176, 200, 75, 19)
$Label26 = GUICtrlCreateLabel("Ver. 0.3 ", 280, 200, 44, 17)
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Label27 = GUICtrlCreateLabel("Copyrights Boty24.pl", 256, 224, 100, 17)
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateTabItem("")
$Label1 = GUICtrlCreateLabel("Tibia potBot - Safe Mode", 188, 0, 182, 19)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
If $free = 0 Then GUICtrlSetState($Button1, $GUI_DISABLE)
If $free = 0 Then GUICtrlSetState($Button2, $GUI_DISABLE)
If $free = 0 Then GUICtrlSetState($Button3, $GUI_DISABLE)
If $free = 1 Then GUICtrlSetState($Button4, $GUI_DISABLE)
If $free = 1 Then GUICtrlSetState($Button5, $GUI_DISABLE)
If $free = 1 Then GUICtrlSetState($Input6, $GUI_DISABLE)
If $free = 1 Then GUICtrlSetData($Label24, "FREE NOW")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
ShellExecute("http://boty24.pl")
Case $Label1
Case $Button1
If ProcessExists("tibia.exe") = 0 Then
MsgBox(16, "Tibia potBot - Safe Mode!", "Tibia must be enabled!")
Else
;~ GUICtrlSetState($Button1, $GUI_DISABLE)
;~ GUICtrlSetState($Button3, $GUI_ENABLE)
If ProcessExists("tibia.exe") = 0 Then
MsgBox(16, "Tibia potBot - Safe Mode!", "You are not logged to game!")
Else
GUISetState(@SW_HIDE)
bot()
EndIf
EndIf
Case $Button5
ShellExecute("http://boty24.pl")
Case $Button3
GUICtrlSetState($Button3, $GUI_DISABLE)
If GUICtrlRead($Input1) <> "0" Then GUICtrlSetState($Input2, $GUI_ENABLE)
If GUICtrlRead($Input1) <> "0" Then GUICtrlSetState($Combo2, $GUI_ENABLE)
If GUICtrlRead($Input2) <> "0" Then GUICtrlSetState($Input3, $GUI_ENABLE)
If GUICtrlRead($Input2) <> "0" Then GUICtrlSetState($Combo3, $GUI_ENABLE)
Sleep(1000)
GUICtrlSetState($Button3, $GUI_ENABLE)
EndSwitch
WEnd
;~ Func save()
;~ IniWrite($plik, "highheal", "highheal", GUICtrlRead($Input1))
;~ IniWrite($plik, "mediumheal", "mediumheal", GUICtrlRead($Input2))
;~ IniWrite($plik, "lowheal", "lowheal", GUICtrlRead($Input3))
;~ IniWrite($plik, "highthotkey", "highthotkey", GUICtrlRead($Combo1))
;~ IniWrite($plik, "mediumhotkey", "mediumhotkey", GUICtrlRead($Combo2))
;~ IniWrite($plik, "lowhotkey", "lowhotkey", GUICtrlRead($Combo3))
;~ bot()
;~ EndFunc ;==>save
Func bot()
While 1
If _IsPressed("10", $dll) = 0 Then
If _IsPressed("11", $dll) = 0 Then
bot2()
Sleep(300)
Else
;~ Sleep(300)
EndIf
Else
;~ Sleep(300)
EndIf
WEnd
EndFunc ;==>bot
Func bot2()
Local $adrXOR = 0x26E584
$adrMyHP = 0xE584B1
$adrMyMaxHP = 0x979E9C
$adrMyMana = 0x7ABFE0
$adrMyMaxMana = 0x7ABF90
Local $tibia = ProcessExists("tibia.exe")
$open = _MemoryOpen($tibia)
Local $MyHP = _MemoryRead($adrMyHP, $open)
$MyMaxHP = _MemoryRead($adrMyMaxHP, $open)
$MyMana = _MemoryRead($adrMyMana, $open)
$MyMaxMana = _MemoryRead($adrMyMaxMana, $open)
$valueXOR = _MemoryRead($adrXOR, $open)
Local $MyHP2 = BitXOR($valueXOR, $MyHP)
$MyMaxHP2 = BitXOR($valueXOR, $MyMaxHP)
$MyMana2 = BitXOR($valueXOR, $MyMana)
$MyMaxMana2 = BitXOR($valueXOR, $MyMaxMana)
GUICtrlSetData($Label11, $MyMana2&" / "&$MyMaxMana2)
GUICtrlSetData($Label10, $MyHP2&" / "&$MyMaxHP2)
If GUICtrlRead($Input1) <> "0" and GUICtrlRead($Combo1) <> "" Then
If $MyHP2 < GUICtrlRead($Input1) Then
If $MyHP2 > GUICtrlRead($Input2) Then
If $MyHP2 > GUICtrlRead($Input3) Then
Sleep(Random(150, 300))
ControlSend("Tibia", "", "", "{" & GUICtrlRead($Combo1) & "}")
EndIf
EndIf
EndIf
If GUICtrlRead($Input2) <> "0" and GUICtrlRead($Combo2) <> "" Then
If $MyHP2 < GUICtrlRead($Input2) Then
If GUICtrlRead($Input3) <> "0" and GUICtrlRead($Combo3) <> "" Then
If $MyHP2 > GUICtrlRead($Input3) Then
Sleep(Random(150, 300))
ControlSend("Tibia", "", "", "{" & GUICtrlRead($Combo2) & "}")
EndIf
Else
Sleep(Random(150, 300))
ControlSend("Tibia", "", "", "{" & GUICtrlRead($Combo2) & "}")
EndIf
EndIf
EndIf
If GUICtrlRead($Input3) <> "0" and GUICtrlRead($Combo3) <> "" Then
If $MyHP2 < GUICtrlRead($Input3) Then
Sleep(Random(150, 300))
ControlSend("Tibia", "", "", "{" & GUICtrlRead($Combo3) & "}")
EndIf
EndIf
EndIf
If $MyMana2 < GUICtrlRead($Input4) Then
Sleep(Random(150, 300))
ControlSend("Tibia","","","{"&GUICtrlRead($Combo4)&"}")
EndIf
TrayTip("Potar Tibia Info Checker (v. 0.1)","Aktualnie posiadam:" & @CRLF &"" & @CRLF & "Zdrowie: "&$MyHP2&"/"&$MyMaxHP2& @CRLF &"Mana: "&$MyMana2&"/"&$MyMaxMana2,0,4)
EndFunc ;==>bot2
;==>bot
Func get()
Ping("www.google.pl", 250)
If @error <> 0 Then
MsgBox(64, "Tibia potBot - Safe Mode!", "Nie ma połączenia z internetem, prosimy połączyć się i spróbować ponownie.")
Exit
Else
$chunk = _INetGetSource("http://www.boty24.pl/bot.php")
$array3 = StringRegExp($chunk, "<(?i)dostep>(.*?)<(?i)", 1, 1)
If $array3[0] = "buy" Then
$free = 0
Else
$free = $free + 1
EndIf
EndIf
EndFunc ;==>get