-- DO NOT EDIT BELOW THIS LINE --
local skills = {'sword', 'axe', 'club', 'distance', 'magic'}
local randTime = math.random(-110, 10)
for i, v in ipairs(charList) do
table.insert(charList[i], $botdb:getvalue('offtrainlast', v[3]) or 0)
table.insert(charList[i], $botdb:getvalue('offtraintime', v[3]) or 0)
end
init end
auto(10000, 30000)
for _, v in ipairs(charList) do
if (os.time() - v[5]) / 60 > v[6] + (12 * 60) + randTime then
randTime = math.random(-110, 10)
connect(v[1], v[2], v[3])
waitping()
v[5] = os.time()
v[6] = $offlinetraining
$botdb:setvalue('offtrainlast', v[3], v[5])
$botdb:setvalue('offtraintime', v[3], v[6])
if $offlinetraining > 10 then
local skill = v[4]
if skill == 'auto' then
if $voc == VOC_DRUID or $voc == VOC_SORCERER then
skill = 'magic'
elseif $voc == VOC_PALADIN then
skill = 'distance'
else
if $axe > $sword and $axe > $club then
skill = 'axe'
elseif $sword > $axe and $sword > $club then
skill = 'sword'
else
skill = 'club'
end
end
end
local id = 16197 + table.find(skills, skill)
reachgrounditem(id)
wait(200, 500)
useitem(id, 'ground')
else
logout()
end
wait(1000, 1500)
press('[ESC]')
wait(1000, 1500)
end
end
Good job buddy, but lines 30-31 shouldn't it be setvalue instead of getvalue ?
01-09-2014, 07:12 PM
leandrocore
It will be very useful for my character! : D
01-09-2014, 07:12 PM
Raphael
Quote:
Originally Posted by Leonardo
Good job buddy, but lines 30-31 shouldn't it be setvalue instead of getvalue ?
Yes, it should.
Fixed, thanks.
01-09-2014, 09:20 PM
Voltzin
How much time it will take to relog?
01-09-2014, 09:59 PM
stmaster
wow very usuefull!!
just .. same question as above.. it will train and logout and will login again when to check?
01-09-2014, 10:24 PM
Raphael
Quote:
Originally Posted by Voltzin
How much time it will take to relog?
From 110 minutes before to 10 minutes after you have full 12h offline training.
01-09-2014, 10:42 PM
Voltzin
Quote:
Originally Posted by Raphael
From 110 minutes before to 10 minutes after you have full 12h offline training.
Nice! Really amazing, really really usefull.
01-11-2014, 10:49 PM
stmaster
Quote:
Originally Posted by Raphael
From 110 minutes before to 10 minutes after you have full 12h offline training.
so its possible to reduce it correct? just change the num 110 to 30 (example) am i correct? i wont bug anything? xD
01-11-2014, 11:19 PM
Raphael
Quote:
Originally Posted by stmaster
so its possible to reduce it correct? just change the num 110 to 30 (example) am i correct? i wont bug anything? xD
Yes, on lines 14 and 24.
07-10-2014, 10:44 PM
bushman
I tried setting up your script
and it isn't working very well for me....the script goes too fast and actually says its loading char info but moves on to next char and maybe loads
up one of the chars lower down the list..is there anyway to get it to move slower like load char info about 8 to 15 seconds apart so that you don't get
(the last char is still logged in message)?
07-13-2014, 04:17 AM
Raphael
Quote:
Originally Posted by bushman
I tried setting up your script
and it isn't working very well for me....the script goes too fast and actually says its loading char info but moves on to next char and maybe loads
up one of the chars lower down the list..is there anyway to get it to move slower like load char info about 8 to 15 seconds apart so that you don't get
(the last char is still logged in message)?
Yes, edit the wait times on lines 43 and 45.
07-16-2014, 02:45 AM
bushman
thank you Raphael
I edited the lines 43 and 45, as you said
and all is working as it should
very nice script, I just had to move bed trainers to statues
10-06-2014, 03:54 PM
Stephano
I am not sure, but after update today this hotkey seems not working.
Because after enable it, nothing happened, shouldn't loggin the characters and click on statues?
11-14-2014, 05:19 AM
wilzone
Its not working for me, have how to fix it?
05-02-2015, 04:46 PM
Raphael
Script updated! Added an 'auto' option for the skill that automatically finds out which skill your char should train.
06-10-2015, 03:16 PM
wilzone
Good its working very good thanks
07-10-2015, 10:00 AM
rafau
very helpful m8, i don't have to put manually 30+ characters :D
02-20-2016, 03:10 AM
simam
Quote:
Originally Posted by Raphael
Offline Trainer
Description
Keeps the listed characters training the selected skill. The character must already be near the training statue.
Configuration
Edit the charList variable on the init block to specify all characters' account, password, name and training skill.
-- DO NOT EDIT BELOW THIS LINE --
local skills = {'sword', 'axe', 'club', 'distance', 'magic'}
local randTime = math.random(-110, 10)
for i, v in ipairs(charList) do
table.insert(charList[i], $botdb:getvalue('offtrainlast', v[3]) or 0)
table.insert(charList[i], $botdb:getvalue('offtraintime', v[3]) or 0)
end
init end
auto(10000, 30000)
for _, v in ipairs(charList) do
if (os.time() - v[5]) / 60 > v[6] + (12 * 60) + randTime then
randTime = math.random(-110, 10)
connect(v[1], v[2], v[3])
waitping()
v[5] = os.time()
v[6] = $offlinetraining
$botdb:setvalue('offtrainlast', v[3], v[5])
$botdb:setvalue('offtraintime', v[3], v[6])
if $offlinetraining > 10 then
local skill = v[4]
if skill == 'auto' then
if $voc == VOC_DRUID or $voc == VOC_SORCERER then
skill = 'magic'
elseif $voc == VOC_PALADIN then
skill = 'distance'
else
if $axe > $sword and $axe > $club then
skill = 'axe'
elseif $sword > $axe and $sword > $club then
skill = 'sword'
else
skill = 'club'
end
end
end
local id = 16197 + table.find(skills, skill)
reachgrounditem(id)
wait(200, 500)
useitem(id, 'ground')
else
logout()
end
wait(1000, 1500)
press('[ESC]')
wait(1000, 1500)
end
end