RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Problem... xD

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 75
Crisis Core
Hello I have a problem. Who can change this script:
Code: [Select]
#===============================================================================
#
# 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] >= Gems::S
        self.contents.draw_text(1, 48, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable3] >= Gems::A
          self.contents.draw_text(0, 48, 288, 32, Rank::A, 2)   
          else if $game_variables[Variable::Variable3] >= Gems::B
            self.contents.draw_text(0, 48, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable3] >= Gems::C
              self.contents.draw_text(0, 48, 288, 32, Rank::C, 2)
              else if $game_variables[Variable::Variable3] >= Gems::D
                self.contents.draw_text(0, 48, 288, 32, Rank::D, 2)
                else if $game_variables[Variable::Variable3] >= Gems::E
                  self.contents.draw_text(0, 48, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable3] >= Gems::F
                    self.contents.draw_text(0, 48, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable3] <= Gems::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] >= Crosses::S
        self.contents.draw_text(1, 72, 288, 32, Rank::S, 2)
        else if $game_variables[Variable::Variable4] >= Crosses::A
          self.contents.draw_text(0, 72, 288, 32, Rank::A, 2)   
          else if $game_variables[Variable::Variable4] >= Crosses::B
            self.contents.draw_text(0, 72, 288, 32, Rank::B, 2)
            else if $game_variables[Variable::Variable4] >= Crosses::C
              self.contents.draw_text(0, 72, 288, 32, Rank::C, 2)
              else if $game_variables[Variable::Variable4] >= Crosses::D
                self.contents.draw_text(0, 72, 288, 32, Rank::D, 2)
                else if $game_variables[Variable::Variable4] >= Crosses::E
                  self.contents.draw_text(0, 72, 288, 32, Rank::E, 2)
                  else if $game_variables[Variable::Variable4] >= Crosses::F
                    self.contents.draw_text(0, 72, 288, 32, Rank::F, 2)
                    else if $game_variables[Variable::Variable4] <= Crosses::F
                      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
Who can show two windows (Window_Mission and Window_Static) by scene (Scene_Mission) ?
« Last Edit: November 06, 2010, 03:28:16 PM by Crisis Core Master Core »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I'm sorry, but I can't read this script. Why are you using so many modules? You aren't even using any of the properties that actually make modules useful. Just use an array or hash for these values and everything in your script would be so much simpler. For one thing, you wouldn't have dozens of these:

Code: [Select]

      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

It would just be something like:

Code: [Select]
rank = 0
POINTS.each { |x|
  break if $game_variables[VARIABLES[0]] < x
  rank += 1
}
self.contents.draw_text (0, 96, 288, 32, RANKS[rank], 2)

Seriously, learn how to use an array; the number of modules you are using makes no sense. Instead of:

Code: [Select]
module Rank
  F = "F"
  E = "E"
  D = "D"
  C = "C"
  B = "B"
  A = "A"
  S = "S"
end

it should be something like:

Code: [Select]
RANKS = ["F", "E", "D", "C", "B", "A", "S"]

IDK, I would help, but I don't have time to figure out what your script is doing and I'm not entirely sure what you are needing help with. Sorry. But if you want to script, you absolutely need to learn how to use arrays and you shouldn't really use modules until you know what they're useful for.
« Last Edit: October 31, 2010, 04:59:50 PM by Robot Unicorn »

**
Rep:
Level 75
Crisis Core
Thanks. I'm remembered this.

**
Rep:
Level 75
Crisis Core
...but problem is actual. :kefka:

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Actual or not, you haven't told us what the problem is. I mean, you say, "Who can show two windows by scene?", which I would assume means you are having trouble showing the windows. However, your scene already shows two windows when you open Scene_Mission. Maybe you're asking how to open the scene? If so:

Code: [Select]
$scene = Scene_Mission.new

Also, you shouldn't refresh the windows every frame like you are.

**
Rep:
Level 75
Crisis Core
Very, very thanks modern algebra! :tpg:
Topic to close.