PDA

View Full Version : Low Supply Alarm



rellikpoc
04-15-2012, 10:55 AM
What about creating an alarm in which you can choose ammo/supplies (such as eq manager), but as an alarm for when they get low. Simply because, often enough i find myself tabbed out, and sometimes I will forget about Tibia, and come back dead because no pots. Any ideas?

danonix
04-15-2012, 11:17 AM
So why You can't do for yourself checker ( if x > 30 go to X else go to Y ) -> if labelname Y then setcavebot off. After 15 minutes it will log out. Or just if labelname Y then withdraw X amount of mana potions.

rellikpoc
04-18-2012, 06:03 PM
Yeah, Could do that.. But, A script isn't what im asking for, I asked for a function on ALARM.

- I sense the E-Hostility, Gozzam Zzude.

Taywedge
08-15-2012, 06:37 PM
----SETTINGS-----------------------------------------------------------------------
-----------------------------------------------------------------------------------
WantedSD = 650 --If less than this amount, alert will sound.

SDID = 3155 --Change ID of item you want supply alert for.

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
--END OF SETTINGS--DONT CHANGE BELOW IF YOUR NOT 100% SURE OF WHAT YOU'RE DOING----

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

function onWalkerSelectLabel(labelName)
if (labelName == "CheckSD") then
if ((Self.ItemCount(SDID) < WantedSD)) then
alert()
else
gotoLabel("Start")
end
end
end

This script will alert you when you have less supplies than the "WantedSD" setting at the top. "SDID" is the id of the item you want the alert for.

Remember to add an appropriate "Check" label or this script will not work. Any Questions pm me and hopefully I can get back to you soon.

Spectrus
08-15-2012, 06:46 PM
Alternatively you could just append this to the bottom of your Lua script for labels.



local config = {
id = 3155,
amountToAlarm = 650
}

registerEventListener(TIMER_TICK, "onTick")

function onTick()
if Self.ItemCount(config.id) < config.amountToAlarm then
alert()
end
end


The problem with adding this in to the bot is that potion ID's change and it's something that can be made through scripting, so it shouldn't really be needed.

Niels
11-13-2012, 11:16 PM
Some high lvls are trying to waste me lately. I thought maybe I can edit this script a litte to make my character stop attacking monsters when it has low supplies and just continue with the walker untill it reaches the checker that makes it refill. I just added setTargetingEnable(false), but this only cancels the actions involving the targeting. Now, when I have low supplies my character will just stand still and hit the creature with the wand untill it dies. Is there a way to really stop attacking the monster?

What I have now:

local config = {
id = 237,
amountToAlarm = 20
}

registerEventListener(TIMER_TICK, "onTick")

function onTick()
if Self.ItemCount(config.id) < config.amountToAlarm then
setTargetingEnabled(false)
alert()
else
setTargetingEnabled(true)
end
end

Spectrus
11-13-2012, 11:48 PM
Some high lvls are trying to waste me lately. I thought maybe I can edit this script a litte to make my character stop attacking monsters when it has low supplies and just continue with the walker untill it reaches the checker that makes it refill. I just added setTargetingEnable(false), but this only cancels the actions involving the targeting. Now, when I have low supplies my character will just stand still and hit the creature with the wand untill it dies. Is there a way to really stop attacking the monster?

What I have now:

local config = {
id = 237,
amountToAlarm = 20
}

registerEventListener(TIMER_TICK, "onTick")

function onTick()
if Self.ItemCount(config.id) < config.amountToAlarm then
setTargetingEnabled(false)
alert()
else
setTargetingEnabled(true)
end
end

If you stop the targeting while you have a target, it will not unattack it. You will have to kill it. After that, it won't target any more.

Niels
11-14-2012, 09:33 AM
Yes I already knew that, but the problem is some guy keeps healing my target until I'm out of supplies. So let's say I'm fighting a hero, every time I make him low hp this lvl 300 uhs it and since he is some no life br with too much money he keeps doing that up to the point I'm all out of manas and the hero kills me.

So what I was aiming for is a lua that unattacks a creature and disables the targeting system when my supplies run dangerously low. I should have explained it better in my first post sorry.

Is there a way to unattack a creature?

Spectrus
11-14-2012, 11:05 AM
Yes I already knew that, but the problem is some guy keeps healing my target until I'm out of supplies. So let's say I'm fighting a hero, every time I make him low hp this lvl 300 uhs it and since he is some no life br with too much money he keeps doing that up to the point I'm all out of manas and the hero kills me.

So what I was aiming for is a lua that unattacks a creature and disables the targeting system when my supplies run dangerously low. I should have explained it better in my first post sorry.

Is there a way to unattack a creature?

I thought I was being clear, but now I realize I wasn't. You can't. Sorry, it's something that has been on the todo list for a while, I believe. Just need to wait for DarkstaR to get it done.

Niels
11-14-2012, 11:16 AM
ah okay too bad. Well thanks!