• 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.

Pokegear Script (XP)

Status
Not open for further replies.
2,273
Posts
18
Years
  • Ok well seeing as though the starter kit comes with the pokegear i have written a very simple script that only needs to be quickly coppied and pasted Here is a screeny
    Pokegear Script (XP)


    Now we are gonna need to have to draw out the new scene so make a new scene and call it pokegear1 and put it under Scene_skill.
    Paste this in your new Pokegear1 scene
    Code:
    #==============================================================================
    # - Scene_Pokegear1
    #------------------------------------------------------------------------------
    # Version 0.1 Written by Link2005 if you find an error you tell me, this is most of blizzys work fused into my pokegear script so       # quite alot of credit goes to blizzy
    #==============================================================================
    class Scene_Pokegear1
      #--------------------------------------------------------------------------
      # initialize
      #--------------------------------------------------------------------------
      def initialize(menu_index = 0)
        @menu_index = menu_index
      end
      #--------------------------------------------------------------------------
      # main
      #--------------------------------------------------------------------------
      def main
        # Main Menu settings you can add or change these
        # コマンドウィンドウを作成
        s1 = "Map"
        s2 = "Radio"
        s3=  "Phone"
        s4=  "Exit"
     
     
        commands = [s1,s2,s3,s4]
     
     
        @command_window = Window_Command.new(160, commands)
        @command_window.index = @menu_index
        @command_window.x = ($width - @command_window.width) - 8
        @command_window.y = 8
        @card = Sprite.new
        @card.bitmap = RPG::Cache.picture("pokegear")
        @card.zoom_x = 2
        @card.zoom_y = 2
        @trainer = Sprite.new
        @trainer.x = 10
        @trainer.y = 150
        @trainer.zoom_x = 1
        @trainer.zoom_y = 1
        @trainer.z = 9999
        #Your going to need two trainer sprites imported into the game save the boy sprite as male and the female as female
        #Below is the display of the trainer sprite if Boy or girl Gender was chosen at the start of the game
        if $pkmn.gender == true
          @trainer.bitmap = RPG::Cache.picture("male")
        end
        if $pkmn.gender == false
          @trainer.bitmap = RPG::Cache.picture("female")
        end
     
        @info = Window_Help2.new
        @info.height = $height / 4 + 16
        @info.width = $width / 2 + 74
        @info.x = 8
        @info.y = $height - @info.height - 8
        @info.z = 9999
        @info2 = Window_Help2.new
        @info2.height = $height / 4 + 16
        @info2.width = $width / 2 + 74
        @info2.x = 8
        @info2.y = $height - @info.height - 8 + 32
        @info2.z = 99999
        @info2.opacity = 0
        @info2.windowskin = @info.windowskin = RPG::Cache.windowskin("infosys")
     
        @target_window = Window_Target.new
        @target_window.visible = false
        @target_window.active = false
        #Below is the badge display replace each badge 1, badge2 ect with your badge icon name
        #if you do not want badges on the pokegear screen delete from
        @badge1 = Sprite.new #Here
        @badge2 = Sprite.new
        @badge3 = Sprite.new
        @badge4 = Sprite.new
        @badge5 = Sprite.new
        @badge6 = Sprite.new
        @badge7 = Sprite.new
        @badge8 = Sprite.new
        if $pkmn.badges[1] == true
          @badge1.bitmap = RPG::Cache.icon("badge1")
          @badge1.x = 64
          @badge1.y = 170
          @badge1.z = 9999
        end
        if $pkmn.badges[2] == true
          @badge2.bitmap = RPG::Cache.icon("badge2")
          @badge2.x = 64 + (48 * 1)
          @badge2.y = 170
          @badge2.z = 9999
        end
        if $pkmn.badges[3] == true
          @badge3.bitmap = RPG::Cache.icon("badge3")
          @badge3.x = 64 + (48 * 2)
          @badge3.y = 170
          @badge3.z = 9999
        end
        if $pkmn.badges[4] == true
          @badge4.bitmap = RPG::Cache.icon("badge4")
          @badge4.x = 64 + (48 * 3)
          @badge4.y = 170
          @badge4.z = 9999
        end
        if $pkmn.badges[5] == true
          @badge5.bitmap = RPG::Cache.icon("badge5")
          @badge5.x = 64 + (48 * 4)
          @badge5.y = 170
          @badge5.z = 9999
        end
        if $pkmn.badges[6] == true
          @badge6.bitmap = RPG::Cache.icon("badge6")
          @badge6.x = 64 + (48 * 5)
          @badge6.y = 170
          @badge6.z = 9999
        end
        if $pkmn.badges[7] == true
          @badge7.bitmap = RPG::Cache.icon("badge7")
          @badge7.x = 64 + (48 * 6)
          @badge7.y = 170
          @badge7.z = 9999
        end
        if $pkmn.badges[8] == true
          @badge8.bitmap = RPG::Cache.icon("badge8")
          @badge8.x = 64 + (48 * 7)
          @badge8.y = 170
          @badge8.z = 9999
        end #to here and also delete all the badge dispose lines after graphics freeze just below
     
        Graphics.transition
        loop do
          Graphics.update
          Input.update
          update
          if $scene != self
            break
          end
        end
        Graphics.freeze
        @command_window.dispose
        @trainer.dispose
        @badge1.dispose
        @badge2.dispose
        @badge3.dispose
        @badge4.dispose
        @badge5.dispose
        @badge6.dispose
        @badge7.dispose
        @badge8.dispose
        @card.bitmap.dispose
        @info.dispose
        @info2.dispose
      end
      #--------------------------------------------------------------------------
      # update the scene
      #--------------------------------------------------------------------------
      def update
        @command_window.update
        @info.update
        @info2.update
     
        #update command window and the info if it's active
        if @command_window.active
          update_command
          update_info
          return
        end
     
      end
      #--------------------------------------------------------------------------
      # update the command window
      #--------------------------------------------------------------------------
      def update_command
        if Input.trigger?(Input::B)
          $game_system.se_play($data_system.cancel_se)
          $scene = Scene_Map.new
          return
        end
     
        #Below is you scene options if you don't know what to do here just change your map phone and radio scenes
        #To a map radio and Phone scene. You can get a radio script at RMXP.net in the forums
        if Input.trigger?(Input::C)
          case @command_window.commands[@command_window.index]
          when "Map"
            print "not availlable in beta 0.2"
            $game_system.se_play($data_system.decision_se)
          when "Radio"
            $game_system.se_play($data_system.decision_se)
            $scene = Scene_Radio3.new
          when "Phone"
            $game_system.se_play($data_system.decision_se)
            $scene = Scene_Map.new
            when "Exit"
            $game_system.se_play($data_system.decision_se)
            $scene = Scene_Map.new
          end
          return
        end
      end
      def update_info
        case @command_window.commands[@command_window.index]
        #Below is what is going to be in the help box when you highlight a certain option you can edit what is in
        # between the "" below to change what is displayed
        when "Map"
          @info.set_text("The Duirin Reigon map")
          @info2.set_text("Shows Visited Places")
        when "Radio"
          @info.set_text("The Radio")
          @info2.set_text("Needs Batterys To Work")
          when "Phone"
          @info.set_text("A Phone")
          @info2.set_text("It Can Be Topped Up And Used")
          when "Exit"
          @info.set_text("Close this Menu window")
          @info2.set_text("and return to the game.")
        end
      end
    end


    (This is just a pokegear main Menu it is not a phone radio or map system)

    I am not allowed to link to other forums but in the script at the top there is some info on where you can find a radio script!
     
    Last edited:

    Dragon.Beat

    Member
    52
    Posts
    18
    Years
    • Seen Dec 24, 2005
    I could tell that's the screen from your game. Nice tut. Rather useful. XD
     

    Blizzy

    me = Scripter.new("Noob")
    492
    Posts
    19
    Years
  • it's good, but you forgot to credit me.
    i wrote some of those parts (trainersprite, badges, help_window)
    this is just an easy edit of the scene_menu, but still nice ;)

    what would be easier is calling methods to draw badges and such
    like:
    Code:
      def create_badges
        @badge1 = Sprite.new
        @badge2 = Sprite.new
        @badge3 = Sprite.new
        @badge4 = Sprite.new
        @badge5 = Sprite.new
        @badge6 = Sprite.new
        @badge7 = Sprite.new
        @badge8 = Sprite.new
      end
    and a method to set the positions [set_badgepos]
    Code:
      def set_badgepos
        if $pkmn.badges[1] == true
          @badge1.bitmap = RPG::Cache.icon("badge1")
          @badge1.x = 64
          @badge1.y = 170
          @badge1.z = 9999
        end
        if $pkmn.badges[2] == true
          @badge2.bitmap = RPG::Cache.icon("badge2")
          @badge2.x = 64 + (48 * 1)
          @badge2.y = 170
          @badge2.z = 9999
        end
        if $pkmn.badges[3] == true
          @badge3.bitmap = RPG::Cache.icon("badge3")
          @badge3.x = 64 + (48 * 2)
          @badge3.y = 170
          @badge3.z = 9999
        end
        if $pkmn.badges[4] == true
          @badge4.bitmap = RPG::Cache.icon("badge4")
          @badge4.x = 64 + (48 * 3)
          @badge4.y = 170
          @badge4.z = 9999
        end
        if $pkmn.badges[5] == true
          @badge5.bitmap = RPG::Cache.icon("badge5")
          @badge5.x = 64 + (48 * 4)
          @badge5.y = 170
          @badge5.z = 9999
        end
        if $pkmn.badges[6] == true
          @badge6.bitmap = RPG::Cache.icon("badge6")
          @badge6.x = 64 + (48 * 5)
          @badge6.y = 170
          @badge6.z = 9999
        end
        if $pkmn.badges[7] == true
          @badge7.bitmap = RPG::Cache.icon("badge7")
          @badge7.x = 64 + (48 * 6)
          @badge7.y = 170
          @badge7.z = 9999
        end
        if $pkmn.badges[8] == true
          @badge8.bitmap = RPG::Cache.icon("badge8")
          @badge8.x = 64 + (48 * 7)
          @badge8.y = 170
          @badge8.z = 9999
        end
      end
    and in main just put
    Code:
    create_badges
    set_badgepos
    so disabling badges is much easier
     
    Last edited:
    215
    Posts
    18
    Years
    • Seen Jan 12, 2024
    I need a picture named "Pokegear".

    Atleast thats what I read in the script.

    @command_window = Window_Command.new(160, commands)
    @command_window.index = @menu_index
    @command_window.x = ($width - @command_window.width) - 8
    @command_window.y = 8
    @card = Sprite.new
    @card.bitmap = RPG::Cache.picture("pokegear")
    @card.zoom_x = 2
    @card.zoom_y = 2
    @trainer = Sprite.new
    @trainer.x = 10
    @trainer.y = 150
    @trainer.zoom_x = 1
    @trainer.zoom_y = 1
    @trainer.z = 9999
     
    2,273
    Posts
    18
    Years
  • Yep your gonna need a picture background thats the size of your game screen so take a printscreen in game play, paste it into paint,cut the exact size of the screen (not the blue frame) write down the width and height then make you background using the width and height save it as pokegear and upload it into RMXP and there you have it its done.
     

    Minorthreat0987

    Pokemon Tellurium
    462
    Posts
    18
    Years
    • Seen Jan 28, 2021
    nice script its just liek the one i made exept mine doenst have the trainer card features....and i have a realy time box......

    OverTheBelow.....
    you could also remove that piece of script and add
    Code:
        @spriteset = Spriteset_Map.new

    that will make it so you see the map behind the gear......instead of a back ground
     
    47
    Posts
    18
    Years
    • Seen Dec 30, 2006
    I tried it but when I test it out it wont show...I placed it below Scene_Skill (I had to make a new script thing). But it still wouldnt work...what do i do?
     
    Status
    Not open for further replies.
    Back
    Top