works without error, i have now setup so my chars reconnect on server save and tomorrow il let u know how it went but until then, as always - great job and thanks!
02-22-2017, 01:44 AM
brandini
Quote:
Originally Posted by Borges
Test This:
-- MAD SHEEP TRAINER
local m = getcreature('Mad Sheep')
local n = getcreature('Wolf')
local waitshield = false -- true or false, Will wait your shielding skill to be the same, example: 20/20, 30/30, 40/40 etc...
if waitshield and (($shielding < $sword) or ($shielding < $club) or ($shielding < $axe)) then
if m.dist == 1 and maround(1,n.name) < 2 and n.dist == 1 then
attack(m.name)
wait(500,1000)
stopattack()
wait(1000*30)
else
attack(n.name)
end
else
if m.dist == 1 and maround(1,n.name) < 2 and n.dist == 1 then
attack(m.name)
else
attack(n.name)
end
end
if maround(1, n.name) > 1 then
equipitem('sickle', "rhand")
wait(234,456)
else
equipitem('hive scythe', "rhand")
wait(234,456)
end
can you edit it with 2 wolfs if they attack me no if they are on window
02-10-2019, 11:46 AM
lucasmazzotti
Quote:
Originally Posted by Borges
All you need in one action:
init start
local lastStand = $standtime
local randTime = math.random(300000, 600000)
init end
auto(100)
-- MAD SHEEP TRAINER
local m = getcreature('Mad Sheep')
local waitshield = false -- true or false, Will wait your shielding skill to be the same, example: 20/20, 30/30, 40/40 etc...
if waitshield and (($shielding < $sword) or ($shielding < $club) or ($shielding < $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 and $connected then
smartscreenshot()
wait(234,456)
closeclient()
wait(234,456)
else
useoncreature(651,$self)
wait(200,500)
end
end
-- RECONNECT
if not $connected then
reconnect(true)
wait(2500)
end
-- ANTI IDLE
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