Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old August 19th, 2017 (1:30 PM). Edited August 21st, 2017 by BlackOutG5.
BlackOutG5's Avatar
BlackOutG5 BlackOutG5 is offline
     
    Join Date: Jul 2015
    Gender: Male
    Nature: Bold
    Posts: 77
    In its own script above main

    Code:
    #Zygarde Cube and Core mechanic by BlackStarG5
    #Free to use with credit!!
    
    ZYGARDECELLS = 107          #Variable reserved for this
    COREEXTREMESPEED = 276      #Switch reserved for this 
    CORETHOUSANDARROWS =  277   #Switch reserved for this
    COREDRAGONDANCE = 278       #Switch reserved for this
    CORETHOUSANDWAVES = 279     #Switch reserved for this
    CORECOREENFORCER = 280      #Switch reserved for this
    
    def pbZygardeConstruct
      loop do
        choices = ["Assembly","Separation","What is assembly?","What is separation?","Quit"]
        cmd = Kernel.pbMessage(_INTL("What would you like to do?"), choices, choices.length - 1)
        if choices[cmd]=="Assembly"
          choices = ["Using Zygarde and the Zygarde Cube","Using the Zygarde Cube only","What assembly methods are available?","Quit"]
          cmd = Kernel.pbMessage(_INTL("Please select how you'd like to assemble Zygarde."), choices, choices.length - 1)
          if choices[cmd]=="Using Zygarde and the Zygarde Cube"
            Kernel.pbMessage(_INTL("Please select Zygarde."))
            pbChooseAblePokemon(1,3)
            poke=$Trainer.party[$game_variables[1]]
            if poke.species==PBSpecies::ZYGARDE
              if $game_variables[ZYGARDECELLS]>9 && poke.form==1
                if $game_variables[ZYGARDECELLS]>=50 && poke.form==1
                  Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                  choices = ["Yes","No"]
                  cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                  if choices[cmd]=="Yes"
                    poke=pbGetPokemon(1)
                    poke.form=0
                    $game_variables[ZYGARDECELLS]-=40
                    Kernel.pbMessage(_INTL("Cells have appeared! Zygarde transformed to Zygarde 50% Forme!"))
                    Kernel.pbMessage(_INTL("The remaining Cells disappeared."))
                    Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                    break
                  elsif choices[cmd]=="No"
                    Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                    return false
                  end
                else
                  Kernel.pbMessage(_INTL("You do not have enough Cells!")) 
                end
              elsif poke.form==0 && $game_variables[ZYGARDECELLS]>=50
                Kernel.pbMessage(_INTL("From your chosen Zygarde and the 50% now in the Zygarde Cube, the unified Zygarde with the Power Construct Ability will be assembled!"))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  poke.setAbility(2)
                  $game_variables[ZYGARDECELLS]-=50
                  Kernel.pbMessage(_INTL("Zygarde has been reassembled!"))
                  Kernel.pbMessage(_INTL("It's the unified Zygarde with the the Power Construct Ability!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                  break
                elsif choices[cmd]=="No"
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  break
                  return false
                end
              else
                Kernel.pbMessage(_INTL("You do not have enough Cells!"))
              end
            else
              Kernel.pbMessage(_INTL("You cannot assemble Pokemon other than Zygarde!"))
              Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
              return false
            end
          elsif choices[cmd]=="Using the Zygarde Cube only"
            if $game_variables[ZYGARDECELLS]>10
              if $game_variables[ZYGARDECELLS]<49
                Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                Kernel.pbMessage(_INTL("The 10% stored in the Zygarde Cube will be used to assemble Zygarde 10% Forme!"))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  p=PokeBattle_Pokemon.new(:ZYGARDE,30,$Trainer)
                  p.form=1
                  p.makeNotShiny
                  p.pbLearnMove(:SAFEGUARD)
                  p.pbLearnMove(:BIND)
                  p.pbLearnMove(:DIG)
                  p.pbLearnMove(:LANDSWRATH)
                  p.setAbility(0)
                  p.calcStats
                  Kernel.pbAddPokemon(p)
                  $game_variables[ZYGARDECELLS]-=10
                  break
                  Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                  Kernel.pbMessage(_INTL("It's Zygarde 10% Forme!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                elsif choices[cmd]=="No"
                  break
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  return false
                end
              end
            else
              Kernel.pbMessage(_INTL("You do not have enough Cells!"))
            end
            if $game_variables[ZYGARDECELLS]>49
              if $game_variables[ZYGARDECELLS]<100
                Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  p=PokeBattle_Pokemon.new(:ZYGARDE,50,$Trainer)
                  p.form=0
                  p.makeNotShiny
                  p.pbLearnMove(:SAFEGUARD)
                  p.pbLearnMove(:BIND)
                  p.pbLearnMove(:SANDSTORM)
                  p.pbLearnMove(:HAZE)
                  p.setAbility(0)
                  p.calcStats
                  Kernel.pbAddPokemon(p)
                  $game_variables[ZYGARDECELLS]-=50
                  break
                  Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                  Kernel.pbMessage(_INTL("It's Zygarde 50% Forme!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                elsif choices[cmd]=="No"
                  break
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  return false
                end
              end
            end
            if $game_variables[ZYGARDECELLS]>99
              if $game_variables[ZYGARDECELLS]>99
                Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                Kernel.pbMessage(_INTL("The Zygarde will have the Power Construct Ability."))
                choices = ["Yes","No"]
                cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                if choices[cmd]=="Yes"
                  p=PokeBattle_Pokemon.new(:ZYGARDE,50,$Trainer)
                  p.form=0
                  p.makeNotShiny
                  p.pbLearnMove(:SAFEGUARD)
                  p.pbLearnMove(:BIND)
                  p.pbLearnMove(:SANDSTORM)
                  p.pbLearnMove(:HAZE)
                  p.setAbility(2)
                  p.calcStats
                  Kernel.pbAddPokemon(p)
                  $game_variables[ZYGARDECELLS]-=50
                  break
                  Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                  Kernel.pbMessage(_INTL("It's Zygarde 50% Forme!"))
                  Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                elsif choices[cmd]=="No"
                  break
                  Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                  return false
                end
              end
            end
          elsif choices[cmd]=="What assembly methods are available?"
            Kernel.pbMessage(_INTL("There are two ways to achieve Zygarde assembly."))
            Kernel.pbMessage(_INTL("One is to take a Zygarde in your party and add to it the Cells stored in the Zygarde Cube!"))
            Kernel.pbMessage(_INTL("The other way is to assemble the Cells stored in the Zygarde Cube to form a whole new Zygarde!"))
          elsif choices[cmd]=="Quit"
            return false
          end
        elsif choices[cmd]=="Separation"
          Kernel.pbMessage(_INTL("Please select the Zygarde you'd like to speparate into cells"))
          pbChooseAblePokemon(1,3)
          poke=$Trainer.party[$game_variables[1]]
          party=$Trainer.party[$game_variables[1]]
          if poke.species==PBSpecies::ZYGARDE
            if $Trainer.party.length>1
              Kernel.pbMessage(_INTL("Once separated, the separated Zygarde cannot be put back together."))
              Kernel.pbMessage(_INTL("You'll lose all it's moves, Ribbons-\\neverything about it."))
              choices = ["Yes","No"]
              cmd = Kernel.pbMessage(_INTL("Would you like to separate the Zygarde you've selected?"), choices, choices.length - 1)
              if choices[cmd]=="Yes"
                if poke.form==1 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 10."))
                  $game_variables[ZYGARDECELLS]+=10
                  $Trainer.party.delete_at($game_variables[1])
                elsif poke.form==1 && isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 100."))
                  $game_variables[ZYGARDECELLS]+=100
                  $Trainer.party.delete_at($game_variables[1])
                elsif poke.form==0 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 50."))
                  $game_variables[ZYGARDECELLS]+=50
                  $Trainer.party.delete_at($game_variables[1])
                elsif poke.form==0 && isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                  Kernel.pbMessage(_INTL("Zygarde has separated."))
                  Kernel.pbMessage(_INTL("The percentage the Zygarde Cube has increased by was 100."))
                  $game_variables[ZYGARDECELLS]+=100
                  $Trainer.party.delete_at($game_variables[1])
                end
              elsif choices[cmd]=="No"
                Kernel.pbMessage(_INTL("Quitting the separation operation!"))
                return false
              end
            else
              Kernel.pbMessage(_INTL("That is your only Pokemon. It can't be divided."))
              return false
            end
          else
            Kernel.pbMessage(_INTL("The Pokemon can only be Zygarde."))
            return false
          end
        elsif choices[cmd]=="What is assembly?"
          Kernel.pbMessage(_INTL("It is called assembly when Zygarde is formed from the cells stored in the Zygarde Cube!"))
        elsif choices[cmd]=="What is separation?"
          Kernel.pbMessage(_INTL("It is called separation when Zygarde is broken down into cells which are then stored in the Zygarde Cube!"))
        elsif choices[cmd]=="Quit"
          return false
        end
      end
    end
    
    ItemHandlers::UseFromBag.add(:ZYGARDECUBE,proc{|item|
      pbChooseAblePokemon(1,3)
      poke=$Trainer.party[$game_variables[1]]
      if poke.species==PBSpecies::ZYGARDE
        choices = ["Teach Move", "Change Forms"]
        #choices.push("Change Forms") if isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
        if poke.species==PBSpecies::ZYGARDE
          cmd = Kernel.pbMessage(_INTL("What would you like to do?"), choices, choices.length - 1)
          if choices[cmd]=="Teach Move"
            choices = []
            choices.push("Extreme Speed") if $game_switches[COREEXTREMESPEED] # Switch for Z-Core 1
            choices.push("Thousand Arrows") if $game_switches[CORETHOUSANDARROWS] # Switch for Z-Core 2
            choices.push("Dragon Dance") if $game_switches[COREDRAGONDANCE] # Switch for Z-Core 3
            choices.push("Thousand Waves") if $game_switches[CORETHOUSANDWAVES] # Switch for Z-Core 4
            choices.push("Core Enforcer") if $game_switches[CORECOREENFORCER] # Switch for Z-Core 5
            choices.push("Cancel")
            cmd = Kernel.pbMessage(_INTL("What would you like to teach it?"), choices, choices.length - 1)
            if choices[cmd]=="Extreme Speed"
              move=getConst(PBMoves,:EXTREMESPEED)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Thousand Arrows"
              move=getConst(PBMoves,:THOUSANDARROWS)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Dragon Dance"
              move=getConst(PBMoves,:DRAGONDANCE)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Thousand Waves"
              move=getConst(PBMoves,:THOUSANDWAVES)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Core Enforcer"
              move=getConst(PBMoves,:COREENFORCER)
              pbLearnMove(poke,move)
            elsif choices[cmd]=="Cancel"
              return 1
            end
          elsif choices[cmd]=="Change Forms"
            if !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
              Kernel.pbMessage(_INTL("Only a Zygarde with the Power Construct Ability can change its Forme."))
              return 1
            end
            choices = []
            choices.push("10%")
            choices.push("50%")
            choices.push("Cancel")
            cmd = Kernel.pbMessage(_INTL("What form would you like?"), choices, choices.length - 1)
            if choices[cmd]=="10%"
              if poke.form==0
                newform=poke.form==1
                poke.form=1
                Kernel.pbMessage(_INTL("{1} changed Form!",poke.name))
                #@scene.pbEndScene
              else
                Kernel.pbMessage(_INTL("It's already 10%!"))
                return 1
              end
            elsif choices[cmd]=="50%"
              if poke.form>=1
                newform=poke.form==0
                poke.form=0
                Kernel.pbMessage(_INTL("{1} changed Form!",poke.name))
              else
                Kernel.pbMessage(_INTL("It's already 50%!"))
                return 1
              end
            end
          elsif choices[cmd]=="Cancel"
            return false
          end
        else
          Kernel.pbMessage(_INTL("You can't do anything with it."))
          return 1
        end
      else
        Kernel.pbMessage(_INTL("It won't have any effect."))
        return 1
      end
      next 1 # Continue
    })
    For the cube, create a new item in items.txt indexed (Change it to fit key items in your game)
    Code:
    XXX,ZYGARDECUBE,Zygarde Cube,8,0,"An item to store Zygarde Cores and Cells. You can also use it to teach Zygarde moves.",2,0,6,
    In PItem_Items place
    Code:
    def pbIsZCube?(item)
      return true if isConst?(item,PBItems,:ZYGARDECUBE)
      return false
    end
    anywhere outside of any def

    Search
    Code:
    commands[cmdUse=commands.length]=_INTL("Use") if ItemHandlers.hasOutHandler(item) || (pbIsMachine?(item) && $Trainer.party.length>0)
    for in PScreen_Bag and under it put
    Code:
    commands[cmdCheck=commands.length]=_INTL("Check") if pbIsZCube?(item)
    In the same script search for
    Code:
    if cmdUse>=0 && command==cmdUse # Use item
            ret=pbUseItem(@bag,item,@scene)
            # 0=Item wasn't used; 1=Item used; 2=Close Bag to use in field
            break if ret==2 # End screen
            @scene.pbRefresh
            next
    under it put
    Code:
    elsif cmdCheck>=0 && command==cmdCheck # Check Zygarde Cube
             Kernel.pbMessage(_INTL("\\w[blacktextskin]\\c[8]You have collected {1}/100 Zygarde Cores and Zygarde Cells.",$game_variables[107]))
             Kernel.pbMessage(_INTL("\\w[blacktextskin]\\c[8]You have {1} in the Zygarde Cube now.",$game_variables[107]))
             @scene.pbRefresh
    The variables are reserved for the moves (Can be changed, One of these has to be on for the cube to work, otherwise it'll say you can't do nothing with it)

    Call the Zygarde Core/Stone mechanic using "pbZygardeConstruct"

    If any edits are made or mistakes are found please let me know. This is free to use with credit of course.
    #Note! This also uses a windowskin called "blacktextskin" so you want to make sure you either change those or create a window skin with that name
    Reply With Quote
      #2   Link to this post, but load the entire thread.  
    Old August 20th, 2017 (3:29 PM).
    BlackOutG5's Avatar
    BlackOutG5 BlackOutG5 is offline
       
      Join Date: Jul 2015
      Gender: Male
      Nature: Bold
      Posts: 77
      These are the final edits, if there needs to be any edits please inform me.
      Reply With Quote
        #3   Link to this post, but load the entire thread.  
      Old September 2nd, 2017 (4:12 AM). Edited September 2nd, 2017 by ToolerMaan.
      ToolerMaan ToolerMaan is offline
         
        Join Date: Aug 2016
        Posts: 1
        Sounds good... But not working for me.
        I get a Syntax error in PItem_items

        Edit: I´m dumb. I placed it wrong.
        Reply With Quote
          #4   Link to this post, but load the entire thread.  
        Old September 2nd, 2017 (10:53 PM).
        Jonas930's Avatar
        Jonas930 Jonas930 is offline
        Jonas930
           
          Join Date: Dec 2013
          Location: Los Angeles
          Gender: Male
          Nature: Lax
          Posts: 27
          It looks nice. Thanks for your hard work. I will use it in my game!!
          Reply With Quote
            #5   Link to this post, but load the entire thread.  
          Old September 7th, 2018 (4:02 PM). Edited September 7th, 2018 by WolfPP.
          WolfPP's Avatar
          WolfPP WolfPP is online now
          Discord: Wolf#1235
             
            Join Date: Aug 2018
            Location: Brazil
            Gender: Male
            Nature: Jolly
            Posts: 185
            Oh, sorry to ress, but when i press Toss, Give or Cancel, open that issue. Every item (to use them its ok and Zygarde Cube its all ok too):

            Code:
            ---------------------------
            Pokemon Essentials
            ---------------------------
            [Pokmon Essentials version 17.2]
            
            Exception: NoMethodError
            
            Message: undefined method `>=' for nil:NilClass
            
            PScreen_Bag:490:in `pbStartScreen'
            
            PScreen_Bag:448:in `loop'
            
            PScreen_Bag:562:in `pbStartScreen'
            
            PScreen_PauseMenu:191:in `pbStartPokemonMenu'
            
            PScreen_PauseMenu:188:in `pbFadeOutIn'
            
            PScreen_PauseMenu:188:in `pbStartPokemonMenu'
            
            PScreen_PauseMenu:144:in `loop'
            
            PScreen_PauseMenu:279:in `pbStartPokemonMenu'
            
            Scene_Map:127:in `call_menu'
            
            Scene_Map:213:in `follow_update'
            Reply With Quote
              #6   Link to this post, but load the entire thread.  
            Old September 15th, 2018 (2:10 PM).
            raki07 raki07 is offline
               
              Join Date: Apr 2016
              Posts: 32
              Quote:
              Originally Posted by WolfPP View Post
              Oh, sorry to ress, but when i press Toss, Give or Cancel, open that issue. Every item (to use them its ok and Zygarde Cube its all ok too):

              Code:
              ---------------------------
              Pokemon Essentials
              ---------------------------
              [Pokémon Essentials version 17.2]
              
              Exception: NoMethodError
              
              Message: undefined method `>=' for nil:NilClass
              
              PScreen_Bag:490:in `pbStartScreen'
              
              PScreen_Bag:448:in `loop'
              
              PScreen_Bag:562:in `pbStartScreen'
              
              PScreen_PauseMenu:191:in `pbStartPokemonMenu'
              
              PScreen_PauseMenu:188:in `pbFadeOutIn'
              
              PScreen_PauseMenu:188:in `pbStartPokemonMenu'
              
              PScreen_PauseMenu:144:in `loop'
              
              PScreen_PauseMenu:279:in `pbStartPokemonMenu'
              
              Scene_Map:127:in `call_menu'
              
              Scene_Map:213:in `follow_update'
              I have this error too.
              Reply With Quote
                #7   Link to this post, but load the entire thread.  
              Old October 2nd, 2018 (5:52 AM).
              WolfPP's Avatar
              WolfPP WolfPP is online now
              Discord: Wolf#1235
                 
                Join Date: Aug 2018
                Location: Brazil
                Gender: Male
                Nature: Jolly
                Posts: 185
                Quote:
                Originally Posted by raki07 View Post
                I have this error too.
                in PScreen_Bag, 'def pbStartScreen', add:
                Code:
                cmdCheck    = -1
                and add like this:
                Code:
                      commands[cmdRead = commands.length]        = _INTL("Read") if pbIsMail?(item)
                      if ItemHandlers.hasOutHandler(item) || (pbIsMachine?(item) && $Trainer.party.length>0)
                        if ItemHandlers.hasUseText(item)
                          commands[cmdUse = commands.length]     = ItemHandlers.getUseText(item)
                        else
                          commands[cmdUse = commands.length]     = _INTL("Use")
                        end
                      end
                      commands[cmdCheck = commands.length]       = _INTL("Check")if pbIsZCube?(item)
                      commands[cmdGive = commands.length]        = _INTL("Give") if $Trainer.pokemonParty.length>0 && pbCanHoldItem?(item)
                      commands[cmdToss = commands.length]        = _INTL("Toss") if !pbIsImportantItem?(item) || $DEBUG
                Done!
                Reply With Quote
                  #8   Link to this post, but load the entire thread.  
                Old 3 Days Ago (6:16 AM). Edited 3 Days Ago by mybusiness.
                mybusiness's Avatar
                mybusiness mybusiness is offline
                   
                  Join Date: Dec 2018
                  Location: Spain
                  Gender: Male
                  Nature: Lonely
                  Posts: 15
                  Excellent contribution. I modified the party screen that appears when you have to choose a Zygarde from your team so that any pokemon other than Zygarde has a "Not able" text in front of them:


                  In PSystem_PokemonUtilities put this anywhere outside any def:
                  Code:
                  def pbChooseZygarde(variableNumber,nameVarNumber)
                    pbChoosePokemon(variableNumber,nameVarNumber,proc {|poke|
                       !poke.egg? && isConst?(poke.species,PBSpecies,:ZYGARDE)
                    })
                  end
                  In BlackOutG5's script, replace pbChooseAblePokemon(1,3) with pbChooseZygarde(1,3). There are three instances where you have to do this step.

                  Done!
                  Reply With Quote
                    #9   Link to this post, but load the entire thread.  
                  Old 3 Days Ago (6:48 AM). Edited 3 Days Ago by WolfPP.
                  WolfPP's Avatar
                  WolfPP WolfPP is online now
                  Discord: Wolf#1235
                     
                    Join Date: Aug 2018
                    Location: Brazil
                    Gender: Male
                    Nature: Jolly
                    Posts: 185
                    Quote:
                    Originally Posted by mybusiness View Post
                    Excellent contribution. I modified the party screen that appears when you have to choose a Zygarde from your team so that any pokemon other than Zygarde has a "Not able" text in front of them:


                    In PSystem_PokemonUtilities put this anywhere outside any def:
                    Code:
                    def pbChooseZygarde(variableNumber,nameVarNumber)
                      pbChoosePokemon(variableNumber,nameVarNumber,proc {|poke|
                         !poke.egg? && isConst?(poke.species,PBSpecies,:ZYGARDE)
                      })
                    end
                    In BlackOutG5's script, replace pbChooseAblePokemon(1,3) with pbChooseZygarde(1,3). There are three instances where you have to do this step.

                    Done!
                    Its possible to record what pokeball Zygarde was catch before actions? Idk if BlackOutG5 did it... I mean, if i catchted Zygarde with a Master Ball and after use this script, the Zygarde will appears only in a Pokeball (instead Masteball).


                    Also, if i catchted a SHINY zygarde and use that script, after used, i will have SHINY zygarde too? Cuz we have 'p.makeNotShiny' in the script.

                    Thanks in advance,
                    Reply With Quote
                      #10   Link to this post, but load the entire thread.  
                    Old 3 Days Ago (7:26 AM).
                    Poq's Avatar
                    Poq Poq is online now
                       
                      Join Date: Aug 2017
                      Posts: 80
                      Quote:
                      Originally Posted by WolfPP View Post
                      Its possible to record what pokeball Zygarde was catch before actions? Idk if BlackOutG5 did it... I mean, if i catchted Zygarde with a Master Ball and after use this script, the Zygarde will appears only in a Pokeball (instead Masteball).


                      Also, if i catchted a SHINY zygarde and use that script, after used, i will have SHINY zygarde too? Cuz we have 'p.makeNotShiny' in the script.

                      Thanks in advance,
                      From what I can tell just looking at the script, p.makeNotShiny only occurs in the script when you are assembling the Zygarde just using the cells in the Zygarde cube. If you are using a Zygarde you own along with the cube, it only changes the form and/or ability and doesn't touch shininess. Of course, if you completely disassemble your Zygarde, then you would lose shininess.

                      If you wanted it to be possible to create a shiny Zygarde using only the cells in the Zygarde cube, you could just delete the p.makeNotShiny lines and let people soft reset to their hearts content!

                      As for the pokeball, I don't see anything in the script that would affect that, again, unless you are completely disassembling a Zygarde, which deletes it from your party (along with the ball it's in). But if you are just adding cells to a Zygarde you caught, it's pokeball shouldn't change (at least based on what I see in the script. I haven't tested any of this).

                      For either the pokeball or the shininess, I'm sure you store that information in a variable somewhere. before you delete the pokemon from the party and then access that information later to add an empty ball to the party or to use that specific ball again the next time a Zygarde is created, to check whether or not the cells in the cube are shiny and thus a shiny zygarde should be created. You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables.
                      Reply With Quote
                        #11   Link to this post, but load the entire thread.  
                      Old 3 Days Ago (8:17 AM).
                      WolfPP's Avatar
                      WolfPP WolfPP is online now
                      Discord: Wolf#1235
                         
                        Join Date: Aug 2018
                        Location: Brazil
                        Gender: Male
                        Nature: Jolly
                        Posts: 185
                        Quote:
                        Originally Posted by Poq View Post
                        From what I can tell just looking at the script, p.makeNotShiny only occurs in the script when you are assembling the Zygarde just using the cells in the Zygarde cube. If you are using a Zygarde you own along with the cube, it only changes the form and/or ability and doesn't touch shininess. Of course, if you completely disassemble your Zygarde, then you would lose shininess.

                        If you wanted it to be possible to create a shiny Zygarde using only the cells in the Zygarde cube, you could just delete the p.makeNotShiny lines and let people soft reset to their hearts content!

                        As for the pokeball, I don't see anything in the script that would affect that, again, unless you are completely disassembling a Zygarde, which deletes it from your party (along with the ball it's in). But if you are just adding cells to a Zygarde you caught, it's pokeball shouldn't change (at least based on what I see in the script. I haven't tested any of this).

                        For either the pokeball or the shininess, I'm sure you store that information in a variable somewhere. before you delete the pokemon from the party and then access that information later to add an empty ball to the party or to use that specific ball again the next time a Zygarde is created, to check whether or not the cells in the cube are shiny and thus a shiny zygarde should be created. You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables.
                        Code:
                        You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables
                        Meu Deus @_@ How can i do that? auhauha
                        Reply With Quote
                          #12   Link to this post, but load the entire thread.  
                        Old 3 Days Ago (12:00 PM).
                        Poq's Avatar
                        Poq Poq is online now
                           
                          Join Date: Aug 2017
                          Posts: 80
                          Quote:
                          Originally Posted by WolfPP View Post
                          Code:
                          You would need to add some lines checking the selected pokemon's ball and shininess, then add some code to interact with global variables
                          Meu Deus @_@ How can i do that? auhauha
                          Here's the code that you would need to retrieve these traits from the selected Zygarde,

                          At the top of the script, where the other globals are defined, you'll want to designate a switch and a variable:
                          Code:
                          ZYGARDECELLS = 107          #Variable reserved for this
                          ZYGARDEBALL = 108     #Variable reserved for this
                          COREEXTREMESPEED = 276      #Switch reserved for this 
                          CORETHOUSANDARROWS =  277   #Switch reserved for this
                          COREDRAGONDANCE = 278       #Switch reserved for this
                          CORETHOUSANDWAVES = 279     #Switch reserved for this
                          CORECOREENFORCER = 280      #Switch reserved for this
                          SHINYZYGARDE = 281     #Switch reserved for this
                          The exact numbers can be different depending on what you're using for your game, you just want to make sure they are reserved.

                          Next, in the Separation section of the script, you'll want to retrieve the Zygarde's shininess and ball used.
                          Code:
                              elsif choices[cmd]=="Separation"
                                Kernel.pbMessage(_INTL("Please select the Zygarde you'd like to speparate into cells"))
                                pbChooseAblePokemon(1,3)
                                poke=$Trainer.party[$game_variables[1]]
                                party=$Trainer.party[$game_variables[1]]
                                if poke.species==PBSpecies::ZYGARDE
                                  if $Trainer.party.length>1
                                    Kernel.pbMessage(_INTL("Once separated, the separated Zygarde cannot be put back together."))
                                    Kernel.pbMessage(_INTL("You'll lose all it's moves, Ribbons-\\neverything about it."))
                                    choices = ["Yes","No"]
                                    cmd = Kernel.pbMessage(_INTL("Would you like to separate the Zygarde you've selected?"), choices, choices.length - 1)
                          					if choices[cmd]=="Yes"
                          						$game_switches[SHINYZYGARDE] = true if poke.isShiny?
                          						$game_variables[ZYGARDEBALL] = poke.ballused
                          			      if poke.form==1 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                          And then, back in the sections where the Zygarde assembly sections where the Zygarde is being assembled just from cells, you'll want to add two new traits to that list of qualities that are all defined with p.(method):
                          Code:
                          p.makeShiny if $game_switches[SHINYZYGARDE]
                          p.ballused = $game_variables[ZYGARDEBALL] if $game_variables[ZYGARDEBALL] != nil     #puts the new Zygarde in the same ball a previous Zygarde was separated from
                          $game_switches[SHINYZYGARDE]=false     #turn of the switch since the shiny cells were "used up"
                          $game_variables[ZYGARDEBALL]=0
                          #set the Zygarde ball to a regular pokeball since Zygarde was returned to the empty ball
                          Remembering that you'll have to add this to each of the three possible Zygarde's created from cells: 10%, 50%, and power construct Zygarde.

                          Now, if you also want to be able to separate a Zygarde's cells, retain their shininess and then add that shininess to another captured Zygarde (which would mean you're doing weird things with Zygarde availability in your game, but whatever), you would need to add similar code to the section for assembly "Using Zygarde and the Zygarde Cube". You would have to add it in more than one place for the different % of Zygarde, but you'd be looking for the lines where it is being edited with poke.(method)
                          Code:
                          poke.makeShiny if $game_switches[SHINYZYGARDE]
                          I think that ought to do it!
                          Reply With Quote
                            #13   Link to this post, but load the entire thread.  
                          Old 3 Days Ago (12:44 PM). Edited 3 Days Ago by WolfPP.
                          WolfPP's Avatar
                          WolfPP WolfPP is online now
                          Discord: Wolf#1235
                             
                            Join Date: Aug 2018
                            Location: Brazil
                            Gender: Male
                            Nature: Jolly
                            Posts: 185
                            Quote:
                            Originally Posted by Poq View Post
                            Here's the code that you would need to retrieve these traits from the selected Zygarde,
                            Spoiler:

                            At the top of the script, where the other globals are defined, you'll want to designate a switch and a variable:
                            Code:
                            ZYGARDECELLS = 107          #Variable reserved for this
                            ZYGARDEBALL = 108     #Variable reserved for this
                            COREEXTREMESPEED = 276      #Switch reserved for this 
                            CORETHOUSANDARROWS =  277   #Switch reserved for this
                            COREDRAGONDANCE = 278       #Switch reserved for this
                            CORETHOUSANDWAVES = 279     #Switch reserved for this
                            CORECOREENFORCER = 280      #Switch reserved for this
                            SHINYZYGARDE = 281     #Switch reserved for this
                            The exact numbers can be different depending on what you're using for your game, you just want to make sure they are reserved.

                            Next, in the Separation section of the script, you'll want to retrieve the Zygarde's shininess and ball used.
                            Code:
                                elsif choices[cmd]=="Separation"
                                  Kernel.pbMessage(_INTL("Please select the Zygarde you'd like to speparate into cells"))
                                  pbChooseAblePokemon(1,3)
                                  poke=$Trainer.party[$game_variables[1]]
                                  party=$Trainer.party[$game_variables[1]]
                                  if poke.species==PBSpecies::ZYGARDE
                                    if $Trainer.party.length>1
                                      Kernel.pbMessage(_INTL("Once separated, the separated Zygarde cannot be put back together."))
                                      Kernel.pbMessage(_INTL("You'll lose all it's moves, Ribbons-\\neverything about it."))
                                      choices = ["Yes","No"]
                                      cmd = Kernel.pbMessage(_INTL("Would you like to separate the Zygarde you've selected?"), choices, choices.length - 1)
                            					if choices[cmd]=="Yes"
                            						$game_switches[SHINYZYGARDE] = true if poke.isShiny?
                            						$game_variables[ZYGARDEBALL] = poke.ballused
                            			      if poke.form==1 && !isConst?(poke.ability,PBAbilities,:POWERCONSTRUCT)
                            And then, back in the sections where the Zygarde assembly sections where the Zygarde is being assembled just from cells, you'll want to add two new traits to that list of qualities that are all defined with p.(method):
                            Code:
                            p.makeShiny if $game_switches[SHINYZYGARDE]
                            p.ballused = $game_variables[ZYGARDEBALL] if $game_variables[ZYGARDEBALL] != nil     #puts the new Zygarde in the same ball a previous Zygarde was separated from
                            $game_switches[SHINYZYGARDE]=false     #turn of the switch since the shiny cells were "used up"
                            $game_variables[ZYGARDEBALL]=0
                            #set the Zygarde ball to a regular pokeball since Zygarde was returned to the empty ball
                            Remembering that you'll have to add this to each of the three possible Zygarde's created from cells: 10%, 50%, and power construct Zygarde.

                            Now, if you also want to be able to separate a Zygarde's cells, retain their shininess and then add that shininess to another captured Zygarde (which would mean you're doing weird things with Zygarde availability in your game, but whatever), you would need to add similar code to the section for assembly "Using Zygarde and the Zygarde Cube". You would have to add it in more than one place for the different % of Zygarde, but you'd be looking for the lines where it is being edited with poke.(method)
                            Code:
                            poke.makeShiny if $game_switches[SHINYZYGARDE]
                            I think that ought to do it!
                            Done! Thank you!
                            Spoiler:

                            Code:
                            ZYGARDECELLS = 107          #Variable reserved for this
                            ZYGARDEBALL = 108           #Variable reserved for this
                            COREEXTREMESPEED = 276      #Switch reserved for this 
                            CORETHOUSANDARROWS =  277   #Switch reserved for this
                            COREDRAGONDANCE = 278       #Switch reserved for this
                            CORETHOUSANDWAVES = 279     #Switch reserved for this
                            CORECOREENFORCER = 280      #Switch reserved for this
                            SHINYZYGARDE = 281          #Switch reserved for this
                            
                            
                            
                                    if $game_variables[ZYGARDECELLS]>=10
                                      if $game_variables[ZYGARDECELLS]<=50
                                        Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                                        Kernel.pbMessage(_INTL("The 10% stored in the Zygarde Cube will be used to assemble Zygarde 10% Forme!"))
                                        choices = ["Yes","No"]
                                        cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                                        if choices[cmd]=="Yes"
                                          p=PokeBattle_Pokemon.new(:ZYGARDE,30,$Trainer)
                                          p.form=1
                                          #p.makeNotShiny
                                          p.pbLearnMove(:SAFEGUARD)
                                          p.pbLearnMove(:BIND)
                                          p.pbLearnMove(:DIG)
                                          p.pbLearnMove(:LANDSWRATH)
                                          p.setAbility(0)
                            #
                                          p.makeShiny if $game_switches[SHINYZYGARDE]
                                          p.ballused = $game_variables[ZYGARDEBALL] if $game_variables[ZYGARDEBALL] != nil #puts the new Zygarde in the same ball a previous Zygarde was separated from
                            #
                            
                                          p.calcStats
                                          Kernel.pbAddPokemon(p)
                            #
                                          $game_switches[SHINYZYGARDE]=false #turn of the switch since the shiny cells were "used up"
                                          $game_variables[ZYGARDEBALL]=0
                            #
                                          $game_variables[ZYGARDECELLS]-=10
                                          break
                                          Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                                          Kernel.pbMessage(_INTL("It's Zygarde 10% Forme!"))
                                          Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                                        elsif choices[cmd]=="No"
                                          break
                                          Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                                          return false
                                        end
                                      end
                                    else
                                      Kernel.pbMessage(_INTL("You do not have enough Cells!"))
                                    end
                                    if $game_variables[ZYGARDECELLS]>=50
                                      if $game_variables[ZYGARDECELLS]<100
                                        Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                                        Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                                        choices = ["Yes","No"]
                                        cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                                        if choices[cmd]=="Yes"
                                          p=PokeBattle_Pokemon.new(:ZYGARDE,50,$Trainer)
                                          p.form=0
                                          #p.makeNotShiny
                                          p.pbLearnMove(:SAFEGUARD)
                                          p.pbLearnMove(:BIND)
                                          p.pbLearnMove(:SANDSTORM)
                                          p.pbLearnMove(:HAZE)
                                          p.setAbility(0)
                            #
                                          p.makeShiny if $game_switches[SHINYZYGARDE]
                                          p.ballused = $game_variables[ZYGARDEBALL] if $game_variables[ZYGARDEBALL] != nil #puts the new Zygarde in the same ball a previous Zygarde was separated from
                            #
                            
                                          p.calcStats
                                          Kernel.pbAddPokemon(p)
                            #
                                          $game_switches[SHINYZYGARDE]=false #turn of the switch since the shiny cells were "used up"
                                          $game_variables[ZYGARDEBALL]=0
                            #
                                          $game_variables[ZYGARDECELLS]-=50
                                          break
                                          Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                                          Kernel.pbMessage(_INTL("It's Zygarde 50% Forme!"))
                                          Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                                        elsif choices[cmd]=="No"
                                          break
                                          Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                                          return false
                                        end
                                      end
                                    end
                                    if $game_variables[ZYGARDECELLS]=100
                                      if $game_variables[ZYGARDECELLS]>99
                                        Kernel.pbMessage(_INTL("Zygarde will be assembled with the Cores and Cells within the Zygarde Cube only!"))
                                        Kernel.pbMessage(_INTL("The 50% stored in the Zygarde Cube will be used to assemble Zygarde 50% Forme!"))
                                        Kernel.pbMessage(_INTL("The Zygarde will have the Power Construct Ability."))
                                        choices = ["Yes","No"]
                                        cmd = Kernel.pbMessage(_INTL("Is that OK?"), choices, choices.length - 1)
                                        if choices[cmd]=="Yes"
                                          p=PokeBattle_Pokemon.new(:ZYGARDE,50,$Trainer)
                                          p.form=0
                                          #p.makeNotShiny
                                          p.pbLearnMove(:SAFEGUARD)
                                          p.pbLearnMove(:BIND)
                                          p.pbLearnMove(:SANDSTORM)
                                          p.pbLearnMove(:HAZE)
                                          p.setAbility(2)
                            #
                                          p.makeShiny if $game_switches[SHINYZYGARDE]
                                          p.ballused = $game_variables[ZYGARDEBALL] if $game_variables[ZYGARDEBALL] != nil #puts the new Zygarde in the same ball a previous Zygarde was separated from
                            #
                                          p.calcStats
                                          Kernel.pbAddPokemon(p)
                            #
                                          $game_switches[SHINYZYGARDE]=false #turn of the switch since the shiny cells were "used up"
                                          $game_variables[ZYGARDEBALL]=0
                            #
                                          $game_variables[ZYGARDECELLS]-=50
                                          break
                                          Kernel.pbMessage(_INTL("A new Zygarde has been assembled!"))
                                          Kernel.pbMessage(_INTL("It's Zygarde 50% Forme!"))
                                          Kernel.pbMessage(_INTL("Zygarde has gone into a Poke Ball!"))
                                        elsif choices[cmd]=="No"
                                          break
                                          Kernel.pbMessage(_INTL("Quitting the assembly operation!"))
                                          return false
                                        end
                                      end
                                    end


                            Also, to my game the player have to capture your Zygarde Shiny. I dont want that make shiny usin the machine lol.
                            Reply With Quote
                            Reply

                            Quick Reply

                            Join the conversation!

                            Create an account to post a reply in this thread, participate in other discussions, and more!

                            Create a PokéCommunity Account
                            Ad Content
                            Thread Tools

                            Posting Rules
                            You may not post new threads
                            You may not post replies
                            You may not post attachments
                            You may not edit your posts

                            BB code is On
                            Smilies are On
                            [IMG] code is On
                            HTML code is Off

                            Forum Jump


                            All times are GMT -8. The time now is 4:30 PM.