View Full Version : Alarms when X potions
jaluvaa
08-05-2012, 01:43 AM
as the topic says, is it hard to make a alarm fuction on low X mana potion or health? :) thanks
thorekz
08-05-2012, 03:08 AM
local PotionID = 268 --Change to ID of mana potion.
local PotionCount = 10 --Change to amount you want to start alarm at
while true do
if Self.ItemCount(PotionID) <= PotionCount then
alert()
end
sleep(500)
end
jaluvaa
08-05-2012, 02:14 PM
local PotionID = 268 --Change to ID of mana potion.
local PotionCount = 10 --Change to amount you want to start alarm at
while true do
if Self.ItemCount(PotionID) <= PotionCount then
alert()
end
sleep(500)
end
is it possible to do go to X waypoint when X amount of mana potions? :)
ty!
desche188
08-05-2012, 02:20 PM
it is possible just change alert() to gotoLabel("Leave")
Infernal Bolt
08-05-2012, 02:46 PM
it is possible just change alert() to gotoLabel("Leave")
sure but it will keep going to the label "Leave" every second so it will stop moving eventually.
desche188
08-05-2012, 02:49 PM
how about
gotoLabel("Leave")
wait 600000
that would give 10 mins to get to dp and refill
Infernal Bolt
08-05-2012, 04:02 PM
how about
gotoLabel("Leave")
wait 600000
that would give 10 mins to get to dp and refill
try it but i think that it would make it check the pots every 10 minutes too.
Why not make a checker label instead? :P
Flacks
01-28-2013, 08:34 PM
The ones above me works great, I just had a problem that when you reach the waypoint where you Reset your bp, the bot alarms since it cant see the manas.
I made this script and it works, just put the coordinates where your resetbp-waypoint is
local ManaName = "health potion" -- What do you want to check
local ManaLow = 40 -- When reach this number alarm
local CordX = 32347 -- Your X-Coordinate
local CordY = 32223 -- Your Y-Coordinate
local CordZ = 7 -- Your Z-Coordinate
-- The coordinates should be where you Reset Your backpacks. Otherwise when you would close your bp
-- the bot would set the alarm.
while true do
if (Self.DistanceFromPosition(CordX, CordY, CordZ) ~= 0) then
if (Self.ItemCount(ManaName) < ManaLow) then
alert()
end
else
end
wait(15000) -- Time that the loops wait until next check. This saves CPU usage.
end
xiaospike
01-28-2013, 10:06 PM
The ones above me works great, I just had a problem that when you reach the waypoint where you Reset your bp, the bot alarms since it cant see the manas.
I made this script and it works, just put the coordinates where your resetbp-waypoint is
local ManaName = "health potion" -- What do you want to check
local ManaLow = 40 -- When reach this number alarm
local CordX = 32347 -- Your X-Coordinate
local CordY = 32223 -- Your Y-Coordinate
local CordZ = 7 -- Your Z-Coordinate
-- The coordinates should be where you Reset Your backpacks. Otherwise when you would close your bp
-- the bot would set the alarm.
while true do
if (Self.DistanceFromPosition(CordX, CordY, CordZ) ~= 0) then
if (Self.ItemCount(ManaName) < ManaLow) then
alert()
end
else
end
wait(15000) -- Time that the loops wait until next check. This saves CPU usage.
end
local ManaName = "health potion" -- What do you want to check
local ManaLow = 40 -- When reach this number alarm
local CordX = 32347 -- Your X-Coordinate
local CordY = 32223 -- Your Y-Coordinate
local CordZ = 7 -- Your Z-Coordinate
-- The coordinates should be where you Reset Your backpacks. Otherwise when you would close your bp
-- the bot would set the alarm.
while true do
if (Self.DistanceFromPosition(CordX, CordY, CordZ) ~= 0) then
if (Self.ItemCount(ManaName) < ManaLow) then
alert()
end
else <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< else what? O.O
end
wait(15000) -- Time that the loops wait until next check. This saves CPU usage.
end
Flacks
01-28-2013, 11:10 PM
local ManaName = "health potion" -- What do you want to check
local ManaLow = 40 -- When reach this number alarm
local CordX = 32347 -- Your X-Coordinate
local CordY = 32223 -- Your Y-Coordinate
local CordZ = 7 -- Your Z-Coordinate
-- The coordinates should be where you Reset Your backpacks. Otherwise when you would close your bp
-- the bot would set the alarm.
while true do
if (Self.DistanceFromPosition(CordX, CordY, CordZ) ~= 0) then
if (Self.ItemCount(ManaName) < ManaLow) then
alert()
end
else <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< else what? O.O
end
wait(15000) -- Time that the loops wait until next check. This saves CPU usage.
end
That's a secret .. :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.