Could any create a script that switch to a weapon when an amount of small stones left?
Could any create a script that switch to a weapon when an amount of small stones left?
How it works? If small stone less than 10,it change weapon to 10 spear from your blue backpack to right hand.
@Forgee, Thanks dude!auto (100)
if $rhand.count < 10 thenequipitem('spear', 'rhand',' blue backpack', 10)
end
Last edited by Turc; 12-17-2013 at 02:43 PM.
I'm just getting into scripting for this bot, but I think this should do the trick. If you have minAmount or less stones it will look for melee weapon in all open windows and equip it. If you got melee weapon equiped and atleast maxAmount of stones it will eqip them instead. It should work with any 1-handed distance and melee weapons. Just set the ids you want to use. It does not equip the stones you loot, I assume you already have that worked out. If not I believe you have my skype or just post here.
Anyone know what tags I can wrap the code in (except [code] and [php])?
init start
local melee = 0 -- id of melee weapon
local smallStone = 0 -- id of small stone
local minAmount = 5 -- amout to equip melee
local maxAmount = 10 -- amount to equip stones
if smallStone == 0 or melee == 0 then
printerror("You must specify the weapon ids.")
end
init end
auto(500, 1000)
if $rhand.id == smallStone and $rhand.count <= minAmount then
equipitem(melee, 'rhand')
wait(500, 1000)
elseif $rhand.id == melee and itemcount(smallStone) >= maxAmount then
equipitem(smallStone, 'rhand')
wait(500, 1000)
end
P.S Turc, you forgot the 'then'.
Last edited by Forgee; 12-17-2013 at 02:55 PM. Reason: added lua code tags
Thanks @Forgee, gonna try it soon and tell you how it's working!
EDIT: @Mention not working?
Forgee use
[.lua] without (.) dotCode:[.lua][/lua]
Nice to see you here Forgee, the LUA king
Hello people, could you please help me?
I need an action to change the weapon when it ends the enchantment for another that is enchanted in bp.
Ex: I have 3 axes enchanted. when one finishes pulling a new one. Is there an action for this?