• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
5
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!~
     
    Back
    Top