• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Spellsurge isn't working as designed/intended

    Discussion in 'Wildbuddy Developers' started by walter, Dec 22, 2014.

    1. walter

      walter Active Member

      Joined:
      Jun 25, 2012
      Messages:
      1,112
      Likes Received:
      10
      Trophy Points:
      38
      Seems the value for spellsurge is set to zero. I cannot get it to work correctly in any routine. Its either on or off I can't manage it like a real player would. Turning off for quick draw and then activating for important abilities.
       
    2. walter

      walter Active Member

      Joined:
      Jun 25, 2012
      Messages:
      1,112
      Likes Received:
      10
      Trophy Points:
      38
      if ((Me.InnateResource == 0) && await CastAny("Ignite"))
      return true;


      It doesn't work. Seems to never fail etc
       
    3. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      I'm not sure exactly what you're trying to do?

      Spell Surge is a "buff" on the player (toggled on and off by casting Spell Surge itself)

      Code:
                  // Turn on or maintain Spell Surge            if (!Me.HasBuff("Spell Surge") && await Cast("Spell Surge"))
                      return true; 
       
    4. walter

      walter Active Member

      Joined:
      Jun 25, 2012
      Messages:
      1,112
      Likes Received:
      10
      Trophy Points:
      38
      So I just have to look for the buff. Me.InnateResource doesn't work for spellsurge? Does it have values in wildbuddy that it follows. Since I want during quick draw not to use spellsurge always but when I have extra. So I can make it play as a perfect human would.


      If I can get values on it would be AWESOME!
       
      Last edited: Dec 23, 2014
    5. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      Well, Spell Surge itself is just a self-buff. You turn it on, or off. So you need to check for it as a buff.

      Code:
      if (!Me.HasBuff("Spell Surge") && await Cast("Spell Surge"))
      I think you're asking about Spell Power? If so, I'm pushing a build in a few moments to add a new wrapper property (SpellPower). In the meantime, you can test with using player.Resources[4].
       
    6. walter

      walter Active Member

      Joined:
      Jun 25, 2012
      Messages:
      1,112
      Likes Received:
      10
      Trophy Points:
      38

      Yea if you add that would be awesome. Thank you very much.
       
    7. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      unit.SpellPower was added in the last build of the bot. That should provide you the info you need! :)
       

    Share This Page