Log in

View Full Version : Relog to next character



xstojakes
07-29-2016, 12:16
IN MODCAVEBOT AFTER(BASIC-3RD LINE)

Option Explicit
PASTE THIS

Dim THandle As Long

Private Declare Function BringWindowToTop Lib "user32" (ByVal _
hwnd As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName _
As Any) As Long
AFTER

Case "onplayerpause-"
cavebotOnPLAYERpause(Sid) = True
'exeLine(Sid) = exeLine(Sid) + 1
updateExeLine Sid, 1, True
fastM = True
PASTE THIS CODE

Case "setrelognextchar"
setRelogNextChar (Sid)
' exeLine(Sid) = exeLine(Sid) + 1
updateExeLine Sid, 1, True
fastM = True
AFTER END FUNCTION CALLED PROCESSATTACKS

End Function
PASTE THIS

Public Sub setRelogNextChar(idConnection)

SafeCastCheatString "TimerMaker1", idConnection, 14
wait 2000
THandle = FindWindow(vbEmpty, "Tibia")
Dim iret As Long
iret = BringWindowToTop(THandle)
wait 1000
SendKeys "{DOWN}"
wait 1000
SendKeys "{ENTER}"
wait 5000
Call frmCavebot.cmdLoadScript_Click
wait 1000
frmCavebot.chkEnabled.Value = 1
wait 1000
frmHPmana.HPopt5.Value = True
Call frmHPmana.cmdAdd_Click
frmHPmana.HPopt8.Value = True
Call frmHPmana.cmdAdd_Click

End Sub

frmMain

AFTER

ReDim setFollowTarget(1 To MAXCLIENTS)
PASTE

ReDim setRelogNextChar(1 To MAXCLIENTS)

AND ATENTION! U NEED TO CHANGE PREMMISIONS IN frmCavebot BUTTONS CALLED
cmdLoadScript_Click AND
chkEnabled, AND IN frmHPmana BUTTONS CALLED
HPopt5 ,
HPopt8 AND
cmdAddFROM PRIVATE TO PUBLIC


What this code mod made? After execute of command "setRelogNextChar bot log out character, turning a Tibia client on the top, and makin one step down on the character list and loginin in this char, after that clickin in button "Load" in cavebot, turnin on the script, and add two rules into the Healer, focused on the new logged character.
One thing more, is that u cannot have opened other windows with header "Tibia"(for example Tibia folder called "Tibia") cause bot will understeand it like the Tibia client