May 27, 20187 yr Hello, i want to interrupt my cast "Healing Touch" when my Healtheprcent >? 80. I use spell.Launch() to spell my casts. Can somebody help me?
May 28, 20187 yr Hello, you can use code like var spell = new Spell("Healing Touch"); spell.Launch(true, false); Thread.Sleep(Usefuls.Latency + 300); while (ObjectManager.Me.CastingSpell.Name == "Healing Touch") { if (ObjectManager.Me.HealthPercent > 80) { Lua.LuaDoString("SpellStopCasting() SpellStopCasting()"); break; } Thread.Sleep(50); } https://wrobot.eu/forums/topic/2652-how-to-cancel-the-current-cast/
May 31, 20187 yr Author @Droidz while (ObjectManager.Me.CastingSpell.Name == "Healing Touch ") do nothing but while (ObjectManager.Me.CastingSpellId == 8903) works. Why?
June 1, 20187 yr Author In my skript there are no space. while (ObjectManager.Me.CastingSpell.Name == "Healing Touch") and this doesn't work
June 2, 20187 yr What game locale are you using? The safest way is to use NameInGame instead of Name if you are using EN game locale. Or instead of string name comparsion - use something like this (works for me 100% times): public Spell LightningBolt = new Spell("Lightning Bolt"); if (ObjectManager.Me.CastingSpell.NameInGame == LightningBolt.NameInGame) { // Your action here }
Create an account or sign in to comment