init start
local lastStand = $standtime
local randTime = math.random(300000, 600000)
init end
auto(100)
if $standtime < lastStand then
lastStand = $standtime
end
if $standtime - lastStand > randTime then
local dirs = {'n', 'e', 's', 'w'}
-- Makes sure it's random and not the same we're facing right now
table.remove(dirs, table.find(dirs, $self.dir))
turn(dirs[math.random(1, 3)])
waitping()
lastStand = $standtime
randTime = math.random(300000, 600000)
end
Reconnect:
auto(2500)
if not $connected then
reconnect(true)
end
Mad Sheep Trainer:
auto(100)
local m = getcreature('Mad Sheep')
if $shielding < ($sword or $club or $axe) then
if m.dist == 1 then
attack(m.name)
wait(500,1000)
stopattack()
wait(1000*30)
end
else
if m.dist == 1 then
attack(m.name)
end
end
if maround(7,m.name) == 0 then
if paround() >= 1 then
smartscreenshot()
wait(234,456)
closeclient()
wait(234,456)
else
useoncreature(651,$self)
wait(200,500)
end
end
how can i use this script to train with rp -small stones?