BBot - The best bot of the world
My really advanced macro for rings - Printable Version

+- BBot - The best bot of the world (https://forums.bmega.net)
+-- Forum: Scripts & Macros (https://forums.bmega.net/forum-4.html)
+--- Forum: Free Scripts (https://forums.bmega.net/forum-10.html)
+--- Thread: My really advanced macro for rings (/thread-20184.html)



My really advanced macro for rings - Catar - 09-08-2016

I made this really complex macro i use on my Demons full afk pall hexera script to switch between 3 different rings.

My macro does:
  • Checks if there are avaiable Prismatic Rings, Ring of healings and Life rings.
  • Checks combat state and PZ state.
  • Checks how many demons bot fights
  • Checks how much mana character have.
  • Puts on Prismatic Ring, if avaiable and when there are more than 3 Demons.
  • Uses Ring of Healings,if they're avaiable, and during a combat.
  • Uses Life Rings, if they are avaiable, when there is no RoH, less than 3 Demons.
  • Uses life rings when there is no Ring of Healings avaible and/or when out of combat
  • Stops using Life ring and RoH when mana is higher than 95%
  • Takes off rings when in protection zone.
  • And YES its all in just ONE macro, of 70+ lines!!!



Variables
PrismHotkey is a Virtual key code of ur prismatic ring hotkey
Code:
PrismHotkey=120

prismonID=16264
prismofID=16114
SecondaryRing=3098
SecondaryRingOn=3100
PrimRing=3052
PrimRingOn=3089


[macro]700 {Ringi}
PeZe:=Status.InPZ()
cmbt:=Status.Battle()
Smana:=Self.Mana%()
pringOFF:=Misc.ItemCountEx(!PrimRing!)
pringON:=Misc.ItemCountEx(!PrimRingOn!)
pring:=!pringON!
VarAdd(pring, !pringOFF!)
sndringOFF:=Misc.ItemCountEx(!SecondaryRing!)
sndringON:=Misc.ItemCountEx(!SecondaryRingOn!)
sndring:=!sndringOFF!
VarAdd(sndring, !sndringON!)
prismringOFF:=Misc.ItemCountEx(!prismofID!)
prismringON:=Misc.ItemCountEx(!prismonID!)
prismring:=!prismringOFF!
VarAdd(prismring, !prismringON!)
coAS:=Self.Inventory.Ring()
QtDem:=Creatures.ByRangeName(2, Demon)
!cmbt!<>1 [cmb]
!PeZe!<>1 [pz]
!Smana!<95 [mana1]
!coAS!<>!PrimRingOn!
Self.Equip.Ring(!PrimRing!)
exit()
{mana1}
Self.UnEquip.Ring(0)
exit()
{pz}
Self.UnEquip.Ring(0)
exit()
{cmb}
!prismring!>=1 [prsm]
!QtDem!>=3 [dem]
Self.Inventory.Ring()<>!prismonID!
Tibia.SendKey(!PrismHotkey!)
exit()
{dem}
!PeZe!<>1 [pz2]
!Smana!<95 [mana2]
!sndring!>=1 [secr]
!coAS!<>!SecondaryRingOn!
Self.Equip.Ring(!SecondaryRing!)
exit()
{secr}
!pring!>=1 [pring]
!coAS!<>!PrimRingOn!
Self.Equip.Ring(!PrimRing!)
exit()
{pring}
Self.UnEquip.Ring(0)
exit()
{mana2}
Self.UnEquip.Ring(0)
exit()
{pz2}
Self.UnEquip.Ring(0)
exit()
{prism}
!PeZe!<>1 [pz2]
!Smana!<95 [mana2]
!sndring!>=1 [secr]
!coAS!<>!SecondaryRingOn!
Self.Equip.Ring(!SecondaryRing!)
exit()
{secr}
!coAS!<>!PrimRingOn!
Self.Equip.Ring(!PrimRing!)
exit()
{mana2}
Self.UnEquip.Ring(0)
exit()
{pz2}
Self.UnEquip.Ring(0)
exit()
[/macro]

I use F9 hotkey as Equip for prismatic ring, because it works with 100% succes, and Self.Equip may sometimes lag,
And having prismatic ring put instant when its needed i s crucial for my macro to keep my pally alive Wink

[Image: 5hiV3Gr.png]


RE: My really advanced macro for rings - nosbor00 - 09-08-2016

wtf!! great work man!


RE: My really advanced macro for rings - Catar - 09-09-2016

(09-08-2016, 11:20 PM)nosbor00 Wrote: wtf!!

What's so surprising? ;D


That's not even most complex macro I made so far.

BBot macro possibilities are huge, just ppl dont understand it Smile


RE: My really advanced macro for rings - FelixZN - 01-05-2017

Such as? thought it was impossible to create macro in this bot, simple ones such as equiping ring barely works


RE: My really advanced macro for rings - Catar - 01-05-2017

(01-05-2017, 12:04 AM)FelixZN Wrote: Such as? thought it was impossible to create macro in this bot, simple ones such as equiping ring barely works

because people simply don't understand how to make them Tongue

just look at any of my videos i posted on this forum.

Without my macros, i wouldn't be able to do what i do now.
Each script i use has like 20 of them