I did a "flee spawn if being PKed" script some days ago, and when someone comes and PK you it works great. But the problem is that sometimes the bot think it is being PKed even tho it isnt.. I have tried diffrent types of it and tried it alot of times, and also used "take screenshot if being pk" script to see what is happening and from what I can see it randomly happens sometimes when a player is outside the screen just about to enter the screen..
To solve this I tried to only look for players inside 5sqm and even 4 sqm but it still bugs out sometimes :/ it doesnt happen every time someone comes inside the screen, its just sometimes. duno if this is only me but I dont think so, seems to be the $pattacker function that there is someting wrong with since I can't hear "PK alarm" (which is activated) at the same time as the bot is switching on the PK script.
this is the script I started with:
--Flee spawn, equip time ring and log out in pz if being PKed.
auto(200)
if $pattacker.id ~= 0 then
CODE
end
and the latest one:
--Flee spawn, equip time ring and log out in pz if being PKed.
auto(200)
if paround(4) > 0 then
if $pattacker.id > 0 then
CODE
end
end
I have tried both $pattacker ~= 0 and $pattacker > 0
@Lucas Terra @SuNe