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.
Variable Value Version. 2.0.0

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 75
Crisis Core
~Variable Value~ 

Description:
This script is creating a new variable value, but you can't buy items. You can buy items by normal gold. :)

Version: 2.0.0

Version History:
  • Version 1.0.0 - Related Script
  • Version 1.0.1 - Short Script
  • Version 1.0.2 - Short Script, Deleted Bug in Scene_Shop
  • Version 1.0.3 - Icon of gold in Scene_Shop
  • Version 2.0.0 - Easier Configurations, Show values by variable and added two variable values.


Script: 
Spoiler for:
Code: [Select]
#===============================================================================
#
# Name: Variable Value
#
# Autor: Crisis Core Master Core
#
# Version: 2.0.0
#
#===============================================================================

#===============================================================================
# Module + Instruction:
#
# Name: ValueName1, ValueName2, ValueName3, ValueName4
# Description: Names of Values.
#
# Name: ValueIcon1, ValueIcon2, ValueIcon3, ValueIcon4
# Description: Icons ID of Values.
#
# Name: ValueVari1, ValueVari2, ValueVari3
# Description: Variables of Values
#
# Name: ValueVari4
# Description:
#    When 0: This script shows gold value.
#    When 1: This script shows gold value and one variable value.
#    When 2: This script shows gold value and two variable values.
#    When 3: This script shows gold value and three variable values.
#===============================================================================
  module Crisis
    ValueIcon1 = 205
    ValueName1 = " Gold"
    ValueIcon2 = 179
    ValueName2 = " Karma"
    ValueIcon3 = 200
    ValueName3 = " Gems"
    ValueIcon4 = 99
    ValueName4 = " Points"
    ValueVari1 = 1
    ValueVari2 = 2
    ValueVari3 = 3
    ValueVari4 = 4
  end

#===============================================================================
# Class: Variable Value
#===============================================================================
  class Window_Gold_Variable_Value < Window_Base
    def initialize(x, y)
      if $game_variables[Crisis::ValueVari4] == 0
        super(x, y, 160, WLH + 32)
      end
     
      if $game_variables[Crisis::ValueVari4] == 1
        super(x, y, 160, WLH * 2 + 32)
      end
     
      if $game_variables[Crisis::ValueVari4] == 2
        super(x, y, 160, WLH * 3 + 32)
      end
     
      if $game_variables[Crisis::ValueVari4] >= 3
        super(x, y, 160, WLH * 4 + 32)
      end
     
      refresh
    end
    def refresh
      self.contents.clear
        if $game_variables[Crisis::ValueVari4] == 0
          draw_icon(Crisis::ValueIcon1 , 4 , 0)
          self.contents.draw_text(0, 0, 120, 24, [$game_party.gold, Crisis::ValueName1], 2)
        end

        if $game_variables[Crisis::ValueVari4] == 1
          draw_icon(Crisis::ValueIcon1 , 4 , 0)
          draw_icon(Crisis::ValueIcon2 , 4 , 24)
          self.contents.draw_text(0, 0, 120, 24, [$game_party.gold, Crisis::ValueName1], 2)
          self.contents.draw_text(0, 24, 120, 24, [$game_variables[Crisis::ValueVari1], Crisis::ValueName2], 2)
        end 
     
        if $game_variables[Crisis::ValueVari4] == 2
          draw_icon(Crisis::ValueIcon1 , 4 , 0)
          draw_icon(Crisis::ValueIcon2 , 4 , 24)
          draw_icon(Crisis::ValueIcon3 , 4 , 48)
          self.contents.draw_text(0, 0, 120, 24, [$game_party.gold, Crisis::ValueName1], 2)
          self.contents.draw_text(0, 24, 120, 24, [$game_variables[Crisis::ValueVari1], Crisis::ValueName2], 2)
          self.contents.draw_text(0, 48, 120, 24, [$game_variables[Crisis::ValueVari2], Crisis::ValueName3], 2)
        end
         
        if $game_variables[Crisis::ValueVari4] >= 3
          draw_icon(Crisis::ValueIcon1 , 4 , 0)
          draw_icon(Crisis::ValueIcon2 , 4 , 24)
          draw_icon(Crisis::ValueIcon3 , 4 , 48)
          draw_icon(Crisis::ValueIcon4 , 4 , 72)
          self.contents.draw_text(0, 0, 120, 24, [$game_party.gold, Crisis::ValueName1], 2)
          self.contents.draw_text(0, 24, 120, 24, [$game_variables[Crisis::ValueVari1], Crisis::ValueName2], 2)
          self.contents.draw_text(0, 48, 120, 24, [$game_variables[Crisis::ValueVari2], Crisis::ValueName3], 2)
          self.contents.draw_text(0, 72, 120, 24, [$game_variables[Crisis::ValueVari3], Crisis::ValueName4], 2)
        end
      end
    end

#===============================================================================
# Class: Value in Shop
#===============================================================================
  class Window_Gold < Window_Base
    def initialize(x, y)
      super(x, y, 160, WLH + 32)
      refresh
    end
    def refresh
      self.contents.clear
      draw_icon(Crisis::ValueIcon1 , 4 , 0)
      self.contents.draw_text(0, 0, 120, 24, [$game_party.gold, Crisis::ValueName1], 2)
    end
  end

#===============================================================================
# Class: Variable Value Number in Menu
#===============================================================================
  class Game_Party < Game_Unit
      attr_reader   :karma
      attr_reader   :gem
      attr_reader   :excalibur
    def initialize
      super
      @gold = 0
      @karma = 0
      @gem = 0
      @excalibur = 0
      @steps = 0
      @last_item_id = 0
      @last_actor_index = 0
      @last_target_index = 0
      @actors = []     
      @items = {}   
      @weapons = {}
      @armors = {}   
    end
  end
#===============================================================================
# Class: Variable Value in Menu
#===============================================================================
  class Scene_Menu < Scene_Base
    def start
      super
      create_menu_background
      create_command_window
        if $game_variables[Crisis::ValueVari4] == 0
          @gold_window = Window_Gold_Variable_Value.new(0, 360)
          @status_window = Window_MenuStatus.new(161, 0)
        end
       
        if $game_variables[Crisis::ValueVari4] == 1
          @gold_window = Window_Gold_Variable_Value.new(0, 336)
          @status_window = Window_MenuStatus.new(161, 0)
        end
       
        if $game_variables[Crisis::ValueVari4] == 2
          @gold_window = Window_Gold_Variable_Value.new(0, 312)
          @status_window = Window_MenuStatus.new(161, 0)
        end
       
        if $game_variables[Crisis::ValueVari4] >= 3
          @gold_window = Window_Gold_Variable_Value.new(0, 288)
          @status_window = Window_MenuStatus.new(161, 0)
        end
      end
    end

Screenshot: None

Demo: None

Autor: Crisis Core Master Core (me)
« Last Edit: October 28, 2010, 04:21:19 PM by Crisis Core Master Core »

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
Care to explain what this script does? Because I have no clue. Nor does anyone who isn't a scripter, I'm sure...
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

**
Rep:
Level 75
Crisis Core
It's modified Teyan's script, but it's my idea. :) I'm a beginner. :) Before this script created two gold values, but I modified it to a gold value and variable value.

Teyan script is in Polish.
Spoiler for:
Code: [Select]
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/Nazwa: Dodatkowa waluta.............._/
#_/Autor: Teyan (www.ultimateam.pl)._/
#_/Data: 28 kwietnia 2010r................_/
#_/Wersja: 2.0..............................._/
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#instrukcja
#switch/prze??cznik, który odpowiada za zmiane waluty
GOLD = 20 #mo?emy go oczywi?cie zmieni?.
#gdy jest off to u?ywan? walut? jest nowa waluta
#gdy jest on to u?ywan? walut? jest stara waluta
#wywo?uj?c skrypt:
#   $scene = Scene_Kantor.new
#otworzy si? nam okno z mo?liwo?ci? kupna/sprzeda?y waluty
#jak w banku mo?na wymienia? pieni?dze na inn? walut?
#najlepiej wywo?a? ten skrypt w poleceniu jakiego? NPC-ta
#takim NPC-tem mo?e by? np: "Królewski Skarbnik" (chyba wiecie o co chodzi?)
#facet b?dzie nam wymienia? pieni?dze: kryszta?y na z?oto i odwrotnie
module Teyan
  Kurs = 200#  w % (oznacza, ?e 2. Waluta = 200% pierwszej waluty) [domy?lnie: 1 kryszta? = 2 sztuki z?ota]
  Icon1 = 205# ikonka pierwszej waluty
  Icon2 = 200# ikonka drugiej waluty
  Nazwa1 = ' G'#skrócona nazwa pierwszej waluty
  Nazwa2 = ' K'#skrócona nazwa drugiej waluty
  Kup = 100 #  % ceny kupna (normalnie jest to 100)
  Sprzedaj = 50 #  % ceny sprzedania (normalnie jest to 50)
# wywo?uj?c skrypt:
# Teyan::Sprzedaj = x (gdzie X musi by? liczb? dodatni? i ca?kowit?)
# sprawimy, ?e nasz bohater b?dzie sprzedawa? przedmioty po X% ich ceny
#
# mo?emy wywo?a? skrypt:
# Teyan::Kup = x (gdzie X musi by? liczb? dodatni? i ca?kowit?)
# sprawimy, ?e nasz bohater b?dzie kupowa? przedmioty po X% ich ceny
# je?eli wywo?amy ten skrypt:
# Teyan::Sprzedaj = 105 (nast?pi inflacja o 5% - ceny wzrosn?)
end
#~~~~~~~~~~~~~~~~~~SKRYPT

class Window_Gold < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH * 2 + 32)
    refresh
  end
  def refresh
    self.contents.clear
    draw_icon(Teyan::Icon1 , 4 , 0)
    draw_icon(Teyan::Icon2 , 4 , 24)
    self.contents.draw_text(0, 0, 120, 24, [$game_party.gold, Teyan::Nazwa1], 2)
    self.contents.draw_text(0, 24, 120, 24, [$game_party.gold2, Teyan::Nazwa2], 2)
  end
end
class Game_Party < Game_Unit
    attr_reader   :gold2
  def initialize
    super
    @gold = 0
    @gold2 = 0
    @steps = 0
    @last_item_id = 0
    @last_actor_index = 0
    @last_target_index = 0
    @actors = []      # Party member (actor ID)
    @items = {}       # Inventory item hash (item ID)
    @weapons = {}     # Inventory item hash (weapon ID)
    @armors = {}      # Inventory item hash (armor ID)
  end
  def gain_gold(n)
    if $game_switches[GOLD]
      @gold = [[@gold + n, 0].max, 9999999].min
    else
      @gold2 = [[@gold2 + n, 0].max, 9999999].min
    end
  end
  def lose_gold(n)
    gain_gold(-n)
  end
end
class Scene_Menu < Scene_Base
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 336)
    @status_window = Window_MenuStatus.new(161, 0)
  end
end
class Scene_Shop < Scene_Base
  def start
    super
    create_menu_background
    create_command_window
    @help_window = Window_Help.new
    @gold_window = Window_Gold.new(384, 56)
    @dummy_window = Window_Base.new(0, 136, 544, 280)
    @buy_window = Window_ShopBuy.new(0, 136)
    @buy_window.active = false
    @buy_window.visible = false
    @buy_window.help_window = @help_window
    @sell_window = Window_ShopSell.new(0, 136, 544, 280)
    @sell_window.active = false
    @sell_window.visible = false
    @sell_window.help_window = @help_window
    @number_window = Window_ShopNumber.new(0, 136)
    @number_window.active = false
    @number_window.visible = false
    @status_window = Window_ShopStatus.new(304, 136)
    @status_window.visible = false
  end
  def update_buy_selection
    @status_window.item = @buy_window.item
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @dummy_window.visible = true
      @buy_window.active = false
      @buy_window.visible = false
      @status_window.visible = false
      @status_window.item = nil
      @help_window.set_text("")
      return
    end
    if Input.trigger?(Input::C)
      @item = @buy_window.item
      number = $game_party.item_number(@item)
      if $game_switches[GOLD]
        if @item == nil or (@item.price * Teyan::Kup / 100) > $game_party.gold or number == 99
          Sound.play_buzzer
        else
          Sound.play_decision
          max = @item.price == 0 ? 99 : $game_party.gold / (@item.price * Teyan::Kup / 100)
          max = [max, 99 - number].min
          @buy_window.active = false
          @buy_window.visible = false
          @number_window.set(@item, max, @item.price * Teyan::Kup / 100)
          @number_window.active = true
          @number_window.visible = true
        end
      else
        if @item == nil or (@item.price * Teyan::Kup * 100 / Teyan::Kurs / 100) > $game_party.gold2 or number == 99
          Sound.play_buzzer
        else
          Sound.play_decision
          max = @item.price == 0 ? 99 : $game_party.gold2 / (@item.price * Teyan::Kup * 100 / Teyan::Kurs / 100)
          max = [max, 99 - number].min
          @buy_window.active = false
          @buy_window.visible = false
          @number_window.set(@item, max, @item.price * Teyan::Kup * 100 / Teyan::Kurs / 100)
          @number_window.active = true
          @number_window.visible = true
        end
      end
    end
  end
  def create_command_window
    s1 = Vocab::ShopBuy
    s2 = Vocab::ShopSell
    s3 = Vocab::ShopCancel
    @command_window = Window_Command.new(384, [s1, s2, s3], 3)
    @command_window.y = 56
    @command_window.height = 80
    if $game_temp.shop_purchase_only
      @command_window.draw_item(1, false)
    end
  end
  def update_sell_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @command_window.active = true
      @dummy_window.visible = true
      @sell_window.active = false
      @sell_window.visible = false
      @status_window.item = nil
      @help_window.set_text("")
    elsif Input.trigger?(Input::C)
      @item = @sell_window.item
      @status_window.item = @item
      if @item == nil or @item.price == 0
        Sound.play_buzzer
      else
        Sound.play_decision
        max = $game_party.item_number(@item)
        @sell_window.active = false
        @sell_window.visible = false
        if $game_switches[GOLD]
          @number_window.set(@item, max, @item.price * Teyan::Sprzedaj / 100)
        else
          @number_window.set(@item, max, @item.price * Teyan::Sprzedaj * 100 / Teyan::Kurs / 100)
        end
        @number_window.active = true
        @number_window.visible = true
        @status_window.visible = true
      end
    end
  end
  def decide_number_input
    Sound.play_shop
    @number_window.active = false
    @number_window.visible = false
    case @command_window.index
    when 0 # Buy
      if $game_switches[GOLD]
        $game_party.lose_gold(@number_window.number * @item.price * Teyan::Kup / 100)
      else
        $game_party.lose_gold(@number_window.number * @item.price * Teyan::Kup * 100 / Teyan::Kurs / 100)
      end
      $game_party.gain_item(@item, @number_window.number)
      @gold_window.refresh
      @buy_window.refresh
      @status_window.refresh
      @buy_window.active = true
      @buy_window.visible = true
    when 1 # sell
      if $game_switches[GOLD]
        $game_party.gain_gold(@number_window.number * (@item.price * Teyan::Sprzedaj / 100))
      else
        $game_party.gain_gold(@number_window.number * (@item.price * Teyan::Sprzedaj * 100 / Teyan::Kurs / 100))
      end
      $game_party.lose_item(@item, @number_window.number)
      @gold_window.refresh
      @sell_window.refresh
      @status_window.refresh
      @sell_window.active = true
      @sell_window.visible = true
      @status_window.visible = false
    end
  end
end
class Window_ShopBuy < Window_Selectable
  def initialize(x, y)
    super(x, y, 304, 280)
    @shop_goods = $game_temp.shop_goods
    refresh
    self.index = 0
  end
  def draw_item(index)
    item = @data[index]
    number = $game_party.item_number(item)
    if $game_switches[GOLD]
      enabled = (item.price * Teyan::Kup / 100 <= $game_party.gold and number < 99)
    else
      enabled = (item.price * Teyan::Kup * 100 / Teyan::Kurs / 100 <= $game_party.gold2 and number < 99)
    end
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    draw_item_name(item, rect.x, rect.y, enabled)
    rect.width -= 4
    if $game_switches[GOLD]
      self.contents.draw_text(rect, item.price * Teyan::Kup / 100, 2)
    else
      self.contents.draw_text(rect, item.price * Teyan::Kup * 100 / Teyan::Kurs / 100, 2)
    end
  end
end
class Window_ShopNumber < Window_Base
  def initialize(x, y)
    super(x, y, 304, 280)
    @item = nil
    @max = 1
    @price = 0
    @number = 1
  end
end
class Window_Base < Window
  def draw_currency_value(value, x, y, width)
    if $game_switches[GOLD]
      cx = contents.text_size(Teyan::Nazwa1).width
    else
      cx = contents.text_size(Teyan::Nazwa2).width
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
    self.contents.font.color = system_color
    if $game_switches[GOLD]
      self.contents.draw_text(x, y, width, WLH, Teyan::Nazwa1, 2)
    else
      self.contents.draw_text(x, y, width, WLH, Teyan::Nazwa2, 2)
    end
  end
end
####################################
#KANTOR!!!!!!!!!!!!!!!!!!!!!!!!
####################################
class Game_Party < Game_Unit
  def gain_gold1(n)
    @gold = [[@gold + n, 0].max, 9999999].min
  end
  def lose_gold1(n)
    gain_gold1(-n)
  end
  def gain_gold2(n)
    @gold2 = [[@gold2 + n, 0].max, 9999999].min
  end
  def lose_gold2(n)
    gain_gold2(-n)
  end
end
class Scene_Kantor < Scene_Base
  def start
    create_menu_background
    create_command_window
    create_command_window1
    create_command_window2
    @gold_window = Window_Gold.new(0, 0)
    @gold_window.visible = false
    @help_window = Okno_Pomocy.new
    @help_window.visible = false
  end
  def terminate
    super
    dispose_menu_background
    @gold_window.dispose
    @help_window.dispose
    @command_window.dispose
    @command_window1.dispose
    @command_window2.dispose
  end
  def update
    super
    update_menu_background
    @gold_window.update
    @help_window.update
    @command_window.update
    @command_window1.update
    @command_window2.update
    if @command_window.active
      update_command_selection
    elsif @command_window1.active
      update_command_selection1
    elsif @command_window2.active
      update_command_selection2
    end
  end
  def update_command_selection1
    if Input.trigger?(Input::C)
      case @command_window1.index
      when 0
        if $game_party.gold < 10
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 10 * 100 / Teyan::Kurs
          $game_party.lose_gold1(kasa * Teyan::Kurs / 100)
          $game_party.gain_gold2(kasa)
          @gold_window.refresh
          sprawdzanie
        end
      when 1
        if $game_party.gold < 20
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 20 * 100 / Teyan::Kurs
          $game_party.lose_gold1(kasa * Teyan::Kurs / 100)
          $game_party.gain_gold2(kasa)
          @gold_window.refresh
          sprawdzanie
        end
      when 2
        if $game_party.gold < 50
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 50 * 100 / Teyan::Kurs
          $game_party.lose_gold1(kasa * Teyan::Kurs / 100)
          $game_party.gain_gold2(kasa)
          @gold_window.refresh
          sprawdzanie
        end
      when 3
        if $game_party.gold < 100
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 100 * 100 / Teyan::Kurs
          $game_party.lose_gold1(kasa * Teyan::Kurs / 100)
          $game_party.gain_gold2(kasa)
          @gold_window.refresh
          sprawdzanie
        end
      when 4
        if $game_party.gold < 200
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 200 * 100 / Teyan::Kurs
          $game_party.lose_gold1(kasa * Teyan::Kurs / 100)
          $game_party.gain_gold2(kasa)
          @gold_window.refresh
          sprawdzanie
        end
      when 5
        if $game_party.gold == 0
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = $game_party.gold * 100 / Teyan::Kurs
          $game_party.lose_gold1(kasa * Teyan::Kurs / 100)
          $game_party.gain_gold2(kasa)
          @gold_window.refresh
          sprawdzanie
        end
      when 6
        Sound.play_decision
        @command_window.active = true
        @command_window.visible = true
        @gold_window.visible = false
        @command_window1.active = false
        @command_window1.visible = false
        @help_window.visible = false
      when 7
        Sound.play_decision
        $scene = Scene_Map.new
      end
    end
  end
  def update_command_selection2
    if Input.trigger?(Input::C)
      case @command_window2.index
     when 0
        if $game_party.gold2 < 10
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 10
          $game_party.lose_gold2(kasa)
          $game_party.gain_gold1(kasa * Teyan::Kurs / 100)
          @gold_window.refresh
          sprawdzanie
        end
      when 1
        if $game_party.gold2 < 20
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 20
          $game_party.lose_gold2(kasa)
          $game_party.gain_gold1(kasa * Teyan::Kurs / 100)
          @gold_window.refresh
          sprawdzanie
        end
      when 2
        if $game_party.gold2 < 50
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 50
          $game_party.lose_gold2(kasa)
          $game_party.gain_gold1(kasa * Teyan::Kurs / 100)
          @gold_window.refresh
          sprawdzanie
        end
      when 3
        if $game_party.gold2 < 100
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 100
          $game_party.lose_gold2(kasa)
          $game_party.gain_gold1(kasa * Teyan::Kurs / 100)
          @gold_window.refresh
          sprawdzanie
        end
      when 4
        if $game_party.gold2 < 200
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = 200
          $game_party.lose_gold2(kasa)
          $game_party.gain_gold1(kasa * Teyan::Kurs / 100)
          @gold_window.refresh
          sprawdzanie
        end
      when 5
        if $game_party.gold2 == 0
          Sound.play_buzzer
        else
          Sound.play_decision
          kasa = $game_party.gold2
          $game_party.lose_gold2(kasa)
          $game_party.gain_gold1(kasa * Teyan::Kurs / 100)
          @gold_window.refresh
          sprawdzanie
        end
      when 6
        Sound.play_decision
        @command_window.active = true
        @command_window.visible = true
        @gold_window.visible = false
        @command_window2.active = false
        @command_window2.visible = false
        @help_window.visible = false
      when 7
        Sound.play_decision
        $scene = Scene_Map.new
      end
    end
  end
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_decision
      $scene = Scene_Map.new
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        if $game_party.gold == 0
          Sound.play_buzzer
        else
          Sound.play_decision
          @command_window.active = false
          @command_window.visible = false
          @gold_window.visible = true
          @command_window1.active = true
          @command_window1.visible = true
          @help_window.visible = true
          @help_window.wstaw_ikonki(Teyan::Icon1, Teyan::Icon2)
        end
      when 1
        if $game_party.gold2 == 0
          Sound.play_buzzer
        else
          Sound.play_decision
          @command_window.active = false
          @command_window.visible = false
          @gold_window.visible = true
          @command_window2.active = true
          @command_window2.visible = true
          @help_window.visible = true
          @help_window.wstaw_ikonki(Teyan::Icon2, Teyan::Icon1)
        end
      end
    end
  end
  def create_command_window
    s1 = 'Wymie? z?oto na kryszta?y.'
    s2 = 'Wymie? kryszta?y na z?oto.'
    @command_window = Window_Command.new(544, [s1, s2], 1)
    @command_window.y = 288
    @command_window.z = 400
    @command_window.height = 128
    @command_window.active = true
    @command_window.visible = true
    if $game_party.gold < 1
      @command_window.draw_item(0, false)
    end
    if $game_party.gold2 < 1
      @command_window.draw_item(1, false)
    end
  end
  def create_command_window1
    s1 = 'Wymie? 10szt.'
    s2 = 'Wymie? 20szt.'
    s3 = 'Wymie? 50szt.'
    s4 = 'Wymie? 100szt.'
    s5 = 'Wymie? 200szt.'
    s6 = 'Wymie? wszystko.'
    s7 = 'Wró?.'
    s8 = 'Koniec.'
    @command_window1 = Window_Command.new(544, [s1, s2, s3, s4, s5, s6, s7, s8], 2)
    @command_window1.y = 288
    @command_window1.z = 400
    @command_window1.height = 128
    @command_window1.active = false
    @command_window1.visible = false
    if $game_party.gold < 200
      @command_window1.draw_item(4, false)
      if $game_party.gold < 100
        @command_window1.draw_item(3, false)
        if $game_party.gold < 50
          @command_window1.draw_item(2, false)
          if $game_party.gold < 20
            @command_window1.draw_item(1, false)
            if $game_party.gold < 10
              @command_window1.draw_item(0, false)
              if $game_party.gold < 1
                @command_window1.draw_item(5, false)
              end
            end
          end
        end
      end
    end
  end
  def create_command_window2
    s1 = 'Wymie? 10szt.'
    s2 = 'Wymie? 20szt.'
    s3 = 'Wymie? 50szt.'
    s4 = 'Wymie? 100szt.'
    s5 = 'Wymie? 200szt.'
    s6 = 'Wymie? wszystko.'
    s7 = 'Wró?.'
    s8 = 'Koniec.'
    @command_window2 = Window_Command.new(544, [s1, s2, s3, s4, s5, s6, s7, s8], 2)
    @command_window2.y = 288
    @command_window2.z = 400
    @command_window2.height = 128
    @command_window2.active = false
    @command_window2.visible = false
    if $game_party.gold2 < 200
      @command_window2.draw_item(4, false)
      if $game_party.gold2 < 100
        @command_window2.draw_item(3, false)
        if $game_party.gold2 < 50
          @command_window2.draw_item(2, false)
          if $game_party.gold2 < 20
            @command_window2.draw_item(1, false)
            if $game_party.gold2 < 10
              @command_window2.draw_item(0, false)
              if $game_party.gold2 < 1
                @command_window2.draw_item(5, false)
              end
            end
          end
        end
      end
    end
  end
  def sprawdzanie
    if $game_party.gold < 1
      @command_window.draw_item(0, false)
    else
      @command_window.draw_item(0, true)
    end
    if $game_party.gold2 < 1
      @command_window.draw_item(1, false)
    else
      @command_window.draw_item(1, true)
    end
    if $game_party.gold < 200
      @command_window1.draw_item(4, false)
    else
      @command_window1.draw_item(4, true)
    end
    if $game_party.gold < 100
      @command_window1.draw_item(3, false)
    else
      @command_window1.draw_item(3, true)
    end
    if $game_party.gold < 50
      @command_window1.draw_item(2, false)
    else
      @command_window1.draw_item(2, true)
    end
    if $game_party.gold < 20
      @command_window1.draw_item(1, false)
    else
      @command_window1.draw_item(1, true)
    end
    if $game_party.gold < 10
      @command_window1.draw_item(0, false)
    else
      @command_window1.draw_item(0, true)
    end
    if $game_party.gold < 1
      @command_window1.draw_item(5, false)
    else
      @command_window1.draw_item(5, true)
    end
    if $game_party.gold2 < 200
      @command_window2.draw_item(4, false)
    else
      @command_window2.draw_item(4, true)
    end
    if $game_party.gold2 < 100
      @command_window2.draw_item(3, false)
    else
      @command_window2.draw_item(3, true)
    end
    if $game_party.gold2 < 50
      @command_window2.draw_item(2, false)
    else
      @command_window2.draw_item(2, true)
    end
    if $game_party.gold2 < 20
      @command_window2.draw_item(1, false)
    else
      @command_window2.draw_item(1, true)
    end
    if $game_party.gold2 < 10
      @command_window2.draw_item(0, false)
    else
      @command_window2.draw_item(0, true)
    end
    if $game_party.gold2 < 1
      @command_window2.draw_item(5, false)
    else
      @command_window2.draw_item(5, true)
    end
  end
end
class Okno_Pomocy < Window_Base
  def initialize
    super(216, 232, 116, 56)
  end
  def wstaw_ikonki(icon1 = 205, icon2 = 200)
    self.contents.clear
    draw_icon(icon1, 0, 0)
    self.contents.draw_text(24, 0, 32, 24, '=>', 1)
    draw_icon(icon2, 56, 0)
  end
end

**
Rep:
Level 75
Crisis Core
Another new version of script is in the first post.  :P

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
what's the practical application of this script, is what I meant... I just don't see a reason why this would be useful, creating a variable through such a method, and I thought that if you gave some examples of what it was used for, it would give me some insight on why it would need a script, rather than just an event system or a common event.
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

**
Rep:
Level 75
Crisis Core
Jango Fett, I show you version 2.0.0. :P