• Visit Rebornbuddy
  • Help with CR

    Discussion in 'Community Developer Forum' started by Zamphire, Oct 4, 2014.

    1. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      Is there anyone on that could answer a question or two about writing a CR for me? Trying to edit Kupo to my tastes and help learn a bit about writing CRs at the same time.

      Now the only part I edited is blow
      Code:
                              //Need to check for insta procs first and foremost
      						Spell.Cast("Thunder II", r => Core.Player.HasAura("Thundercloud") && Core.Player.ClassLevel >= 28),
                              Spell.Cast("Thunder III", r => Core.Player.HasAura("Thundercloud") && Core.Player.ClassLevel >= 46),
                              Spell.Cast("Fire III", r => Core.Player.HasAura("Firestarter")),
      						
      						//Thunder on targets at the start who don't have it
      						Spell.Apply("Thunder II", r => Core.Player.ClassLevel >= 22 && !Core.Target.HasAura("Thunder")),
      						
      						Spell.Cast("Transpose", r => Core.Player.HasAura("Umbral Ice II") && Core.Player.CurrentManaPercent >= 90),
      						Spell.Cast("Transpose", r => Core.Player.HasAura("Umbral Ice") && Core.Player.CurrentManaPercent >= 90),
      						Spell.Cast("Transpose", r => Core.Player.HasAura("Astral Fire II") && Core.Player.CurrentManaPercent <= 20),
      						Spell.Cast("Transpose", r => Core.Player.HasAura("Astral Fire") && Core.Player.CurrentManaPercent <= 20),
      						Spell.Cast("Blizzard", r => Core.Player.HasAura("Umbral Ice II")),
      						Spell.Cast("Blizzard", r => Core.Player.HasAura("Umbral Ice")),
      						Spell.Cast("Fire")
      
      The first mob it pulls it does fine to begin with. Attacks the mob with Thunder, then fire spams till it runs out of mana, but never transposes when it gets to low mana. And then from then on out, it just spams Blizzard, even when it's still at max mana, it never transposes back to fire. Any ideas?
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      Can you post a log please when the issue occurs
       
    3. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      Oh actually, you probably need to set the target of the spell to the player.
       
    4. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      I tried using Spell.Apply instead of cast, since it appeared that that didn't need a target.

      I was working with LostCoder to test his version of Kupo and it did the same thing with his code. No matter what he did it didn't seem to detect the aura and cast transpose.

      I'm posting this from my phone now, but tomorrow I'll post a log of it doing it.
       
    5. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      You need to pass the player as the target.

      Code:
      Spell.Apply("Aetherflow", r => Core.Player.CurrentManaPercent < 65 || (Resting && Core.Player.CurrentManaPercent < settings.RestEnergyDone), r => Core.Player)
      
       
    6. Zamphire

      Zamphire Member

      Joined:
      May 16, 2013
      Messages:
      349
      Likes Received:
      11
      Trophy Points:
      18
      You sir, are a scholar among men. Thank you. passing to the player worked perfectly.
       

    Share This Page