dvdood 1 Posted August 19, 2017 Share Posted August 19, 2017 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. Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/ Share on other sites More sharing options...
Avvi 98 Posted August 19, 2017 Share Posted August 19, 2017 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 Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30883 Share on other sites More sharing options...
dvdood 1 Posted August 19, 2017 Author Share Posted August 19, 2017 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 :/ Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30884 Share on other sites More sharing options...
Mykoplazma 24 Posted August 19, 2017 Share Posted August 19, 2017 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 ;) Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30885 Share on other sites More sharing options...
dvdood 1 Posted August 19, 2017 Author Share Posted August 19, 2017 forerun is there a topic how to use c#rotation ? Not sure where to put this immolate example. Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30888 Share on other sites More sharing options...
Mykoplazma 24 Posted August 19, 2017 Share Posted August 19, 2017 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 ;) Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30891 Share on other sites More sharing options...
Avvi 98 Posted August 19, 2017 Share Posted August 19, 2017 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. Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30894 Share on other sites More sharing options...
dvdood 1 Posted August 19, 2017 Author Share Posted August 19, 2017 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) Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-30896 Share on other sites More sharing options...
ScripterQQ 89 Posted January 5, 2018 Share Posted January 5, 2018 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. Avvi 1 Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-37416 Share on other sites More sharing options...
leogetz 0 Posted January 7, 2018 Share Posted January 7, 2018 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? Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-37474 Share on other sites More sharing options...
eeny 523 Posted January 7, 2018 Share Posted January 7, 2018 (edited) 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, 2018 by eeny ScripterQQ 1 Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-37476 Share on other sites More sharing options...
ScripterQQ 89 Posted January 8, 2018 Share Posted January 8, 2018 Yea I noticed sometimes even the lua code fails, not everytime, but happens. The delay might be the easier solution then. Link to comment https://wrobot.eu/forums/topic/6818-vampiric-touch-cast-twice/#findComment-37483 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