设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 921|回复: 0
打印 上一主题 下一主题

[已经过期] 為甚麼圖片顯示不出來了?(腳本內)

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
510 小时
注册时间
2010-5-8
帖子
266
跳转到指定楼层
1
发表于 2012-2-1 17:20:50 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
  1. =begin
  2. ==============================================================================
  3. ** MOG Scene Menu Itigo V1.5
  4.      By Moghunter  
  5.      http://www.atelier-rgss.com
  6. ------------------------------------------------------------------------------
  7. ** Reinvisioned version
  8. 設定:大部份圖片也是在picture資料夾內,請自行修改。
  9. ☆這兒用角色臉圖
  10.   名稱要是「角色名稱_Fs」(默認版本,如果不喜歡請在第22行修改。)
  11.   大小要是50x50
  12. ==============================================================================
  13. =end

  14. module MOG

  15.   # 基本圖片名稱定義
  16.     # Main Menu Graphics Used
  17.       MAIN_LAYOUT       = "Layout-Menu"     # 主菜單的窗口圖
  18.       MAIN_BACKGROUND   = "Back-Other"       # 背景
  19.       MAIN_CURSOR       = "MogCursor"       # 遊標圖
  20.       MAIN_CURSOR_FX    = false             # 遊標移動fx開關
  21.       SECOND_CURSOR     = "MogCursor_2"     # 遊標圖2
  22.       SECOND_CURSOR_FX  = false             # 遊標2移動fx開關
  23.       FACE_SMALL        = "_Fs"             # 角色臉圖名稱定義
  24.       MAIN_MAPNAME      = true              # 如果是true就顯示地圖名稱
  25.     # Menu
  26.       MAIN_FX           = 1                 # 背景設定(0:活動背景/1:固定/2:地圖)
  27.       MAIN_TRAN_TIME    = 20                # 畫面過渡時間
  28.       MAIN_TRAN_TYPE    = "006-Stripe02"    # 畫面過渡圖
  29.     # Font Used
  30.       MAIN_FONT         = "華康中圓體"         # 字型
  31.   
  32.   # 欄位圖片名稱定義
  33.     # Empty Bars
  34.       MAIN_BAR_E        = "BAR0"            # HP/SP空欄圖
  35.       MAIN_BAR_XP_E     = "Exp_Back"        # EXP空欄圖
  36.     # Fill Bars
  37.       MAIN_BAR_HP       = "HP_Bar"          # HP欄填充圖
  38.       MAIN_BAR_SP       = "SP_Bar"          # SP欄填充圖
  39.       MAIN_BAR_XP       = "Exp_Meter"       # EXP欄填充圖
  40.     # Gauge Texts
  41.       MAIN_TEXT_HP      = "HP_Tx"           # HP美術文字
  42.       MAIN_TEXT_SP      = "SP_Tx"           # SP美術文字
  43.       MAIN_TEXT_XP      = "Exp_tx"          # EXP美術文字
  44.       MAIN_TEXT_LV      = "LV_tx"           # LEVEL美術文字
  45.   
  46. end

  47. # Mogscript global
  48. $mogscript = {} if $mogscript == nil
  49. $mogscript["menu_itigo"] = true



  50. #==============================================================================
  51. # ** Game_Actor
  52. #------------------------------------------------------------------------------
  53. #  This class handles the actor. It's used within the Game_Actors class
  54. #  ($game_actors) and refers to the Game_Party class ($game_party).
  55. #==============================================================================

  56. class Game_Actor < Game_Battler
  57.   def now_exp
  58.   #--------------------------------------------------------------------------
  59.   # * Get EXP
  60.   #--------------------------------------------------------------------------   
  61.     return @exp - @exp_list[@level]
  62.   end
  63.   #--------------------------------------------------------------------------
  64.   # * Get Next Level EXP
  65.   #--------------------------------------------------------------------------
  66.   def next_exp
  67.     return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  68.   end
  69. end



  70. #==============================================================================
  71. # ** Game_Map
  72. #------------------------------------------------------------------------------
  73. #  This class handles the map. It includes scrolling and passable determining
  74. #  functions. Refer to "$game_map" for the instance of this class.
  75. #==============================================================================

  76. class Game_Map
  77.   #--------------------------------------------------------------------------
  78.   # * Public Instance Variables
  79.   #--------------------------------------------------------------------------
  80.   attr_reader   :map_id                   # map id
  81.   #--------------------------------------------------------------------------
  82.   # * Map Name
  83.   #--------------------------------------------------------------------------  
  84.   def mpname
  85.     $mpname = load_data("Data/MapInfos.rxdata")
  86.     $mpname[@map_id].name
  87.   end
  88. end



  89. #==============================================================================
  90. # ** Window_Base
  91. #------------------------------------------------------------------------------
  92. #  This class is for all in-game windows.
  93. #==============================================================================

  94. class Window_Base < Window
  95.   #--------------------------------------------------------------------------
  96.   # * Draw Empty Face
  97.   #--------------------------------------------------------------------------  
  98.   def nada
  99.     face = RPG::Cache.menu("")
  100.   end   
  101.   #--------------------------------------------------------------------------
  102.   # * Draw Face
  103.   #     actor : actor
  104.   #     x     : draw spot x-coordinate
  105.   #     y     : draw spot y-coordinate
  106.   #--------------------------------------------------------------------------  
  107.   def drw_face(actor, x, y)
  108.     face = RPG::Cache.menu(actor.name + MOG::FACE_SMALL) rescue nada
  109.     cw = face.width
  110.     ch = face.height
  111.     src_rect = Rect.new(0, 0, cw, ch)
  112.     self.contents.blt(x , y - ch, face, src_rect)   
  113.   end   
  114.   #--------------------------------------------------------------------------
  115.   # * Draw HP from Image
  116.   #     actor : actor
  117.   #     x     : draw spot x-coordinate
  118.   #     y     : draw spot y-coordinate
  119.   #--------------------------------------------------------------------------  
  120.   def draw_maphp3(actor, x, y)
  121.     back = RPG::Cache.menu(MOG::MAIN_BAR_E)
  122.     cw = back.width  
  123.     ch = back.height
  124.     src_rect = Rect.new(0, 0, cw, ch)   
  125.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  126.     meter = RPG::Cache.menu(MOG::MAIN_BAR_HP)
  127.     cw = meter.width  * actor.hp / actor.maxhp
  128.     ch = meter.height
  129.     src_rect = Rect.new(0, 0, cw, ch)
  130.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  131.     text = RPG::Cache.menu(MOG::MAIN_TEXT_HP)
  132.     cw = text.width  
  133.     ch = text.height
  134.     src_rect = Rect.new(0, 0, cw, ch)
  135.     self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  136.     self.contents.font.color = Color.new(0, 0, 0, 255)
  137.     self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
  138.     self.contents.font.color = Color.new(255, 255, 255, 255)
  139.     self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)   
  140.   end  
  141.   #--------------------------------------------------------------------------
  142.   # * Draw SP from Image
  143.   #     actor : actor
  144.   #     x     : draw spot x-coordinate
  145.   #     y     : draw spot y-coordinate
  146.   #--------------------------------------------------------------------------
  147.   def draw_mapsp3(actor, x, y)
  148.     back = RPG::Cache.menu(MOG::MAIN_BAR_E)
  149.     cw = back.width  
  150.     ch = back.height
  151.     src_rect = Rect.new(0, 0, cw, ch)   
  152.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  153.     meter = RPG::Cache.menu(MOG::MAIN_BAR_SP)   
  154.     cw = meter.width  * actor.sp / actor.maxsp
  155.     ch = meter.height
  156.     src_rect = Rect.new(0, 0, cw, ch)
  157.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  158.     text = RPG::Cache.menu(MOG::MAIN_TEXT_SP)
  159.     cw = text.width  
  160.     ch = text.height
  161.     src_rect = Rect.new(0, 0, cw, ch)
  162.     self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  163.     self.contents.font.color = Color.new(0, 0, 0, 255)
  164.     self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2)
  165.     self.contents.font.color = Color.new(255, 255, 255, 255)
  166.     self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2)   
  167.   end  
  168.   #--------------------------------------------------------------------------
  169.   # * Draw EXP from Image
  170.   #     actor : actor
  171.   #     x     : draw spot x-coordinate
  172.   #     y     : draw spot y-coordinate
  173.   #--------------------------------------------------------------------------
  174.   def draw_mexp2(actor, x, y)
  175.     bitmap2 = RPG::Cache.menu(MOG::MAIN_BAR_XP_E)
  176.     cw = bitmap2.width
  177.     ch = bitmap2.height
  178.     src_rect = Rect.new(0, 0, cw, ch)
  179.     self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
  180.     if actor.next_exp != 0
  181.       rate = actor.now_exp.to_f / actor.next_exp
  182.     else
  183.       rate = 1
  184.     end
  185.     bitmap = RPG::Cache.menu(MOG::MAIN_BAR_XP)
  186.     if actor.level < 99
  187.       cw = bitmap.width * rate
  188.     else
  189.       cw = bitmap.width
  190.     end   
  191.     ch = bitmap.height
  192.     src_rect = Rect.new(0, 0, cw, ch)
  193.     self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
  194.     exp_tx = RPG::Cache.menu(MOG::MAIN_TEXT_XP)
  195.     cw = exp_tx.width
  196.     ch = exp_tx.height
  197.     src_rect = Rect.new(0, 0, cw, ch)
  198.     self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect)
  199.     lv_tx = RPG::Cache.menu(MOG::MAIN_TEXT_LV)
  200.     cw = lv_tx.width
  201.     ch = lv_tx.height
  202.     src_rect = Rect.new(0, 0, cw, ch)
  203.     self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect)
  204.     self.contents.font.color = Color.new(0, 0, 0, 255)
  205.     self.contents.draw_text(x + 161, y + 7, 24, 32, actor.level.to_s, 1)
  206.     self.contents.font.color = Color.new(255, 255, 255, 255)
  207.     self.contents.draw_text(x + 160, y + 6, 24, 32, actor.level.to_s, 1)
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # * Draw State
  211.   #     actor : actor
  212.   #     x     : draw spot x-coordinate
  213.   #     y     : draw spot y-coordinate
  214.   #     width : draw spot width
  215.   #--------------------------------------------------------------------------
  216.   def draw_actor_state(actor, x, y, width = 80)
  217.     text = make_battler_state_text(actor, width, true)
  218.     self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
  219.     self.contents.draw_text(x, y, width, 32, text, 2)
  220.   end  
  221. end



  222. #==============================================================================
  223. # ** Window_MenuStatus
  224. #------------------------------------------------------------------------------
  225. #  This window displays party member status on the menu screen.
  226. #==============================================================================

  227. class Window_MenuStatus < Window_Selectable
  228.   #--------------------------------------------------------------------------
  229.   # * Object Initialization
  230.   #--------------------------------------------------------------------------  
  231.   def initialize
  232.     super(0, 0, 415, 280)
  233.     self.contents = Bitmap.new(width - 32, height - 32)
  234.     self.windowskin = RPG::Cache.windowskin("")
  235.     self.opacity = 0
  236.     self.z = 15
  237.     refresh
  238.     self.active = false
  239.     self.index = -1
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # * Refresh
  243.   #--------------------------------------------------------------------------  
  244.   def refresh
  245.     self.contents.clear
  246.     @item_max = $game_party.actors.size
  247.     for i in 0...$game_party.actors.size
  248.       x = 20
  249.       y = i * 62
  250.       actor = $game_party.actors[i]
  251.       self.contents.font.name = MOG::MAIN_FONT
  252.       if $mogscript["TP_System"] == true
  253.         draw_actor_tp(actor, x + 285, y - 5, 4)  
  254.         draw_actor_state(actor, x + 190, y - 5)
  255.       else  
  256.         draw_actor_state(actor, x + 220, y - 5)
  257.       end
  258.       drw_face(actor, x, y + 50)
  259.       draw_maphp3(actor, x + 40, y - 5)
  260.       draw_mapsp3(actor, x + 40, y + 20)
  261.       draw_mexp2(actor, x + 140, y + 15)
  262.     end
  263.   end
  264.   #--------------------------------------------------------------------------
  265.   # * Cursor Rectangle Update
  266.   #--------------------------------------------------------------------------
  267.   def update_cursor_rect
  268.     if @index < 0
  269.       self.cursor_rect.empty
  270.     else
  271.       self.cursor_rect.set(5, @index * 62, self.width - 32, 50)
  272.     end
  273.   end
  274. end



  275. #==============================================================================
  276. # ** Window_Gold
  277. #------------------------------------------------------------------------------
  278. #  This window displays amount of gold.
  279. #==============================================================================

  280. class Window_Gold < Window_Base
  281.   #--------------------------------------------------------------------------
  282.   # * Object Initialization
  283.   #--------------------------------------------------------------------------
  284.   def initialize
  285.     super(0, 0, 160, 64)
  286.     self.contents = Bitmap.new(width - 32, height - 32)
  287.     self.windowskin = RPG::Cache.windowskin("")
  288.     self.opacity = 0
  289.     self.z = 15
  290.     refresh
  291.   end
  292.   def refresh
  293.     self.contents.clear
  294.     self.contents.font.size = 15
  295.     cx = contents.text_size($data_system.words.gold).width
  296.     self.contents.font.color = normal_color
  297.     self.contents.draw_text(0, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
  298.     self.contents.font.color = system_color
  299.     self.contents.draw_text(120-cx, 0, cx, 32, $data_system.words.gold, 2)
  300.   end
  301. end



  302. #==============================================================================
  303. # ** Window_PlayTime
  304. #------------------------------------------------------------------------------
  305. #  This window displays play time on the menu screen.
  306. #==============================================================================

  307. class Window_PlayTime < Window_Base
  308.   #--------------------------------------------------------------------------
  309.   # * Object Initialization
  310.   #--------------------------------------------------------------------------
  311.   def initialize
  312.     super(0, 0, 160, 96)
  313.     self.contents = Bitmap.new(width - 32, height - 32)
  314.     self.windowskin = RPG::Cache.windowskin("")
  315.     self.opacity = 0
  316.     self.z = 15
  317.     refresh
  318.   end
  319.   #--------------------------------------------------------------------------
  320.   # * Refresh
  321.   #--------------------------------------------------------------------------
  322.   def refresh
  323.     self.contents.clear
  324.     self.contents.font.size = 15
  325.     @total_sec = Graphics.frame_count / Graphics.frame_rate
  326.     hour = @total_sec / 60 / 60
  327.     min = @total_sec / 60 % 60
  328.     sec = @total_sec % 60
  329.     text = sprintf("%02d:%02d:%02d", hour, min, sec)
  330.     self.contents.font.color = normal_color
  331.     self.contents.draw_text(0, 0, 120, 32, text, 2)
  332.   end
  333. end

  334. #==============================================================================
  335. # ** Window_Steps
  336. #------------------------------------------------------------------------------
  337. #  This window displays step count on the menu screen.
  338. #==============================================================================

  339. class Window_Steps < Window_Base
  340.   #--------------------------------------------------------------------------
  341.   # * Object Initialization
  342.   #--------------------------------------------------------------------------
  343.   def initialize
  344.     super(0, 0, 160, 96)
  345.     self.contents = Bitmap.new(width - 32, height - 32)
  346.     self.windowskin = RPG::Cache.windowskin("")
  347.     self.opacity = 0
  348.     self.z = 15
  349.     refresh
  350.   end
  351.   #--------------------------------------------------------------------------
  352.   # * Refresh
  353.   #--------------------------------------------------------------------------
  354.   def refresh
  355.     self.contents.clear
  356.     self.contents.font.size = 15
  357.     self.contents.font.color = normal_color
  358.     self.contents.draw_text(0, 0, 120, 32, $game_party.steps.to_s, 2)
  359.   end
  360. end



  361. #==============================================================================
  362. # ** Window_Map_Name
  363. #------------------------------------------------------------------------------
  364. #  This window displays the map name on the menu screen.
  365. #==============================================================================

  366. class Window_Map_Name < Window_Base
  367.   #--------------------------------------------------------------------------
  368.   # * Object Initialization
  369.   #--------------------------------------------------------------------------
  370.   def initialize
  371.     super(0, 0, 160, 96)
  372.     self.contents = Bitmap.new(width - 32, height - 32)
  373.     self.windowskin = RPG::Cache.windowskin("")
  374.     self.opacity = 0
  375.     self.z = 15
  376.     refresh
  377.   end
  378.   #--------------------------------------------------------------------------
  379.   # * Refresh
  380.   #--------------------------------------------------------------------------
  381.   def refresh
  382.     self.contents.clear
  383.     self.contents.font.color = normal_color
  384.     self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 1)
  385.   end
  386. end



  387. #==============================================================================
  388. # ** Scene_Menu
  389. #------------------------------------------------------------------------------
  390. #  This class performs menu screen processing.
  391. #==============================================================================

  392. class Scene_Menu
  393.   #--------------------------------------------------------------------------
  394.   # * Main Processing
  395.   #--------------------------------------------------------------------------
  396.   def main
  397.     s1 = ""
  398.     s2 = ""
  399.     s3 = ""
  400.     s4 = ""
  401.     s5 = ""
  402.     s6 = ""
  403.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  404.     @command_window.index = @menu_index
  405.     if $game_party.actors.size == 0
  406.       @command_window.disable_item(0)
  407.       @command_window.disable_item(1)
  408.       @command_window.disable_item(2)
  409.       @command_window.disable_item(3)
  410.     end
  411.     @command_window.visible = false
  412.     @command_window.x = -640
  413.     #layout
  414.     @mnlay = Sprite.new
  415.     @mnlay.bitmap = RPG::Cache.menu(MOG::MAIN_LAYOUT)
  416.     @mnlay.z = 10
  417.     @mnlay.opacity = 0
  418.     @mnlay.x = 0
  419.     #background
  420.     if MOG::MAIN_FX == 0
  421.       @mnback = Plane.new
  422.       @mnback.bitmap = RPG::Cache.menu(MOG::MAIN_BACKGROUND)
  423.       @mnback.blend_type = 0
  424.       @mnback.z = 5
  425.       @mnback2 = Plane.new
  426.       @mnback2.bitmap = RPG::Cache.menu(MOG::MAIN_BACKGROUND)
  427.       @mnback2.blend_type = 0
  428.       @mnback2.z = 5
  429.       @mnback2.opacity = 60
  430.     elsif MOG::MAIN_FX == 1
  431.       @mnback = Plane.new
  432.       @mnback.bitmap = RPG::Cache.menu(MOG::MAIN_BACKGROUND)
  433.       @mnback.blend_type = 0
  434.       @mnback.z = 5
  435.     else
  436.       @spriteset = Spriteset_Map.new
  437.     end
  438.     #cursor
  439.     @mnsel = Sprite.new
  440.     @mnsel.bitmap = RPG::Cache.menu(MOG::MAIN_CURSOR)
  441.     @mnsel.z = 20
  442.     @mnsel.x = 40
  443.     @mnsel.y = 112
  444.     @mnop = 150
  445.     if $game_system.save_disabled
  446.       @command_window.disable_item(4)
  447.     end
  448.     # 章程
  449.       case $game_variables[3]
  450.     when 1
  451.       @stage = "1"
  452.     else
  453.       @stage = "1"
  454.     end
  455.     @menu_stage = Sprite.new
  456.     @menu_stage.bitmap = RPG::Cache.menu("#{@stage}")
  457.     @menu_stage.zoom_x = 0.4
  458.     @menu_stage.zoom_y = 0.4
  459.     @menu_stage.z = 100
  460.     @menu_stage.opacity = 200
  461.     @menu_stage.x = -56
  462.     @menu_stage.y = -329
  463.     #
  464.     @playtime_window = Window_PlayTime.new
  465.     @playtime_window.x = -15#54
  466.     @playtime_window.y = 60#68
  467.     @playtime_window.contents_opacity = 0
  468.     if MOG::MAIN_MAPNAME == true
  469.       @mapname_window = Window_Map_Name.new
  470.       @mapname_window.x = 425
  471.       @mapname_window.y = 25
  472.       @mapname_window.contents_opacity = 0
  473.     end
  474.     #(X: - <=, + =>), (y: +v, - ^)
  475.     @steps_window = Window_Steps.new
  476.     @steps_window.x = -69#54
  477.     @steps_window.y = 44#88
  478.     @steps_window.contents_opacity = 0
  479.     @gold_window = Window_Gold.new
  480.     @gold_window.x = -59#54
  481.     @gold_window.y = 25#48
  482.     @gold_window.contents_opacity = 0
  483.     @status_window = Window_MenuStatus.new
  484.     @status_window.x = 295
  485.     @status_window.y = 110
  486.     @status_window.contents_opacity = 0
  487.     if MOG::MAIN_FX == 0
  488.       Graphics.transition(MOG::MAIN_TRAN_TIME, "Graphics/Transitions/" +
  489.         MOG::MAIN_TRAN_TYPE)
  490.     elsif MOG::MAIN_FX == 1
  491.       Graphics.transition(MOG::MAIN_TRAN_TIME, "Graphics/Transitions/" +
  492.         MOG::MAIN_TRAN_TYPE)
  493.     else
  494.       Graphics.transition  
  495.     end
  496.     loop do
  497.       Graphics.update
  498.       Input.update
  499.       update
  500.       if $scene != self
  501.         break
  502.       end
  503.     end
  504.     for i in 0..10  
  505.       if MOG::MAIN_FX == 0
  506.         @mnback.oy += 1
  507.         @mnback.ox += 1
  508.         @mnback2.oy += 1
  509.         @mnback2.ox -= 1
  510.       end
  511.       @status_window.x += 20
  512.       @status_window.contents_opacity -= 25
  513.       @mnsel.opacity -= 25
  514.       @mnsel.zoom_x += 0.03
  515.       @mnlay.x -= 0 #10
  516.       @mnlay.opacity = 255 #-=25
  517.       if MOG::MAIN_MAPNAME == true
  518.         @mapname_window.x += 5
  519.         @mapname_window.contents_opacity -= 20
  520.       end
  521.       @steps_window.contents_opacity -= 25
  522.       @gold_window.contents_opacity -= 25
  523.       @playtime_window.contents_opacity -= 25
  524.       Graphics.update   
  525.     end
  526.     Graphics.freeze
  527.     @command_window.dispose
  528.     @playtime_window.dispose
  529.     @steps_window.dispose
  530.     @gold_window.dispose   
  531.     @status_window.dispose
  532.     @menu_stage.dispose
  533.     @mnlay.dispose
  534.     if MOG::MAIN_FX == 0
  535.       @mnback.dispose
  536.       @mnback2.dispose
  537.     elsif MOG::MAIN_FX == 1
  538.       @mnback.dispose
  539.     else
  540.       @spriteset.dispose
  541.     end
  542.     @mnsel.dispose
  543.     @mapname_window.dispose if MOG::MAIN_MAPNAME == true
  544.     Graphics.update
  545.   end
  546.   #--------------------------------------------------------------------------
  547.   # * Frame Update
  548.   #--------------------------------------------------------------------------
  549.   def update
  550.     if MOG::MAIN_CURSOR_FX
  551.       if @mnsel.zoom_x <= 1.6
  552.         @mnsel.zoom_x += 0.03
  553.         @mnsel.opacity -= 10
  554.       elsif @mnsel.zoom_x > 1.6
  555.         @mnsel.zoom_x = 1.0
  556.         @mnsel.opacity = 255
  557.       end     
  558.     end
  559.     if @mnlay.x < 0
  560.       @mnlay.opacity = 255 #25
  561.       @mnlay.x += 10
  562.     elsif @mnlay.x >= 0  
  563.       @mnlay.opacity = 255
  564.       @mnlay.x = 0
  565.     end
  566.     @command_window.update if @command_window.active
  567.     @playtime_window.update
  568.     @status_window.update if @status_window.active
  569.     if MOG::MAIN_FX == 0
  570.       @mnback.oy += 1
  571.       @mnback.ox += 1
  572.       @mnback2.oy += 1
  573.       @mnback2.ox -= 1
  574.     end
  575.     @mnop += 5
  576.     # Secondary Cursor
  577.     if @command_window.active == true
  578.       @mnsel.bitmap = RPG::Cache.menu(MOG::MAIN_CURSOR)   
  579.     else
  580.       @mnsel.bitmap = RPG::Cache.menu(MOG::SECOND_CURSOR)
  581.       unless MOG::SECOND_CURSOR_FX
  582.         @mnsel.zoom_x = 1
  583.         @mnsel.opacity = 255
  584.       end
  585.     end
  586.     @mapname_window.contents_opacity += 15 if MOG::MAIN_MAPNAME == true
  587.     @playtime_window.contents_opacity += 15
  588.     @gold_window.contents_opacity += 15
  589.     @playtime_window.contents_opacity += 15
  590.     @steps_window.contents_opacity += 15
  591.    
  592.     if @status_window.x > 195
  593.       @status_window.x -= 10
  594.       @status_window.contents_opacity += 10
  595.     elsif @status_window.x <= 195
  596.       @status_window.x = 195
  597.       @status_window.contents_opacity = 255
  598.     end
  599.     if @mnop >= 255
  600.       @mnop = 120
  601.     end   
  602.     if @command_window.active
  603.       update_command
  604.       return
  605.     end
  606.     if @status_window.active
  607.       update_status
  608.       return
  609.     end
  610.   end
  611.   #--------------------------------------------------------------------------
  612.   # * Frame Update (when command window is active)
  613.   #--------------------------------------------------------------------------
  614.   def update_command
  615.     case @command_window.index
  616.     when 0  
  617.       @mnsel.x = 40
  618.       @mnsel.y = 112
  619.     when 1
  620.       @mnsel.x = 40
  621.       @mnsel.y = 162
  622.     when 2
  623.       @mnsel.x = 40
  624.       @mnsel.y = 209
  625.     when 3
  626.       @mnsel.x = 40
  627.       @mnsel.y = 255
  628.     when 4
  629.       @mnsel.x = 40
  630.       @mnsel.y = 303
  631.     when 5
  632.       @mnsel.x = 40
  633.       @mnsel.y = 348
  634.     end   
  635.     if Input.trigger?(Input::B)
  636.       $game_system.se_play($data_system.cancel_se)
  637.       $scene = Scene_Map.new
  638.       return
  639.     end
  640.     if Input.trigger?(Input::C)
  641.       if $game_party.actors.size == 0 and @command_window.index < 4
  642.         $game_system.se_play($data_system.buzzer_se)
  643.         return
  644.       end
  645.       case @command_window.index
  646.       when 0
  647.         $game_system.se_play($data_system.decision_se)
  648.         $scene = Scene_Item.new
  649.       when 1
  650.         $game_system.se_play($data_system.decision_se)
  651.         @command_window.active = false
  652.         @status_window.active = true
  653.         @status_window.index = 0
  654.       when 2
  655.         $game_system.se_play($data_system.decision_se)
  656.         @command_window.active = false
  657.         @status_window.active = true
  658.         @status_window.index = 0
  659.       when 3
  660.         $game_system.se_play($data_system.decision_se)
  661.         @command_window.active = false
  662.         @status_window.active = true
  663.         @status_window.index = 0
  664.       when 4
  665.         if $game_system.save_disabled
  666.           $game_system.se_play($data_system.buzzer_se)
  667.         return
  668.       end
  669.         $game_system.se_play($data_system.decision_se)
  670.         $scene = Scene_Save.new
  671.       when 5
  672.         $game_system.se_play($data_system.decision_se)
  673.         $scene = Scene_End.new
  674.       end
  675.       return
  676.     end
  677.   end
  678.   #--------------------------------------------------------------------------
  679.   # * Frame Update (when status window is active)
  680.   #--------------------------------------------------------------------------
  681.   def update_status  
  682.     case @status_window.index
  683.     when 0  
  684.       @mnsel.x = 180
  685.       @mnsel.y = 130
  686.     when 1
  687.       @mnsel.x = 180
  688.       @mnsel.y = 195
  689.     when 2
  690.       @mnsel.x = 180
  691.       @mnsel.y = 255
  692.     when 3
  693.       @mnsel.x = 180
  694.       @mnsel.y = 320
  695.     end  
  696.     if Input.trigger?(Input::B)
  697.       $game_system.se_play($data_system.cancel_se)
  698.       @command_window.active = true
  699.       @status_window.active = false
  700.       @status_window.index = -1
  701.       return
  702.     end
  703.     if Input.trigger?(Input::C)
  704.       case @command_window.index
  705.       when 1
  706.         if $game_party.actors[@status_window.index].restriction >= 2
  707.           $game_system.se_play($data_system.buzzer_se)
  708.           return
  709.         end
  710.         $game_system.se_play($data_system.decision_se)
  711.         $scene = Scene_Skill.new(@status_window.index)
  712.       when 2  
  713.         $game_system.se_play($data_system.decision_se)
  714.         $scene = Scene_Equip.new(@status_window.index)
  715.       when 3  
  716.         $game_system.se_play($data_system.decision_se)
  717.         $scene = Scene_Status.new(@status_window.index)
  718.         end
  719.       return
  720.     end
  721.   end
  722. end
复制代码
http://www.atelier-rgss.com/RGSS/Menu/XP_Menu01.html  ←原版
這個是我修改過的MoGHUNTER menu,我想加入一個顯示章程的圖片 (約487行開始)不過為甚魔顯示不出來了啦!!而且角色臉圖也不見了!! >< (自認腳本盲)
附圖1張:

(素材是不是很熟悉呢~(就是淚光的圖啦...對不起明尼君)當然那個[通往青空的道路](就是現實中會消失的圖)會改的)

点评

啊不好意思,臉圖另一個問題,請別理會 ==  发表于 2012-2-1 17:44
舊坑被棄了
開新坑~
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-21 04:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表