I need script .lua when my character stay 60 second my client play alarm.
This is possible?![]()
I need script .lua when my character stay 60 second my client play alarm.
This is possible?![]()
It is possible:
local seconds = 0
local pos = Self.Position()
while true then
if Self.Position().x == pos.x and Self.Position().y == pos.y then
seconds = seconds + 1
if seconds >= 60 then
alert()
end
else
seconds = 0
pos = Self.Position()
end
end
This is not tested and written on the phone so you might want to check it before you run it![]()
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.
local seconds = 0
local pos = Self.Position()
while true do
if Self.Position().x == pos.x and Self.Position().y == pos.y then
seconds = seconds + 1
if seconds >= 60 then
alert()
end
else
seconds = 0
pos = Self.Position()
end
end
@Elizabeth
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.
If I were you I wouldn't copy my code any time... As most of the time I reply from phone so my code may have typos and so on... I would carefully rewrite it.
Also I have never tested it and actually never tried to write something like this, so this is just rough try.
At the moment I don't see any problem with it.
To be honest I also forgot about this![]()
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.
PHP Code:
local seconds = 0
local pos = Self.Position()
while true do
if Self.Position().x == pos.x and Self.Position().y == pos.y then
seconds = seconds + 1
sleep(1000)
if seconds >= 60 then
alert()
end
else
seconds = 0
pos = Self.Position()
end
end
this should work sleep function was missing :P
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.