Log in

View Full Version : logout when x strong mana potion



Infell
01-13-2016, 04:40 PM
logout when x strong mana potion, is there any lua script to do this?

Tirell
01-13-2016, 06:27 PM
local smptologout = 30

Module.New("Log", function(Module)
if (Self.ItemCount("strong mana potion") <= smptologout) then
wait(4000)
Self.Logout()
end
Module:Delay(10000, 15000)
end)

eldera
01-13-2016, 07:07 PM
local supplies = {
--["NAME"] = MIN_AMOUNT
["strong mana potion"] = 50,
["strong health potion"] = 30,
["royal spear"] = 10
}

--[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--
local shouldLogout = false

Module.New("logout-on-low-supplies", function()
if (not shouldLogout) then
for item, minAmount in pairs(supplies) do
if (Self.ItemCount(item) < minAmount) then
shouldLogout = true
return
end
end
else
if (Walker.IsEnabled()) then
Walker.Stop()
end

if (not Self.isInFight()) then
print("Logging out - see ya!")
wait(2000)
if (not Self.isInFight()) then
os.exit() -- or Self.Logout()
end
else
print("Waiting for pz to disappear.")
end
end
end)

jardy
08-31-2016, 08:00 AM
Thanks Eldera its work :d

caldo
09-09-2016, 01:04 AM
Can you make this to work with SDS AND GMP?