Automatically logs the next character on list if stamina drops below a certain threshold.
Configuration
Edit the accountList, table on the init block to specify your Tibia credentials and characters' name. Also edit the minStamina variable to specify the stamina threshold.
Code
-- local SCRIPT_VERSION = '1.1.0'
local minStamina = 16 * 60 -- In minutes
local accountList = {
{
account = 'account1',
password = 'password1',
character = 'character1'
},
{
account = 'account2',
password = 'password2',
character = 'character2'
},
{
account = 'account3',
password = 'password3',
character = 'character3'
}
}
-- 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
Automatically logs the next character on list (must be on the same account) if stamina drops below a certain threshold.
Configuration
Edit the account, password and charList variables on the init block to specify your Tibia credentials and character names. Also edit the minStamina variable to specify the stamina threshold.
Code
local account = 'accountName'
local password = 'accountPassword'
local charList = {'Char1', 'Char2', 'Char3', 'Char4'}
local minStamina = 16 * 60 -- In minutes
-- DO NOT EDIT BELOW THIS LINE --
table.lower(charList)
if $stamina < minStamina then
local curChar = table.find(charList, $name:lower())
local nextChar = charList[(curChar % #charList) + 1]
logout()
waitping()
keyevent(VK_ESCAPE)
waitping()
connect(account, password, nextChar)
end
I dont know why its not working correctly, it does logout the character who got lot stamina, start typing acc/pass, but then it stucks on character list, doesnt try to connect the next char:
Code:
local account = 'xxxx'
local password = 'xxxx'
local charList = {'Pentagram Neo', 'Madein Brazil Cogu', 'Mousesports Cyx', 'Natus Vincere Markeloff'}
local minStamina = 15 * 60 -- In minutes
-- DO NOT EDIT BELOW THIS LINE --
table.lower(charList)
if $stamina < minStamina then
setsetting('Persistent/Scripts/reconnect/Enabled', 'no')
local curChar = table.find(charList, $name:lower())
local nextChar = charList[(curChar % #charList) + 1]
logout()
waitping()
keyevent(VK_ESCAPE)
waitping()
connect(account, password, nextChar)
end
Any Clues?
03-13-2014, 04:35 AM
Deertier
If this is used for cavebotting then maybe you should add
if ($stamina < minStamina) and ($pzone == true) then
Otherwise it's gonna try and logout during a hunt and not while in a protection zone.
Also keep in mind guys that if you're using this for multiple characters on one account (cavebotting), you need to use the exact same backpacks unless you create an action that changes them to whatever character you're logged in on.
03-13-2014, 05:22 PM
Raphael
Quote:
Originally Posted by Deertier
If this is used for cavebotting then maybe you should add
if ($stamina < minStamina) and ($pzone == true) then
Otherwise it's gonna try and logout during a hunt and not while in a protection zone.
Also keep in mind guys that if you're using this for multiple characters on one account (cavebotting), you need to use the exact same backpacks unless you create an action that changes them to whatever character you're logged in on.
I believe it's pretty explicit this is meant to be an action (as per the label on the title of the thread) and not a hotkey, therefore it should most likely be added after a deposit, which assures you are in pz.
I dont know why its not working correctly, it does logout the character who got lot stamina, start typing acc/pass, but then it stucks on character list, doesnt try to connect the next char:
Code:
...
Any Clues?
Are you sure you wrote the character names correctly? Letter by letter?
03-13-2014, 08:24 PM
Leonardo
Quote:
Originally Posted by Raphael
Are you sure you wrote the character names correctly? Letter by letter?
I have the same problem, sometimes it works flawlessly and sometimes it just connect to the same character then it runs the cavebot until it reaches the relog action and repeat the issue. Not sure but some function or variable may be bugged.
03-14-2014, 07:49 PM
Raphael
Quote:
Originally Posted by Leonardo
I have the same problem, sometimes it works flawlessly and sometimes it just connect to the same character then it runs the cavebot until it reaches the relog action and repeat the issue. Not sure but some function or variable may be bugged.
Weird.
03-17-2014, 09:35 PM
mexicows
Quote:
Originally Posted by Leonardo
I have the same problem, sometimes it works flawlessly and sometimes it just connect to the same character then it runs the cavebot until it reaches the relog action and repeat the issue. Not sure but some function or variable may be bugged.
exactly that, and the characters name is 100% correct, i guess its on the mood
03-18-2014, 11:26 AM
Imba
Is it possible to somehow read character names from 'Select Character' box, and relog to next (wihout using character name list)