View Full Version : Alarm when lower X quantity of Item ID
Tibiano
11-22-2014, 10:17 PM
Hi!
I got a problem, for me create a complete script 100% afk its too hard!
So yea, I just configure my walker with my own nodes, stands, targeter, shooter... Like almost 70% afk!
So the other 30% I need to go refill and deposit items I just looted etc..
I would be nice to add "Advanced Alarms" in Xenobot Alarms Option!
Just like...
Alarm when:
Lower than 50: Item ID: 238 (great mana potion)
Lower than 100: Item ID 3155 (sudden death rune)
Lower than 2: Item ID 3051 (energy ring)
Lower capacity than 50.
You can add items by pressing "add" and you just have to choose the item ID and quantity!
When one of them its lower than X, alarm should sound!
What do you think!? Its perfect to create simple and own scripts!!
Thanks.. Waiting opinions and improved ideas!
HERE IS WHERE ITS SUPOSED TO ADD THE: Advanced Alarm Options
11289
Tibiano
11-22-2014, 10:21 PM
I know that there are some scripts but, why we cant make it easier? :) DarkstaR
MrGreen
11-22-2014, 10:42 PM
This is nice, but there is probably better things to fix :P
There is a great script for this in the "Examples" folder, I think ;)
HjugO
11-22-2014, 10:45 PM
Tibia Client has limited space of boxes etc. I am not an expert but somewhere I read about it and I'm not sure if it's true.
Here is LUA code for alarms:
local CAP = 50
local ALARMS = {
{"great mana potion", 50},
{"sudden death rune", 100},
{"energy ring", 2}
}
Module.New("Alarms", function(moduleObject)
for _, value in ipairs(ALARMS) do
if (Self.ItemCount(value[1]) < value[2] or Self.Cap() < CAP) then
alert()
--break
end
end
end)
maroxy
11-22-2014, 10:57 PM
I give you two options:
First:
This one will play alarm when he get low amount of supplies, but It will play alarm if you are at depot or buying supplies too.
local gmp = Item.GetID("Great Mana Potion")
local lowGmp = 50
local sd = Item.GetID("Sudden Death Rune")
local lowSd = 100
local ring = Item.GetID("Energy Ring")
local lowRng = 2
local cap = Self.Cap()
local lowCap = 50
Module.New("Alarms-Tool", function(module)
if (Self.ItemCount(gmp) <= lowGmp or Self.ItemCount(sd) <= lowSd or Self.ItemCount(ring) <= lowRng or cap <= lowCap) then
if (Self.ItemCount(gmp) <= lowGmp) then
print("Low amount of Great Mana Potions!")
alert()
elseif (Self.ItemCount(sd) <= lowSd) then
print("Low amount of Sudden Death Rune!")
alert()
elseif (Self.ItemCount(ring) <= lowRng) then
print("Low amount of Energy Rings!")
alert()
elseif (cap <= lowCap) then
print("Low amount of Cap!")
alert()
end
Module:Delay(1000)
end
end)
Second:
This one uses Walker for to don't play it anymore, the problem is, the spawn must be of one floor, cause it will leave spawn when it plays alarm.
registerEventListener(WALKER_SELECTLABEL, "onGetLabel")
function onGetLabel(label)
if (label == "Start-Module") then
Module.Start("Alarms-Tool")
print("Alarms-Tool module started!")
elseif (label == "Stop-Module") then
Module.Stop("Alarms-Tool")
print("Alarms-Tool module stopped!")
end
end
local trueLabel = "Leave"
local gmp = Item.GetID("Great Mana Potion")
local lowGmp = 50
local sd = Item.GetID("Sudden Death Rune")
local lowSd = 100
local ring = Item.GetID("Energy Ring")
local lowRng = 2
local cap = Self.Cap()
local lowCap = 50
Module.New("Alarms-Tool", function(module)
if (Self.ItemCount(gmp) <= lowGmp or Self.ItemCount(sd) <= lowSd or Self.ItemCount(ring) <= lowRng or cap <= lowCap) then
if (Self.ItemCount(gmp) <= lowGmp) then
print("Low amount of Great Mana Potions!")
Walker.Goto(trueLabel)
alert()
elseif (Self.ItemCount(sd) <= lowSd) then
print("Low amount of Sudden Death Rune!")
Walker.Goto(trueLabel)
alert()
elseif (Self.ItemCount(ring) <= lowRng) then
print("Low amount of Energy Rings!")
Walker.Goto(trueLabel)
alert()
elseif (cap <= lowCap) then
print("Low amount of Cap!")
Walker.Goto(trueLabel)
alert()
end
end
module:Delay(1000)
end, false)
And Walker should be something like that, remember it must be just in one floor!
http://i61.tinypic.com/2gx4fmx.png
freixeee
11-22-2014, 11:14 PM
I just LOVE the idea! I dont like to config allways scripts and copy/paste and re-configurate it if I want to use it with diferent options!
That idea its a faster configuration of simple hunting not using Notepad or edit scripts!
That little things make things better! :)
Signed with blood! DarkstaR
Tibiano
11-22-2014, 11:21 PM
Hey man! I think I will take the first one script for the time being, but I hope DarkStaR will like that and add it to XenoSuite :P
Maybe yea.. maybe not.. Who knows :P
With that we're not gonna use scripts for alarms any more :P
THANKS AGAIN MAROXY for the script!!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.