Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Wizered67

1
RMXP Script Database / [XP] RMX-OS Player Shops
December 03, 2014, 12:04:53 am
RMX-OS Player Shops
Authors: Wizered67
Version: 0.89
Type: Player Shop System
Key Term: RMX-OS Plugin



Introduction

A few weeks ago I worked on this script for Player Shops for Whitespirits. Unfortunately I don't currently have RMXP so I can't put the finishing touches on this script, but it should be complete enough to be functional and can be edited as necessary. This script allows players to create their own shops where they can place items, weapons, and armor for sale at a price of their choice for other players to buy. There is a configurable fee for creating a shop and players will only be able to access shops on the map they were created in. Players can also name their shops for extra fun. With this script even games without hundreds of players online at a time can have a thriving economy and community.


Features


  • Lets players make shops to make money.

  • Gives players an alternate way to buy goods.

  • Adds new commands for making, editing, buying from, and listing shops.

  • Nearly completely plug and play.





Screenshots
Selling items in a shop: ShowHide

Buying from a shop: ShowHide



Demo

N/A


Script
Client Side (RMX-OS 2.0 Compatible): ShowHide


#------------------------------------------------------------------------------#
#                  RMX-OS Player Shops                                       #
#                     by Wizered67                                             #
#                          V 0.89                                              #
# All errors should be reported at www.chaos-project.com.                      #
#------------------------------------------------------------------------------#
module PlayerShopConfig
 SHOP_COST = 500
end

#==============================================================================
# module RMXOS
#==============================================================================

module RMXOS
 
 #============================================================================
 # module Documentation
 #============================================================================
 
 module Documentation
   
   PARAMETERS['shops']   = 'none'
   PARAMETERS['makeshop']    = 'SHOPNAME'
   PARAMETERS['editshop']    = 'SHOPID'
   PARAMETERS['buy']    = 'SHOPID'
   DESCRIPTIONS['shops'] = 'Displays a list of all shops on the same map.'
   DESCRIPTIONS['makeshop']  = "Creates a new shop on the current map. Costs #{PlayerShopConfig::SHOP_COST} gold."
   DESCRIPTIONS['editshop']  = 'Edits the shop with the specified id.'
   DESCRIPTIONS['buy']  = 'Opens the shop with the specified id. Only 1 player can be using a shop at a time.'
 end
 
 #============================================================================
 # module Data
 #============================================================================
 
 module Data
   PlayerShopsReceivedMoney     = 'Received AMOUNT Gold for purchases made in your shop.'
   NewShopCreated               = "Spent #{PlayerShopConfig::SHOP_COST} gold and created a new shop with id: ID. Add items with /editshop SHOPID"
   InvalidItemShop              = 'Invalid item or shop has been selected.'
   NotEnoughMoney               = "Not enough money to make a shop. It costs #{PlayerShopConfig::SHOP_COST} gold."
   
 end
 
 #============================================================================
 # Network
 #============================================================================
 
 class Network
   
   def sell_item(price)
     if $game_temp.player_shop_sell_item == nil || $game_temp.player_shop_sell_selected == 0
       self.add_error(RMXOS::Data::InvalidItemShop)
       return
     end
     type = 0
     case $game_temp.player_shop_sell_item
     when RPG::Item
       $game_party.lose_item($game_temp.player_shop_sell_item.id, $game_temp.player_shop_sell_amount)
       type = 0
     when RPG::Weapon
       $game_party.lose_weapon($game_temp.player_shop_sell_item.id, $game_temp.player_shop_sell_amount)
       type = 1
     when RPG::Armor
       $game_party.lose_armor($game_temp.player_shop_sell_item.id, $game_temp.player_shop_sell_amount)
       type = 2
     end
     shop = $game_temp.player_shop_sell_selected
     item = $game_temp.player_shop_sell_item.id
     amount = $game_temp.player_shop_sell_amount
     self.send('SCD', shop, item, amount, price, type)
   end
   
   alias check_game_player_shops_alias check_game
   def check_game(message)
     
       case message
       
       when /\ARMPS\t(.+)/
         amount = $1
         self.add_message(0, RMXOS::Data::PlayerShopsReceivedMoney.sub('AMOUNT',
           amount), RMXOS::Data::ColorOk)
           $game_party.gain_gold(amount.to_i)
       return true
       
       when /\ANSI\t(.+)/
         id = $1.to_i
         self.add_message(0, RMXOS::Data::NewShopCreated.sub('ID',
           id.to_s), RMXOS::Data::ColorOk)
       return true
       
       when /\ALSSD\t(.+)/
         $game_temp.player_shop_buy_items = eval($1)
         $game_temp.player_shop_owner = $game_temp.player_shop_buy_items[0]
         $game_temp.player_shop_name = $game_temp.player_shop_buy_items[4]
         $scene = Scene_PlayerShopBuy.new
       return true
       
       when /\AEIS\Z/ #invalid shop selected (sell)
         $game_temp.player_shop_sell_selected = 0
       return true
       
       when /\AEISB\Z/ #invalid shop selected (buy)
         $game_temp.player_shop_buy_selected = 0
       return true
         
       when /\AOESC\t(.+)\t(.+)/ #open edit shop screen
         $game_temp.player_shop_owner = $1
         $game_temp.player_shop_name = $2
         $scene = Scene_PlayerShopSell.new
       return true
     end
     
     return check_game_player_shops_alias(message)
   end
   
   alias check_normal_commands_player_shops_alias check_normal_commands
   def check_normal_commands(message)
     case message
       when /\A\/shops\Z/
         self.send('SMSM', $game_map.map_id)
       return true
       
       when /\A\/editshop (\S+)\Z/
         self.send('TSES', $1)
         $game_temp.player_shop_sell_selected = $1.to_i
       return true
     
       when /\A\/buy (\S+)\Z/
         self.send('SSD', $1, $game_map.map_id)
         $game_temp.player_shop_buy_selected = $1.to_i
       return true
       
       when /\A\/makeshop (\S{1}.*)/
           if $game_party.gold >= PlayerShopConfig::SHOP_COST
             $game_party.lose_gold(PlayerShopConfig::SHOP_COST)
             self.send('CNPS', @username, @user_id, $game_map.map_id, $1)
           
         else
           self.add_error(RMXOS::Data::NotEnoughMoney)
         end
       return true
     end
     return check_normal_commands_player_shops_alias(message)
   end
 
 end
 
end


#==============================================================================
# ** Scene_Shop
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================

class Scene_PlayerShopSell
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make help window
   @help_window = Window_Help.new
   # Make gold window
   @gold_window = Window_Gold.new
   @gold_window.x = 480
   @gold_window.y = 64
   # Make dummy window
   @dummy_window = Window_Base.new(0, 128, 640, 352)
   @dummy_window2 = Window_Base.new(0, 128, 368, 352)
   @dummy_window2.visible = false
   @shop_name_window = Window_PlayerShopName.new
   # Make sell window
   @sell_window = Window_ShopSell.new
   @sell_window.active = true
   @sell_window.visible = true
   @sell_window.help_window = @help_window
   # Make quantity input window
   @number_window = Window_PlayerShopSellNumber.new
   @number_window.active = false
   @number_window.visible = false
   @input_number_window = Window_PlayerShopInputNumber.new(6)
   @input_number_window.number = 0
   #@input_number_window.x = 128
   #@input_number_window.y = 224
   @input_number_window.visible = false
   @input_number_window.active = false
   # Make status window
   @status_window = Window_ShopStatus.new
   @status_window.visible = false
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @help_window.dispose
   @gold_window.dispose
   @dummy_window.dispose
   @dummy_window2.dispose
   @sell_window.dispose
   @number_window.dispose
   @status_window.dispose
   @shop_name_window.dispose
   @input_number_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @help_window.update
   @gold_window.update
   @dummy_window.update
   @sell_window.update
   @number_window.update
   @status_window.update
   @shop_name_window.update
   
   $network.listen
   
   if @input_number_window.active
     @input_number_window.update
     update_price_input
     return
   end
   # If sell window is active: call update_sell
   if @sell_window.active
     update_sell
     return
   end
   # If quantity input window is active: call update_number
   if @number_window.active
     update_number
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when price window is active)
 #--------------------------------------------------------------------------
 def update_price_input
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     @input_number_window.active = false
     @input_number_window.visible = false
     @number_window.active = true
     @number_window.visible = true
     #@dummy_window.visible = true
     @dummy_window2.visible = false
     return
   end
   
   if Input.trigger?(Input::C)
     if @input_number_window.number == 0
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.shop_se)
     @dummy_window.visible = true
     $network.sell_item(@input_number_window.number)
     @gold_window.refresh
     @sell_window.refresh
     @status_window.refresh
     # Change windows to sell mode
     @sell_window.active = true
     @sell_window.visible = true
     @status_window.visible = false
     @input_number_window.visible = false
     @input_number_window.active = false
     @dummy_window2.visible = false
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when sell window is active)
 #--------------------------------------------------------------------------
 def update_sell
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Change windows to initial mode
     $scene = Scene_Map.new
     $network.send('SIU', $game_temp.player_shop_sell_selected, 0)
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Get item
     @item = @sell_window.item
     # Set status window item
     @status_window.item = @item
     # If item is invalid, or item price is 0 (unable to sell)
     if @item == nil or @item.price == 0
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Get items in possession count
     case @item
     when RPG::Item
       number = $game_party.item_number(@item.id)
     when RPG::Weapon
       number = $game_party.weapon_number(@item.id)
     when RPG::Armor
       number = $game_party.armor_number(@item.id)
     end
     # Maximum quanitity to sell = number of items in possession
     max = number
     # Change windows to quantity input mode
     @sell_window.active = false
     @sell_window.visible = false
     @number_window.set(@item, max)
     @number_window.active = true
     @number_window.visible = true
     @status_window.visible = true
     @dummy_window.visible = false
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when quantity input window is active)
 #--------------------------------------------------------------------------
 def update_number
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Set quantity input window to inactive / invisible
     @number_window.active = false
     @number_window.visible = false
     # Branch by command window cursor position
     
       @sell_window.active = true
       @sell_window.visible = true
       @status_window.visible = false
       @dummy_window.visible = true
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Play shop SE
     $game_system.se_play($data_system.decision_se)
     $game_temp.player_shop_sell_item = @item
     $game_temp.player_shop_sell_amount = @number_window.number
     @number_window.active = false
     @number_window.visible = false
     @input_number_window.number = 0
     @input_number_window.active = true
     @input_number_window.visible = true
     @input_number_window.set_item(@item)
     @input_number_window.refresh
     @dummy_window.visible = false
     @dummy_window2.visible = true
     return
   end
   return
 end
end

#==============================================================================
# ** Window_PlayerShopName
#------------------------------------------------------------------------------
#  Displays owner and shop name in shop screen
#==============================================================================

class Window_PlayerShopName < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 64, 480, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   update
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def update
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 480, 32, $game_temp.player_shop_owner + "'s " + $game_temp.player_shop_name)
 end
end


#==============================================================================
# ** Window_PlayerShopSellNumber
#------------------------------------------------------------------------------
#  Modified version that doesn't show how much it will sell for
#==============================================================================

class Window_PlayerShopSellNumber < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 128, 368, 352)
   self.contents = Bitmap.new(width - 32, height - 32)
   @item = nil
   @max = 1
   @number = 1
 end
 #--------------------------------------------------------------------------
 # * Set Items, Max Quantity, and Price
 #--------------------------------------------------------------------------
 def set(item, max)
   @item = item
   @max = max
   @number = 1
   refresh
 end
 #--------------------------------------------------------------------------
 # * Set Inputted Quantity
 #--------------------------------------------------------------------------
 def number
   return @number
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   draw_item_name(@item, 4, 96)
   self.contents.font.color = normal_color
   self.contents.draw_text(272, 96, 32, 32, "×")
   self.contents.draw_text(308, 96, 24, 32, @number.to_s, 2)
   self.cursor_rect.set(304, 96, 32, 32)
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   super
   if self.active
     # Cursor right (+1)
     if Input.repeat?(Input::RIGHT) and @number < @max
       $game_system.se_play($data_system.cursor_se)
       @number += 1
       refresh
     end
     # Cursor left (-1)
     if Input.repeat?(Input::LEFT) and @number > 1
       $game_system.se_play($data_system.cursor_se)
       @number -= 1
       refresh
     end
     # Cursdr up (+10)
     if Input.repeat?(Input::UP) and @number < @max
       $game_system.se_play($data_system.cursor_se)
       @number = [@number + 10, @max].min
       refresh
     end
     # Cursor down (-10)
     if Input.repeat?(Input::DOWN) and @number > 1
       $game_system.se_play($data_system.cursor_se)
       @number = [@number - 10, 1].max
       refresh
     end
   end
 end
end

#==============================================================================
# ** Window_PlayerShopInputNumber
#------------------------------------------------------------------------------
#  This window is for inputting numbers, and is used within the
#  message window.
#==============================================================================

class Window_PlayerShopInputNumber < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     digits_max : digit count
 #--------------------------------------------------------------------------
 def initialize(digits_max)
   @digits_max = digits_max
   @number = 0
   @item = nil
   # Calculate cursor width from number width (0-9 equal width and postulate)
   dummy_bitmap = Bitmap.new(32, 32)
   @cursor_width = dummy_bitmap.text_size("0").width + 8
   dummy_bitmap.dispose
   super(0, 128, 368, 352)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.z += 9999
   self.opacity = 0
   @index = 0
   refresh
   update_cursor_rect
 end
 #--------------------------------------------------------------------------
 # * Get Number
 #--------------------------------------------------------------------------
 def number
   return @number
 end
 #--------------------------------------------------------------------------
 # * Set Number
 #     number : new number
 #--------------------------------------------------------------------------
 def number=(number)
   @number = [[number, 0].max, 10 ** @digits_max - 1].min
   refresh
 end
 #--------------------------------------------------------------------------
 # * Cursor Rectangle Update
 #--------------------------------------------------------------------------
 def update_cursor_rect
   self.cursor_rect.set(128 + @index * @cursor_width, 96, @cursor_width, 32)
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   super
   # If up or down directional button was pressed
   if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
     $game_system.se_play($data_system.cursor_se)
     # Get current place number and change it to 0
     place = 10 ** (@digits_max - 1 - @index)
     n = @number / place % 10
     @number -= n * place
     # If up add 1, if down substract 1
     n = (n + 1) % 10 if Input.repeat?(Input::UP)
     n = (n + 9) % 10 if Input.repeat?(Input::DOWN)
     # Reset current place number
     @number += n * place
     refresh
   end
   # Cursor right
   if Input.repeat?(Input::RIGHT)
     if @digits_max >= 2
       $game_system.se_play($data_system.cursor_se)
       @index = (@index + 1) % @digits_max
     end
   end
   # Cursor left
   if Input.repeat?(Input::LEFT)
     if @digits_max >= 2
       $game_system.se_play($data_system.cursor_se)
       @index = (@index + @digits_max - 1) % @digits_max
     end
   end
   update_cursor_rect
 end
 def set_item(item)
     @item = item
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   draw_item_name(@item, 4, 0)
   self.contents.draw_text(128, 64, 96,32, "Price: ")
   s = sprintf("%0*d", @digits_max, @number)
   for i in 0...@digits_max
     self.contents.draw_text(128 + i * @cursor_width + 4, 96, 32, 32, s[i,1])
   end
 end
end


#==============================================================================
# ** Scene_PlayerShopBuy
#------------------------------------------------------------------------------
#  This class performs shop screen processing.
#==============================================================================

class Scene_PlayerShopBuy
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   # Make help window
   @help_window = Window_Help.new
   # Make command window
   # Make gold window
   @gold_window = Window_Gold.new
   @gold_window.x = 480
   @gold_window.y = 64
   # Make dummy window
   @dummy_window = Window_Base.new(0, 128, 640, 352)
   @dummy_window.visible = false
   @shop_name_window = Window_PlayerShopName.new
   # Make buy window
   @buy_window = Window_PlayerShopBuy.new #shop goods here
   @buy_window.active = true
   @buy_window.visible = true
   @buy_window.help_window = @help_window
   # Make quantity input window
   @number_window = Window_ShopNumber.new
   @number_window.active = false
   @number_window.visible = false
   # Make status window
   @status_window = Window_ShopStatus.new
   @status_window.visible = true
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @help_window.dispose
   @gold_window.dispose
   @dummy_window.dispose
   @buy_window.dispose
   @number_window.dispose
   @status_window.dispose
   @shop_name_window.dispose
 end
 
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @help_window.update
   @gold_window.update
   @dummy_window.update
   @buy_window.update
   @number_window.update
   @status_window.update
   @shop_name_window.update
   $network.listen
   # If buy window is active: call update_buy
   if @buy_window.active
     update_buy
     return
   end
   # If quantity input window is active: call update_number
   if @number_window.active
     update_number
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when buy window is active)
 #--------------------------------------------------------------------------
 def update_buy
   # Set status window item
   @status_window.item = @buy_window.item
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     $network.send('SIU', $game_temp.player_shop_buy_selected, 0)
     $scene = Scene_Map.new
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Get item
     @item = @buy_window.item
     # If item is invalid, or price is higher than money possessed
     if @item == nil or @buy_window.get_price > $game_party.gold
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Get items in possession count
     case @item
     when RPG::Item
       number = $game_party.item_number(@item.id)
     when RPG::Weapon
       number = $game_party.weapon_number(@item.id)
     when RPG::Armor
       number = $game_party.armor_number(@item.id)
     end
     # If 99 items are already in possession
     if number == 99
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Calculate maximum amount possible to buy
     max = @buy_window.get_price == 0 ? 99 : $game_party.gold / @buy_window.get_price
     max = [max, 99 - number, @buy_window.get_number].min
     # Change windows to quantity input mode
     @buy_window.active = false
     @buy_window.visible = false
     @number_window.set(@item, max, @buy_window.get_price)
     @number_window.active = true
     @number_window.visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when quantity input window is active)
 #--------------------------------------------------------------------------
 def update_number
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Set quantity input window to inactive / invisible
     @number_window.active = false
     @number_window.visible = false
     # Branch by command window cursor position
     @buy_window.active = true
     @buy_window.visible = true
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Play shop SE
     $game_system.se_play($data_system.shop_se)
     # Set quantity input window to inactive / invisible
     @number_window.active = false
     @number_window.visible = false
     if $game_temp.player_shop_buy_items[1] != $network.user_id
       $game_party.lose_gold(@number_window.number * @buy_window.get_price)
     end
       
       $network.send('SMP',$game_temp.player_shop_buy_items[1] ,@number_window.number * @buy_window.get_price)
       case @item
       when RPG::Item
         type = 0
         $game_party.gain_item(@item.id, @number_window.number)
       when RPG::Weapon
         type = 1
         $game_party.gain_weapon(@item.id, @number_window.number)
       when RPG::Armor
         type = 2
         $game_party.gain_armor(@item.id, @number_window.number)
       end
       shop = $game_temp.player_shop_buy_selected
       id = @item.id
       amount = @number_window.number
       price = @buy_window.get_price
       $network.send('SCD',shop, id, -amount, price, type)
       @buy_window.reduce_quantity(@number_window.number)
       # Refresh each window
       @gold_window.refresh
       @buy_window.refresh
       @status_window.refresh
       # Change windows to buy mode
       @buy_window.active = true
       @buy_window.visible = true
     return
   end
 end
end

#==============================================================================
# ** Window_PlayerShopBuy
#------------------------------------------------------------------------------
#  This window displays buyable goods on the shop screen.
#==============================================================================

class Window_PlayerShopBuy < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     shop_goods : goods
 #--------------------------------------------------------------------------
 def initialize
   super(0, 128, 368, 352)
   refresh
   self.index = 0
 end
 #--------------------------------------------------------------------------
 # * Item Acquisition
 #--------------------------------------------------------------------------
 def item
   return nil if @data == []
   return @data[self.index][0]
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   goods = $game_temp.player_shop_buy_items
   for item_data in goods[3].values
     next if item_data[1] <= 0
     case item_data[2]
     when 0
     item = $data_items[item_data[3]]
     when 1
       item = $data_weapons[item_data[3]]
     when 2
       item = $data_armors[item_data[3]]
     end
     if item != nil
       @data.push([item, item_data[0], item_data[1]]) #[item, price, amount]
     end
   end
   if self.index >= @data.size
       self.index = @data.size - 1
       self.index = 0 if self.index < 0
   end
   # If item count is not 0, make a bit map and draw all items
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
 end
 
 def reduce_quantity(amount)
   for item_data in $game_temp.player_shop_buy_items[3].values
    case item_data[2]
     when 0
     item = $data_items[item_data[3]]
     when 1
       item = $data_weapons[item_data[3]]
     when 2
       item = $data_armors[item_data[3]]
     end
     if item == self.item
         item_data[1] -= amount
     end
   end
 end
   
 def get_price
     return @data[self.index][1]
 end
 
 def get_number
     return @data[self.index][2]
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #     index : item number
 #--------------------------------------------------------------------------
 def draw_item(index)
   item = @data[index][0]
   # Get items in possession
   case item
   when RPG::Item
     number = $game_party.item_number(item.id)
   when RPG::Weapon
     number = $game_party.weapon_number(item.id)
   when RPG::Armor
     number = $game_party.armor_number(item.id)
   end
   # If price is less than money in possession, and amount in possession is
   # not 99, then set to normal text color. Otherwise set to disabled color
   if @data[index][1] <= $game_party.gold and number < 99
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width - 32, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   bitmap = RPG::Cache.icon(item.icon_name)
   opacity = self.contents.font.color == normal_color ? 255 : 128
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   self.contents.draw_text(x + 28, y, 212, 32, item.name + "  [QTY: " + @data[index][2].to_s + "]", 0)
   self.contents.draw_text(x + 240, y, 88, 32, @data[index][1].to_s, 2)
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
   @help_window.set_text(self.item == nil ? "" : self.item.description)
 end
end



class Game_Temp
   attr_accessor :player_shop_sell_item
   attr_accessor :player_shop_sell_amount
   attr_accessor :player_shop_sell_selected
   attr_accessor :player_shop_owner
   attr_accessor :player_shop_name
   attr_accessor :player_shop_buy_items
   attr_accessor :player_shop_buy_selected
   alias initialize_player_shops initialize
   def initialize
       @player_shop_sell_item = nil
       @player_shop_sell_amount = 0
       @player_shop_sell_selected = 0
       @player_shop_owner = ""
       @player_shop_name = ""
       @player_shop_buy_items = {}
       @player_shop_buy_selected = 0
       initialize_player_shops
   end
end


.rb extension: ShowHide

#------------------------------------------------------------------------------
#                  RMX-OS Player Shops                                            
#                     by Wizered67                                                          
#                          V 0.89                                                              
# All errors should be reported at www.chaos-project.com.                  
#------------------------------------------------------------------------------
module RMXOS

#------------------------------------------------------------------
# Passes the extension's main module to RMX-OS on the top
# level so it can handle this extension.
# Returns: Module of this extension for update.
#------------------------------------------------------------------
def self.load_current_extension
return PlayerShops
end

end

#======================================================================
# module PlayerShops
#======================================================================

module PlayerShops

# extension version
VERSION = 1.0
# required RMX-OS version
RMXOS_VERSION = 2.0
# whether the server should update this extension in an idividual thread or not
SERVER_THREAD = true
# the extension's name/identifier
IDENTIFIER = 'Player Shops'

SHOPS_CREATED_FILENAME = './createdshops.dat'
SHOPS_DATA_FILENAME = './shopsdata.dat'
MONEY_OWED_FILENAME = './moneyowed.dat'
# :::: START Configuration
# - YOUR CONFIGURATION HERE
# :::: END Configuration

#------------------------------------------------------------------
# Initializes the extension (i.e. instantiation of classes).
#------------------------------------------------------------------
def self.initialize
# create mutex
@mutex = Mutex.new
@shops_created = {}
if FileTest.exist?(SHOPS_CREATED_FILENAME)
file = File.open(SHOPS_CREATED_FILENAME, 'r')
created = Marshal.load(file)
file.close
created.each_key {|map| @shops_created[map] = created[map]}
end
@max_shop_id = 1
if @shops_created != {}
for map in @shops_created.keys
for id in @shops_created[map]
@max_shop_id = id + 1 if id >= @max_shop_id
end
end
end
@shop_data = {}
if FileTest.exist?(SHOPS_DATA_FILENAME)
file = File.open(SHOPS_DATA_FILENAME, 'r')
data = Marshal.load(file)
file.close
for map in @shops_created.keys
for id in @shops_created[map]
@shop_data[id] = data[id]
end
end
end
@money_owed = {}
if FileTest.exist?(MONEY_OWED_FILENAME)
file = File.open(MONEY_OWED_FILENAME, 'r')
money = Marshal.load(file)
file.close
money.each_key {|p| @money_owed[p] = money[p]}
end
#puts @shop_data
end
#------------------------------------------------------------------
# Gets the local extension mutex.
#------------------------------------------------------------------
def self.mutex
return @mutex
end
#------------------------------------------------------------------
# Calls constant updating on the server.
#------------------------------------------------------------------
def self.main
# while server is running
while RMXOS.server.running
@mutex.synchronize {
self.server_update
}
sleep(0.1) # 0.1 seconds pause, decreases server load
end
end
#------------------------------------------------------------------
# Handles the server update.
#------------------------------------------------------------------
def self.server_update
user_ids = []
RMXOS.clients.get.each {|c| user_ids.push(c.player.user_id) if c.player.user_id > 0}
for shop in @shop_data.keys
if !user_ids.include?(@shop_data[shop][2])
@shop_data[shop][2] = 0 #if a player isn't online, change it so no one is using the shop they were previously using
end
end
end
#------------------------------------------------------------------
# Handles updating from a client.
# client - Client instance (from Client.rb)
# Returns: Whether to stop check the message or not.
#------------------------------------------------------------------
def self.client_update(client)
case client.message
when /\AENT\Z/ # enter server, send login money
user_id = client.player.user_id
if @money_owed.keys.include?(user_id) && @money_owed[user_id] != 0
client.send('RMPS', @money_owed[user_id])
@money_owed[user_id] = 0
self.save_money_owed
end


when /\ATSES\t(.+)/ #try editting a shop
shop_id = $1.to_i
if !@shop_data.keys.include?(shop_id)
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "There is no shop with that id."))
client.send('EIS')
return true
end
if client.player.user_id != @shop_data[shop_id][1]
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "You do not own that shop."))
client.send('EIS')
return true
end
if @shop_data[shop_id][2] != 0
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "Selected shop is already in use."))
return true
end
@shop_data[shop_id][2] = client.player.user_id
client.send('OESC', @shop_data[shop_id][0], @shop_data[shop_id][4])
return true

when /\ASMP\t(.+)\t(.+)/ #send money to da people (if not online, add to money owed hash)
user_id = $1.to_i
amount = $2.to_i
user_ids = []
return if user_id == client.player.user_id
RMXOS.clients.get.each {|c| user_ids.push(c.player.user_id) if c.player.user_id > 0}
if user_ids.include?(user_id)
client.sender.send_to_id(user_id, RMXOS.make_message('RMPS', amount))
else
if @money_owed.include?(user_id)
@money_owed[user_id] += amount
else
@money_owed[user_id] = amount
end
self.save_money_owed
#puts @money_owed
end
return true

when /\ACNPS\t(.+)\t(.+)\t(.+)\t(.+)/ #create new player shop
owner_name = $1
owner_id = $2.to_i
map_id = $3.to_i
shop_name = $4
@shops_created[map_id] = [] if @shops_created[map_id] == nil
@shops_created[map_id].push(@max_shop_id)
@shop_data[@max_shop_id] = [owner_name, owner_id, 0, {}, shop_name]
client.send('NSI', @max_shop_id)
puts "New shop created by " + client.player.username + " on map " + map_id.to_s + " with id " + @max_shop_id.to_s + " and name " + shop_name
@max_shop_id += 1
self.save_shop_data
self.save_shop_list

return true

when /\ARPS\t(.+)\t(.+)/ #remove player shop
shop_id = $1.to_i
map_id = $2.to_i
if !@shops_created.keys.include?(shop_id) || !@shop_data.keys.include?(shop_id)
return true
end
@shops_created[map_id].delete(shop_id)
@shop_data[shop_id] = nil
self.save_shop_data
self.save_shop_list
return true


when /\ASMSM\t(.+)/
#puts "Request to send shop list"
map_id = $1.to_i
message = []
puts @shop_data
if @shops_created[map_id] != nil
for sid in @shops_created[map_id]
message.push(" " + @shop_data[sid][0] + "'s " + @shop_data[sid][4] + " [" + sid.to_s + "]") if @shop_data[sid] != nil
end
end
if message == []
text = "No shops on this map."
else
text = "Shops on map: " + message.join(',')
end
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorOk, 0, text))
#puts text
return true


when /\ASMDS\t(.+)/ #send map data on shops
map_id = $1.to_i
if !@shops_created.keys.include?(map_id)
return true
end
client.send('LMDS', [@shops_created[map_id].inspect])
return true

when /\ASSD\t(.+)\t(.+)/ #send specific shop data
shop_id = $1.to_i
map_id = $2.to_i
if !@shop_data.keys.include?(shop_id)
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "Selected shop does not exist."))
client.send('EISB')
return true
end
if @shops_created[map_id] == nil || !@shops_created[map_id].include?(shop_id)
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "Selected shop is not on the same map."))
return true
end
#puts @shop_data[shop_id][2]
self.server_update
if @shop_data[shop_id][2] != 0
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "Selected shop is already in use."))
return true
end
@shop_data[shop_id][2] = client.player.user_id
client.send('LSSD', @shop_data[shop_id].inspect)
return true

when /\ASIU\t(.+)\t(.+)/ #change shop in use
shop_id = $1.to_i
user = $2.to_i
if !@shop_data.keys.include?(shop_id)
return true
end
@shop_data[shop_id][2] = user
return true

when /\ASSO\t(.+)\t(.+)\t(.+)/ #set shop owner
owner_name = $1
owner_id = $2.to_i
shop_id = $3.to_i
if !@shop_data.keys.include?(shop_id)
return true
end
data = @shop_data[shop_id]
data[0] = owner_name
data[1] = owner_id
return true


when /\ASCD\t(.+)\t(.+)\t(.+)\t(.+)\t(.+)/ #change shop data
shop_id = $1.to_i
item_id = $2
amount = $3.to_i
price = $4.to_i
type = $5.to_i
if !@shop_data.keys.include?(shop_id)
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "Selected shop does not exist."))
client.send('EIS')
return true
end
self.server_update
if @shop_data[shop_id][2] != 0 && @shop_data[shop_id][2] != client.player.user_id
client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorError, 0, "Selected shop is already in use. Please wait until the current user is done."))
return true
end
data = @shop_data[shop_id]
items = data[3]
access_id = item_id + "-" + type.to_s
if items[access_id] == nil
items[access_id] = []
items[access_id][1] = amount
items[access_id][0] = price
items[access_id][2] = type
items[access_id][3] = item_id.to_i
else
items[access_id][1] += amount
items[access_id][0] = price
items[access_id][2] = type
items[access_id][3] = item_id.to_i
if items[access_id][1] <= 0
@shop_data[shop_id][3].delete(access_id)
end
end
#puts @shop_data
self.save_shop_data
if (amount > 0)
#client.send(RMXOS.make_message('CHT', RMXOS::Data::ColorOk, 0, "Item(s) placed for sale."))
end
#puts "Item " + item_id + "-" + type.to_s + " is in quantity " + item[1].to_s + " at price " + item[0].to_s + " in shop " + shop_id.to_s

return true
end
return false

end

def self.save_shop_data
file = File.open(SHOPS_DATA_FILENAME, 'w')
Marshal.dump(@shop_data, file)
file.close
end

def self.save_money_owed
file = File.open(MONEY_OWED_FILENAME, 'w')
Marshal.dump(@money_owed, file)
file.close
end

def self.save_shop_list
file = File.open(SHOPS_CREATED_FILENAME, 'w')
Marshal.dump(@shops_created, file)
file.close
end

end






Instructions

Place the script below RMX-OS and add the extension. Optionally configure a creation price in the client script. 3 .dat files will automatically be created in the server to keep track of shops and money owed to players. The names can be optionally configured.

Commands (Note: some cannot be used if shop is in use already):

  • /makeshop NAME - Creates a shop with the given name. Names are seen by other players and can give a description of the shop or just be for fun.

  • /editshop ID - Edits the shop with the given id as long as you are the owner. Shop id can be seen in the shop list and is shown when creating a shop.

  • /buy ID - Enters the shop with the given id on the current map and allows you to buy goods. The shop owner can use this to get back unsold goods for free.

  • /shops - Shows a list of all shops on the current map, including names, owners, and ids.




Compatibility

Requires RMX-OS 2.0. Probably not ideal for use with custom shop systems. Let me know if you find other compatibility issues.


Credits and Thanks


  • Me

  • Blizzard for making RMX-OS

  • Whitespirits for requesting and testing




Author's Notes

This is definitely my biggest script I've publically released. I hope you guys get some use out of it. As I mentioned above, I currently don't have RMXP so I won't be able to add many new features or fix bugs for now. If you have any questions, don't hesitate to let me know. Enjoy!
2
New Projects / [Game Maker] A Family Affair
June 02, 2014, 09:15:58 pm
Introduction:
After years of biding your time, the moment has come for you to take what is rightfully yours! Starting from a small base, you must build your criminal organization to control the entire city. But there will be those that oppose you...

A Family Affair is a game made in Game Maker Studio for the Spring Stemfuse Got Game Competition. Our goal with this project was to combine turn based strategy and action platforming in order to deliver a fun game that challenges the player's mind and reflexes. For the first time, we used Spine for the graphics, and we had great results! The animations are much more fluid than they ever could have been before. Overall our team is really happy with how it turned out, and will be working on it over the Summer in order to improve the game and fix the remaining bugs (especially the AI related ones).

Download:
You can try out the current demo here. As this is our first release, there will be some bugs. We'd really love some feedback on the game so that we know what to improve for the future. Also, it would be great if you could please take a moment to upvote our game!

Screenshots:
Spoiler: ShowHide

Spoiler: ShowHide

Spoiler: ShowHide
3
For the past couple of months, I've been working during my spare time on a project for the Stemfuse Got Game Competition. This competition is specifically for middle and high school Game Maker games. The RTS genre has always intrigued me, so I figured a low stakes competition was a good opportunity to try to make my own. With some help from my friends for graphics and music, I finally finished the game, 1800. 1800 is a historically based minimalist RTS that takes place during the Napoleonic Wars and War of 1812.
Spoiler: ShowHide


Anyway, now for some thoughts on the project. First of all, RTSs are hard. Very hard. I was constantly attempting to optimize the game, while throwing on new features to add to the "strategy" aspect. I had a fairly decent vision of the project from the start, but it definitely evolved as I worked on it. The main pitfalls I fell into were not knowing what I was doing, resulting in some highly questionable design choices at the beginning, creating an AI that wasn't terrible, and reducing lag. Unfortunately I waited until the end to add the AI, and that caused some problems. First of all, it was much harder than I had expected. I really had no clue how to do it and began piecing it together as I went along. Additionally, the AI made the game start to lag immensely as large amounts of units were on the map at a time. This is an issue I never really fixed, but instead tried to minimize in the level design. The original plan was to have 5 countries actively moving units as well as multiple others that were neutral. I maintained this original vision for the most part in the free play mode, along with the warning that it will lag on most computers. For the campaign mode, the American campaign being the only one I actually made, I removed all of the unnecessary countries. This reduced the lag significantly at the beginning of the game, but after playing for a couple of minutes the lag still gets pretty overwhelming.

Overall, I think the game ended up being fairly mediocre in terms of actual gameplay. However, I think that this was a great experience for me. I have learned a lot about what to do and what not to do when making an RTS, and would be able to approach things completely differently in the future. That being said, I'm really sick of RTSs right now and can't imagine making another in the near future :P. I think had I chosen to to a turn based game instead, it would have saved me a lot of trouble with worrying about the lag, so I'll keep that in mind for the future.

Now for the part where you can help me. Here's a link to my entry in the competition. If you could spare me about 2 clicks to upvote the entry, that would be greatly appreciated. Even if you don't think the game is very good, I hope you could just take a moment to appreciate the effort that went into making this and support me. Currently the entry leading in the popular vote has over 500 votes, and is a simple and nearly broken maze game with one level. The effort that went into making that is so minimal that its number of votes is mind boggling. My goal is to get at least 100 votes in the competition, and with your help I can do it.

Thanks so much everyone!  
4
RMXP Script Database / [XP] RMX-OS Login Messages
February 13, 2013, 07:04:55 pm
    RMX-OS Login Messages
    Authors: Wizered67
    Version: 0.89
    Type: RMX-OS Login Notification
    Key Term: RMX-OS Plugin



    Introduction

    A simple script that will alert players when someone logs in or out.


    Features


    • Displays login messages

    • Easy to use





    Screenshots
    None, use your imagination.


    Demo

    N/A


    Script
    Spoiler: ShowHide
    [/list]

    module RMXOS
     class Network

       alias check_game_login_messages check_game
       def check_game(message)
         case message
       when /\ASCM(.+)\t(.+)/
          if eval($2)
             connect = "Logged in"
           else
             connect = "Disconnected"
           end
         
           self.add_message(nil,"#{$1} Has #{connect}." , RMXOS::Data::ColorInfo, false)
           return true
         end
         return check_game_login_messages(message)
       end
     end
    end
       


    .rb extension: ShowHide

    #------------------------------------------------------------------------------
    module RMXOS
     
     def self.load_current_extension
       return LoginMessages
     end
     
    end

    #======================================================================
    # module MOTD
    #======================================================================

    module LoginMessages
     
     VERSION = 1.00
     RMXOS_VERSION = 1.15
     SERVER_THREAD = false
     
     def self.initialize
     end
     
     
     def self.main
       while RMXOS.server.running
         self.server_update
         sleep(0.1)
       end
     end
     
     def self.server_update
     end
     
     def self.client_update(client)
       case client.message
    when /\ADCT\Z/ # disconnect
    connect = false
         client.sender.send_to_all("SCM#{client.player.username}\t#{connect}", false)
       return true
     
     when /\AENT\Z/ # enter server
    # broadcast to everybody that a new player has entered the server
    connect = true
         client.sender.send_to_all("SCM#{client.player.username}\t#{connect}", true) #login message avictor
          #print "Login: #{@player.username}"
         return true

    end
        return false
    end
     
    end



    Instructions

    Place the script below RMX-OS and add the extension.


    Compatibility

    Requires RMX-OS. No other issues none.


    Credits and Thanks


    • Me

    • Blizzard of course




    Author's Notes

    Enjoy! Should be simple, but let me know if you have any problems.
    5
    After using RMX-OS for a while, I feel like I have a fairly good understanding of how things work, so I felt that it was time to give back to the community. If you're using RMX-OS and need help adding a new feature or editing an existing one, I'd be happy to take a look at it when I get the time.

    First of all, I will not help you set up the server. I had enough trouble doing that myself xD Also, I can't make any promises that I can actually do what you need, but I can take a shot at it. My free time is fairly limited, so don't expect me to be working 24/7 on it or anything. Finally, even with my experience with
    RMX-OS, I'm not at the level where I can make an ABS work with it or anything like that, so try to keep it fairly simple, though I can always take a shot at some more advanced stuff.

    Here's some samples of the stuff I made a while ago. Some of it may be outdated, but I made these a while ago.

    http://forum.chaos-project.com/index.php?topic=8336.0
    http://forum.chaos-project.com/index.php?topic=8960.0
    http://forum.chaos-project.com/index.php?topic=7962.0
    http://forum.chaos-project.com/index.php?topic=8533.0


    For a sample of the more complex stuff I've pulled off, take a look at my project thread, where I've managed to get multiplayer building, global doors, global sound effects, etc.

    If you have a script request, please give me details on what it is, how it works, any commands that need to be added, etc.

    Just a final note, this is completely free, so don't worry about that, I just can't make any promises that I can do what you want. If you have any questions, let me know.

    6
    General Discussion / Giving Ludum Dare a Try
    April 20, 2012, 12:02:24 am
    Last year, I first heard about Ludum Dare, a game competition where participants try to make a game in 48 hours. I finally decided to give it a shot and will be entering the 72 hour "jam" with some of my friends in real life. It starts tomorrow and I'm really excited.  I'm not expecting to do very well, and I don't know if I'll finish the game in time, but I really want to give it a shot for the experience if nothing else.

    Is anyone else going to be making a game for Ludum Dare?

    For anyone curious, here's the website.
    7
    Introduction:
    Creations is a 2D multi-player build-and-destroy game created with RMXP. Players are able to build structures while interacting with each other. Players are also able to create kingdoms in order to claim a map. Kingdoms can be used in many ways, and it's up to the players whether they will create a simple trade route, or make an empire and claim the world. If 2 kingdoms want the same land, they can challenge each other to a battle for the land. The entire world is in the hands of the players. Peaceful or violent, mining or farming, good or evil, the choice is yours.



    Gameplay:
    The style of gameplay will be similar to Minecraft. You will be able to place tiles, break them, and interact with some. So far, only a few decorative tiles and doors, chests, and signs have actually been added. This is definitely a work in progress so far. Only the main systems (Building, destroying, etc) have been created so far. I am not quite sure what to do with the game from here, but I am hoping for some ideas while I come up with my own. The game will be multi-player.



    Features:
    Green means completed, yellow means in progress, and red means not started. There may still be some issues even if completed.

    • Basic Building

    • Basic Destroying

    • Basic HUD

    • Global Maps

    • Interactive Tiles

    • Crafting

    • Battle System

    • On-map Menus





    Known Issues

    • Problems with multiple players building at the same time

    • Issues with scrolling maps

    • Risk of data corruption or hacking

    • Issues with moving events

    • No battle system, little content

    • Problem with multiple players using the same chest at the same time





    Screenshots and Videos
    Spoiler: ShowHide

    New and improved walls.


    Spoiler: ShowHide

    Global day and night system.


    Spoiler: ShowHide

    Building a City.


    Spoiler: ShowHide

    Trees and Plants.


    Spoiler: ShowHide

    New Destruction System.


    Spoiler: ShowHide

    Crafting!


    Multi-player Test Video!



    Demo
    Demo removed, but let me know if you want to help test!



    Credits

    • Blizzard - Scripts

    • Nathmatt - A few lines I borrowed from him

    • Game_Guy - Item Storage

    • Ryex - Mouse Window API

    • Homerunbom12 - Ideas



    Thanks for looking at my project! Feedback is appreciated!
    8
    Wizered67's Ultimate Mouse Menu
    Authors: Wizered67
    Version: 0.86
    Type: Custom Mouse Menu System
    Key Term: Custom Menu System



    Introduction

    When Ryex first released his Mouse Window API, I thought it was a cool script, but I didn't think I would ever use it. However, I soon realized that if I wanted a menu that didn't pause my game, I was going to need to make it myself and Ryex's Mouse Window API seemed like the best option. Finally, I have made enough progress and I feel that it is in a form I can release. This easy to use menu comes with various windows which should be enough for basic games. This script is not perfect and has a few things that need to be added or fixed. If you find an error, you should report it here.


    Features


    • An easy to use menu for RMX-OS and Blizz-ABS that doesn't pause the game.

    • Features a main menu, item menu, hotkey menu, equip menu, and stat distribution menu. A quest window is in progress. Also includes a shop window.

    • Comes with right click menus (although they are set to open on left click) that let you find out more about your items.




    Screenshots
    Spoiler: ShowHide

    You can see some more screenshots of this in action in my project thread for Legendary Kingdoms Online. The link is in my signature. Oh yeah, and be sure to support my game while your at it  ;).


    Demo
    You can download the demo here:




    Script
    See the demo.



    Instructions

    Configure the script (There's not much) and place all of the menu scripts and Ryex's Mouse Window API in your game. Make sure you add
    $mouse_window_controller.update

    to the update method in Scene_Map.


    Compatibility

    Requires Ryex's Mouse Window API. For best results, use with RMX-OS, and Blizz-ABS.


    Credits and Thanks


    • Wizered67 for making the script

    • Ryex for his Mouse Window API and helping me.




    Author's Notes

    Enjoy and be sure to credit. Feel free to post if you have problems or need help or have feedback.

    9
    RMXP Script Database / [XP] RMX-OS Following
    March 12, 2011, 12:19:39 pm
    RMX-OS Following
    Authors: Wizered67
    Version: 0.90
    Type: RMX-OS Party Addon
    Key Term: RMX-OS Plugin



    Introduction

    This script adds a new command allowing player's to follow each other. It can be very helpful in parties, but you do not have to be in the same party as the other person. I got this idea while trying to get my friend to follow me while testing some stuff in my game.


    Features


    • Plugin for following.

    • Makes it easier to follow.

    • No Server Extension.

    • Easy to use.




    Screenshots

    None


    Demo

    None


    Script

    Spoiler: ShowHide

    #------------------------------------------------------------------------------
    #                  RMX-OS Following
    #                     by Wizered67
    #                          V 0.90
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    class Game_Player
    attr_accessor :following
    alias init_add_follow initialize
    def initialize
      @following = nil
      init_add_follow
    end

    alias update_following_check_add update
    def update
       unless moving? or $game_system.map_interpreter.running? or
               @move_route_forcing or $game_temp.message_window_showing
       if @following != nil
         update_following
         end
      end
    update_following_check_add
      end

      def update_following
    if @old_following_x != @following.x || @old_following_y != @following.y
    $game_player.path_target_x = @following.x
    $game_player.path_target_y = @following.y
    @old_following_x = @following.x
    @old_following_y = @following.y
    end
    end
    end

    module RMXOS
      module Documentation
      PARAMETERS['follow']    = 'PLAYER' 
      DESCRIPTIONS['follow']    = 'Lets you follow another player. You can stop with /stopfollow'
      PARAMETERS['stopfollow']    = 'none' 
      DESCRIPTIONS['stopfollow']    = 'Stops you from following a player anymore.'
    end
    class Network
       alias check_normal_commands_follow_add check_normal_commands
      def check_normal_commands(message)
        case message
        when /\A\/follow (\S+)/
         command_follow($1)
          return true
        when /\A\/stopfollow\Z/
         command_stop_follow
          return true
        end
        return check_normal_commands_follow_add(message)
      end
     
      def command_follow(player)
      @players.any? {|key, value|
      $game_player.following = value if value.username == player }
    end

      def command_stop_follow
        $game_player.following = nil
       add_message(nil,'You stop following.', RMXOS::Data::ColorOK)
        end
    end
    end


    This requires Blizz-ABS also, and you must place it below Blizz-ABS.


    Instructions

    Just add below Blizz-ABS.


    Compatibility

    Requires Blizz-ABS and RMX-OS. For the third time, make sure it goes below Blizz-ABS.


    Credits and Thanks


    • Wizered67

    • Winkio for adding the pathfinder to Blizz-ABS.

    • Blizzard for Blizz-ABS.

    • Nathmatt because I borrowed a little from his player drop down window.




    Author's Notes

    For best results, you may want to consider adding this to nathmatt's drop down window. This script is not 100% finished yet. If there are any errors, please report them. I appreciate any feedback you have to give.
    10
    I'm trying to make an add-on for RMX-OS that let's you follow other players(specifcally party members). Basically, I have been setting the @following variable to the player that you are following. The only problem is that after you follow someone, you can no longer move anymore. I'm not sure if I made a silly mistake with something or if I'm just missing something. I'm not an expert when it comes to scripting,but here's what I have:
    Spoiler: ShowHide
    class Game_Player
    attr_accessor :following
    alias init_add_follow initialize
    def initialize
     @following = nil
     init_add_follow
    end

    alias update_following_check_add update
    def update
      unless moving? or $game_system.map_interpreter.running? or
              @move_route_forcing or $game_temp.message_window_showing
      if @following != nil
        update_following
        end
     end
    update_following_check_add
     end

     def update_following
    if @old_following_x != @following_x || @old_following_y != @following.y
    $game_player.path_target_x = @following.x
    $game_player.path_target_y = @following.y
    @old_following_x = @following.x
    @old_following_y = @following.y
    end
    end
    end


    Just so you know, it uses the Blizz-ABS pathfinder for it. I would appreicate any help.

    Thanks,
    Wizered67
    11
    RMXP Script Database / [XP] RMX-OS Reporting
    February 16, 2011, 11:22:43 am
    RMX-OS Reporting
    Authors: Wizered67
    Version: 1.01
    Type: Reporting System
    Key Term: RMX-OS Plugin



    Introduction

    Have you ever played a game where you see another player cheating? Normally in RMX-OS, a player can do nothing about players that are breaking rules. What this script adds is a "/report" command. The command has the parameters Player and Reason. The player's name does not have to be exact and they do not have to be logged on. Basically, the player and reason are sent to the server and kept in a log. That way admins can check the log and see if there is anyone they need to ban.


    Features


    • Allows players to report other players that break rules.

    • Name does not need to be exact.

    • Server formats reports for you.

    • Can easily be used to report bugs in the game itself also.

    • Now features MySQL support




    Screenshots

    None but the log looks like this:
    2011-02-15 18:29:04 UTC: Player 'Wizered67' was reported by 'beta46'. Reason: 'He was walking through walls' .


    Demo

    Sorry, no demo.


    Script

    Client Side: ShowHide

    #------------------------------------------------------------------------------
    #                  RMX-OS Reporting Players
    #                     by Wizered67
    #                          V 1.00
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    module RMXOS
     module Documentation
     PARAMETERS['report']    = 'PLAYER REASON'  
     DESCRIPTIONS['report']    = 'Allows you to report a player that is breaking a rule.'
     end
     class Network
     def command_report(player, reason)
     $network.send("RPL#{player}\t#{reason}")
     end
     alias check_normal_commands_report_add check_normal_commands
     def check_normal_commands(message)
       case message
       when /\A\/report (\S+) (\S{1}.*)\Z/
        command_report($1, $2)
         return true
       end
       return check_normal_commands_report_add(message)
     end
    end
    end

    Client Side for RMX-OS 2.0: ShowHide
    #------------------------------------------------------------------------------
    #                  RMX-OS Reporting Players
    #                     by Wizered67
    #                          V 1.00
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    module RMXOS
      module Documentation
      PARAMETERS['report']    = 'PLAYER REASON' 
      DESCRIPTIONS['report']    = 'Allows you to report a player that is breaking a rule.'
      end
      class Network
      def command_report(player, reason)
      $network.send("RPL\t#{player}\t#{reason}")
      end
      alias check_normal_commands_report_add check_normal_commands
      def check_normal_commands(message)
        case message
        when /\A\/report (\S+) (\S{1}.*)\Z/
         command_report($1, $2)
          return true
        end
        return check_normal_commands_report_add(message)
      end
    end
    end


    .rb add-on: ShowHide
    #------------------------------------------------------------------------------
    #                  RMX-OS Reporting Players
    #                     by Wizered67
    #                          V 1.00
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    module RMXOS

    #------------------------------------------------------------------
    # Passes the extension's main module to RMX-OS on the top
    # level so it can handle this extension.
    # Returns: Module of this extension for update.
    #------------------------------------------------------------------
    def self.load_current_extension
    return ReportPlayers
    end

     module Data
     REPORT_TEXT = 'TIME: Player \'PLAYER\' was reported by \'REPORTER\'. Reason: \'REASON\'.'
     end
    end

    #======================================================================
    # module ReportPlayers
    #======================================================================

    module ReportPlayers

    # extension version
    VERSION = 1.0
    # required RMX-OS version
    RMXOS_VERSION = 1.18
    # whether the server should update this extension in an idividual thread or not
    SERVER_THREAD = true

    # :::: START Configuration
    REPORT_LOG = './Extensions/reports.log'
    # :::: END Configuration

    #------------------------------------------------------------------
    # Initializes the extension
    #------------------------------------------------------------------
    def self.initialize
    end
    #------------------------------------------------------------------
    # Calls constant updating on the server.
    #------------------------------------------------------------------
    def self.main
    # while server is running
    while RMXOS.server.running
    self.server_update
    sleep(0.1)
    end
    end
    #------------------------------------------------------------------
    # Handles the server update.
    #------------------------------------------------------------------
    def self.server_update
     end
    #------------------------------------------------------------------
    # Handles updating from a client.
    # client - Client instance (from Client.rb)
    # Returns: Whether to stop check the message or not.
    #------------------------------------------------------------------
    def self.client_update(client)
    case client.message
     when /\ARPL(.+)\t(.+)/
     player_reported = $1
     reason = $2
     reporter = client.player.username
     time = Time.now.getutc.to_s
    message = RMXOS::Data::REPORT_TEXT.sub('TIME', time).sub('PLAYER', player_reported).sub('REASON', reason).sub('REPORTER', reporter)
     message = message + "\n"
     client.send("CHT#{RMXOS::Data::ColorInfo}\t0\tPlayer was reported.")
     self.log_report(message)
     return true
    end
       return false

    end
     
     
     def self.log_report(message)
       file = File.open(REPORT_LOG,'a')
       file.write(message)
       file.close
       end
    end


    .rb extension RMX-OS 2.0: ShowHide
    module RMXOS
       
        #------------------------------------------------------------------
        # Passes the extension's main module to RMX-OS on the top
        # level so it can handle this extension.
        # Returns: Module of this extension for update.
        #------------------------------------------------------------------
        def self.load_current_extension
            return ReportPlayers
        end
       
        module Data
      REPORT_TEXT = 'TIME: Player \'PLAYER\' was reported by \'REPORTER\'. Reason: \'REASON\'.'
      end
       
    end

    #======================================================================
    # module ExtensionSkeleton
    #======================================================================

    module ReportPlayers
       
        # extension version
        VERSION = 1.0
        # required RMX-OS version
        RMXOS_VERSION = 2.0
        # whether the server should update this extension in an idividual thread or not
        SERVER_THREAD = true
        # the extension's name/identifier
        IDENTIFIER = 'Report Players'
        REPORT_LOG = './Extensions/reports.log'
       
        # :::: START Configuration
        # - YOUR CONFIGURATION HERE
        # :::: END Configuration
       
        #------------------------------------------------------------------
        # Initializes the extension (i.e. instantiation of classes).
        #------------------------------------------------------------------
        def self.initialize
            # create mutex
            @mutex = Mutex.new
        end
        #------------------------------------------------------------------
        # Gets the local extension mutex.
        #------------------------------------------------------------------
        def self.mutex
            return @mutex
        end
        #------------------------------------------------------------------
        # Calls constant updating on the server.
        #------------------------------------------------------------------
        def self.main
            # while server is running
            while RMXOS.server.running
                @mutex.synchronize {
                    self.server_update
                }
                sleep(0.1) # 0.1 seconds pause, decreases server load
            end
        end
        #------------------------------------------------------------------
        # Handles the server update.
        #------------------------------------------------------------------
        def self.server_update
            # - YOUR SERVER CODE HERE
        end
        #------------------------------------------------------------------
        # Handles updating from a client.
        # client - Client instance (from Client.rb)
        # Returns: Whether to stop check the message or not.
        #------------------------------------------------------------------
        def self.client_update(client)
            case client.message
        when /\ARPL(.+)\t(.+)/
        player_reported = $1
        reason = $2
        reporter = client.player.username
        time = Time.now.getutc.to_s
        message = RMXOS::Data::REPORT_TEXT.sub('TIME', time).sub('PLAYER', player_reported).sub('REASON', reason).sub('REPORTER', reporter)
        message = message + "\n"
        client.send("CHT\t#{RMXOS::Data::ColorInfo}\t0\t Player was reported.")
        self.log_report(message)
        return true
            end
        return false
        end
       
        def self.log_report(message)
        file = File.open(REPORT_LOG,'a')
        file.write(message)
        file.close
        end
       
    end


    MySQL Code: ShowHide
    CREATE TABLE IF NOT EXISTS `reports` (
     `id` int(11) NOT NULL AUTO_INCREMENT,
     `Time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Zeit',
     `Reported_Player` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Spieler der Gemeldet wird',
     `Reporter` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Spieler der Gemeldet hat',
     `Reason` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Grund',
     PRIMARY KEY (`id`),
     UNIQUE KEY `id` (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

    .rb for MySQL version: ShowHide
    #------------------------------------------------------------------------------
    #                  RMX-OS Reporting Players
    #                     by Wizered67
    #                  Modified by Midakox3
    #                          V 1.01?
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    module RMXOS
       
       #------------------------------------------------------------------
       # Passes the extension's main module to RMX-OS on the top
       # level so it can handle this extension.
       # Returns: Module of this extension for update.
       #------------------------------------------------------------------
       def self.load_current_extension
           return ReportPlayers
       end

    end

    #======================================================================
    # module ReportPlayers
    #======================================================================

    module ReportPlayers
       
       # extension version
       VERSION = 1.01
       # required RMX-OS version
       RMXOS_VERSION = 1.18
       # whether the server should update this extension in an idividual thread or not
       SERVER_THREAD = true
       
       #------------------------------------------------------------------
       # Initializes the extension
       #------------------------------------------------------------------
       def self.initialize
       end
       #------------------------------------------------------------------
       # Calls constant updating on the server.
       #------------------------------------------------------------------
       def self.main
           # while server is running
           while RMXOS.server.running
               self.server_update
               sleep(0.1)
           end
       end
       #------------------------------------------------------------------
       # Handles the server update.
       #------------------------------------------------------------------
       def self.server_update
     end
       #------------------------------------------------------------------
       # Handles updating from a client.
       # client - Client instance (from Client.rb)
       # Returns: Whether to stop check the message or not.
       #------------------------------------------------------------------
       def self.client_update(client)
           case client.message
     when /\ARPL(.+)\t(.+)/
     player_reported = $1
     reason = $2
     reporter = client.player.username
     time = Time.now.getutc.to_s
     con = Mysql.new 'host', 'dbuser', 'dbpassword', 'rmxosdb'
     con.query("INSERT INTO reports(Time, Reported_Player, Reporter, Reason) VALUES ('" + time + "', '" + player_reported + "','" + reporter + "', '" + reason + "')")
     client.send("CHT#{RMXOS::Data::ColorInfo}\t0\tPlayer was reported.")
     return true
           end
       return false
       
       end
     
     

    end

    .rb for MySQL version RMX-OS 2.0 (untested): ShowHide
    #------------------------------------------------------------------------------
    #                  RMX-OS Reporting Players
    #                     by Wizered67
    #                  Modified by Midakox3
    #                          V 1.01?
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    module RMXOS
       
       #------------------------------------------------------------------
       # Passes the extension's main module to RMX-OS on the top
       # level so it can handle this extension.
       # Returns: Module of this extension for update.
       #------------------------------------------------------------------
       def self.load_current_extension
           return ReportPlayers
       end

    end

    #======================================================================
    # module ReportPlayers
    #======================================================================

    module ReportPlayers
       
       # extension version
       VERSION = 1.01
       # required RMX-OS version
       RMXOS_VERSION = 1.18
       # whether the server should update this extension in an idividual thread or not
       SERVER_THREAD = true
       
       #------------------------------------------------------------------
       # Initializes the extension
       #------------------------------------------------------------------
       def self.initialize
       end
       #------------------------------------------------------------------
       # Calls constant updating on the server.
       #------------------------------------------------------------------
       def self.main
           # while server is running
           while RMXOS.server.running
               self.server_update
               sleep(0.1)
           end
       end
       #------------------------------------------------------------------
       # Handles the server update.
       #------------------------------------------------------------------
       def self.server_update
     end
       #------------------------------------------------------------------
       # Handles updating from a client.
       # client - Client instance (from Client.rb)
       # Returns: Whether to stop check the message or not.
       #------------------------------------------------------------------
       def self.client_update(client)
           case client.message
     when /\ARPL(.+)\t(.+)/
     player_reported = $1
     reason = $2
     reporter = client.player.username
     time = Time.now.getutc.to_s
     con = Mysql.new 'host', 'dbuser', 'dbpassword', 'rmxosdb'
     con.query("INSERT INTO reports(Time, Reported_Player, Reporter, Reason) VALUES ('" + time + "', '" + player_reported + "','" + reporter + "', '" + reason + "')")
     client.send("CHT\t#{RMXOS::Data::ColorInfo}\t0\tPlayer was reported.")
     return true
           end
       return false
       
       end
     
     

    end



    Instructions

    Just put the script in and it should work. Note that if the reason is more than one word, you must separate the words with dashes or something else.
    Now includes a MySQL version courtesy of Midakox3. To use the MySQL version, use the .rb file labeled "MySQL" and use the MySQL code on the database. If you are using RMX-OS 2.0, only use the scripts labeled as the 2.0 version.


    Compatibility

    Requires RMX-OS.


    Credits and Thanks


    • Me

    • Blizzard for making RMX-OS and since I borrowed a lot from his User Logger script.

    • Midakox3 for his modification for MySQL




    Author's Notes

    Enjoy and report any bugs here. Remember to use the extension!
    12
    RMXP Script Database / [XP] RMX-OS Daily Messages
    January 22, 2011, 01:36:40 am
    RMX-OS Daily Messages
    Authors: Wizered67
    Version: 1.00
    Type: Message of the day system
    Key Term: RMX-OS Plugin



    Introduction

    This script adds a new feature to RMX-OS that allows a message to be displayed upon logging in. It's pretty much the same thing as a "message of the day", but I called it daily messages so that it's shorter.  :haha:
    All you have to do is add the script and .rb extension and make a text file called "MOTD" (can be configured) that contains the message.


    Features


    • Displays important messages upon logging in

    • Easy to use

    • Server does not require a restart after changing the message so you can change it as much as you want.





    Screenshots
    None, its just a message....


    Demo

    N/A


    Script
    Client Side (RMX-OS 2.0 Compatible): ShowHide


    #------------------------------------------------------------------------------#
    #                  RMX-OS Daily Messages                                       #
    #                     by Wizered67                                             #
    #                          V 1.00                                              #
    # All errors should be reported at www.chaos-project.com.                      #
    #------------------------------------------------------------------------------#
    class Scene_Loading < Scene_Network
     alias load_game_motd load_game
     def load_game
       $network.send('GDM')
      load_game_motd
       end
    end




    .rb extension: ShowHide
    #------------------------------------------------------------------------------
    #                  RMX-OS Daily Messages                                            
    #                     by Wizered67                                                          
    #                          V 1.00                                                              
    # All errors should be reported at www.chaos-project.com.                  
    #------------------------------------------------------------------------------
    module RMXOS
     
     def self.load_current_extension
       return MOTD
     end
     
    end

    #======================================================================
    # module MOTD
    #======================================================================

    module MOTD
     
     VERSION = 1.00
     RMXOS_VERSION = 1.15
     SERVER_THREAD = false
     FILE_NAME = './MOTD.txt'
     
     
     def self.initialize
     end
     
     
     def self.main
       while RMXOS.server.running
         self.server_update
         sleep(0.1)
       end
     end
     
     def self.server_update
     end
     
     def self.client_update(client)
       case client.message
     when /\AGDM\Z/
      #set the message to empty
      message = []
       #get message from file
       file = File.open(FILE_NAME , 'r')
       #add each line to the message array.  
       file.each_line {|line| message.push(line)
       }
         #close file
         file.close
      # prepare final message
       final_message = ''
      for i in 0...message.size
      final_message = final_message  + message[i]  
        end
        client.send("CHT#{RMXOS::Data::ColorInfo}\t0\tMOTD: #{final_message}")
        return true
        end
        return false
    end
     
    end

    RMX-OS 2.0 Extension: ShowHide
    module RMXOS

    #------------------------------------------------------------------
    # Passes the extension's main module to RMX-OS on the top
    # level so it can handle this extension.
    # Returns: Module of this extension for update.
    #------------------------------------------------------------------
    def self.load_current_extension
    return MOTD
    end

    end

    #======================================================================
    # module MOTD
    #======================================================================

    module MOTD

    # extension version
    VERSION = 1.0
    # required RMX-OS version
    RMXOS_VERSION = 2.0
    # whether the server should update this extension in an idividual thread or not
    SERVER_THREAD = true
    # the extension's name/identifier
    IDENTIFIER = 'MOTD'
    FILE_NAME = './MOTD.txt'

    # :::: START Configuration
    # - YOUR CONFIGURATION HERE
    # :::: END Configuration

    #------------------------------------------------------------------
    # Initializes the extension (i.e. instantiation of classes).
    #------------------------------------------------------------------
    def self.initialize
    # create mutex
    @mutex = Mutex.new
    end
    #------------------------------------------------------------------
    # Gets the local extension mutex.
    #------------------------------------------------------------------
    def self.mutex
    return @mutex
    end
    #------------------------------------------------------------------
    # Calls constant updating on the server.
    #------------------------------------------------------------------
    def self.main
    # while server is running
    while RMXOS.server.running
    @mutex.synchronize {
    self.server_update
    }
    sleep(0.1) # 0.1 seconds pause, decreases server load
    end
    end
    #------------------------------------------------------------------
    # Handles the server update.
    #------------------------------------------------------------------
    def self.server_update
    # - YOUR SERVER CODE HERE
    end
    #------------------------------------------------------------------
    # Handles updating from a client.
    # client - Client instance (from Client.rb)
    # Returns: Whether to stop check the message or not.
    #------------------------------------------------------------------
    def self.client_update(client)
    case client.message
      when /\AGDM\Z/
       #set the message to empty
       message = []
        #get message from file
        file = File.open(FILE_NAME , 'r')
        #add each line to the message array. 
        file.each_line {|line| message.push(line)
        }
          #close file
          file.close
       # prepare final message
        final_message = ''
       for i in 0...message.size
       final_message = final_message  + message[i] 
         end
         client.send("CHT\t#{RMXOS::Data::ColorInfo}\t0\tMOTD: #{final_message}")
         return true
         end
         return false
    end

    end



    Instructions

    Place the script below RMX-OS and add the extension. Create a neq text document called MOTD in the
    RMX-OS server folder with the message.


    Compatibility

    Requires RMX-OS. No other issues none.


    Credits and Thanks


    • Me

    • Blizzard for making RMX-OS




    Author's Notes

    The only error I couldn't fix had to do with multiple lines in the message. Therefore, keep the message only one line long until I get this fixed. Feel free to report errors. I know it's a small script, but enjoy.
    13
    RMXP Script Database / [XP] RMX-OS Online List
    December 20, 2010, 09:03:27 pm
    RMX-OS Online List
    Authors: Wizered67
    Version: 1.00
    Type: RMX-OS Add-on
    Key Term: RMX-OS Plugin



    Introduction

    Adding this script will add a new command for RMX-OS called "/online". By using this command it will give the player a list of all players online. This script requires Blizzard's User Logger for RMX-OS.


    Features


    • Simple add-on that is easy to use

    • Makes it easy for any player to find out who is online.




    Screenshots
    Spoiler: ShowHide



    Demo
    N/A


    Script

    Script: ShowHide

    #------------------------------------------------------------------------------
    #                  RMX-OS Online List
    #                     by Wizered67
    #                          V 1.00
    # All errors should be reported at www.chaos-project.com.
    #------------------------------------------------------------------------------
    module RMXOS
     module Documentation
     PARAMETERS['online']    = 'none'  
     DESCRIPTIONS['online']    = 'Shows the amount of players online.'
     end
     class Network
     alias check_normal_commands_online_add check_normal_commands
     def check_normal_commands(message)
       case message
       when /\A\/online\Z/
        $network.send('POL')
         return true
       end
       return check_normal_commands_online_add(message)
     end
    end
    end


    .rb server extension

    .rb add-on: ShowHide

    module RMXOS
     
     def self.load_current_extension
       return PlayersOnline
     end
     
    end

    #======================================================================
    # module PlayersOnline
    #======================================================================

    module PlayersOnline
     
     VERSION = 1.01
     RMXOS_VERSION = 1.08
     SERVER_THREAD = false
     #This will not work if the user logger isn't listed before this.
     LOG_LOCATION = UserLogger::ONLINELIST_FILENAME
     
     def self.initialize
     end
     
     
     def self.main
       while RMXOS.server.running
         self.server_update
         sleep(0.1)
       end
     end
     
     def self.server_update
     end
     def self.client_update(client)
       case client.message
     when /\APOL\Z/
       #set @players_online to equal an empty array
       @players_online = []
       #get info from the user logger log.
       file = File.open(LOG_LOCATION , 'r')
       #add each line to the @players_online array.  Each line is a different user.
       file.each_line {|line| @players_online.push(line)
       }
         #close file
         file.close
         #define a new variable, at first being equal to an empty string.
         @players_on = ''
        for i in 0...@players_online.size
        #makes @players_on equal to the current @players_on plus the players that are online.
        @players_on = @players_online[i] + @players_on
       end
        #sends final message
        client.send("CHT#{RMXOS::Data::ColorInfo}\t0\tPlayers Online: #{@players_on}")
        return true
        end
        return false
    end
     
    end




    Instructions
    Just put in the script below RMX-OS and add the .rb add-on to extension to the extensions list.
    Make sure it comes after the user logger in  the server config.


    Compatibility

    Requires RMX-OS and Blizzard's User Logger.


    Credits and Thanks


    • Wizered67

    • Blizzard for making RMX-OS and his user logger.




    Author's Notes

    If you have any problems, just report them. I may have missed something.
    14
    Welcome! / Gonna be gone!
    July 27, 2010, 02:15:30 pm
    Just letting anyone that cares know that I will be gone for 2 weeks starting tomorrow. During these 2 weeks I won't be able to log on at all.
    15
    New Projects / [XP] Legendary Kingdoms Online
    July 21, 2010, 12:27:00 am
    Hey everyone, this is the game I'm working on using RMX-OS.....

    Legendary Kingdoms Online




    Intro:
    intro: ShowHide
    In the middle ages, a war is raging between 3 kingdoms; the Palimite Kingdom, Deterature Kingdom, and Hokcink kingdom. At the beginning of the game, you will decide which of these kingdoms to fight for.




    The Game:
    The Game: ShowHide
    Throughout the game, you will complete quests for people, venture through dungeons and defeat monsters in order to bring glory to your kingdom and increase your fame.
    As you adventure, you may find academies to train at in order to learn new skills and increase your level. (This is not the only way to get EXP) Although there are 5 different classes, you will not be forced to choose only one, and can mix and match the equipment and skills of different classes. The current classes are:
    •   Warrior
    •   Mage
    •   Archer
    •   Thief

    As you increase your level, you will also increase ranks. The highest rank you can achieve is king, but unlike the others, this rank is not gained immediately after reaching a certain level. In order to become the king, you must overthrow the former king of your kingdom (there can only be one king at a time). To overthrow the player that was formerly king, you must have a higher combined level and fame than the old king. If you succeed, then congratulations, you're the new king! However, you will still need to train so that another player doesn't overthrow you! Basically, the point of the game is to have the best kingdom by bringing glory through quests and other things. You also want to become strong yourself, but being a team player will be important in this game.
     




    Features:

    • RMX-OS and Blizz-ABS with sprites for attacking, defending, and visual equipment!

    • A multi-player RMXP game in which you actually get to interact with other players!

    • Kingdom Points for each kingdom are controlled with global variables, so when you help your kingdom, other players will see its rank increase and other kingdoms ranks decrease.


       And much more!




    Screenshots:
    Spoiler: ShowHide

    Server Select


    Spoiler: ShowHide

    Equip powerful weapons to aid you in battle.


    Spoiler: ShowHide

    Fight enemies to gain gold, experience, and items.


    Spoiler: ShowHide

    Go on the adventure of a lifetime.


    Spoiler: ShowHide

    Shop for more equipment in case you don't have enough already.


    Spoiler: ShowHide

    Cast powerful spells to defeat even the strongest of foes.


    Spoiler: ShowHide

    Use ranged combat if you don't want to get to close to your target.


    Spoiler: ShowHide

    When you die (like me) you can visit your castle's healer to heal you back to health.


    Spoiler: ShowHide


    Fight Chickens!!!!!!!!!!!!!


    Demo: Coming..... eventually......


    Well thanks for reading and be sure to tell me what you think of the idea.
    16
    Hey everyone. I'm currently working on a game using RMX-OS and the blizz-abs controller.  I was considering posting some info on my game and maybe do some recruiting, but I thought that first I should see if anyone cared/thought I should or shouldn't. So here's a poll for those of you that want to vote.
    17
    Wizered67's Speed Menu
    Authors: Wizered67
    Version: 0.30
    Type: On-map Menu System
    Key Term: Custom Menu System



    Introduction
    Hello, and welcome to my first script. I understand that it is probably not very good and messy, but I wanted to post it anyway. (At least for critique). Recently, I have noticed an increase in the amount of people trying to make an online game with
    RMX-OS and Blizz-abs. However, one common problem is that the default menu (and most others) pause the game while other players continue to play and take advantage of this. I know this from experience, as I too am trying to create a game like this, and this has been a major setback. Thereofre, I began looking through google. However, I only could find one script (which btw required SDK  >:() that did what I needed it to. This was ztorm's speed menu. However, the demo was missing. therefore, I attempted to learn scripting to make the script I needed. I don't know if anyone will use it, but oh well


    Features


    • On-map menu
    • doesn't pause game
    • my first script  ;)

    Right now, I haven't made special windows for item, equip, skills , etc and plan on adding that later. (Note how its only version 0.30)


    Screenshots

    Spoiler: ShowHide



    Demo

    None yet, but I can make one


    Script

    Place the script above main, but below menu and map scenes.
    Spoiler: ShowHide

    #------------------------------------------------------------------------------
    #This is my Speed Menu by Wizered67. If you have any questions,
    #visit www.chaos-project.com. To show the menu on the map,
    #you press shift. To move the cursor over or select an option, you have
    #to hold down control and move the arrow keys. I hope this is easy enough and works
    #fine. This curently doesn't support mouse control or have any of the scenes.

    ##############################################################################
    #SPEED MENU
    #By Wizered67
    #version 0.30
    ##############################################################################
    #-------------------------------------------------------------------------------
    #==============================================================================
    # ** Window_Speed_Menu
    #------------------------------------------------------------------------------
    #  This window displays the menu in a window like format on the map instead
    #  of the menu scene.
    #==============================================================================

    class Window_Speed_Menu < Window_Selectable
     #--------------------------------------------------------------------------
     # * Object Initialization
     #--------------------------------------------------------------------------
     def initialize
       super(0, 64, 640, 64)  
       self.contents = Bitmap.new(width - 32, height - 32)
       @item_max = 5
       @column_max = 4
       @commands = ["Item", "Skill", "Equip","Status","End Game"]
       refresh
       self.index = 0
    end
     #--------------------------------------------------------------------------
     # * Refresh
     #--------------------------------------------------------------------------
     def refresh
       self.contents.clear
       for i in 0...@item_max
         draw_item(i)
       end
     end
     #--------------------------------------------------------------------------
     # * Draw Item
     #     index : item number
     #--------------------------------------------------------------------------
     def draw_item(index)
       x = 4 + index * 160
       self.contents.draw_text(x, 0, 128, 32, @commands[index])
      end
    end
    #-----------------------------------------------------------------------------
    # Update Menu
    #-----------------------------------------------------------------------------
    def update_speed_menu
    #-------------------------------------------------------------------------
    #Check for input (Select Choice)
    #-------------------------------------------------------------------------
    if Input.press?(Input::Key['Ctrl'])
    if Input.trigger?(Input::C)
       case @window_speed_menu.index
           when 0
             $game_system.se_play($data_system.decision_se)
             
             @window_speed_menu.active = false
             @window_speed_menu.visible = false
             $speed_menu_showing = false
             $scene = Scene_Item.new
             when 1
             $game_system.se_play($data_system.decision_se)
             
             @window_speed_menu.active = false
             @window_speed_menu.visible = false
             $speed_menu_showing = false
             $scene = Scene_Skill.new
           when 2
             $game_system.se_play($data_system.decision_se)
           
             @window_speed_menu.active = false
             @window_speed_menu.visible = false
             $speed_menu_showing = false
             $scene = Scene_Equip.new
           when 3
             $status_window_showing = true
             $game_system.se_play($data_system.decision_se)
             
             @window_speed_menu.active = false
             @window_speed_menu.visible = false
             @status_window = Window_MenuStatus.new
             $speed_menu_showing = false
             @status_window.opacity = 160
           @window_gold = Window_Gold.new
    @window_gold.opacity = 160
    @window_gold.x = 480
    @window_gold.y = 350
             when 4
             $game_system.se_play($data_system.decision_se)
             @window_speed_menu.active = false
             @window_speed_menu.visible = false
             $speed_menu_showing = false
             $scene = Scene_End.new
           end
    end
    end
    #-----------------------------------------------------------------------
    #Check for Escape Key
    #-----------------------------------------------------------------------
    if Input.trigger?(Input::Key['Esc']) and ($speed_menu_showing == true or $status_window_showing == true)
      if @window_speed_menu.visible == true
      @window_speed_menu.active = false
     @window_speed_menu.visible = false
     $speed_menu_showing = false
     end
     if $status_window_showing == true
       @window_gold.dispose
       @status_window.dispose
       $status_window_showing = false
       end
     end
    #-------------------------------------------------------------------------
    #Check for input (Move cursor)
    #-------------------------------------------------------------------------
     if Input.press?(Input::Key['Ctrl'])
      if Input.trigger?(Input::RIGHT)
        @window_speed_menu.active = true
        unless @window_speed_menu.index == 3
        $game_system.se_play($data_system.cursor_se)
          @window_speed_menu.index += 1
      else
        $game_system.se_play($data_system.cursor_se)
        @window_speed_menu.index = 0
      end
        end
      if Input.trigger?(Input::LEFT)
        @window_speed_menu.active = true
        unless @window_speed_menu.index <= 0
        $game_system.se_play($data_system.cursor_se)
          @window_speed_menu.index -= 1
      else
        $game_system.se_play($data_system.cursor_se)
        @window_speed_menu.index = 3
        end
    end
    end
    end
    #--------------------------------------------------------------------
    #Scene_Map
    #   def update
    # This part of the scene was put into this script with slight differences for plug and play.
    #---------------------------------------------------------------------
    class Scene_Map
     def update
       # Loop
       loop do
         # Update map, interpreter, and player order
         # (this update order is important for when conditions are fulfilled
         # to run any event, and the player isn't provided the opportunity to
         # move in an instant)
         $game_map.update
         $game_system.map_interpreter.update
         $game_player.update
         # Update system (timer), screen
         $game_system.update
         $game_screen.update
         if @window_speed_menu
         @window_speed_menu.active = true
           update_speed_menu
         end
         # Abort loop if player isn't place moving
         unless $game_temp.player_transferring
           break
         end
         # Run place move
         transfer_player
         # Abort loop if transition processing
         if $game_temp.transition_processing
           break
         end
       end
       # Update sprite set
       @spriteset.update
       # Update message window
       @message_window.update
       # If game over
       if $game_temp.gameover
         # Switch to game over screen
         $scene = Scene_Gameover.new
         return
       end
       # If returning to title screen
       if $game_temp.to_title
         # Change to title screen
         $scene = Scene_Title.new
         return
       end
       # If transition processing
       if $game_temp.transition_processing
         # Clear transition processing flag
         $game_temp.transition_processing = false
         # Execute transition
         if $game_temp.transition_name == ""
           Graphics.transition(20)
         else
           Graphics.transition(40, "Graphics/Transitions/" +
             $game_temp.transition_name)
         end
       end
       # If showing message window
       if $game_temp.message_window_showing
         return
       end
       # If encounter list isn't empty, and encounter count is 0
       if $game_player.encounter_count == 0 and $game_map.encounter_list != []
         # If event is running or encounter is not forbidden
         unless $game_system.map_interpreter.running? or
                $game_system.encounter_disabled
           # Confirm troop
           n = rand($game_map.encounter_list.size)
           troop_id = $game_map.encounter_list[n]
           # If troop is valid
           if $data_troops[troop_id] != nil
             # Set battle calling flag
             $game_temp.battle_calling = true
             $game_temp.battle_troop_id = troop_id
             $game_temp.battle_can_escape = true
             $game_temp.battle_can_lose = false
             $game_temp.battle_proc = nil
           end
         end
       end
       # If B button was pressed
       if Input.trigger?(Input::B)
         # If event is running, or menu is not forbidden
         unless $game_system.map_interpreter.running? or
                $game_system.menu_disabled
           # Set menu calling flag or beep flag
          # $game_temp.menu_calling = true
           #$game_temp.menu_beep = true
         end
       end
       if Input.trigger?(Input::A) && ($speed_menu_showing != true)
         $speed_menu_showing = true
         @window_speed_menu = Window_Speed_Menu.new
        @window_speed_menu.active = true
           @window_speed_menu.visible = true
         @window_speed_menu.opacity = 140
         end
       # If debug mode is ON and F9 key was pressed
       if $DEBUG and Input.press?(Input::F9)
         # Set debug calling flag
         $game_temp.debug_calling = true
       end
       # If player is not moving
       unless $game_player.moving?
         # Run calling of each screen
         if $game_temp.battle_calling
           call_battle
         elsif $game_temp.shop_calling
           call_shop
         elsif $game_temp.name_calling
           call_name
         elsif $game_temp.menu_calling
           call_menu
         elsif $game_temp.save_calling
           call_save
         elsif $game_temp.debug_calling
           call_debug
         end
       end
     end
    end
    #----------------------
    #End Scene Map
    #----------------------
    #---------------------------------------
    #Scene_Menu
    # This is just a small edit so that you can't go to the menu scene
    #----------------------------------------

    class Scene_Menu
     def main
       $scene = Scene_Map.new
     end
    end
     
     
     
     
     




    Instructions

    To open the menu, press shift. To move cursor or select on the menu you MUST be holding down ctrl.


    Compatibility

    Requires Tons ,Blizz-abs ,or RMX-OS for custom controls
    None other issues known.


    Credits and Thanks


    • Wizered67, me
    • Blizzard for inspiring me
    • Ztorm for the inspiration to make my own speed menu when his demo was missing.




    Author's Notes
    This is my first script. I don't really expect anyone to use it, but I figured I might as well post it to get critique. Hit me with your best shot!
    18
    Script Troubleshooting / Quick Question
    May 25, 2010, 11:32:25 pm
    Okay, I have a very quick little question. I am using Xp by the way.

    Is it possible to fix an armor to the player in the middle of the game? I know you can do iut in the database, but can you do it in-game?
    19
    Script Requests / Mouse Controller Edit
    May 13, 2010, 08:41:34 pm
    Hello, it's me again with my second request. This time, I'm looking for a slight edit to the mouse controller script.
    Right now, when you use an item and are selecting its target, when you put the mouse in between 2 party members, it highlights them all allowing items with a scope of 1 to be used on all party members.
    Is there anyone here willing to edit the mouse controller to fix this? Thanks in advance.

    Here's a screenshot
    Spoiler: ShowHide
    20
    Hi, I'm Wizered67 and this is my first request.

    Right now, the global switches and variables script for rmxos is really good and works great. There is just one feature its missing that I really want. Being able to have a global variable equal a string. Now, this might not seem very useful, but it could allow event systems that store another players username as a global variable.

    Ex. (for the record, this isnt what I want it for)
    You've made a player owned house system where players can one of 3 houses in the game. You can also visit other players houses. Using a global variable as a string equal to the player that owns that house's username, you could put a sign outside saying
    "Player \v[]'s house" where the \v[] is the global variable equal to their username. The scripts I am using are
    Spoiler: ShowHide
    Default Scripts
    Gameover script by Jackolas
    Tons of Addons
    RMX-OS Options
    RMX-OS script
    Global switches and variables for RMX-OS
    ATES
    ATES RMX-OS Pluggin
    Mouse Controller
    RMX-OS Main


    thanks in advnce
    21
    hi, its me Wizered67, the guy that seems to have the worst luck ever....  >:(

    I'm using XP and I get a error whenever I go to just this one map. The error is
    QuoteNo method error occured while running script.
    undefined method 'name' for nil:NilClass


    I don't think I even do anything special with scripts on this map....

    The scripts I am using are (in this order)

    Spoiler: ShowHide
    Default Scripts
    Gameover script by Jackolas
    Tons of Addons
    RMX-OS Options
    RMX-OS script
    Global switches and variables for RMX-OS
    ATES
    ATES RMX-OS Pluggin
    Mouse Controller
    RMX-OS Main


    Any help would be greatly aprecciated....

    edit: There are definitely no script event commands....
    edit 2: unfortunately, this doesnt seem to be a common event issue either....
    22
    General Discussion / SDK, what does it do?
    April 05, 2010, 12:25:38 pm
    This  will probably be taken as a joke, but what does SDK actually do? It seems like all it does is cause incompatibility issues.

    Btw, I got this from HBGames.org

    QuoteThe SDK should NOT be edited and redistribute without contacting a member of the SDK Team. Edits to the SDK may cause massive capability errors and would defeat what we are trying to do here.


    Um... too late for that....
    23
    Event Systems / Party Changer
    April 04, 2010, 12:43:54 am
    Party Changer
    Version:1.0
    Type: add-on



    Introduction

    This event system will allow you to switch party members.


    Features


    • Allows you to change party members.
    • fairly simple (I think)



    Screenshots

    Sorry, no screenshots. You'll have to actually try out the demo  ;)


    Demo

    Demo available at http://rapidshare.com/files/371778593/Party_Changing_system.exe.html.


    Instructions
    Just paste it into your game! Some things MAY need to be changed to fit your needs.


    Credits and Thanks


    • Me




    Author's Notes
    If you find bugs, just report them here.
    24
    Hello, I'm Wizered67, and I have a problem. While trying to get rmx-os to work, there is an error where the script hangs when one of my firends tries to play the game. After getting help, I believe this is caused by my norton antivirus firewall. I googled it to try to make an excpetion like I need to, but I can't get it to work. I'd appreciate it if someone could help me with my problem.

    Thanks in advance,
    Wizered67

    ps. If this is in the wrong section, could someone please move it....