Bastilla 2 Posted May 27, 2018 Share Posted May 27, 2018 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? Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/ Share on other sites More sharing options...
Droidz 2738 Posted May 28, 2018 Share Posted May 28, 2018 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/ Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44050 Share on other sites More sharing options...
Bastilla 2 Posted May 28, 2018 Author Share Posted May 28, 2018 Thanks Druidz for your quick respons. Very nice Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44054 Share on other sites More sharing options...
Bastilla 2 Posted May 31, 2018 Author Share Posted May 31, 2018 @Droidz while (ObjectManager.Me.CastingSpell.Name == "Healing Touch ") do nothing but while (ObjectManager.Me.CastingSpellId == 8903) works. Why? Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44143 Share on other sites More sharing options...
Requ 2 Posted June 1, 2018 Share Posted June 1, 2018 You have put an extra space after "Touch". Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44151 Share on other sites More sharing options...
Bastilla 2 Posted June 1, 2018 Author Share Posted June 1, 2018 OMG thanks ? Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44152 Share on other sites More sharing options...
Bastilla 2 Posted June 1, 2018 Author Share Posted June 1, 2018 In my skript there are no space. while (ObjectManager.Me.CastingSpell.Name == "Healing Touch") and this doesn't work Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44153 Share on other sites More sharing options...
Requ 2 Posted June 2, 2018 Share Posted June 2, 2018 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 } Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44183 Share on other sites More sharing options...
Bastilla 2 Posted June 2, 2018 Author Share Posted June 2, 2018 Thanks Link to comment https://wrobot.eu/forums/topic/9477-interrupt-own-spell-fightclass-c/#findComment-44186 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now