| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 14813 | 
 
| 最后登录 | 2016-11-13 | 
 
| 在线时间 | 135 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 52 
 
        - 在线时间
 - 135 小时
 
        - 注册时间
 - 2011-11-5
 
        - 帖子
 - 83
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
 本帖最后由 ji3rul4coco 于 2013-4-7 17:52 编辑  
 
如題,上次跟人求了個腳本,結果因為有事一個多月沒上6R,腳本是求到了,可是不知怎麼用((殘念啊......... 
 
請會用的大大幫個忙解釋一下(請詳細解釋..我是菜鳥) 
 
腳本如下 
 
 
 
module WhiteSnow 
  CONTENTS_SIZE = 6 
    # 表示する変数の数 
     
  CONTENTS      = [ 
    [ { "\\i[10]" => 0 } , {"\\v[15]" => 2} ], 
    [ { "\\i[11]" => 0 } , {"\\v[16]" => 2} ], 
    [ { "\\i[13]" => 0 } , {"\\v[17]" => 2} ], 
    [ { "\\i[14]" => 0 } , {"\\v[18]" => 2} ], 
    [ { "\\i[12]" => 0 } , {"\\v[19]" => 2} ], 
    [ { "\\i[15]" => 0 } , {"\\v[20]" => 2} ], 
                  ] 
    # 表示テキスト 
    # \\i[n]でn番のアイコンを描画、\\v[n]でn番の変数の値を描画します 
end 
                 
#============================================================================== 
# ■ Window_VariablesView 
#============================================================================== 
 
class Window_VariablesView < Window_Selectable 
  #-------------------------------------------------------------------------- 
  # ● オブジェクト初期化 
  #-------------------------------------------------------------------------- 
  def initialize 
#~     super(0,0, window_width, fitting_height(WhiteSnow::CONTENTS_SIZE)) 
    super(0,0, window_width, fitting_height(item_max)) 
    refresh 
  end 
  #-------------------------------------------------------------------------- 
  # ● ウィンドウ幅の取得 
  #-------------------------------------------------------------------------- 
  def window_width 
    return 160 
  end 
  #-------------------------------------------------------------------------- 
  # ● 項目数の取得 
  #-------------------------------------------------------------------------- 
  def item_max 
#~     return WhiteSnow::CONTENTS_SIZE 
    WhiteSnow::CONTENTS_SIZE - (WhiteSnow::CONTENTS_SIZE / 2) 
  end 
  #-------------------------------------------------------------------------- 
  # ● リフレッシュ 
  #-------------------------------------------------------------------------- 
  def refresh 
    contents.clear 
 
    WhiteSnow::CONTENTS_SIZE.times do |i| 
      WhiteSnow::CONTENTS.each do |content| 
        t = content.keys.pop 
        text = t.dup 
        unless text.scan(/\\v\[(\d+)\]/).empty? 
          text_v =  text.gsub(/\\v\[(\d+)\]/) { "#{$game_variables[$1.to_i]}" } 
          text.nil? 
          text = "" if text.nil? 
        end 
        flag = true if text.scan(/\\i\[(\d+)\]/) 
        icon_index = $1.to_i 
        text_p = text.dup 
        text.gsub!(/\\i\[\d+\]/) { "" } 
         
        # 座標計算追加---------------------- 
        item_width_x = item_width / 2 
        x = (i % 2) * item_width_x 
        y = (i / 2) * item_height 
        # ------------------------------------ 
         
        if flag 
          case content[text_p] 
          when 0 
#~             draw_icon(icon_index, 0, i * 24) 
            draw_icon(icon_index, x, y) 
          when 1 
#~             draw_icon(icon_index, item_width / 2 - 12, i * 24) 
            draw_icon(icon_index, x + item_width_x / 2 - 12, y) 
          when 2 
#~             draw_icon(icon_index, item_width, i * 24) 
            draw_icon(icon_index, x + item_width_x, y) 
          end 
        end 
        if text_v 
#~           draw_text(0, i * 24, item_width, item_height, text_v, content[text]) 
          draw_text(x, y, item_width_x, item_height, text_v, content[text]) 
        else 
#~           draw_text(0, i * 24, item_width, item_height, text, content[text]) unless text.empty? 
          draw_text(x, y, item_width_x, item_height, text, content[text]) unless text.empty? 
        end 
      end 
    end 
  end 
  #-------------------------------------------------------------------------- 
  # ● ウィンドウを開く 
  #-------------------------------------------------------------------------- 
  def open 
    refresh 
    super 
  end 
end 
 
#============================================================================== 
# ■ Scene_Menu 
#------------------------------------------------------------------------------ 
#  メニュー画面の処理を行うクラスです。 
#============================================================================== 
 
class Scene_Menu < Scene_MenuBase 
  #-------------------------------------------------------------------------- 
  # ● 開始処理 
  #-------------------------------------------------------------------------- 
  alias variables_view_start start 
  def start 
    variables_view_start 
    create_variables_window 
  end 
  #-------------------------------------------------------------------------- 
  # ● 変数ウィンドウの作成 
  #-------------------------------------------------------------------------- 
  def create_variables_window 
    @variables_window = Window_VariablesView.new 
    @variables_window.x = 0 
    #@variables_window.y = Graphics.height - @gold_window.height - @variables_window.height 
    @variables_window.y = @command_window.height 
  end 
end 
 
 
 
 
原網址:求個成績單的腳本~~ |   
 
 
 
 |