Jump to content

dida1990

Members
  • Posts

    188
  • Joined

  • Last visited

Posts posted by dida1990

  1. I am making this tutorial, because I was searching for this so long, until I just figured out how to use WoW_API with the bot correctly. Maybe you are in the same position as me.

     

    For this we use the WoW_API 

    Quote

    CastSpell(spellID, spellbookType);

    spellID = the position in your spell book (1 is at the top left, counting up for every step you go down in the first column

    spellbookType = "spell" or "pet" (we want to use "pet" here)

     

    For example: We have a Voidwalker and want to use the spell "Torment" to taunt the target we open up our spellbook and look in the "Demonic" spellbook and find Torment on the 4th position.

    Torment CastSpell.PNG

    Now we have everything we need:

    - Create a new spell with the name  CastSpell(4, "pet");

    - Add your conditions

    - select "Not spell, is lua script" = true

     

    Torment CastSpell2.PNG

    (Expl.: The -(Torment) is the descrtiption I added in "Spell Settings)

    And there you go.

     

    Warning: This can slow down your rotation a lot, if you will not use the right conditions

  2. I want to check if an item is in my bag (in this case Soul Chard) and let the variable "ret" be setted to "true".

    This is the code I come up with:

    local itemID = 6265
    ret = false
    for i = 0, NUM_BAG_SLOTS do
     for z = 1, GetContainerNumSlots(i) do
      if GetContainerItemID(i, z) == itemID then ret = true
      break
      end
     end
    end

    In the development tool it returns "true" if i got the item in back and false if I don't (like it should).

    But when I insert it as a LUA-condition into the fight class it always return false and will not use my spell

    How do I have to change my code?

×
×
  • Create New...