Im pretty much noob with lua but i finaly did it and it works great.
I run 4 settings, one "reloader" and 3 settings for each character.
Reloader:
PHP Code:
local minStamina = 15 * 60 -- In minutes
local accountList = {
{
account = 'aa',
password = 'bb',
character = 'x'
},
{
account = 'aa',
password = 'bb',
character = 'y'
},
{
account = 'aa',
password = 'bb',
character = 'z'
}
}
-- DO NOT EDIT BELOW THIS LINE --
for _, v in ipairs(accountList) do
v.character = v.character:lower()
end
if $stamina < minStamina then
local curAccount = table.find(accountList, $name:lower(), 'character')
local nextAccount = accountList[(curAccount % #accountList) + 1]
waitandlogout()
waitping()
keyevent(VK_ESCAPE)
waitping()
connect (nextAccount.account, nextAccount.password, nextAccount.character)
end
if $name == 'x' then
loadsettings('Knight Rotworm.xml')
elseif $name == 'y' then
loadsettings('testing ghost pal.xml')
elseif $name == 'z' then
loadsettings('Knight bz.xml')
end
In every farming settiings i have check when in depo as action:
In every farming settings i have persistent so cavebot starts running :PHP Code:
--[XT] Depositer --
depotaction('mainbpdp', 'stackbp', {'b','raredpstackbpdp'})
local minStamina = 14* 60 -- In minutes
if $stamina < minStamina then
loadsettings('Reload.xml')
end
Also have reconecter script i found on forum, i put as persistent and turn it on/off in cavebot action so it dont colide with Reloader:PHP Code:
auto(1000)
setcavebot('on') -- sets cavebot on
gotolabel('diip', 'Depositing')
I have to start persistent scripts through editing files but it's ok.PHP Code:
auto(1000, 1500)
--[[
Name: Auto Safe Reconnect Lite by BlakW
Version: v5.1.0
]]--
----- Safe Temple Settings -----
--Temple NPCs:
local templeNpcNames = {"Alia", "Tyrias", "Brewster", "Rahkem", "Kasmir", "Amanda", "Isimov", "Yberius", "Maealil", "Quentin", "Lynda", "Lorietta", "Prezil", "Kjesse", "Asralius"}
--Temple Position Range (sqm):
local templePositionRange = 7
----- Engine [Do not edit unless you know what you are doing] -----
if ($connected == false and $dead == false)
then
reconnect()
wait(600, 1800)
pausewalking(10000)
if (($pzone == true) and (maround_ib(10, false, unpack(templeNpcNames)) >= 1)
or ($pzone == true) and (islocationxyz_ib(32787, 31276, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32595, 32744, 6, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(33213, 32454, 1, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32213, 31133, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(33004, 31490, 11, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32649, 31925, 11, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(33217, 31814, 8, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32317, 32826, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(33194, 32853, 8, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32369, 32241, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32360, 31782, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32957, 32076, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(32732, 31634, 7, templePositionRange))
or ($pzone == true) and (islocationxyz_ib(33447, 31323, 9, templePositionRange)))
then
wait(1500)
closeclient()
wait(1500)
messagebox("Reconnect Message: Tibia client has been closed because character was inside a temple. This is to protect your character from being killed by other players.")
end
wait(10000, 15000)
end
Thats it i hope it helps someone, sorry for spamming forum with requests and thx for everyone for helping me. All scripts i use are edited scripts i picked from this forum.