Log in

View Full Version : os.exit() when specific player on screen



playmate
05-28-2016, 05:29 AM
Heya

I'm constantly targeted by the leading guild on a non-pvp server... meaning they are bringing their 600+ to kill all my monsters and ruin my hunts.

My question is:

Can I set the bot to exit log (when no battle - such as at an refill attempt) whenever a specific player has entered the screen?

Trykon
05-28-2016, 09:19 AM
Local xplayer = Creature.New(players name)
Set his name
Open module:
local logout = false
for name,_ in Creature.iPlayers (7) do
if (name == xplayer:name) then
logout = true
end
end

if ((not Self.isInFight()) and logout==true) then
os.exit ()
end
wait (1000)

Should work
I write this while being on phone during my way to work, so I cannot test it