BBot - The best bot of the world
Macro for changing a wapon - Printable Version

+- BBot - The best bot of the world (https://forums.bmega.net)
+-- Forum: Support (https://forums.bmega.net/forum-6.html)
+--- Forum: Support & Help (https://forums.bmega.net/forum-8.html)
+--- Thread: Macro for changing a wapon (/thread-13998.html)



Macro for changing a wapon - Wojtek456 - 02-16-2014

Hello
Could anyone write macro when more then 2 creatures atack us character change wapon (knife) for better one (fire sword).
Thanks !


RE: Macro for changing a wapon - Nobody93 - 02-17-2014

Code:
weapon1:=SWORD_ID
weapon2:=KNIFE_ID
Creatures.ByRange(3)>2 [else]
Self.Inventory.LeftHand()<>!weapon1!
Self.Equip.LeftHand(!weapon1!)
{else}
Creatures.ByRange(3)<=2
Self.Inventory.LeftHand()<>!weapon2!
Self.Equip.LeftHand(!weapon2!)

Please remember to change SWORD_ID and KNIFE_ID.

Good Luck!