Hi, basically I'm using 2 separate persistent hotkeys - one for an alert if a certain player in on screen and one for force refill, I need to combine them together so that force refill also considers this player and when he is on screen, it will run to dp - he has revenge on me and I often bot afk.
Alert I'm using:
init start
Players = {"xxx"}
init end
auto(1000, 1500)
foreach creature p "ps" do
if table.find(Players, p.name) then
playsound("playeronscreen.wav")
flashclient()
end
end
and the force refiller:
auto(1000)
local ManaNameIs = getuseroption("ManaName")
local AmmoNameIs = "sudden death rune"
local MinAmmoIs = tonumber(getuseroption("MinAmmo"))
local MinManaIs = tonumber(getuseroption("MinMana"))
local MinCapIs = tonumber(getuseroption("MinCap"))
if ($wptsection == "Hunt" or $wptsection == "SpawnToSpawn" or $wptsection == "AntiLure") then
if itemcount(AmmoNameIs) <= (MinAmmoIs) or itemcount(ManaNameIs) <= (MinManaIs) or $cap <= (MinCapIs) or ($stamina <= 60 * 15 and getuseroption("OfflineTrain")) then
if $posz == 11 then
stopattack()
setlooting("no")
settargeting("no")
gotolabel(0, "Leave")
wait(10000)
elseif $posz == 12 and $posy > 32632 then
stopattack()
setlooting("no")
settargeting("no")
gotolabel("FromWestToEast", "SpawnToSpawn")
wait(10000)
elseif $posz == 12 and $posy <= 32632 then
stopattack()
setlooting("no")
settargeting("no")
gotolabel("FromEastToWest", "SpawnToSpawn")
wait(15000)
end
end
end
I would really appreciate your help. Thanks