August 19, 20178 yr Even if i set condition same as for shadow ward: pain (buff / buff casted by me false) it sometimes casts twice in a row and thats quite a bit of mana wasted. Can i somehow prevent that.
August 19, 20178 yr I think i was able to work around this in my fight class. take a look at mine here. Feel free to change yours to replicate my settings
August 19, 20178 yr Author I am already using your fight class, modified for my needs :) I tried right now without modifications but same thing happens, vampiric touch sometimes is cast twice in a row for no reason :/
August 19, 20178 yr There is a reason. The reason is the dot is appearing on the target after the cast is done. And the checking is done before the dot is on the target. So for example during the casting the button of the spell will be 'pushed' second time because the dot is not on the target yet. You need to make a delay to try to cast spell only after one second or more ? :) There is a solution an was done very very long ago in lua unlockers time. public bool canImmolate() { int canImmolate = Lua.LuaDoString<int>(@" vImmolate=0 local i=1 while(i<=40)do local a={UnitDebuff(""target"",i)}; -- Get the debuff's info if a[8]==""player"" then if a[1]==""Immolate"" then vImmolate=a[7]-GetTime() end end i=i+1 end if vUAflag==nil then vUAflag=0 end; if ({UnitCastingInfo(""player"")})[1]==""Immolate"" and vUAts==nil then vUAflag=1 vUAts=GetTime() end; if vUAflag==1 and GetTime()-vUAts>2 then vUAflag=0 vUAts=nil end spell = 0 if vUAflag==0 and vImmolate<1 then spell = 1 end", "spell"); if (canImmolate == 1) return true; return false; } Immolate example ( it's working with c# rotation for me ) in sense if (canImmolate()) - cast immolate etc. Of course the problem is with all 'dot's with cast time'. Other bots have something like preventDoubleCast procedure but this is not here ;)
August 19, 20178 yr Author forerun is there a topic how to use c#rotation ? Not sure where to put this immolate example.
August 19, 20178 yr Sorry if I'm creating a mess here. I don't think so that there is any topic about c# rotation. You can use part of that code and make a check inside lua in fight class editor ;)
August 19, 20178 yr 1 hour ago, dvdood said: I am already using your fight class, modified for my needs :) I tried right now without modifications but same thing happens, vampiric touch sometimes is cast twice in a row for no reason :/ Oh, sorry for the issue with it then :( . I think the best way to fix this is to actually do it in c# or use lua. Like @forerun said, the bot starts casting again because it has not detected that the target has the buff yet. Alternatively, there may be a wait to add a wait time of preventing it from being casting successfully more than once every x seconds in the Not spell is C# code part of the Spell Settings. I do not have a code example of this, though. Or even.. .. add a Thread.Sleep(250) right after the spell is casted.
August 19, 20178 yr Author Im not very bright in these things, "inside lua in fight class editor" not sure how to check inside lua, i load fight class and then what :D or where to add Thread.Sleep(250)
January 5, 20188 yr Sorry for bumping, but I was looking for the solution of this problem so I reply here instead of opening another topic. The problem with double cast happens to me too, not everytime but let's say 50% of times. I don't know if this can be avoided with changing the fps of the fight class, or other settings. So as other users said (and on other similar topics too), you can implement some C# code to prevent the double cast. But if you don't know about C# code (like me), you can use this simple lua script 1) Spell Name: SpellStopCasting() 2) Conditions: LUA script: Lua Script stop = "no" if UnitCastingInfo("player") == "Vampiric Touch" then stop = "yes" end Return Value Research: yes Return Value Var: stop Target Buff Casted By Me: Vampiric Touch (true) 3) Set on top right corner: Not Spell, is Lua script: true Put the spell with an higher priority than Vampiric Touch and you're done. Tested and working. Greetings.
January 7, 20188 yr On 2018-01-05 at 9:50 PM, scripterx said: Sorry for bumping, but I was looking for the solution of this problem so I reply here instead of opening another topic. The problem with double cast happens to me too, not everytime but let's say 50% of times. I don't know if this can be avoided with changing the fps of the fight class, or other settings. So as other users said (and on other similar topics too), you can implement some C# code to prevent the double cast. But if you don't know about C# code (like me), you can use this simple lua script 1) Spell Name: SpellStopCasting() 2) Conditions: LUA script: Lua Script stop = "no" if UnitCastingInfo("player") == "Vampiric Touch" then stop = "yes" end Return Value Research: yes Return Value Var: stop Target Buff Casted By Me: Vampiric Touch (true) 3) Set on top right corner: Not Spell, is Lua script: true Put the spell with an higher priority than Vampiric Touch and you're done. Tested and working. Greetings. Hello, I am sorry to say that I did not make this to work. My bot still applies Vampiric Touch twice. I am however playing on 2.4.3 if that does any difference?
January 7, 20188 yr 11 hours ago, leogetz said: Hello, I am sorry to say that I did not make this to work. My bot still applies Vampiric Touch twice. I am however playing on 2.4.3 if that does any difference? If your using the FC editor, just put a 3 second CD on the spell. Sometimes wrobot takes .5 second to refresh debuffs on the target (clients/ server delay).. so if Vampiric Touch has the ability to be chain cast it may be casting it again because it hasnt refreshed the target buffs yet. I still use iftargethsbuff- however i put a 2-3 sec CD on the DoT spell to avoid the double cast. Edited January 8, 20188 yr by eeny
January 8, 20188 yr Yea I noticed sometimes even the lua code fails, not everytime, but happens. The delay might be the easier solution then.
Create an account or sign in to comment