RPG-Forum: {Script} Windows XP à la place du menu - RPG-Forum

Aller au contenu

Page 1 sur 1

{Script} Windows XP à la place du menu

#1 L'utilisateur est hors-ligne   S@muz Icône

  • Villageois
  • PipPip
  • Groupe : Membres
  • Messages : 40
  • Inscrit(e) : 11-décembre 06
  • Gender:Male
  • Location:derièr toi

Icône du message  Posté 05 avril 2007 - 12:58

Quoi de mieux que d'avoir un menu qui vous fera penser à votre ordinateur? Pour cela, suivez bien ce script
:Vous voulez un ordi dans votre jeux ???
Vous pouvez lire vos mails déposez de l'argent (ok javoue c'est bizarre) déposez des objets.

C'est facile, simple et je lai tester avec les scripts sur un jeu pas vierge je suis sur de moi ^^.

Bon ... d'abord on supprime le script main et on le remplace par ceci ^^ : (laisser lui le nom Main)

#==============================================================================
# â–  Main
#------------------------------------------------------------------------------
#  å„クラスã®å®šç¾©ãŒçµ‚ã‚ã£ãŸå¾Œã€ã“ã“ã‹ã‚‰å®Ÿéš›ã®å‡¦ç†ãŒå§‹ã
りã¾ã™ã€‚
#==============================================================================

begin
  Font.default_name = "Arial"
  Font.default_size = 24
  # Change the $fontface variable to change the font style
  $fontface = "Arial"
  # Change the $fontsize variable to change the font size
  $fontsize = 24
  $defaultfonttype = $fontface
  $defaultfontsize = $fontsize
  Font.default_name = $fontface
  Font.default_size = $fontsize
  # トランジション準備
  Graphics.freeze
  # シーンオブジェクト (タイトル画é¢) を作æˆ
  $scene = Scene_Title.new
  # $scene ãŒæœ‰åйãªé™ã‚Š main メソッドを呼ã³å‡ºã™
  while $scene != nil
	$scene.main
  end
  # フェードアウト
  Graphics.transition(20)
rescue Errno::ENOENT
  # 例外 Errno::ENOENT を補足
  # ファイルãŒã‚ªãƒ¼ãƒ—ンã§ããªã‹ã£ãŸå ´åˆã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã
ã¦çµ‚了ã™ã‚‹
  filename = $!.message.sub("No such file or directory - ", "")
  print("File #{filename} was not found.")
end


Et on met un nouveau script du nom de Item Bank au-dessus de main ^^ :
class Itembank
  attr_reader :items
 
  def initialize
	@items = {}
  end
 
  def deposit(item_id, n, lose_party = true)
	if item_id > 0
	  @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min
	end
	$game_party.lose_item(item_id, n) if lose_party == true
  end
 
  def withdraw(item_id, n)
	deposit(item_id, -n)
  end
 
  def item_number(item_id)
	return @items.include?(item_id) ? @items[item_id] : 0
  end
end

class Scene_Title
 alias itembank_title_new_game command_new_game
 def command_new_game
   itembank_title_new_game
   $itembank = Itembank.new
 end
end

#===================================================
# â–¼ CLASS Scene_Save Additional Code Begins
#===================================================
class Scene_Save

alias itembank_write_save_data write_save_data

  def write_save_data(file)
   itembank_write_save_data(file)
	Marshal.dump($itembank, file)
  end
 
end 
#===================================================
# â–² CLASS Scene_Save Additional Code Ends
#===================================================


#===================================================
# â–¼ CLASS Scene_Load Additional Code Begins
#===================================================
class Scene_Load

alias itembank_read_save_data read_save_data

  def read_save_data(file)
	itembank_read_save_data(file)
	 $itembank = Marshal.load(file)
  end
 
end 
#===================================================
# â–² CLASS Scene_Load Additional Code Ends
#===================================================

class Items_Party_Window < Window_Selectable
  def initialize
	super(0, 0, 320, 480)
	self.active = false
	self.index = -1
	refresh
	self.index = 0 if @data.size > 0
	self.back_opacity = 160
  end
  #--------------------------------------------------------------------------
  # ◠アイテムã®å–å¾—
  #--------------------------------------------------------------------------
  def item
	return @data[self.index]
  end
  def size
	return @data.size
  end
  #--------------------------------------------------------------------------
  # ◠リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
	if self.contents != nil
	  self.contents.dispose
	  self.contents = nil
	end
	@data = []
	# アイテムを追加
	for i in 1...$data_items.size
	  if $game_party.item_number(i) > 0
		@data.push($data_items[i])
	  end
	end
	@item_max = @data.size
	if @item_max > 0
	  self.contents = Bitmap.new(width - 32, row_max * 32)
	  self.contents.font.name = $fontface
	  self.contents.font.size = $fontsize
	  for i in 0...@item_max
		draw_item(i)
	  end
	end
  end
  #--------------------------------------------------------------------------
  # â— é …ç›®ã®æç”»
  #	 index : 項目番å·
  #--------------------------------------------------------------------------
  def draw_item(index)
	item = @data[index]
	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
	  self.contents.font.color = normal_color
	x = 4
	y = index * 32
	rect = Rect.new(x, y, self.width / @column_max - 32, 32)
	self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
	bitmap = RPG::Cache.icon(item.icon_name)
	opacity = 255
	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, 0)
	self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
	self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end

class Items_Bank_Window < Window_Selectable
  def initialize
	super(320, 0, 320, 480)
	self.active = false
	self.index = -1
	refresh
	self.index = 0 if @data.size > 0
	self.back_opacity = 160
  end
  #--------------------------------------------------------------------------
  # ◠アイテムã®å–å¾—
  #--------------------------------------------------------------------------
  def item
	return @data[self.index]
  end
  def size
	return @data.size
  end
  #--------------------------------------------------------------------------
  # ◠リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
	if self.contents != nil
	  self.contents.dispose
	  self.contents = nil
	end
	@data = []
	# アイテムを追加
	for i in 1...$data_items.size
	  if $itembank.item_number(i) > 0
		@data.push($data_items[i])
	  end
	end
	@item_max = @data.size
	if @item_max > 0
	  self.contents = Bitmap.new(width - 32, row_max * 32)
	  self.contents.font.name = $fontface
	  self.contents.font.size = $fontsize
	  for i in 0...@item_max
		draw_item(i)
	  end
	end
  end
  #--------------------------------------------------------------------------
  # â— é …ç›®ã®æç”»
  #	 index : 項目番å·
  #--------------------------------------------------------------------------
  def draw_item(index)
	item = @data[index]
	number = $itembank.item_number(item.id)
	self.contents.font.color = normal_color
	x = 4
	y = index * 32
	rect = Rect.new(x, y, self.width / @column_max - 32, 32)
	self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
	bitmap = RPG::Cache.icon(item.icon_name)
	opacity = 255
	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, 0)
	self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
	self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end

class Scene_Item_Bank
  def main
  @left_window = Items_Party_window.new
  @right_window = Items_Bank_window.new
  @left_window.refresh
  @right_window.refresh
  @right_window.index = -1
  @left_window.active = true
  Graphics.transition
  loop do
	Graphics.update
	Input.update
	update
	if $scene != self
	  break
	end
  end
  Graphics.freeze
  @left_window.dispose
  @right_window.dispose
end
# --------------------
def update
  @left_window.update
  @right_window.update
  if @left_window.active
	update_left
	return
  end
  if @right_window.active
	update_right
	return
  end
end
# --------------------
def update_left
  if Input.trigger?(Input::B)
	$game_system.se_play($data_system.decision_se)
	$scene = Scene_Computer.new
  end
  if Input.trigger?(Input::C)
	if @left_window.size > 0
	  $game_system.se_play($data_system.decision_se)
	  $itembank.deposit(@left_window.item.id, 1)
	  @right_window.refresh
	  @left_window.refresh
	  @left_window.index = -1 if @left_window.size == 0
	  @left_window.index = @left_window.size - 1 if @left_window.index > @left_window.size - 1
	else
	  $game_system.se_play($data_system.buzzer_se)
	end
  end
  if Input.trigger?(Input::RIGHT)
	$game_system.se_play($data_system.cursor_se)
	@left_window.index = -1
	@left_window.active = false
	@right_window.refresh
	@right_window.index = (@right_window.size > 0 ? 0 : -1)
	@right_window.active = true
  end
end
# --------------------
def update_right
  if Input.trigger?(Input::B)
	$game_system.se_play($data_system.decision_se)
	$scene = Scene_Computer.new
  end
  if Input.trigger?(Input::C)
	if @right_window.size > 0
	  $game_system.se_play($data_system.decision_se)
	  $itembank.withdraw(@right_window.item.id, 1)
	  @left_window.refresh
	  @right_window.refresh
	  @right_window.index = -1 if @right_window.size == 0
	  @right_window.index = @right_window.size - 1 if @right_window.index > @right_window.size - 1
	else
	  $game_system.se_play($data_system.buzzer_se)
	end
  end
  if Input.trigger?(Input::LEFT)
	$game_system.se_play($data_system.cursor_se)
	@right_window.index = -1
	@right_window.active = false
	@left_window.refresh
	@left_window.index = (@left_window.size > 0 ? 0 : -1)
	@left_window.active = true
  end
end
end

Et encore un de nom de Bank au-dessus de main :
class Bank
  attr_reader :money
 
  def initialize
	@money = 0
  end
 
  def deposit(n)
	@money += n
	$game_party.lose_gold(n)
  end
 
  def withdraw(n)
	deposit(-n)
  end
 
  def can_deposit?(n)
	if ($game_party.gold - n) < 0
	  return false
	else
	  return true
	end
  end
 
  def can_withdraw?(n)
	if @money - n >= 0
	  if ($game_party.gold + n) > 9999999
		return false
	  else
		return true
	  end
	else
	  return false
	end
  end
end

class Scene_Title
 alias bank_title_new_game command_new_game
 def command_new_game
   bank_title_new_game
   $bank = Bank.new
 end
end

#===================================================
# â–¼ CLASS Scene_Save Additional Code Begins
#===================================================
class Scene_Save

alias bank_write_save_data write_save_data

  def write_save_data(file)
   bank_write_save_data(file)
	Marshal.dump($bank, file)
  end
 
end 
#===================================================
# â–² CLASS Scene_Save Additional Code Ends
#===================================================


#===================================================
# â–¼ CLASS Scene_Load Additional Code Begins
#===================================================
class Scene_Load

alias bank_read_save_data read_save_data

  def read_save_data(file)
	bank_read_save_data(file)
	 $bank = Marshal.load(file)
  end
 
end 
#===================================================
# â–² CLASS Scene_Load Additional Code Ends
#===================================================


Et encore un du nom de Mail au-dessus de Main ^^ :
#--------------------------------------------------------------------------------------------------------------------------
# * Created by: GoldenShadow
#=============================================================

module SC # don't delete module, it's ripping if done anyway!
 RXSC_MAIL = "Mail Client Script: Ver.1.1"
 MAIL_HEAR_SOUND = true # set to true to hear a sound on receive
end

class Mail
 
 attr_accessor :mail		  # Mail
 attr_accessor :msg		  # Content of mail
 attr_accessor :account	 # Your e-mail account
 attr_accessor :sender	   # The sender
 attr_accessor :read		  # If it's read or new
 attr_accessor :font		   # Contents font
 
 def initialize # Define the variables we're going to use
   # Why are they global variables you ask? So we can use 'em outside this class
   @mail = [] # mail IDs
   @msg = [] # mail msgs
   @account = "#{$game_party.actors[0].name}@RXSC.net" # This is the player's mail
   @sender = [] # sender IDs
   @read = []# unread option IDs
   @font = [] # font
 end
 
 def received_include?(string) # check if string is in mail or sender (can be number)
   if @mail.include?(string)
	 return true
   elsif @sender.include?(string)
	 return true
   else
	 return false
   end
 end
	 
 def is_new?(id) # see if mail is unread
   if @read[id] == true
	 return false
   elsif @read[id] == false
	 return true
   else
	 return false
   end
 end
 
 def write_mail(topic = nil,from = nil,msg = [], type = nil, font = nil)
   if SC::MAIL_HEAR_SOUND == true # Sound when receiving
	 Audio.se_play("Audio/SE/055-Right01", 100, 150) # You may change the soundfile
	 # In fact, you may even use Music Effects, BGM (not recommended) or BGS.
	 # Change the 'se_play' to 'me_play','bgm_play' or 'bgs_play' respectivly.
	 # You should also change the directory when something else than SE is used.
   end
   if topic == nil or topic == ""# Subject of message
	 @mail.push("(no subject)") # if no subject specified
   else
	 @mail.push(topic)
   end
   if msg == nil # Write a message in array format, like: ["line1, "line2, "etc"]
	 @msg.push(["* AUTO MAIL*","No message specified by the sender."," ","Greetings from webmaster@mailserver.rxsc"])
   else
	 @msg.push(msg)
   end
   if from == nil or from == "" # The sender of the mail
	 @sender.push("(unknown)") # if no sender specified
   else
	 @sender.push(from)
   end
   if font != nil
	 @font.push(font)
   else
	 @font.push(nil)
   end
   @read.push(false) # set it to unread
   if type != nil # some cool stuff
	 if type == 1
	   # Type 1: Corrupted Mail
	   @msg[topic].push("","* AUTO MAIL *","The mail is corrupted.","Sorry for this inconvinience.","","Greetings from Webmaster")
	 elsif type == 2
	   # Type 2: Infected Mail
	   @msg[topic].push("","* AUTO MAIL *","This mail is infected.","Delete it immediately.","","Greetings from Webmaster")
	 elsif type == 3
	   # Type 3: Incomplete Mail
	   @msg[topic].push("","* AUTO MAIL *","Mail was not sent correctly.","Some parts may have been lost.","","Greetings from Webmaster")
	 elsif type == 4
	   # Add more if you like, see above for the examples
	 end
   end
 end
end

# This is the topic window or in other words the message window.
# So this is the window where the contents of a mail is shown.
# You may change it in how you want it actually.
# Screwing this up is your own fault... but then again, you can always repaste...
class Window_Topic < Window_Base
 attr_reader :msg
 def initialize(mail)
   super(0, 0, 640, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   self.visible = false
   @mail = mail # This is the index of the inbox and will be converted to the mail ID
   refresh
 end
 
 def refresh
   self.contents.clear
   unless @mail == "none" # Just a block
	 self.contents.draw_text(4, 0, self.width - 40, 32, "Subject: #{$mail.mail[@mail]}")
	 self.contents.draw_text(4, 32, self.width - 40, 32, "From: #{$mail.sender[@mail]}")
	 rect = Rect.new(0, 68, self.width, 2)
	 self.contents.fill_rect(rect, Color.new(255, 255, 255)) # Modify the color as pleased
   end
 end
 
 def show_msg(msg) # Show the mail message contents
   @topic = $mail.mail[@mail].to_s
   @msg = $mail.msg[@mail]
   self.contents = Bitmap.new(width - 32, (@msg.size * 16) + 80)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   refresh
   y = 53 # start line 1 at this y-position
   unless @msg == nil or @mail == "none" # Also just a block
	 for line in 0...@msg.size
	   y += 16 # space between the lines
	   self.contents.font.size = 16 # font size
	   if $mail.font[@mail] != nil
		 self.contents.font.name = $mail.font[@mail] # own font
	   end
	   self.contents.draw_text(4, y, self.width, 32, @msg[line].to_s)
	 end
   end
 end
end

# This is the inbox
# When email is received it will be added at the end of the list.
# So that you can see, like the real one, which one's old or new.
class Window_Inbox < Window_Selectable
 
 def initialize
   super(0, 64, 640, 416)
   @column_max = 1
   self.index = -1
   refresh
 end

 def item
   return @data[self.index]
 end
 
def refresh
   if self.contents != nil
	 self.contents.dispose
	 self.contents = nil
   end
   @data = []
   for i in 0...$mail.mail.size # This is the var for mails
	 @data.push($mail.mail[i])
   end
   @item_max = @data.size
   if @item_max >= 0
	 self.contents = Bitmap.new(width - 32, height - 32)
	 self.contents.font.name = $fontface
	 self.contents.font.size = 24
	 for i in 0...@item_max
	   draw_item(i)
	 end
   end
 end

 def draw_item(index)
   item = @data[index]
   self.contents.font.color = normal_color
   x = 4
   y = index * 32 # 32 stands for space between lines
   rect = Rect.new(x, y, self.width / @column_max - 32, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   self.contents.draw_text(x, y, self.width - 40, 32, item.to_s) # mail topic (subject)
   self.contents.draw_text(x + 400, y, self.width - 40, 32, $mail.sender[index].to_s) # Sender
   if $mail.read[index] == false
	 self.contents.font.color = Color.new(130,225,89)
	 self.contents.draw_text(x + 300, y, self.width - 40, 32, "NEW") # if mail is unread
   else
	 self.contents.font.color = normal_color
	 self.contents.draw_text(x + 300, y, self.width - 40, 32, "") # if mail is read, change as pleased
   end
 end
end

# This is the built-in mail client.
# You may modify it but try not to screw it too much up.
class Scene_Mail
 
 def main
   @help_window = Window_Help.new
   if $mail.mail.size == 0 or $mail.mail == nil
	 @help_window.set_text("No mail.")
   else
	 @help_window.set_text("You have #{$mail.mail.size} message" + ($mail.mail.size > 1 ? "s " : " ") + "in your inbox.")
   end
   @help_window.z = 100
   @inbox = Window_Inbox.new
   @inbox.index = 0 if $mail.mail.size > 0
   @inbox.active = true
   @inbox.visible = true
   @inbox.z = 200
   @topic_window = Window_Topic.new("none")
   @topic_window.z = 100
   @message_window = Window_Message.new # For msg's to show...
   Graphics.transition
   loop do
	 Graphics.update
	 Input.update
	 update
	 if $scene != self
	   break
	 end
   end
   Graphics.freeze
   @inbox.dispose
   @topic_window.dispose
   @message_window.dispose
   @help_window.dispose
 end
 
 def update
   @message_window.update
   @inbox.update
   @help_window.update
   @topic_window.update
   if $game_temp.message_window_showing
	 return
   end
   if @inbox.active == false
	 update_topic
	 return
   end
   if @inbox.active == true
	 update_inbox
	 return
   end
 end
   
 def update_inbox
   if $mail.mail.size == 0 or $mail.mail == nil
	 @inbox.index = -1
   end
   if Input.trigger?(Input::C) # selecting the topic at inbox
	 if @inbox.index == nil or $mail.mail.size == 0 # if no topics...
	   $game_system.se_play($data_system.buzzer_se) # errrr
	   return
	 end
	 $game_system.se_play($data_system.decision_se)
	 @topic_window.contents.clear
	 @topic_window = Window_Topic.new(@inbox.index)
	 @topic_window.show_msg(@inbox.index)
	 if $mail.read[@inbox.index] == false
	   $mail.read[@inbox.index] = true
	   @inbox.refresh
	 end
	 @topic_window.visible = true
	 @inbox.active = false
	 @inbox.visible = false
	 @help_window.visible = false
   end
   if Input.trigger?(Input::B)
	 $game_system.se_play($data_system.cancel_se)
	 $scene = Scene_Computer.new # This would be the previous scene
   end
   if Input.trigger?(Input::Z) # Deletes selected email
	 $mail.mail.delete_at(@inbox.index)
	 $mail.msg.delete_at(@inbox.index)
	 $mail.sender.delete_at(@inbox.index)
	 $mail.read.delete_at(@inbox.index)
	 $mail.font.delete_at(@inbox.index)
	 $game_system.se_play($data_system.decision_se)
	 @inbox.refresh
	 if $mail.mail.size == 0
	   @inbox.index = -1
	   @help_window.set_text("No mail.")
	 else
	 @help_window.set_text("You have #{$mail.mail.size} message" + ($mail.mail.size > 1 ? "s " : " ") + "in your inbox.")
	 end
	 if @inbox.index > $mail.mail.size - 1
	   @inbox.index -= 1
	 end
   end
   if Input.trigger?(Input::X) # Deletes all
	 $mail.mail.clear
	 $mail.msg.clear
	 $mail.sender.clear
	 $mail.read.clear
	 $mail.font.clear
	 $game_system.se_play($data_system.decision_se)
	 @inbox.refresh
	 @help_window.set_text("No mail.")
	 @inbox.index = -1 # this will make the cursor be hidden (cuz there arent any mails)
   end
 end
 
 def update_topic # this command is for the topic window, add stuff if you like
   if Input.trigger?(Input::B) # cancel button to return to inbox
	 $game_system.se_play($data_system.cancel_se)
	 @inbox.active = true
	 @inbox.visible = true
	 @help_window.visible = true
	 @topic_window.visible = false
   end
   if Input.repeat?(Input::DOWN)
	 @topic_window.oy += 16 if @topic_window.oy < ((@topic_window.msg.size * 16) + 80) - 448
   end
   if Input.repeat?(Input::UP)
	 @topic_window.oy -= 16 if @topic_window.oy > 0
   end   
 end
end

# This is a example mail for you to learn from.
# Study this and you'll learn it in no time!
class Scene_Title
 alias mail_title_new_game command_new_game
 def command_new_game
   mail_title_new_game
   $mail = Mail.new
 end
end

#===================================================
# â–¼ CLASS Scene_Save Additional Code Begins
#===================================================
class Scene_Save

alias mail_write_save_data write_save_data

  def write_save_data(file)
   mail_write_save_data(file)
	Marshal.dump($mail, file)
  end
 
end 
#===================================================
# â–² CLASS Scene_Save Additional Code Ends
#===================================================


#===================================================
# â–¼ CLASS Scene_Load Additional Code Begins
#===================================================
class Scene_Load

alias mail_read_save_data read_save_data

  def read_save_data(file)
	mail_read_save_data(file)
	 $mail = Marshal.load(file)
  end
 
end 
#===================================================
# â–² CLASS Scene_Load Additional Code Ends
#===================================================

Et encore un du nom de Computer au-dessus de main (c'est le dernier) :
#-----------------------------------------------------------------
# Slipknot Computer Menu System
#	created by slipknot
#-----------------------------------------------------------------
class Game_Temp
  attr_accessor :menubar
  alias comp_menu_init initialize
  def initialize
	comp_menu_init
	@menubar = "bar1"
  end
end
class Scene_Computer
#-----------------------------------------------------------------
 def initialize(menu_index = 0)
   @menu_index = menu_index
 end
#-----------------------------------------------------------------
 def main
   @g = Gold.new
   @g.x = 80
   @g.y = 80
   @g.visible = false
   @g.active = false
   s1="Deposit"
   s2="Withdraw"
   s3="About"
   s4="None"
   s5="Blue"
   s6="Olive"
   s7="Silver"
   @bank = Window_Command.new(132, [s1,s2])
   @bank.x = 320-@bank.width/2
   @bank.y = 240-@bank.height/2
   @bank.visible = false
   @bank.active = false
   @back = Window_Command.new(100, [s5,s6,s7])
   @back.x = 320-@back.width/2
   @back.y = 240-@back.height/2
   if @backso = nil
	 @backso = 1
   end
   @back.visible = false
   @back.active = false
   @imagen = Sprite.new
   @imagen.bitmap=RPG::Cache.picture("back")
   @bar = Sprite.new
   @bar.bitmap=RPG::Cache.picture($game_temp.menubar)
   @bar.y=449
   @playtime = Playtime.new
   @stname = Startname.new
   @command = Computer.new
   @command.index = @menu_index
   @command.z = 100
   Graphics.transition
   loop do
	 Graphics.update
	 Input.update
	 update
	 if $scene != self
	   break
	 end
   end
   Graphics.freeze
   @command.dispose
   @playtime.dispose
   @stname.dispose
   @g.dispose
   @bar.dispose
   @imagen.dispose
 end
#-----------------------------------------------------------------
 def update
   @command.update
   @bar.update
   @stname.update
   @playtime.update
   @imagen.update
   if @backso==0
	 @bar.bitmap=RPG::Cache.picture("bar1")
	 $game_temp.menubar = "bar1"
   elsif @backso==1
	 @bar.bitmap=RPG::Cache.picture("bar2")
	 $game_temp.menubar = "bar2"
   elsif @backso==2
	 @bar.bitmap=RPG::Cache.picture("bar3")
	 $game_temp.menubar = "bar3"
   end
   @g.update
   @bank.update
   @banknum.update if @banknum != nil
   @back.update
   if @back.active
	 update_back
	 return
   end
   if @bank.active
	 update_g
	 return
   end
	if @banknum != nil
   if @banknum.active
	 update_banknum
	 return
   end
   end
   if @command.active
	 update_command
	 return
   end
 end
#-----------------------------------------------------------------
 def delay(seconds)
   for i in 0...(seconds * 1)
	 sleep 0.01
	 Graphics.update
   end
 end
#-----------------------------------------------------------------
 def audiofade
   Audio.bgm_fade(800)
   Audio.bgs_fade(800)
   Audio.me_fade(800)
 end
#-----------------------------------------------------------------
 def update_banknum
   if Input.trigger?(Input::B)
	 $game_system.se_play($data_system.cancel_se)
   @banknum.active = false
   @banknum.visible = false
   @banknum.dispose
   @banknum = nil
   @bank.active = true
   @bank.visible = true
	 return
   end
   if Input.trigger?(Input::C)
	 n = @banknum.number
	 if @withdraw
	   if $bank.can_withdraw?(n)
		 $game_system.se_play($data_system.shop_se)
		 $bank.withdraw(n)
		 @g.refresh
		 bank_done
	   else
		 $game_system.se_play($data_system.buzzer_se)
	   end
	 else
	   if $bank.can_deposit?(n)
		 $game_system.se_play($data_system.shop_se)
		 $bank.deposit(n)
		 @g.refresh
		 bank_done
	   else
		 $game_system.se_play($data_system.buzzer_se)
	   end
	 end
	 return
   end
 end

 def bank_done
   @banknum.active = false
   @banknum.visible = false
   @banknum.dispose
   @banknum = nil
   @withdraw = nil
   @bank.active = true
   @bank.visible = true
 end

 def update_g
   if Input.trigger?(Input::B)
	 $game_system.se_play($data_system.cancel_se)
	 @g.visible = false
	 @g.active = false
	 @bank.active = false
	 @bank.visible = false
	 @command.active = true
	 return
   end
   if Input.trigger?(Input::C)
	 case @bank.index
	 when 0
	   $game_system.se_play($data_system.decision_se)
	   bank_deposit
	 when 1
	   $game_system.se_play($data_system.decision_se)
	   bank_withdraw
	 end
	 return
   end
 end
 
 def bank_deposit
   @bank.active = false
   @bank.visible = false
   @withdraw = false
   @banknum = Window_InputNumber.new(7)
   @banknum.opacity = 255
   @banknum.x = 320-@banknum.width/2
   @banknum.y = 240-@banknum.height/2
   @banknum.number = 0
   @banknum.active = true
   @banknum.visible = true
 end
 
 def bank_withdraw
   @bank.active = false
   @bank.visible = false
   @withdraw = true
   @banknum = Window_InputNumber.new(7)
   @banknum.opacity = 255
   @banknum.x = 320-@banknum.width/2
   @banknum.y = 240-@banknum.height/2
   @banknum.number = 0
   @banknum.active = true
   @banknum.visible = true
 end
 
#-----------------------------------------------------------------
 def update_back
   if Input.trigger?(Input::B)
	 $game_system.se_play($data_system.cancel_se)
	 acceptback
	 @back.index = -1
	 return
   end
   if Input.trigger?(Input::C)
	 case @back.index
	 when 0
	   $game_system.se_play($data_system.decision_se)
	   @backso = 0
	   acceptback
	 when 1
	   $game_system.se_play($data_system.decision_se)
	   @backso = 1
	   acceptback
	 when 2
	   $game_system.se_play($data_system.decision_se)
	   @backso = 2
	   acceptback
	 end
	 return
   end
 end
#-----------------------------------------------------------------
 def acceptback
   @back.active = false
   @back.visible = false
   @command.active = true
 end
#-----------------------------------------------------------------
 def update_command
   if Input.trigger?(Input::B)
	 $game_system.se_play($data_system.cancel_se)
	 $scene = Scene_Map.new
	 return
   end
   if Input.trigger?(Input::C)
	 if $game_party.actors.size == 0 and @command.index < 4
	   $game_system.se_play($data_system.buzzer_se)
	   return
	 end
	 case @command.index
	 when 0
	   $game_system.se_play($data_system.decision_se)
	   $scene = Scene_Item_Bank.new
	 when 1
	   $game_system.se_play($data_system.decision_se)
	   $scene = Scene_Mail.new
	 when 2
	   $game_system.se_play($data_system.decision_se)
	   @command.active=false
	   @g.visible=true
	   @bank.active=true
	   @bank.visible=true
	   return
	 when 3
	   $game_system.se_play($data_system.decision_se)
	   @command.active=false
	   @back.active=true
	   @back.visible=true
	   @back.index = 0
	   return
	 end
	 return
   end
   if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
	 delay(2)
	 $game_system.se_play($data_system.cursor_se)
	 @command.setup_move(Computer::M_L)
	 delay(2)
	 return
   end
   if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
	 delay(2)
	 $game_system.se_play($data_system.cursor_se)
	 @command.setup_move(Computer::M_R)
	 delay(2)
	 return
   end
 end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Computer < Window_Base
#-----------------------------------------------------------------
 M_R=1
 M_L=2
 attr_accessor :index
#-----------------------------------------------------------------
 def initialize
   super(0, 0, 640, 480)
   self.contents = Bitmap.new(width-32, height-32)
   self.contents.font.name = $defaultfonttype
   self.contents.font.color = text_color(0)
   self.contents.font.size = 22
   self.opacity = 0
   s1 = "Item Storage"
   s2 = "Mail"
   s3 = "Bank"
   s4 = "Theme"
   @commands = [s1, s2, s3, s4]
   @item_max = 4
   @index = 0
   ic_itm = RPG::Cache.icon("034-Item03")
   ic_eml = RPG::Cache.icon("033-Item02")
   ic_gld = RPG::Cache.icon("gold")
   ic_bck = RPG::Cache.icon("backicon")
   @items = [ic_itm, ic_eml, ic_gld, ic_bck]
   @disabled = [false, false, false, false]
   refresh
 end
#-----------------------------------------------------------------
 def update
   super
   refresh
 end
#-----------------------------------------------------------------
 def refresh
   self.contents.clear
   x=4
   y=50
   o=25
   for i in 0...@item_max
	 ic_disable = RPG::Cache.icon("")
	 rect = Rect.new(0, 0, @items[i].width, @items[i].height)
	 if @index == i
	   self.contents.blt( x, y*i+1, @items[i], rect)
	   if @disabled[@index]
		 self.contents.blt( x, y*i+1, ic_disable, rect)
	   end
	 else
	   self.contents.blt( x, y*i+1, @items[i], rect, 128)
	   if @disabled[@index]
		 self.contents.blt( x, y*i+1, ic_disable, rect, 128)
	   end
	 end
   end
   self.contents.font.size = 18
   self.contents.draw_text(4, o, 100, 24,"Item Storage")
   self.contents.draw_text(4, o+y, 100, 24,"Mail")
   self.contents.draw_text(4, o+y*2, 100, 24,"Bank")
   self.contents.draw_text(4, o+y*3, 100, 24,"Theme")
 end
#-----------------------------------------------------------------
 def disable_item(index)
   @disabled[index] = true
 end
#-----------------------------------------------------------------
 def setup_move(mode)
   if mode == M_R
	 @index -= 1
	 @index = @items.size - 1 if @index < 0
   elsif mode == M_L
	 @index += 1
	 @index = 0 if @index >= @items.size
   else
	 return
   end
 end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Gold < Window_Base
#-----------------------------------------------------------------
 def initialize
   super(0,0,160,156)
   self.contents = Bitmap.new(width-32, height-32)
   self.contents.font.name = $defaultfonttype
   self.contents.font.size = $defaultfontsize
   refresh
 end
 def refresh
   self.contents.clear
   self.contents.draw_text(0,0,120,32,"You have:")
   icon = RPG::Cache.icon("gold")
   self.contents.draw_text (4,32,92,32,$game_party.gold.to_s,2)
   self.contents.blt(103,37,icon,Rect.new(0,0,24,24))
   self.contents.draw_text(0,64,128,32,"Bank contains:")
   self.contents.draw_text (4,96,92,32,$bank.money.to_s,2)
   self.contents.blt(103,101,icon,Rect.new(0,0,24,24))
 end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Playtime < Window_Base
#-----------------------------------------------------------------
 def initialize
   super(546,433,140,64)
   self.contents = Bitmap.new(width-32,height-32)
   self.opacity = 0
   self.contents.font.name = $fontface
   self.contents.font.size = 16
   self.contents.font.color = Color.new(0, 0, 0)
   refresh
 end
 #--------------------------------------------------------------------------
 def refresh
	self.contents.clear
	@total_sec = Graphics.frame_count / Graphics.frame_rate
	hour = @total_sec / 60 / 60
	min = @total_sec / 60 % 60
	sec = @total_sec % 60
	text = sprintf("%02d:%02d:%02d", hour, min, sec)
	self.contents.draw_text(12, 0, 140, 32, text)
  end
  #--------------------------------------------------------------------------
  def update
	super
	if Graphics.frame_count / Graphics.frame_rate != @total_sec
	  refresh
	end
  end
#-----------------------------------------------------------------
end
#-----------------------------------------------------------------
class Startname < Window_Base
#-----------------------------------------------------------------
 def initialize
   super(-12,432,112,64)
   self.contents = Bitmap.new(width-32,height-32)
   self.opacity = 0
   self.contents.font.name = ["Franklin Gothic Medium", $defaultfonttype]
   self.contents.font.size = 26
   self.contents.font.bold = true
   self.contents.font.italic = true
   icon = RPG::Cache.icon("xp")
   self.contents.blt(0,5,icon,Rect.new(0,0,24,24))
   self.contents.font.color = Color.new(128, 128, 128, 160)
   self.contents.draw_text(30,2,72,32,"start")
   self.contents.font.color = normal_color
   self.contents.draw_text(27,0,72,32,"start")
 end
#-----------------------------------------------------------------
end

Maintenant juste encore des icone a mettre dans "icone" :


Maintenant encore des pictures :



voila le résultat:

Miniature(s) jointe(s)

  • Image attachée
  • Image attachée
  • Image attachée
  • Image attachée
  • Image attachée
  • Image attachée
  • Image attachée
  • Image attachée

"Zelda The Father Quest" aucun raport avec une princesse Ganon ou même Epona une simple histoire de Rpg qui tourne au drame , un enfant qui voit du jour au lendemain ces amis et sa famille diparaitre et lancé dans une quête qu'il n'imaginait même pas
a paraître bientôt chez votre marchand de Rpg

>>>>>>>>>>Clic si té cap<<<<<<<<<<
0

#2 L'utilisateur est hors-ligne   Nalexis Icône

  • Villageois
  • PipPip
  • Groupe : Membres +
  • Messages : 80
  • Inscrit(e) : 17-février 07
  • Gender:Male
  • Location:Ben chez moi je suppose

Icône du message  Posté 05 avril 2007 - 13:54

:blink: Trop drole, c'est vraiment marrant merci S@muz !!!! :P
* @£€x by N@!€xi$ *
0

#3 L'utilisateur est hors-ligne   Fallout Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 11
  • Inscrit(e) : 21-juin 06

Posté 05 avril 2007 - 14:06

Pas mal, c'est bien trouvé ! Par contre je ne pense pas que ça conviendrait au RPG que je suis en train de faire ...
0

#4 L'utilisateur est hors-ligne   S@muz Icône

  • Villageois
  • PipPip
  • Groupe : Membres
  • Messages : 40
  • Inscrit(e) : 11-décembre 06
  • Gender:Male
  • Location:derièr toi

Icône du message  Posté 05 avril 2007 - 14:29

Voir le messageFallout, le 05/04/2007 à 15:06, dit :

Pas mal, c'est bien trouvé ! Par contre je ne pense pas que ça conviendrait au RPG que je suis en train de faire ...

c'est vrai que sa conviendrait mieux a un jeu de type pokémon
"Zelda The Father Quest" aucun raport avec une princesse Ganon ou même Epona une simple histoire de Rpg qui tourne au drame , un enfant qui voit du jour au lendemain ces amis et sa famille diparaitre et lancé dans une quête qu'il n'imaginait même pas
a paraître bientôt chez votre marchand de Rpg

>>>>>>>>>>Clic si té cap<<<<<<<<<<
0

#5 L'utilisateur est hors-ligne   Fallout Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 11
  • Inscrit(e) : 21-juin 06

Posté 05 avril 2007 - 15:29

Oui mais bon c'est vraiment bien quand même !

Juste une petite question hors sujet que je me pose depuis longtemps: Peux t-on inserer des scripts dans RPG Maker 2003 car je sais que c'est faisable sur RPG Maker XP ?
0

#6 L'utilisateur est hors-ligne   Quelqu'un Icône

  • Inconu au bataillon ...
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 705
  • Inscrit(e) : 01-août 06
  • Gender:Male
  • Location:Quelquepart O_O

Posté 05 avril 2007 - 16:05

Voir le messageFallout, le 05/04/2007 à 16:29, dit :

Oui mais bon c'est vraiment bien quand même !

Juste une petite question hors sujet que je me pose depuis longtemps: Peux t-on inserer des scripts dans RPG Maker 2003 car je sais que c'est faisable sur RPG Maker XP ?


Tu aurais du la poser dans le topic des questions diverse.

Pour te répondre: Non on ne peut pas mais tu peux programé casiment tout les scripts en évent ;) (C'est beaucoup plus pro et c'est très très remarqué par tout les grands makers ;) )

Sinon je modifi quelque peu le premier post et je le rajoute.

P.S.: Tu es prié de mettre le pseudo de l'auteur de ce script. (L'auteur pas le posteur du script d'où tu l'as pris ...)
Image IPB
---------------------------------------------------------------------------------------------
Si vous n'avez jamais lu les rêgles du forum avant de poster, ne vous étonnez pas que vous êtes traité de boulet.
-Les rêgles de la section RPG-Making, sont >>>ICI<<<
---------------------------------------------------------------------------------------------
Et n'oubliez jamais que Google est votre ami ! ;)
0

#7 L'utilisateur est hors-ligne   Fallout Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 11
  • Inscrit(e) : 21-juin 06

Posté 05 avril 2007 - 16:16

Voir le messageQuelqu, le 06/04/2007 à 00:05, dit :

Tu aurais du la poser dans le topic des questions diverse.

Pour te répondre: Non on ne peut pas mais tu peux programé casiment tout les scripts en évent ;) (C'est beaucoup plus pro et c'est très très remarqué par tout les grands makers ;) )


Désolé d'avoir posé cette question ici, je le saurai pour la prochaine fois.
Et encore merci pour ta réponse.
0

#8 L'utilisateur est hors-ligne   S@muz Icône

  • Villageois
  • PipPip
  • Groupe : Membres
  • Messages : 40
  • Inscrit(e) : 11-décembre 06
  • Gender:Male
  • Location:derièr toi

Posté 11 avril 2007 - 16:05

derniere chose pour appellez un ordinateur suffit de mettre sur un evenement par la touche action ce scrîpt:
$scene = Scene_Computer.new
Pour ajoutez des objets lorsque le joueur ce connecte a l ordi c est :
$itembank.deposit(1,4,false) #4 "nom de l objet et enlevez les guillemets", not from party
Changez le 4 par un chiffre de votre choix.

Vala The classical sourire ^^
Amusez vous bien.
"Zelda The Father Quest" aucun raport avec une princesse Ganon ou même Epona une simple histoire de Rpg qui tourne au drame , un enfant qui voit du jour au lendemain ces amis et sa famille diparaitre et lancé dans une quête qu'il n'imaginait même pas
a paraître bientôt chez votre marchand de Rpg

>>>>>>>>>>Clic si té cap<<<<<<<<<<
0

#9 L'utilisateur est hors-ligne   jak645 Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 3
  • Inscrit(e) : 30-mai 07

Icône du message  Posté 30 mai 2007 - 00:48

est jai trouver un problaime de scripte ou de mon logitiel mais quand tu va dans le menu de l'ordi quand tu fais touch bas et en haut pour changer ils en passe deux ji item money mais pas mail et theme ils le passe automatique jai chercher dans le scripte et rien a changer aide moi stp :blink:
0

#10 L'utilisateur est hors-ligne   karimakos Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 17
  • Inscrit(e) : 29-mai 07
  • Gender:Male
  • Location:Dubai

Posté 30 mai 2007 - 10:46

Exellent job s@muz je pense que ca peut marcher avec mon project dont je vais poster la demo dans quelque jour ! ;)
0

#11 L'utilisateur est hors-ligne   ninjar Icône

  • Ecuyer
  • PipPipPip
  • Groupe : Membres +
  • Messages : 145
  • Inscrit(e) : 15-mai 07

Posté 30 mai 2007 - 12:39

Beau menu , ressemblant ^^
NinjaR plus rapide que l'air !
http://ninjarfoot.skyblog.com 5 coms sur mon blog = 20 coms sur ton blog !
0

#12 L'utilisateur est hors-ligne   Tigre rouge Icône

  • Tigre Cagoulé
  • PipPipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 2 154
  • Inscrit(e) : 15-mars 05
  • Gender:Male
  • Location:夜露死苦

Posté 30 mai 2007 - 18:15

Très bonne initiative même si il y aurai encore 2/3 trucs à améliorer graphiquement ;)
Les Règles Du Forum Making !
DO NOT PM ME TO ASK ME TO GO ON MSN, post the query on the support forums!
Image IPB Image IPB Image IPB Image IPB
0

#13 L'utilisateur est hors-ligne   jak645 Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 3
  • Inscrit(e) : 30-mai 07

Posté 30 mai 2007 - 22:33

merci boucoup je vais attendre la demo :) tres gentil votre par vive RPG LEGENDS
0

#14 L'utilisateur est hors-ligne   jak645 Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 3
  • Inscrit(e) : 30-mai 07

Posté 02 juin 2007 - 00:20

je remarque que sa fais plusieu jour passer et aucun demo a ete mi desoler mais je trouve sa plat parceque dans lordinateur la flech haut et bas =2 je baise de 2 chec touche praiser
0

#15 L'utilisateur est hors-ligne   Wilderness Icône

  • La Pure
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 1 124
  • Inscrit(e) : 27-octobre 06
  • Gender:Female
  • Location:1428, Elm Street

Posté 02 juin 2007 - 11:52

jak645, si t'écrivais mieux ça nous aiderai pour la compréhention de tes phrases et ainsi t'aider; parce que là, j'ai rien compris a ce que tu as écris :blink: (je pense ne pas être la seule...)
Homéopathie... Oh pauvre Juliette!

My DeviantArt -> Image IPB <- My DeviantArt

My dragons -> Image IPB Image IPB Image IPB Image IPB Image IPB <- click on pics to help them to grow up!

Et n'oubliez pas: le 11 avril c'est la St Boulet!
0

#16 L'utilisateur est hors-ligne   mimidu57 Icône

  • Au bistrot du coin
  • Pip
  • Groupe : Membres
  • Messages : 1
  • Inscrit(e) : 22-novembre 09

Posté 22 novembre 2009 - 13:04

bonjour voila g tous fait ... mes quand je fai l'action il me dise fil graphisme/audio/pictur .... g pas trop bien compri comment on fai a partire des image que tu ma donner si tu pourer méxpliquer
0

Page 1 sur 1


Réponse rapide

  

1 utilisateur(s) en train de lire ce sujet
0 membre(s), 1 invité(s), 0 utilisateur(s) anonyme(s)