Untitled
Guest 171 27th Sep, 2024
setDefaultTab("Tools")
local iconImageID = 70526
addIcon("Attack", {
item = iconImageID,
movable = true,
text = "Attack"
}, function()
if AttackBot.isOn() then
AttackBot.setOff()
else
AttackBot.setOn()
end
end)
setDefaultTab("TOOLS")
-- config
-- 1 - EK
-- 2 - RP
-- 3 - MS
-- 4 - ED
local vocation = player:getVocation()
-- dont edit below
local antiManaCost
local paralSpell
local hasteSpell
local hasteManaCost
if vocation == 1 or vocation == 1 then
paralSpell = "utani gran hur"
antiManaCost = 170
elseif vocation == 1 then
paralSpell = "exura gran"
antiManaCost = 70
else
paralSpell = "utani gran hur"
antiManaCost = 210
end
if vocation == 1 or vocation == 1 then
hasteSpell = "utani gran hur"
hasteManaCost = 100
elseif vocation == 1 then
hasteSpell = "utani gran hur"
hasteManaCost = 100
else
hasteSpell = "utani gran hur"
hasteManaCost = 100
end
macro(100, "Anty Paral - Haste", function()
if isParalyzed() then
if mana() >= antiManaCost then
say(paralSpell)
delay(400)
end
elseif not hasHaste() then
if mana() >= hasteManaCost then
say(hasteSpell)
delay(400)
end
end
end)
setDefaultTab("Tools")
UI.Separator()
local trainingDummy = { 28565, 28558, 28559, 28560 } --// Training Dummy IDs
local paladinId = 35288 --// Excercise Bow ID
local knightId = 35285 --// Exercise Melee ID (By default Sword)
local mageId = 35289 --// Exercise Magic ID (By default Wand)
local distanceDummy = 4 --// Self-distance from the dummy
--[[
If you want 100% afk experience I recommend settings up like:
At: "Ingame Script Editor" set:
CaveBot.setOn()
And on a CaveBot Script:
exerciseDummy()
schedule(1000, function() CaveBot.setOff() end)
return true
-------------------------------------------------------------
By default there's ONLY "Ferumbras Training Dummy" IDs, if you're using a non-ferumbras dummy, add the IDs.
--------------------------------------------------------------
If you want to use per example different knights with different skills, you can set them below
player_name = character name
knightId = the id you want to use
]]
local playerName = player:getName()
if playerName == "player name" then
knightId = 35287
elseif playerName == "player_name" then
knightId = 28552
elseif playerName == "player_name" then
mageId = 28552
elseif playerName == "player_name" then
paladinId = 28552
end
function exerciseDummy()
for _, tile in ipairs(g_map.getTiles(posz())) do
--// Checks distance within character and tile
if getDistanceBetween(pos(), tile:getPosition()) <= distanceDummy then
--// Get items on top of the floor
local item = tile:getTopUseThing()
--// Checks if the item has the same ID as our table.
if item and table.find(trainingDummy, item:getId()) then
--// Checks our vocation, in this case if paladin then use exercise bow.
if voc() == 2 or voc() == 12 then
--tile:setText("Dummy Found RP")
item:setMarked("#2eb9ff")
--autoWalk(item:getPosition(), 20, {
-- ignoreNonPathable = true,
-- precision = 0,
-- marginMin = 1,
-- marginMax = 1
--})
g_game.useInventoryItemWith(paladinId, item)
return true
end
--// Checks our vocation, in this case if knight then use melee exercise weapon.
if voc() == 1 or voc() == 11 then
--tile:setText("Dummy Found EK")
item:setMarked("#2eb9ff")
autoWalk(item:getPosition(), 20, {
ignoreNonPathable = true,
precision = 0,
marginMin = 1,
marginMax = 1
})
schedule(2000, function() g_game.useInventoryItemWith(knightId, item) end)
end
--// Checks our vocation, in this case if mage then use wand or rod weapon.
if voc() == 3 or voc() == 13 or voc() == 4 or voc() == 14 then
--tile:setText("Dummy Found Mage")
item:setMarked("#2eb9ff")
--autoWalk(item:getPosition(), 20, {
-- ignoreNonPathable = true,
-- precision = 0,
-- marginMin = 1,
-- marginMax = 1
--})
g_game.useInventoryItemWith(mageId, item)
return true
end
end
end
end
end
UI.Button("Exercise Dummy", function()
exerciseDummy()
end)
onTextMessage(function(mode, text)
if string.match(text, "You have changed position. Training has stopped.") then
print("[Error] "..text)
schedule(5000, function() exerciseDummy() end)
end
if string.match(text, "This exercise dummy can only be used after a 20 second cooldown.") then
print("[Error] "..text)
exerciseDummy()
end
if string.match(text, "Your training weapon has disappeared.") then
print("[Error] "..text)
exerciseDummy()
end
end)
UI.Separator()
setDefaultTab("HP")
UI.Separator()
local utamoHp = 65
local exuraHp = 98
local safeMana = 10
macro(150, "Balance Utamo Vita", function()
if hppercent() <= utamoHp and not hasManaShield() and manapercent() > safeMana then
say("utamo vita")
elseif hasManaShield() and (hppercent() >= exuraHp or manapercent() < safeMana) then
say("exana vita")
end
end)
To share this paste please copy this url and send to your friends
RAW Paste Data