kergudu 2 Posted October 31, 2017 Share Posted October 31, 2017 Some classes has spells to avoid falling damage. For example, priest has "Levitate". Problem is to detect when this spell required 1) declare global LUA variable in additional C# code string fallTime=Lua.LuaDoString("fallTime=nil","fallTime"); 2) add spell "Levitate", with options: Can move during cast = Yes; Cast if mounted = true; Cast spell on = player; Combat only = false 3) add conditions for this spell: - Buff (Name=Levitate, Need=false) - Lua script, with return var "falling" and return value research "ok" falling="no" if(IsFalling()) then if (fallTime==nil) then fallTime=GetTime() elseif (GetTime()-fallTime>=1) then falling="ok" end else fallTime=nil end Thats all. When priest falls more than 1 second, bot automatically buffs him. Now you can queue Arathi Basin and go def LM But not all Spoiler Other classes has chance too. Go to Gatzetdan and buy a lot of Noggenfogger Elixir. And now is time to hack it 1) first step is the same 2) Instead "Levitate" add LUA code, with the same options and timer=3000 UseItemByName("Noggenfogger Elixir") 3) Use the same conditions, and 1 more. This is LUA script with return var "need" and return value research "y": need="y" for i=1,40 do local n,_,_,_,_,_,x,_,_,_,id=UnitBuff("player",i) if n and id==16593 and x>1 then need="n" fallTime=nil break end end Now you have 33% chance to survive. Or acquare strange look. Or both Link to comment Share on other sites More sharing options...
camelot10 155 Posted November 1, 2017 Share Posted November 1, 2017 ObjectManager.Me.IsFalling ObjectManager.Me.IsFallingFar y2krazy 1 Link to comment Share on other sites More sharing options...
kergudu 2 Posted November 1, 2017 Author Share Posted November 1, 2017 52 minutes ago, camelot10 said: ObjectManager.Me.IsFallingFar It would be nice to have C# conditions in fight class editor, but for now there is only LUA. Of course, in C# fight class ObjectManager.Me.IsFallingFar is the best choice Link to comment Share on other sites More sharing options...
Droidz 2737 Posted November 1, 2017 Share Posted November 1, 2017 1 hour ago, ivanra said: It would be nice to have C# conditions in fight class editor, but for now there is only LUA. Of course, in C# fight class ObjectManager.Me.IsFallingFar is the best choice You can use C# with the condition name "C Sharp Code" y2krazy 1 Link to comment Share on other sites More sharing options...
kergudu 2 Posted November 1, 2017 Author Share Posted November 1, 2017 11 hours ago, Droidz said: You can use C# with the condition name "C Sharp Code" Indeed. So, no need for 1), and for 3) C# conditions are ObjectManager.Me.IsFallingFar && !Me.HaveBuff("Levitate") // for levitate or some other levitate spells/trinkets ObjectManager.Me.BuffTimeLeft(new List<uint> {16593}) < 1000 // for Noggenfogger Elixir Link to comment Share on other sites More sharing options...
kergudu 2 Posted November 2, 2017 Author Share Posted November 2, 2017 tested: IsFallingFar triggers too fast. Bot uses spell almost immediately (and dismount). So, solution with ~1 second delay after fall start is better Link to comment 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