Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Zamknięty przez: Ayene
Wto 02 Lis, 2010 09:03
Problem xD (mam nadzieję, że prosty)
Autor Wiadomość
CreeperCrisis 



Preferowany:
RPG Maker VXAce

Pomógł: 32 razy
Dołączył: 01 Maj 2010
Posty: 395
Wysłany: Sob 30 Paź, 2010 11:50
Problem xD (mam nadzieję, że prosty)
Mam mały problem. Napisałem skrypt dla http://rmrk.net/ , choć ma on mały błąd.

Chciałbym, aby ten skrypt uruchamiał 2 okna poprzez klasę, znajdziecie go w spoilerze:
Spoiler:

Kod:
#===============================================================================
#
# Name: Crisis Core Master Core Mission Results
#
# Autor: Crisis Core Master Core
#
# Version: 1.0.0
#
#===============================================================================


#===============================================================================
# Module + Instruction:
#
# Name: Variable1
# Description: Variable of Points.
#
# Name: Variable2
# Description: Variable of Extra Points.
#
# Name: Variable3
# Description: Variable of Gems.
#
# Name: Variable4
# Description: Variable of Crosses.
#
# Name: Variable5
# Description: Variable of Main Points.
#===============================================================================

module Variable
  Variable1 = 5
  Variable2 = 6
  Variable3 = 7
  Variable4 = 8
  Variable5 = 9
end

#===============================================================================
# Module + Instruction:
#
# Name: F
# Description: Rank "F".
#
# Name: E
# Description: Rank "E".
#
# Name: D
# Description: Rank "D".
#
# Name: C
# Description: Rank "C".
#
# Name: B
# Description: Rank "B".
#
# Name: A
# Description: Rank "A".
#
# Name: S
# Description: Rank "S".
#===============================================================================
module Rank
  F = "F"
  E = "E"
  D = "D"
  C = "C"
  B = "B"
  A = "A"
  S = "S"
end

#===============================================================================
# Module + Instruction:
#
# Name: Message1
# Description: Main Message of Mission.
#
# Name: Message2
# Description: Main Message of Points, after this script shows a rank.
#
# Name: Message3
# Description: Main Message of Extra Points, after this script shows a rank.
#
# Name: Message4
# Description: Main Message of Gems, after this script shows a rank.
#
# Name: Message5
# Description: Main Message of Crosses, after this script shows a rank.
#
# Name: Message6
# Description: Main Message of Main Points, after this script shows a rank.
#===============================================================================
module Messages
  Message1 = "Mission Complete:"
  Message2 = "Points:"
  Message3 = "Extra Points:"
  Message4 = "Gems:"
  Message5 = "Crosses:"
  Message6 = "Main:"
end

#===============================================================================
# Module + Instruction:
#
# Name: F
# Description: Points for Rank "F".
#
# Name: E
# Description: Points for Rank "E".
#
# Name: D
# Description: Points for Rank "D".
#
# Name: C
# Description: Points for Rank "C".
#
# Name: B
# Description: Points for Rank "B".
#
# Name: A
# Description: Points for Rank "A".
#
# Name: S
# Description: Points for Rank "S".
#===============================================================================
module Points
  F = 40
  E = 50
  D = 60
  C = 70
  B = 80
  A = 90
  S = 100
end

#===============================================================================
# Module + Instruction:
#
# Name: F
# Description: Extra Points for Rank "F".
#
# Name: E
# Description: Extra Points for Rank "E".
#
# Name: D
# Description: Extra Points for Rank "D".
#
# Name: C
# Description: Extra Points for Rank "C".
#
# Name: B
# Description: Extra Points for Rank "B".
#
# Name: A
# Description: Extra Points for Rank "A".
#
# Name: S
# Description: Extra Points for Rank "S".
#===============================================================================
module Extra_Points
  F = 40
  E = 50
  D = 60
  C = 70
  B = 80
  A = 90
  S = 100
end

#===============================================================================
# Module + Instruction:
#
# Name: F
# Description: Gems for Rank "F".
#
# Name: E
# Description: Gems for Rank "E".
#
# Name: D
# Description: Gems for Rank "D".
#
# Name: C
# Description: Gems for Rank "C".
#
# Name: B
# Description: Gems for Rank "B".
#
# Name: A
# Description: Gems for Rank "A".
#
# Name: S
# Description: Gems for Rank "S".
#===============================================================================
module Gems
  F = 0
  E = 5
  D = 10
  C = 15
  B = 20
  A = 25
  S = 30
end

#===============================================================================
# Module + Instruction:
#
# Name: F
# Description: Crosses for Rank "F".
#
# Name: E
# Description: Crosses for Rank "E".
#
# Name: D
# Description: Crosses for Rank "D".
#
# Name: C
# Description: Crosses for Rank "C".
#
# Name: B
# Description: Crosses for Rank "B".
#
# Name: A
# Description: Crosses for Rank "A".
#
# Name: S
# Description: Crosses for Rank "S".
#===============================================================================
module Crosses
  F = 0
  E = 5
  D = 10
  C = 15
  B = 20
  A = 25
  S = 30
end

#===============================================================================
# Class: Scene Mission
#===============================================================================
class Scene_Mission < Scene_Base
  def start
    super
    @mission = Window_Mission.new
    @static = Window_Static.new
  end 

  def terminate
    super
    dispose_menu_background
    @mission.dispose
    @static.dispose
  end
 
  def update
    super
    update_menu_background
    @mission.refresh
    @static.refresh
  end
end

#===============================================================================
# Class: Mission Window
#===============================================================================
class Window_Mission < Window_Base
  def initialize (x = 0, y = 0, width = 544, height = 60)
    super (x, y, width, height)
      self.contents.dispose
      self.contents = Bitmap.new(width - 32, height - 32)
      self.opacity = 255
      self.contents_opacity = 255
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.draw_text(0, 0, 288, 32, Messages::Message1, 1)
  end
end

#===============================================================================
# Class: Statistics Window
#===============================================================================
class Window_Static < Window_Base
  def initialize (x = 0, y = 60, width = 544, height = 192)
    super (x, y, width, height)
      self.contents.dispose
      self.contents = Bitmap.new(width - 32, height - 32)
      self.opacity = 255
      self.contents_opacity = 255
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.draw_text(0, 0, 120, 32, Messages::Message2, 0)     
      if $game_variables[Variable::Variable1] >= Points::S
        self.contents.draw_text(1, 0, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable1] >= Points::A
          self.contents.draw_text(0, 0, 288, 32, Rank::A, 2)
          else if $game_variables[Variable::Variable1] >= Points::B
            self.contents.draw_text(0, 0, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable1] >= Points::C
              self.contents.draw_text(0, 0, 288, 32, Rank::C, 2)   
              else if $game_variables[Variable::Variable1] >= Points::D
                self.contents.draw_text(0, 0, 288, 32, Rank::D, 2)   
                else if $game_variables[Variable::Variable1] >= Points::E
                  self.contents.draw_text(0, 0, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable1] >= Points::F
                    self.contents.draw_text(0, 0, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable1] <= Points::F
                      self.contents.draw_text(0, 0, 288, 32, Rank::F, 2)
                    end
                  end
                end
              end
            end
          end
        end
      end

    self.contents.draw_text(0, 24, 120, 32, Messages::Message3, 0)
      if $game_variables[Variable::Variable2] >= Extra_Points::S
        self.contents.draw_text(1, 24, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable2] >= Extra_Points::A
          self.contents.draw_text(0, 24, 288, 32, Rank::A, 2)   
          else if $game_variables[Variable::Variable2] >= Extra_Points::B
            self.contents.draw_text(0, 24, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable2] >= Extra_Points::C
              self.contents.draw_text(0, 24, 288, 32, Rank::C, 2)
              else if $game_variables[Variable::Variable2] >= Extra_Points::D
                self.contents.draw_text(0, 24, 288, 32, Rank::D, 2)
                else if $game_variables[Variable::Variable2] >= Extra_Points::E
                  self.contents.draw_text(0, 24, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable2] >= Extra_Points::F
                    self.contents.draw_text(0, 24, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable2] <= Extra_Points::F
                      self.contents.draw_text(0, 24, 288, 32, Rank::F, 2)
                    end
                  end
                end
              end
            end
          end
        end
      end
     
    self.contents.draw_text(0, 48, 120, 32, Messages::Message4, 0)
      if $game_variables[Variable::Variable3] >= 100
        self.contents.draw_text(1, 48, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable3] >= 90
          self.contents.draw_text(0, 48, 288, 32, Rank::A, 2)   
          else if $game_variables[Variable::Variable3] >= 80
            self.contents.draw_text(0, 48, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable3] >= 70
              self.contents.draw_text(0, 48, 288, 32, Rank::C, 2)
              else if $game_variables[Variable::Variable3] >= 60
                self.contents.draw_text(0, 48, 288, 32, Rank::D, 2)
                else if $game_variables[Variable::Variable3] >= 50
                  self.contents.draw_text(0, 48, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable3] >= Points::F
                    self.contents.draw_text(0, 48, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable3] <= Points::F
                      self.contents.draw_text(0, 48, 288, 32, Rank::F, 2)
                    end
                  end
                end
              end
            end
          end
        end
      end
     
    self.contents.draw_text(0, 72, 120, 32, Messages::Message5, 0)
      if $game_variables[Variable::Variable4] >= 100
        self.contents.draw_text(1, 72, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable4] >= 90
          self.contents.draw_text(0, 72, 288, 32, Rank::A, 2)   
          else if $game_variables[Variable::Variable4] >= 80
            self.contents.draw_text(0, 72, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable4] >= 70
              self.contents.draw_text(0, 72, 288, 32, Rank::C, 2)
              else if $game_variables[Variable::Variable4] >= 60
                self.contents.draw_text(0, 72, 288, 32, Rank::D, 2)
                else if $game_variables[Variable::Variable4] >= 50
                  self.contents.draw_text(0, 72, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable4] >= 40
                    self.contents.draw_text(0, 72, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable4] <= 40
                      self.contents.draw_text(0, 72, 288, 32, Rank::F, 2)
                    end
                  end
                end
              end
            end
          end
        end
      end

    self.contents.draw_text(0, 96, 120, 32, Messages::Message6, 0)
      if $game_variables[Variable::Variable5] >= 400
        self.contents.draw_text(1, 96, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable5] >= 360
          self.contents.draw_text(0, 96, 288, 32, Rank::A, 2)   
          else if $game_variables[Variable::Variable5] >= 320
            self.contents.draw_text(0, 96, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable5] >= 280
              self.contents.draw_text(0, 96, 288, 32, Rank::C, 2)
              else if $game_variables[Variable::Variable5] >= 240
                self.contents.draw_text(0, 96, 288, 32, Rank::D, 2)
                else if $game_variables[Variable::Variable5] >= 200
                  self.contents.draw_text(0, 96, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable5] >= 160
                    self.contents.draw_text(0, 96, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable5] <= 160
                      self.contents.draw_text(0, 96, 288, 32, Rank::F, 2)
                    end
                  end
                end
              end
            end
          end
        end
      end
    end
  end



oraz chciałbym się dowiedzieć jakie komendy w ruby dodają np. do zmiennej 5 zmienną 1,
zmiennej 5 zmienną 2 etc. :-) Pozdrawiam
 
 
radek02 



Preferowany:
RPG Maker VX

Pomógł: 13 razy
Dołączył: 17 Lut 2010
Posty: 257
Skąd: klikasz ?
Wysłany: Sob 30 Paź, 2010 12:35
Cytat:
Napisałem skrypt dla http://rmrk.net/ , choć ma on mały błąd

To się nazywa patriotyzm.

Według mnie, powinieneś pisac skrypty dla Ultimy, rmxp.pl, titka czy twierdzy - w polsce brakuje nam twórców skryptów do VX.
________________________
2009-10-12 - dzień , od którego jestem uczestnikiem na polskiej scenie RPG Makera [/b]

Dołącz do grupy makerowiczów na nk ! http://nk.pl/#grupy/29610
 
 
 
CreeperCrisis 



Preferowany:
RPG Maker VXAce

Pomógł: 32 razy
Dołączył: 01 Maj 2010
Posty: 395
Wysłany: Sob 30 Paź, 2010 14:07
Powiem ci szczerze, chcę najpierw zaistnieć zagranicą, później dam dla ultimy jeżeli się spodobają. :-)
 
 
radek02 



Preferowany:
RPG Maker VX

Pomógł: 13 razy
Dołączył: 17 Lut 2010
Posty: 257
Skąd: klikasz ?
Wysłany: Sob 30 Paź, 2010 15:51
Cytat:
Powiem ci szczerze, chcę najpierw zaistnieć zagranicą,

Aha, tak się odwdzięczasz pomocy innym polskim makerowcom ... Zaistniej na polskiej , później próbuj gdzie indziej .

Cytat:
później dam dla ultimy jeżeli się spodobają

kolego, zagraniczne fora mają muuuuultum skryptów do vx, zaś w polskich można odczuć brakowych. Zresztą niezbyt to dobrze wygląda gdy wpierw tworzy się dla zagranicy, a później dla Ojczyzny .

ps.: Jednym skryptem nie zaistniejesz ;)
________________________
2009-10-12 - dzień , od którego jestem uczestnikiem na polskiej scenie RPG Makera [/b]

Dołącz do grupy makerowiczów na nk ! http://nk.pl/#grupy/29610
 
 
 
Colombos 



Preferowany:
RPG Maker XP

Ranga RM:
3 gry

Pomógł: 6 razy
Dołączył: 05 Kwi 2010
Posty: 49
Wysłany: Sob 30 Paź, 2010 17:40
Ale chwila, to już nie można pisać skryptów na wszystkie fora?
 
 
CreeperCrisis 



Preferowany:
RPG Maker VXAce

Pomógł: 32 razy
Dołączył: 01 Maj 2010
Posty: 395
Wysłany: Wto 02 Lis, 2010 07:28
Już nie potrzebuję pomocy, koledzy z drugiego forum mi pomogli. Temat do zamknięcia.
 
 
Wyświetl posty z ostatnich:   
Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene