• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] How to add CP in Essentials (Using EBS)

Byliyth

A Giant Mess
  • 13
    Posts
    6
    Years
    • Seen Jul 4, 2020
    So I'm attempting to add CP to Essentials (as title says) and I'm also using EBS (as title also says). The formula I'll be using is ((HP+Atk+Def+SAtk+SDef+Spd) * Level * 6 / 100). Here's the code I'm trying to use as a base:
    Code:
    # writes the Pokemon's CP
        str = "#{getBattler(@battler).level}"
        x = @playerpoke ? -30 : -26
        pbDrawOutlineText(@sprites["text"].bitmap,x+o,-20,@sprites["text"].bitmap.width,@sprites["text"].bitmap.height,str,Color.new(255,255,255),Color.new(0,0,0),2)
        x -= @sprites["text"].bitmap.text_size(str).width+(@playerpoke ? 3 : 2)
        pbSetSmallFont(@sprites["text"].bitmap)
        str = _INTL("CP")
        pbDrawOutlineText(@sprites["text"].bitmap,x+o+2,-19,@sprites["text"].bitmap.width,@sprites["text"].bitmap.height,str,Color.new(222,197,95),Color.new(0,0,0),2)

    It's found in EliteBattle_3 if you downloaded it using UPI. I want it to display right above Level. If someone could help, I'd really appreciate it!~
     
    Bump!~
     
    Back
    Top