View Single Post
  #12    
Old July 30th, 2013 (12:03 AM).
Kaito123 Kaito123 is offline
     
    Join Date: Jul 2012
    Gender: Male
    Posts: 61

    Quote:
    Originally Posted by Maruno View Post
    If you're looking at the %03d part, that only applies to filenames (just like every other script dealing with file names). You can still use pbShowStarterSelection(4,25,1138) and it'll work just fine - filenames here will be 004, 025 and 1138.

    %03d means that, when the number (d means "number" here) is turned into a string (% means "turn into string"), it is padded at the beginning so that it's at least 3 digits long. The character used for padding is 0.

    how must I Chance my script, to call it how you say with pbCallPokemonSelect(4,25,1138)?
    And how I can show the Name, Type-Picture (like in Summary) and the Graphic of the Pokémon?
    Spoiler:
    Code:
    class PokemonPokemonSelectScene

    def update pbUpdateSpriteHash(@sprites) end

    def pbStartScene @sprites={} @select=0 @viewport=Viewport.new(0,0,Graphics.width,Graphics.height) @viewport.z=99999

    @sprites["bg"]=IconSprite.new(0,0,@viewport) @sprites["bg"].setBitmap("Graphics/Pictures/Starter_BG")

    pbFadeInAndShow(@sprites) { update } end

    def pbEndScene pbFadeOutAndHide(@sprites) { update } pbDisposeSpriteHash(@sprites) @viewport.dispose end

    def pbPokemonSelect loop do Graphics.update Input.update self.update

    @sprites["text"]=Window_AdvancedTextPokemon.new("") @sprites["text"].visible=false @sprites["text"][email protected] @sprites["text"].x=130 @sprites["text"].y=695 @sprites["text"].width=512 @sprites["text"].height=96 @sprites["text"].baseColor=Color.new(248,248,248) @sprites["text"].shadowColor=Color.new(0,0,0) @sprites["text"].windowskin=nil

    @sprites["pokemon"]=IconSprite.new(0,400,@viewport) @sprites["pokemon"].setBitmap("Graphics/Pictures/Starter_Pokeball")

    case @select when 0 @sprites["hand"]=IconSprite.new(60,468,@viewport) @sprites["hand"].setBitmap("Graphics/Pictures/Starter_Hand") @sprites["ball"]=IconSprite.new(26,544,@viewport) @sprites["ball"].setBitmap("Graphics/Pictures/Starter_Select") @sprites["text"].visible=true @sprites["text"].text=_INTL("Pflanzen-Pokémon") when 1 @sprites["hand"]=IconSprite.new(230,468,@viewport) @sprites["hand"].setBitmap("Graphics/Pictures/Starter_Hand") @sprites["ball"]=IconSprite.new(194,544,@viewport) @sprites["ball"].setBitmap("Graphics/Pictures/Starter_Select") @sprites["text"].visible=true @sprites["text"].text=_INTL(" Feuer-Pokémon") when 2 @sprites["hand"]=IconSprite.new(398,468,@viewport) @sprites["hand"].setBitmap("Graphics/Pictures/Starter_Hand") @sprites["ball"]=IconSprite.new(364,544,@viewport) @sprites["ball"].setBitmap("Graphics/Pictures/Starter_Select") @sprites["text"].visible=true @sprites["text"].text=_INTL(" Wasser-Pokémon") end

    if Input.trigger?(Input::RIGHT) and @select==1 @sprites["text"].visible=false @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=2 end

    if Input.trigger?(Input::RIGHT) and @select==0 @sprites["text"].visible=false @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=1 end

    if Input.trigger?(Input::LEFT) and @select==1 @sprites["text"].visible=false @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=0 end

    if Input.trigger?(Input::LEFT) and @select==2 @sprites["text"].visible=false @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=1 end

    if Input.trigger?(Input::C) case @select when 0 @sprites["msgwindow"]=Kernel.pbCreateMessageWindow(@viewport) Kernel.pbMessageDisplay(@sprites["msgwindow"], _INTL("Insert the text here0")) when 1 @sprites["msgwindow"]=Kernel.pbCreateMessageWindow(@viewport) Kernel.pbMessageDisplay(@sprites["msgwindow"], _INTL("Insert the text here1")) when 2 @sprites["msgwindow"]=Kernel.pbCreateMessageWindow(@viewport) Kernel.pbMessageDisplay(@sprites["msgwindow"], _INTL("Insert the text here2")) end end

    if pbMouseInArea?(25, 543, 124, 124) @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=0 end if pbMouseInArea?(194, 543, 124, 124) @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=1 end if pbMouseInArea?(363, 543, 124, 124) @sprites["hand"].visible=false @sprites["ball"].visible=false pbWait(15) @select=2 end

    end end

    end

    class PokemonPokemonSelect

    def initialize(scene) @scene=scene end

    def pbStartScreen @scene.pbStartScene @scene.pbPokemonSelect @scene.pbEndScene @starterOne=starterOne @starterTwo=starterTwo @starterThree=starterThree end

    end

    def pbCallPokemonSelect scene=PokemonPokemonSelectScene.new screen=PokemonPokemonSelect.new(scene) screen.pbStartScreen end

    Reply With Quote