Im looking for script that will at hour XX:XX kill all monsters around and logout.
Im looking for script that will at hour XX:XX kill all monsters around and logout.
lua code:
--[[ time in 24 hour format, eg, 21:00, 12:30, 04:35 ]]
local hourTime = 07 -- time in hours (00 to 24)
local minsTime = 20 -- time in minutes (00 to 60)
--[[ leave below this alone]]
function creatureCount()
local count = 0
for name, cid in Creature.iMonsters() do
count = count + 1
end
return count
end
while true do
-- get local time
local logTime = os.date("*t")
if logTime.hour == hourTime and logTime.min == minsTime then
-- stop the walker if time is equal to variable time
Walker.Stop()
-- wait until there are no creatures on screen..
while creatureCount() ~= 0 do
wait(1000)
end
-- ..then exit the client
os.exit()
end
wait(5000)
end
All my full afk scripts are accessible at:
My thread
My store
My project
Looking for RL Tibia testers - RP and EK scripts for FREE. Link to info.
It will still kill any creatures around before it triggers the xlog. XLogging is safe if there are no creatures around that can do waves, as the creatures will not directly target you if you are disconnected.
@xwicuxx
I can add Self.isInFight() which will wait for your battle sign to drop (if you want to be sure of your characters safety), but it would result in your character standing there for a while if you are cursed by anything.
Yes, please add it, its 100% exact script im looking for.
lua code:
--[[ time in 24 hour format, eg, 21:00, 12:30, 04:35 ]]
local hourTime = 11 -- time in hours (00 to 24)
local minsTime = 50 -- time in minutes (00 to 60)
--[[ leave below this alone]]
function creatureCount()
local count = 0
for name, cid in Creature.iMonsters() do
count = count + 1
end
return count
end
while true do
-- get local time
local logTime = os.date("*t")
if logTime.hour == hourTime and logTime.min == minsTime then
-- stop the walker if time is equal to variable time
Walker.Stop()
-- wait until there are no creatures on screen..
while creatureCount() ~= 0 or Self.isInFight() do
wait(1000)
end
-- ..then exit the client
os.exit()
end
wait(5000)
end