Posts: 7
Threads: 4
Joined: Nov 2020
Reputation:
0
i want to know if is posible to Run from the cave if someone attacks me, and run to DP if possible i would appreciate!
Posts: 5
Threads: 4
Joined: May 2021
Reputation:
0
Hi,
This script doesnt work for me and im not sure what im doing wrong. I tried to use the script in "edit action" and a persistent script.
Do i need to change anything in this?
if attackingme(2000, 'p') > 0 then
local wpt = waypoint()
if wpt.id >= 0 and wpt.id <= 4 then
setglobal('BEING_ATTACKED', true)
gotolabel('Leave_Hunt')
end
end
I have 4 waypoint 000 to 004.
Posts: 2,390
Threads: 409
Joined: Jul 2018
Reputation:
61
The script can be used anywhere, but you must understand that each place you run LUA scripts works differently.
Cavebot Actions only runs the script when you go to that waypoint.
Persistents runs it from time to time.
The script will go to wpt Leave_Hunt if a player attacked you in last 2 seconds AND Cavebot current waypoint is between wpt #000 and #004.