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

Sapping when not incombat?

Code:
 if (StyxWoW.Me.Combat == false && StyxWoW.Me.IsStealthed == true && StyxWoW.Me.CurrentTarget != null && StyxWoW.Me.CurrentTarget.Combat == false && StyxWoW.Me.CurrentTarget.IsHumanoid == true && StyxWoW.Me.CurrentTarget.Distance <= 10)
                {
                    Styx.Logic.Combat.SpellManager.Cast("Sap");
                }

1. StyxWoW.Me.IsStealthed == true (Make sure you are in stealth)

2. StyxWoW.Me.CurrentTarget != null (Make sure you got target)

3. StyxWoW.Me.CurrentTarget.Combat == false (Make sure your target is not in combat)

4. StyxWoW.Me.CurrentTarget.IsHumanoid == true (Make sure your target is Humanoid)

5. StyxWoW.Me.CurrentTarget.Distance <= 10 (Make sure your target is within 10 yard sap distance)

6. Styx.Logic.Combat.SpellManager.Cast("Sap") (Sap your target)

Well i suppose you just start learning so I write a simple and long sample. When you understand more, you can shorten the code. But for starter (like me 1 month ago, that may helpfull)

Enjoy coding :)
 
thanks, but that doesn't seem to work inside Combat(), it stops ticking when out of combat
 
Well, you have to insert it in the precombuff and that will work, because you have to be out of combat to sap don't you :)
 
Back
Top