|
Post by crowface28 on Aug 8, 2020 2:41:30 GMT
Nothing special here. It's not efficient or anything, but it works.
while true do
FindMobile("")
count = 0
for mobile in FINDMOBILENAME do
count = count + 1
if FINDMOBILEHP[count] == "0" and tonumber(FINDMOBILEDIST[count]) < 3 then
ContextMenu(FINDMOBILEID[count], "Harvest")
sleep(500)
ContextMenu(FINDMOBILEID[count], "Loot All")
sleep(3000)
end
end
end
|
|
|
Post by polymerase on Sept 2, 2020 16:10:48 GMT
Suggested changes:
while true do count = 0 FindMobile("") if FINDMOBILE != nil then for count = 1,#FINDMOBILE do if FINDMOBILE[count].HP == 0 and FINDMOBILE[count].DIST < 3 then ContextMenu(FINDMOBILE[count].ID, "Harvest") sleep(500) ContextMenu(FINDMOBILE[count].ID, "Loot All") sleep(3000) end end end end
|
|
|
Post by nefariis on Nov 27, 2020 7:59:11 GMT
My take on it - there is no need for counting, use a for loop - also you really should check if the name is blue ("4D88FF"), no need to get guard whacked - and lastly, you don't want the sleep after the "loot all", you want it before the next iteration so the script isnt scanning the area every millisecond
while true do FindMobile("corpse") if FINDMOBILE then for corpse in FINDMOBILE do if corpse.DISTANCE < 5 and not string.match(corpse.NAME, "4D88FF") then ContextMenu(corpse.ID, "Harvest") sleep(1000) ContextMenu(corpse.ID, "Loot All") end end end sleep(5000) end
|
|