Posts: 16
Threads: 5
Joined: Feb 2019
Reputation:
0
Hello scripters,
I'd two scripts:
1) Player removes soft boots when mana reaches x % (80 for example), and puts boh, puts back soft boots when mana reaches 50%.
2) If Worn soft boost = 2 => Cavebot : stop
Thank you, much appreciated!
P.s. I'd work on that scripts but I don't have that much time those days (work) so I ask you for help, thanks.
Posts: 2,545
Threads: 423
Joined: Jul 2018
Reputation:
68
Hello.
It's a good idea to develop and release this script.
Do you have soft boots IDs? I would the following ids: Softs IN USE, Softs NOT in use, worn softs.
If you don't have the IDs, but have the soft boots, here's a small tutorial to teach you how to get the ids.
Move the soft boots to your FEET (so it's gonna be IN USE) and run this code on CONSOLE tab:
Then copy it and save somewhere.
Then move the soft boots to your BELT/ARROW SLOT and run this code on CONSOLE tab:
Then copy it and save somewhere.
Later when it gets WORN then move the WORN soft boots to your BELT/ARROW SLOT again and run this code on CONSOLE tab:
Then copy it and save somewhere.
You will have three different ids, finally send it to me. hehe
Posts: 16
Threads: 5
Joined: Feb 2019
Reputation:
0
In use : 3246
On arrow slot (not in use) : 3549 (Not worn)
On arrow slot (not in use) : 5570 (Worn)
Thanks!
Posts: 2,545
Threads: 423
Joined: Jul 2018
Reputation:
68
Hello.
I could not really test it for a long time, but it SEEMS to work.
Please, let me know if it works for you.
local boots = 'boots of haste' -- this is the alternative boots, to equip while you have enough mana/health.
local boots_location = 'green backpack'
local SETTINGS = {
Consider = 'mppc', --You must use 'mppc' for mana %, 'mp' for mana value, 'hppc' for health % or 'hp' for health value.
Equip = {65,75},
Unequip = {85,95},
AlertIfNoSoft = true, -- This will play an alert if you have no more good softs to use.
AlertOnSoftCount = 0, -- This will play an alert if the count of softs, worn and in use are less than this value.
SoundFile = 'default.wav' -- This is the sound you want to use play when you have no soft
} -- It will equip soft if you have less than 65~75% of MP, and equip soft boots if you have more than 85~95% of MP.
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
--[[ DON'T EDIT BELOW THIS LINE --]]
local soft = {id = 3549, use = 3246, worn = 5570}
local bootsid = itemid(boots)
if n_equip == nil or n_unequip == nil then
n_equip = math.random(unpack(SETTINGS.Equip))
n_unequip = math.random(unpack(SETTINGS.Unequip))
end
local ntype = SETTINGS.Consider:lower()
local cur = 0
if ntype == 'mppc' then
cur = mppc()
elseif ntype == 'mp' then
cur = mp()
elseif ntype == 'hppc' then
cur = hppc()
elseif ntype == 'hp' then
cur = hp()
else
cur = mppc()
end
local feet_item = feet()
if feet_item.id == soft.use then
if cur > n_unequip then
if itemcount(bootsid, boots_location) > 0 then
moveitems(bootsid, 'feet', boots_location, 100)
wait(800)
else
moveitems(soft.use, boots_location, 'feet', 100)
wait(800)
end
n_equip = nil
end
elseif feet_item.id == soft.worn or feet_item.id == 0 then
if cur < n_equip and itemcount(soft.id, boots_location) > 0 then
moveitems(soft.id, 'feet', boots_location, 100)
wait(800)
n_equip = nil
else
if itemcount(bootsid, boots_location) > 0 then
moveitems(bootsid, 'feet', boots_location, 100)
wait(800)
elseif feet_item.id > 0 then
moveitems(soft.worn, boots_location, 'feet', 100)
wait(800)
end
n_equip = nil
end
elseif feet_item.id == bootsid then
if cur < n_equip and itemcount(soft.id, boots_location) > 0 then
moveitems(soft.id, 'feet', boots_location, 100)
wait(800)
n_equip = nil
end
end
if SETTINGS.AlertIfNoSoft or SETTINGS.AlertOnSoftCount > 0 then
local soft_count = itemcount(soft.id, '', true)
local inuse_count = itemcount(soft.use, '', true)
local worn_count = itemcount(soft.worn, '', true)
if SETTINGS.AlertIfNoSoft and feet_item.id ~= soft.use and soft_count == 0 and inuse_count == 0 then
playsound(SETTINGS.SoundFile)
flashclient()
end
if SETTINGS.AlertOnSoftCount > 0 and (soft_count + inuse_count + worn_count) < SETTINGS.AlertOnSoftCount then
playsound(SETTINGS.SoundFile)
flashclient()
end
end
Posts: 16
Threads: 5
Joined: Feb 2019
Reputation:
0
Works perfectly, good work done here! Thanks!
|