What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Run code if shield is equipped

deusx

Member
Joined
Feb 1, 2010
Messages
206
Reaction score
5
Ok one more question and i will stop spamming developer forum for today :) How do I make a condition to cast a spell if a shield or a 2h weaoin equipped? That is
Code:
Spell.BuffSelf("Defensive Stance", ret => [B][COLOR=#ff0000]if char has shield in his offhand slot[/COLOR][/B]),
Spell.BuffSelf("Battle Stance", ret => [B][COLOR=#ff0000]if char has 2h weapon equipped[/COLOR][/B]),
 
Have a look at the AutoAngler2 code. It looks at which weapon you have currently equipped, so it knows what to switch back to for when it goes into combat.
AutoAngler2 is a bot-base, but you'll find what you need in there. I haven't look at equipped inventory checks yet.
 
your going to have to make a method to look at the slot,and see whats equipped, there's no easy way of doing it.
 
Actually i solved it with
Code:
 Spell.BuffSelf("Defensive Stance", ret => StyxWoW.Me.Inventory.Equipped.MainHand.ItemInfo.WeaponClass != WoWItemWeaponClass.TwoHandWeapon),
 
Actually i solved it with
Code:
 Spell.BuffSelf("Defensive Stance", ret => StyxWoW.Me.Inventory.Equipped.MainHand.ItemInfo.WeaponClass != WoWItemWeaponClass.TwoHandWeapon),

yep that's basicly what i was thinking of, but i would of made a nice little wrapper for it so you wouldnt have to copy and paste that all over the place.
 
I'd check OffHand and type "Shield". What if the person is dual-wielding 1h swords?
 
Back
Top