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

Project1

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

[已经过期] 技能畫面問題

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
510 小时
注册时间
2010-5-8
帖子
266
跳转到指定楼层
1
发表于 2011-6-24 23:09:42 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 PCNinja 于 2011-6-24 23:11 编辑

先前發的那個求菜單帖請版主幫我關了他。
找到一個不錯的,不過技能畫面有些面題,而且改了幾次也改不了(可能我的RGSS能力不足)。
技能菜單:

戰鬥:

有沒有辦法把技能菜單的持能名稱的顏色改回白色,
另外有沒有辦法只在戰鬥時能使用RMXP默認的Windows Skill?
因為這個腳本內置了Windows skill,一改正,技能菜單就會很失效。

給大家腳本:

  1. #==============================================================================
  2. # ** MOG Scene Skill Nami V2.0
  3. #     By Moghunter  
  4. #     http://www.atelier-rgss.com
  5. #------------------------------------------------------------------------------
  6. # ** Reinvisioned version
  7. #   
  8. #    This variant has retooled the MOG module by adding more configurables for
  9. #    the user.  No longer are the graphics hardwired into the code but are now
  10. #    able to be altered in the revised configuration serction.
  11. #
  12. #    Also, certain classes have been renamed  back to their original versions.
  13. #    As such...   classes such as  Window_SkillStatus2  and Window_Skill2 have
  14. #    been renamed back  to Window_SkillStatus  and Window_Skill.   This change
  15. #    within the script also allowed  for the deletion  of unnecessary  and red
  16. #    dundant methods within the script:
  17. #
  18. #    Classes and methods renamed:
  19. #    * Window_SkillStatus2
  20. #    * Window_Skill
  21. #    * draw_actor_state2 (in the Window_Base class)
  22. #
  23. #    Methods deleted from the original system:
  24. #    * skill       (Window_Menu)
  25. #    * update_help (Window_Menu)
  26. #==============================================================================


  27. module MOG
  28.   
  29.   # BASIC MENU CONFIGURATION
  30.     # Skill Menu Graphics Used
  31.       SKILL_LAYOUT      = "Layout-Skill"    # Skill Menu Graphics
  32.       SKILL_BACKGROUND  = "Back-Other"      # Animated background graphic
  33.       SKILL_STATUS      = "Status-Skill"    # Skill Status Graphic
  34.       FACE_SMALL        = "_Fs"             # Suffix for face graphics
  35.       FACE_LARGE        = "_Fl"             # Suffix for large face graphics
  36.     # Menu
  37.       SKILL_FX          = 0                 # Back FX (0=Moving/ 1=Still/ 2=Map)   
  38.       SKILL_TRAN_TIME   = 20                # Transition Time
  39.       SKILL_TRAN_TYPE   = "004-Blind04"     # Transition Type (Name)
  40.     # Font Used
  41.       SKILL_FONT        = "Georgia"         # Font used in skill menu
  42.       SKILL_FONT_COLOR  = Color.new(0,0,0)  # Font color used open areas
  43.         
  44.   # MENU GAUGE GRAPHICS
  45.     # Empty Bars
  46.       SKILL_BAR_E       = "BAR0"            # Blank bar
  47.       SKILL_BAR_XP_E    = "Exp_Back"        # Blank bar for EXP
  48.     # Fill Bars
  49.       SKILL_BAR_HP      = "HP_Bar"          # Fill bar for HP
  50.       SKILL_BAR_SP      = "SP_Bar"          # Fill bar for SP
  51.       SKILL_BAR_XP      = "Exp_Meter"       # Fill bar for EXP
  52.     # Gauge Texts
  53.       SKILL_TEXT_HP     = "HP_Tx"           # Text graphic for HP
  54.       SKILL_TEXT_SP     = "SP_Tx"           # Text graphic for SP
  55.       SKILL_TEXT_XP     = "Exp_tx"          # Text graphic for EXP
  56.       SKILL_TEXT_LV     = "LV_tx"           # Text graphic for Level
  57.       
  58.   # SKILL PROFILE GAUGE GRAPHICS
  59.     # Empty Bars
  60.       SKILL_BAR_E_2     = "BAR"             # Blank bar
  61.       SKILL_BAR_XP_E_2  = "Exp_Back"        # Blank bar for EXP      
  62.     # Fill Bars
  63.       SKILL_BAR_HP_2    = "HP_Bar2"         # Fill bar for HP
  64.       SKILL_BAR_SP_2    = "SP_Bar2"         # Fill bar for SP
  65.       SKILL_BAR_XP_2    = "Exp_Meter"       # Fill bar for EXP      
  66.       
  67. end
  68.    
  69. # Mogscript global
  70. $mogscript = {} if $mogscript == nil
  71. $mogscript["menu_nami"] = true



  72. #==============================================================================
  73. # ** Game_Actor
  74. #------------------------------------------------------------------------------
  75. #  This class handles the actor. It's used within the Game_Actors class
  76. #  ($game_actors) and refers to the Game_Party class ($game_party).
  77. #==============================================================================

  78. class Game_Actor < Game_Battler
  79.   def now_exp
  80.   #--------------------------------------------------------------------------
  81.   # * Get EXP
  82.   #--------------------------------------------------------------------------   
  83.     return @exp - @exp_list[@level]
  84.   end
  85.   #--------------------------------------------------------------------------
  86.   # * Get Next Level EXP
  87.   #--------------------------------------------------------------------------
  88.   def next_exp
  89.     return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  90.   end
  91. end



  92. #==============================================================================
  93. # ** Window_Base
  94. #------------------------------------------------------------------------------
  95. #  This class is for all in-game windows.
  96. #==============================================================================

  97. class Window_Base < Window
  98.   #--------------------------------------------------------------------------
  99.   # * Draw Empty Face
  100.   #--------------------------------------------------------------------------  
  101.   def nada
  102.     face = RPG::Cache.picture("")
  103.   end   
  104.   #--------------------------------------------------------------------------
  105.   # * Draw Face
  106.   #     actor : actor
  107.   #     x     : draw spot x-coordinate
  108.   #     y     : draw spot y-coordinate
  109.   #--------------------------------------------------------------------------  
  110.   def drw_face(actor, x, y)
  111.     face = RPG::Cache.picture(actor.name + MOG::FACE_SMALL) rescue nada
  112.     cw = face.width
  113.     ch = face.height
  114.     src_rect = Rect.new(0, 0, cw, ch)
  115.     self.contents.blt(x , y - ch, face, src_rect)   
  116.   end   
  117.   #--------------------------------------------------------------------------
  118.   # * Draw Face #3 (Larger face)
  119.   #     actor : actor
  120.   #     x     : draw spot x-coordinate
  121.   #     y     : draw spot y-coordinate
  122.   #--------------------------------------------------------------------------  
  123.   def draw_heroface3(actor,x,y)
  124.     face = RPG::Cache.picture(actor.name + MOG::FACE_LARGE) rescue nada
  125.     cw = face.width
  126.     ch = face.height
  127.     src_rect = Rect.new(0, 0, cw, ch)
  128.     self.contents.blt(x , y - ch, face, src_rect)   
  129.   end   
  130.   #--------------------------------------------------------------------------
  131.   # * Draw HP from Image
  132.   #     actor : actor
  133.   #     x     : draw spot x-coordinate
  134.   #     y     : draw spot y-coordinate
  135.   #--------------------------------------------------------------------------  
  136.   def draw_maphp3(actor, x, y)
  137.     back = RPG::Cache.picture(MOG::SKILL_BAR_E)
  138.     cw = back.width  
  139.     ch = back.height
  140.     src_rect = Rect.new(0, 0, cw, ch)   
  141.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  142.     meter = RPG::Cache.picture(MOG::SKILL_BAR_HP)
  143.     cw = meter.width  * actor.hp / actor.maxhp
  144.     ch = meter.height
  145.     src_rect = Rect.new(0, 0, cw, ch)
  146.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  147.     text = RPG::Cache.picture(MOG::SKILL_TEXT_HP)
  148.     cw = text.width  
  149.     ch = text.height
  150.     src_rect = Rect.new(0, 0, cw, ch)
  151.     self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  152.     self.contents.font.color = Color.new(0, 0, 0, 255)
  153.     self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
  154.     self.contents.font.color = Color.new(255, 255, 255, 255)
  155.     self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)   
  156.   end  
  157.   #--------------------------------------------------------------------------
  158.   # * Draw SP from Image
  159.   #     actor : actor
  160.   #     x     : draw spot x-coordinate
  161.   #     y     : draw spot y-coordinate
  162.   #--------------------------------------------------------------------------
  163.   def draw_mapsp3(actor, x, y)
  164.     back = RPG::Cache.picture(MOG::SKILL_BAR_E)
  165.     cw = back.width  
  166.     ch = back.height
  167.     src_rect = Rect.new(0, 0, cw, ch)   
  168.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  169.     meter = RPG::Cache.picture(MOG::SKILL_BAR_SP)   
  170.     cw = meter.width  * actor.sp / actor.maxsp
  171.     ch = meter.height
  172.     src_rect = Rect.new(0, 0, cw, ch)
  173.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  174.     text = RPG::Cache.picture(MOG::SKILL_TEXT_SP)
  175.     cw = text.width  
  176.     ch = text.height
  177.     src_rect = Rect.new(0, 0, cw, ch)
  178.     self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  179.     self.contents.font.color = Color.new(0, 0, 0, 255)
  180.     self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2)
  181.     self.contents.font.color = Color.new(255, 255, 255, 255)
  182.     self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2)   
  183.   end  
  184.   #--------------------------------------------------------------------------
  185.   # * Draw Skill Status Window
  186.   #     x     : draw spot x-coordinate
  187.   #     y     : draw spot y-coordinate  
  188.   #--------------------------------------------------------------------------   
  189.   def draw_lay(x, y)
  190.     lay = RPG::Cache.picture(MOG::SKILL_STATUS)
  191.     cw = lay.width
  192.     ch = lay.height
  193.     src_rect = Rect.new(0, 0, cw, ch)
  194.     self.contents.blt(x , y - ch, lay, src_rect)   
  195.   end  
  196.   #--------------------------------------------------------------------------
  197.   # * Draw HP from Image (Larger Gauge)
  198.   #     actor : actor
  199.   #     x     : draw spot x-coordinate
  200.   #     y     : draw spot y-coordinate
  201.   #--------------------------------------------------------------------------  
  202.   def draw_maphp4(actor, x, y)
  203.     back = RPG::Cache.picture(MOG::SKILL_BAR_E_2)
  204.     cw = back.width  
  205.     ch = back.height
  206.     src_rect = Rect.new(0, 0, cw, ch)   
  207.     self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  208.     meter = RPG::Cache.picture(MOG::SKILL_BAR_HP_2)
  209.     cw = meter.width  * actor.hp / actor.maxhp
  210.     ch = meter.height
  211.     src_rect = Rect.new(0, 0, cw, ch)
  212.     self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  213.     self.contents.font.color = Color.new(0,0,0,255)
  214.     self.contents.draw_text(x + 66, y - 1, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)  
  215.     self.contents.font.color = Color.new(250,255,255,255)
  216.     self.contents.draw_text(x + 65, y - 2, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)  
  217.   end  
  218.   #--------------------------------------------------------------------------
  219.   # * Draw SP from Image (Larger Gauge)
  220.   #     actor : actor
  221.   #     x     : draw spot x-coordinate
  222.   #     y     : draw spot y-coordinate
  223.   #--------------------------------------------------------------------------
  224.   def draw_mapsp4(actor, x, y)
  225.     back = RPG::Cache.picture(MOG::SKILL_BAR_E_2)
  226.     cw = back.width  
  227.     ch = back.height
  228.     src_rect = Rect.new(0, 0, cw, ch)   
  229.     self.contents.blt(x + 65 , y - ch + 30, back, src_rect)
  230.     meter = RPG::Cache.picture(MOG::SKILL_BAR_SP_2)
  231.     cw = meter.width  * actor.sp / actor.maxsp
  232.     ch = meter.height
  233.     src_rect = Rect.new(0, 0, cw, ch)
  234.     self.contents.blt(x + 65 , y - ch + 30, meter, src_rect)
  235.     self.contents.font.color = Color.new(0,0,0,255)
  236.     self.contents.draw_text(x + 66, y - 1, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)  
  237.     self.contents.font.color = Color.new(250,255,255,255)
  238.     self.contents.draw_text(x + 65, y - 2, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)  
  239.   end
  240.   #--------------------------------------------------------------------------
  241.   # * Draw EXP from Image (Larger Gauge)
  242.   #     actor : actor
  243.   #     x     : draw spot x-coordinate
  244.   #     y     : draw spot y-coordinate
  245.   #--------------------------------------------------------------------------
  246.   def draw_mexp4(actor, x, y)
  247.     actor = $game_party.actors[0]
  248.     bitmap2 = RPG::Cache.picture(MOG::SKILL_BAR_XP_E_2)
  249.     cw = bitmap2.width
  250.     ch = bitmap2.height
  251.     src_rect = Rect.new(0, 0, cw, ch)
  252.     self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
  253.     if actor.next_exp != 0
  254.       rate = actor.now_exp.to_f / actor.next_exp
  255.     else
  256.       rate = 1
  257.     end
  258.     bitmap = RPG::Cache.picture(MOG::SKILL_BAR_XP_2)
  259.     if actor.level < 99
  260.       cw = bitmap.width * rate
  261.     else
  262.       cw = bitmap.width
  263.     end   
  264.     ch = bitmap.height
  265.     src_rect = Rect.new(0, 0, cw, ch)
  266.     self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
  267.     self.contents.font.color = Color.new(0,0,0,255)
  268.     self.contents.draw_text(x + 55, y + 1, 84, 32, "Exp",0)
  269.     self.contents.font.color = Color.new(255,255,255,255)
  270.     self.contents.draw_text(x + 54, y, 84, 32, "Exp",0)
  271.     self.contents.font.color = Color.new(0,0,0,255)
  272.     self.contents.draw_text(x + 190, y - 125, 60, 32,"LV " +  actor.level.to_s, 1)
  273.     self.contents.font.color = Color.new(255,255,255,255)   
  274.     self.contents.draw_text(x + 191, y - 124, 60, 32,"LV " + actor.level.to_s, 1)   
  275.   end
  276.   #--------------------------------------------------------------------------
  277.   # * Draw EXP from Image
  278.   #     actor : actor
  279.   #     x     : draw spot x-coordinate
  280.   #     y     : draw spot y-coordinate
  281.   #--------------------------------------------------------------------------
  282.   def draw_mexp_it(actor, x, y)
  283.     lv_tx = RPG::Cache.picture(MOG::SKILL_TEXT_LV)
  284.     cw = lv_tx.width
  285.     ch = lv_tx.height
  286.     src_rect = Rect.new(0, 0, cw, ch)
  287.     self.contents.blt(x + 60 , y - ch + 32, lv_tx, src_rect)
  288.     self.contents.font.color = Color.new(0,0,0,255)
  289.     self.contents.draw_text(x + 101, y + 5, 24, 32, actor.level.to_s, 1)
  290.     self.contents.font.color = Color.new(255,255,255,255)
  291.     self.contents.draw_text(x + 100, y + 4, 24, 32, actor.level.to_s, 1)
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # * Draw State (In skill target window)
  295.   #     actor : actor
  296.   #     x     : draw spot x-coordinate
  297.   #     y     : draw spot y-coordinate
  298.   #     width : draw spot width
  299.   #--------------------------------------------------------------------------
  300.   def draw_actor_state_it(actor, x, y, width = 80)
  301.     text = make_battler_state_text(actor, width, true)
  302.     self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
  303.     self.contents.draw_text(x, y, width, 32, text, 1)
  304.   end
  305. end



  306. #==============================================================================
  307. # ** Window_Target_face
  308. #------------------------------------------------------------------------------
  309. #  This window selects a use target for the actor on the skill screen.
  310. #==============================================================================
  311. class Window_Target_face < Window_Selectable
  312.   #--------------------------------------------------------------------------
  313.   # * Object Initialization
  314.   #--------------------------------------------------------------------------  
  315.   def initialize
  316.     super(0, 130, 280, 300)
  317.     self.contents = Bitmap.new(width - 32, height - 32)
  318.     self.contents.font.name = MOG::SKILL_FONT
  319.     self.z += 10
  320.     @item_max = $game_party.actors.size
  321.     refresh
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # * Refresh
  325.   #--------------------------------------------------------------------------  
  326.   def refresh
  327.     self.contents.clear
  328.     for i in 0...$game_party.actors.size
  329.       x = 4
  330.       y = i * 65
  331.       actor = $game_party.actors[i]
  332.       drw_face(actor, x, y + 55)
  333.       if $mogscript["TP_System"] == true
  334.         draw_actor_tp(actor, x + 168, y + 27 ,4)
  335.       else
  336.         draw_mexp_it(actor, x + 110, y + 25 )
  337.       end
  338.       draw_actor_state_it(actor, x + 165, y )
  339.       draw_maphp3(actor, x + 20, y + 0)
  340.       draw_mapsp3(actor, x + 20, y + 32)
  341.     end
  342.   end
  343.   #--------------------------------------------------------------------------
  344.   # * Cursor Rectangle Update
  345.   #--------------------------------------------------------------------------  
  346.   def update_cursor_rect
  347.     if @index <= -2
  348.       self.cursor_rect.set(0, (@index + 10) * 65, self.width - 32, 60)
  349.     elsif @index == -1
  350.       self.cursor_rect.set(0, 0, self.width - 32, @item_max * 64 )
  351.     else
  352.     self.cursor_rect.set(0, @index * 65, self.width - 32, 60)
  353.     end
  354.   end
  355. end



  356. #==============================================================================
  357. # ** Window_SkillStatus
  358. #------------------------------------------------------------------------------
  359. #  This window displays the skill user's status on the skill screen.
  360. #==============================================================================

  361. class Window_SkillStatus < Window_Base
  362.   #--------------------------------------------------------------------------
  363.   # * Object Initialization
  364.   #     actor : actor
  365.   #--------------------------------------------------------------------------
  366.   def initialize(actor)
  367.     super(350, 75, 290, 340)
  368.     self.contents = Bitmap.new(width - 32, height - 32)
  369.     @actor = actor
  370.     self.opacity = 0
  371.     self.contents.font.name = MOG::SKILL_FONT
  372.     refresh
  373.   end
  374.   #--------------------------------------------------------------------------
  375.   # * Refresh
  376.   #--------------------------------------------------------------------------  
  377.   def refresh
  378.     self.contents.clear
  379.     draw_lay(0,300)
  380.     draw_heroface3(@actor,50,140)
  381.     draw_actor_name(@actor, 15, 10)
  382.     draw_actor_state(@actor, 120, 140)
  383.     draw_mexp4(@actor, -30, 135)
  384.     draw_maphp4(@actor, 5, 195)
  385.     draw_mapsp4(@actor, 5, 240)
  386.     if $mogscript["TP_System"] == true
  387.       draw_actor_tp(@actor, 40, 265,1)
  388.     end
  389.   end
  390. end


  391. #==============================================================================
  392. # ** Window_Skill
  393. #------------------------------------------------------------------------------
  394. #  This window displays usable skills on the skill and battle screens.
  395. #==============================================================================

  396. class Window_Skill < Window_Selectable
  397.   #--------------------------------------------------------------------------
  398.   # * Object Initialization
  399.   #     actor : actor
  400.   #--------------------------------------------------------------------------  
  401.   def initialize(actor)
  402.     super(0, 95, 335, 290)
  403.     @actor = actor
  404.     @column_max = 1
  405.     refresh
  406.     self.index = 0
  407.   end
  408.   #--------------------------------------------------------------------------
  409.   # * Refresh
  410.   #--------------------------------------------------------------------------   
  411.   def refresh
  412.     if self.contents != nil
  413.       self.contents.dispose
  414.       self.contents = nil
  415.     end
  416.     @data = []
  417.     for i in [email protected]
  418.       skill = $data_skills[@actor.skills[i]]
  419.       if skill != nil
  420.         @data.push(skill)
  421.       end
  422.     end
  423.     @item_max = @data.size
  424.     if @item_max > 0
  425.       self.contents = Bitmap.new(width - 32, row_max * 32)
  426.       for i in 0...@item_max
  427.         draw_item(i)
  428.       end
  429.     end
  430.   end
  431.   #--------------------------------------------------------------------------
  432.   # * Draw Item
  433.   #     index : item number
  434.   #--------------------------------------------------------------------------
  435.   def draw_item(index)
  436.     skill = @data[index]
  437.     if @actor.skill_can_use?(skill.id)
  438.       self.contents.font.color = normal_color
  439.       opacity = 255
  440.     else
  441.       self.contents.font.color = disabled_color
  442.       opacity = 128
  443.     end
  444.     self.contents.font.name = MOG::SKILL_FONT
  445.     x = index % 1 * (288)
  446.     y = index / 1 * 32
  447.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  448.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  449.     bitmap = RPG::Cache.icon(skill.icon_name)
  450.    
  451.     self.contents.font.color = MOG::SKILL_FONT_COLOR
  452.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  453.     self.contents.font.color = Color.new(0,0,0,128) if opacity = 128
  454.     self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
  455.     self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  456.     if $mogscript["TP_System"] == true
  457.       tp_cost = MOG::TP_COST[skill.id]
  458.       if tp_cost != nil   
  459.         self.contents.font.color = Color.new(50,250,150,255)
  460.         self.contents.draw_text(x + 170, y, 48, 32, MOG::TP_NAME, 2)   
  461.       else
  462.         self.contents.font.color = Color.new(200,200,0,255)
  463.         self.contents.draw_text(x + 170, y, 48, 32, $data_system.words.sp, 2)      
  464.       end
  465.     else
  466.       self.contents.font.color = Color.new(200,200,0,255)
  467.       self.contents.draw_text(x + 170, y, 48, 32, $data_system.words.sp, 2)   
  468.     end
  469.   end
  470. end



  471. #==============================================================================
  472. # ** Scene_Skill
  473. #------------------------------------------------------------------------------
  474. #  This class performs skill screen processing.
  475. #==============================================================================

  476. class Scene_Skill
  477.   #--------------------------------------------------------------------------
  478.   # * Main Processing
  479.   #--------------------------------------------------------------------------  
  480.   def main
  481.     @actor = $game_party.actors[@actor_index]
  482.     @msk_lay = Sprite.new
  483.     @msk_lay.bitmap = RPG::Cache.picture(MOG::SKILL_LAYOUT)
  484.     @msk_lay.z = 100
  485.     unless MOG::SKILL_FX == 2
  486.       @msk_back1 = Plane.new
  487.       @msk_back1.bitmap = RPG::Cache.picture(MOG::SKILL_BACKGROUND)
  488.       @msk_back1.z = 10
  489.     else
  490.       @spriteset = Spriteset_Map.new
  491.     end   
  492.     @help_window = Window_Help.new
  493.     @help_window.y = 500
  494.     @status_window = Window_SkillStatus.new(@actor)
  495.     @status_window.z = 110
  496.     @status_window.x = 640
  497.     @skill_window = Window_Skill.new(@actor)
  498.     @skill_window.help_window = @help_window
  499.     @skill_window.help_window.y = 500
  500.     @target_window = Window_Target_face.new
  501.     @target_window.x = 640
  502.     @target_window.y = 100
  503.     @target_window.opacity = 0
  504.     @target_window.visible = false
  505.     @target_window.active = false
  506.     @skill_window.opacity = 0
  507.     @help_window.opacity = 0
  508.     @slide = true
  509.     unless MOG::SKILL_FX == 2
  510.       Graphics.transition(MOG::SKILL_TRAN_TIME, "Graphics/Transitions/" +
  511.         MOG::SKILL_TRAN_TYPE)
  512.     else
  513.       Graphics.transition
  514.     end        
  515.     loop do
  516.       Graphics.update
  517.       Input.update
  518.       update
  519.       if $scene != self
  520.         break
  521.       end
  522.     end
  523.     for i in 0..30
  524.       @status_window.x += 25
  525.       @target_window.x += 25
  526.       Graphics.update  
  527.     end  
  528.     Graphics.freeze
  529.     @help_window.dispose
  530.     @status_window.dispose
  531.     @skill_window.dispose
  532.     @target_window.dispose
  533.     @msk_lay.dispose
  534.     @msk_back1.dispose unless MOG::SKILL_FX == 2
  535.     @spriteset.dispose if MOG::SKILL_FX == 2
  536.   end
  537.   #--------------------------------------------------------------------------
  538.   # * Frame Update
  539.   #--------------------------------------------------------------------------  
  540.   def update
  541.     if @target_window.active == true
  542.       @target_window.visible = true
  543.       if @target_window.x > 340
  544.         @target_window.x -= 15
  545.       elsif @target_window.x <= 340
  546.         @target_window.x = 340
  547.       end
  548.     else   
  549.       if @target_window.x < 640
  550.         @target_window.x += 15
  551.       elsif @target_window.x >= 640
  552.         @target_window.x = 640
  553.         @target_window.visible = false
  554.       end
  555.     end  
  556.     if @slide == true
  557.       @status_window.visible = true
  558.       if @status_window.x > 350
  559.         @status_window.x -= 15
  560.       elsif @status_window.x <= 350
  561.         @status_window.x = 350
  562.       end      
  563.     else
  564.       if @status_window.x < 640
  565.         @status_window.x += 15
  566.       elsif @status_window.x >= 640
  567.         @status_window.x = 640
  568.         @status_window.visible = false
  569.       end  
  570.     end
  571.     @help_window.update
  572.     @status_window.update
  573.     @skill_window.update
  574.     @target_window.update
  575.     if MOG::SKILL_FX == 0
  576.       @msk_back1.ox += 1
  577.       @msk_back1.oy += 1
  578.     end
  579.     if @skill_window.help_window.y > 425
  580.       @skill_window.help_window.y -= 5
  581.     elsif @skill_window.help_window.y <= 425  
  582.       @skill_window.help_window.y = 425
  583.     end   
  584.     if @skill_window.active
  585.       update_skill
  586.       return
  587.     end
  588.     if @target_window.active  
  589.       update_target
  590.       return
  591.     end
  592.   end
  593.   #--------------------------------------------------------------------------
  594.   # * Frame Update (if skill window is active)
  595.   #--------------------------------------------------------------------------  
  596.   def update_skill
  597.     if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
  598.       @help_window.y = 500  
  599.     end  
  600.     if Input.trigger?(Input::B)
  601.       $game_system.se_play($data_system.cancel_se)
  602.       $scene = Scene_Menu.new(1)
  603.       return
  604.     end
  605.     if Input.trigger?(Input::C)
  606.       @skill = @skill_window.skill
  607.       if @skill == nil or not @actor.skill_can_use?(@skill.id)
  608.         $game_system.se_play($data_system.buzzer_se)
  609.         return
  610.       end
  611.       $game_system.se_play($data_system.decision_se)
  612.       if @skill.scope >= 3
  613.         @skill_window.active = false
  614.         @target_window.active = true
  615.         @slide = false
  616.         if @skill.scope == 4 || @skill.scope == 6
  617.           @target_window.index = -1
  618.         elsif @skill.scope == 7
  619.           @target_window.index = @actor_index - 10
  620.         else
  621.           @target_window.index = 0
  622.         end
  623.       else
  624.         if @skill.common_event_id > 0
  625.           $game_temp.common_event_id = @skill.common_event_id
  626.           $game_system.se_play(@skill.menu_se)
  627.           @actor.sp -= @skill.sp_cost
  628.           @status_window.refresh
  629.           @skill_window.refresh
  630.           @target_window.refresh
  631.           $scene = Scene_Map.new
  632.           return
  633.         end
  634.       end
  635.       return
  636.     end
  637.     if Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
  638.       $game_system.se_play($data_system.cursor_se)
  639.       @actor_index += 1
  640.       @actor_index %= $game_party.actors.size
  641.       $scene = Scene_Skill.new(@actor_index)
  642.       return
  643.     end
  644.     if Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
  645.       $game_system.se_play($data_system.cursor_se)
  646.       @actor_index += $game_party.actors.size - 1
  647.       @actor_index %= $game_party.actors.size
  648.       $scene = Scene_Skill.new(@actor_index)
  649.       return
  650.     end
  651.   end
  652.   #--------------------------------------------------------------------------
  653.   # * Frame Update (if target window is active)
  654.   #--------------------------------------------------------------------------  
  655.   def update_target
  656.     if Input.trigger?(Input::B)
  657.       $game_system.se_play($data_system.cancel_se)
  658.       @skill_window.active = true
  659.       @target_window.active = false
  660.       @slide = true
  661.       return
  662.     end
  663.     if Input.trigger?(Input::C)
  664.       unless @actor.skill_can_use?(@skill.id)
  665.         $game_system.se_play($data_system.buzzer_se)
  666.         return
  667.       end
  668.       if @target_window.index == -1
  669.         used = false
  670.         for i in $game_party.actors
  671.           used |= i.skill_effect(@actor, @skill)
  672.         end
  673.       end
  674.       if @target_window.index <= -2
  675.         target = $game_party.actors[@target_window.index + 10]
  676.         used = target.skill_effect(@actor, @skill)
  677.       end
  678.       if @target_window.index >= 0
  679.         target = $game_party.actors[@target_window.index]
  680.         used = target.skill_effect(@actor, @skill)
  681.       end
  682.       if used
  683.         $game_system.se_play(@skill.menu_se)
  684.         @actor.sp -= @skill.sp_cost
  685.         @status_window.refresh
  686.         @skill_window.refresh
  687.         @target_window.refresh
  688.         if $game_party.all_dead?
  689.           $scene = Scene_Gameover.new
  690.           return
  691.         end
  692.         if @skill.common_event_id > 0
  693.           $game_temp.common_event_id = @skill.common_event_id
  694.           $scene = Scene_Map.new
  695.           return
  696.         end
  697.       end
  698.       unless used
  699.         $game_system.se_play($data_system.buzzer_se)
  700.       end
  701.       return
  702.     end
  703.   end
  704. end
复制代码

PS:如果有解決方法,我便把整個系統改良後發出來吧!
舊坑被棄了
開新坑~

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
2
发表于 2011-6-24 23:13:33 | 只看该作者
脚本44行:
  1. SKILL_FONT_COLOR  = Color.new(0,0,0)
复制代码
Color.new(255,255,255)是白色

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
510 小时
注册时间
2010-5-8
帖子
266
3
 楼主| 发表于 2011-6-25 23:09:27 | 只看该作者
先謝你一個,不過問題2仍未解決
舊坑被棄了
開新坑~
回复

使用道具 举报

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
4
发表于 2011-6-25 23:10:16 | 只看该作者
问题2的话,右边那个窗口没问题么?

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
510 小时
注册时间
2010-5-8
帖子
266
5
 楼主| 发表于 2011-6-26 12:32:40 | 只看该作者
沒問題~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-11-26 06:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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