Jump to content

Recommended Posts

Hello !

First of all I want to thank you for the private server version of the bot !

I've got a dilemma. I'm trying to get Void Tendrils to work with my FightClass. The way i want it to work is to cast the spell and then take a few steps back to get out of the mob's range.  I've searched around a little and found one of your posts that said something like this:

wManager.Wow.Helpers.Keybindings.DownKeybindings(Keybindings.MOVEBACKWARD);
System.Threading.Thread.Sleep(2500);
wManager.Wow.Helpers.Keybindings.UpKeybindings(Keybindings.MOVEBACKWARD);

The thing is , it doesn't work in a fight class(done with the editor). I might need to check out the C# code for it.

I looked at the lua API for movement and it looks easy at first , 'till you get to the delay part , where you have to write a function for it. So i think it is even harder this way.

Second thing is that tendrils don't show up as a buff for the target , they are objects with hp  so i have no idea how to check of them .

I'll keep messing around to see if i can get it to work.

Any input would be appreciated !

Thanks in advance!

 

Link to comment
https://wrobot.eu/forums/topic/2482-shadow-priest-void-tendrils-help/
Share on other sites

Hello,

You can use this lua code (put it in spell name and activate spell option "Not spell, is lua script"):

local name = GetSpellInfo(108920);
RunMacroText("/cast " .. name);
MoveBackwardStart()
C_Timer.After(2, function() MoveBackwardStop() end)

API: http://wow.gamepedia.com/API_C_Timer.After (replace 2 by the number of second), http://wow.gamepedia.com/API_MoveBackwardStarthttp://wow.gamepedia.com/API_MoveBackwardStophttp://wrobot.eu/forums/topic/1688-lua-and-multi-language-support/

Thank you for the answer !

I know about C_Timer.After() function , the only problem with it is that it was introduced in patch 6.0.2 and I'm running 5.4.8. I've tried to build my own wait function , but that only freezes my game.

The only way i found little bit efficient is to do a lua like :

CastSpellByName("Void Tendrils");MoveBackwardStart();

---make a function that does something with a defined number of steps --

MoveBackwardStop();

i noticed it doesn't freeze the game and it goes back a little , not as much as i would want it but it gets out of the range of some mobs.

It might not work for everyone , because it's a system dependent thing ( my computer is very old so it goes trough the code slower that for others).

 

For people running warlords of draenor ... C_Timer.After() is the way to go !

I'm messing around with register events right now ... I'll let you know if i find a better way!

Thanks for the answer again !

All the best!

 

 

I have found this: http://wowwiki.wikia.com/wiki/Wait

Result:

local waitTable = {};
local waitFrame = nil;

function WaitToCall(delay, func, ...)
  if(type(delay)~="number" or type(func)~="function") then
    return false;
  end
  if(waitFrame == nil) then
    waitFrame = CreateFrame("Frame","WaitFrame", UIParent);
    waitFrame:SetScript("onUpdate",function (self,elapse)
      local count = #waitTable;
      local i = 1;
      while(i<=count) do
        local waitRecord = tremove(waitTable,i);
        local d = tremove(waitRecord,1);
        local f = tremove(waitRecord,1);
        local p = tremove(waitRecord,1);
        if(d>elapse) then
          tinsert(waitTable,i,{d-elapse,f,p});
          i = i + 1;
        else
          count = count - 1;
          f(unpack(p));
        end
      end
    end);
  end
  tinsert(waitTable,{delay,func,{...}});
  return true;
end

local name = GetSpellInfo(108920);
RunMacroText("/cast " .. name);
MoveBackwardStart()
WaitToCall(2, function() MoveBackwardStop() end)

This seem to work on MoP.

Thanks a lot for the help ! The script does work , i found out that the one i had worked as well. It still doesn't do what i wanted it to do because of one small detail . :biggrin:

The lua script runs inside the game space while the bot runs in his own space ... so that means the bot doesn't know i'm waiting for a script to execute in game and continues casting spells . Casting the next spell in the rotation stops the character.

I tried adding "Me in Move" condition to every spell in the fight class and it still stops the movement. So i was looking at it the wrong way from the start. The only solution  that i could see working is to build a plugin that moves the character back when the spell is cast. I saw that there is a plugin for movement if fights . I'll see what bits i can use from that and build my own .:smile:

Thank you again for the help . I'll let you know when i have something that works. :wink:

All the best!

 

  • 3 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...