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

Project1

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

[已经解决] 關於“limit break”這個腳本的問題

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
38 小时
注册时间
2016-2-21
帖子
24
跳转到指定楼层
1
发表于 2016-5-13 10:35:25 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
關於“limit break”這個腳本......是在steam上發現的免費素材包中的一個腳本。。。原作者也有說可能並不能夠兼容所有......雖然是嘗試了下,正常運行打開遊戲倒是沒有問題,菜單界面的“limit”選項也出現了



但是點擊的話就會變成這樣......












然後原作者的腳本是這樣的
RUBY 代码复制
  1. if true # make false to disable script. true = enabled
  2. #===============================================================================
  3. #
  4. # ☆ Dekita - Complicated Exp & Gold Formulas.
  5. # -- Author   : Dekita
  6. # -- Version  : 1.0
  7. # -- Level    : Complex  
  8. # -- Requires : N/A
  9. # -- Engine   : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. ($imported||={})[:Dekita_] = 1.0
  15. #===============================================================================
  16. # ☆ Updates
  17. #-------------------------------------------------------------------------------
  18. # D /M /Y
  19. # 16/1o/2o14 -
  20. #===============================================================================
  21. # ☆ Introduction
  22. #-------------------------------------------------------------------------------
  23. # This script was origionally written by DekitaRPG for The Tomb Of Lost Art
  24. # Challenge #5 - Theme: Unbreakable. This piece of 'art' simply shows off
  25. # some code writing skills. :)
  26. #
  27. # This script creates my interpretation of the limit break system from Final
  28. # Fantasy 7.
  29. # As the theme was 'unbreakable', I have included the ability to notetag a
  30. # state so that when the state is applied, your characters cannot break their
  31. # limit. ie.. their limit is 'unbreakable' :p
  32. #
  33. #===============================================================================
  34. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  35. #===============================================================================
  36. # Please give credit to Dekita (or DekitaRPG). (requested, not required.)
  37. # Free to use for all projects (commercial / non commercial).
  38. #
  39. # Please do not repost this script on other sites - if you wish, you can
  40. # provide a link to the webpage below;
  41. # [url]http://www.dekitarpg.wordpress.com[/url]
  42. #
  43. #===============================================================================
  44. # ☆ Instructions
  45. #-------------------------------------------------------------------------------
  46. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  47. #
  48. #===============================================================================
  49. # ☆ Script Calls
  50. #-------------------------------------------------------------------------------
  51. # N/A
  52. #
  53. #===============================================================================
  54. # ☆ Notetags (default)
  55. #-------------------------------------------------------------------------------
  56. # <unbreakable>
  57. # Notetag used in states notebox to disallow limit break.
  58. #
  59. #===============================================================================
  60. # ☆ HELP
  61. #-------------------------------------------------------------------------------
  62. # This script i provided as is; therefore, compatability updates will not be
  63. # possible. However, bugs caused by this script can be reported and will be
  64. # resolved asap.
  65. # You can report bugs for any of MY scripts at the web page below;
  66. # [url]http://dekitarpg.wordpress.com/bug-reports/[/url]
  67. #
  68. #===============================================================================
  69. # [url]www.dekyde.com[/url]
  70. # [url]www.dekitarpg.wordpress.com[/url]
  71. #===============================================================================
  72. module Limit_Break
  73. #===============================================================================
  74.   #-----------------------------------------------------------------------------
  75.   #
  76.   #-----------------------------------------------------------------------------
  77.   Vocab = {
  78.     :menu_command   => "Limit",
  79.     :battle_command => "Limit Skill",
  80.     :change_help    => "View skill data and change active limit.",
  81.     :leave_help     => "Leave Scene",
  82.   }
  83.   #-----------------------------------------------------------------------------
  84.   # Notetag used in states to disallow limit break.
  85.   # <unbreakable>
  86.   #-----------------------------------------------------------------------------
  87.   Notetag = /<unbreakable>/i
  88.   #-----------------------------------------------------------------------------
  89.   # true   = override attack command
  90.   # false  = place new command above it
  91.   #-----------------------------------------------------------------------------
  92.   Override = true
  93.   #-----------------------------------------------------------------------------
  94.   # Hash of actor id => [limit skilll id, limit skilll id, limit skilll id, ...]
  95.   #-----------------------------------------------------------------------------
  96.   Limits = {
  97.        1 =>[118,119,120,121,122,123,124,125], # << Actor 1
  98.        2 =>[118,119,120,121,122,123,124,125], # << Actor 2
  99.        3 =>[118,119,120,121,122,123,124,125], # << Actor 3
  100.        4 =>[118,119,120,121,122,123,124,125], # << Actor 4
  101.        5 =>[118,119,120,121,122,123,124,125], # << Actor 5
  102.        6 =>[118,119,120,121,122,123,124,125], # << Actor 6
  103.        7 =>[118,119,120,121,122,123,124,125], # << Actor 7
  104.        8 =>[118,119,120,121,122,123,124,125], # << Actor 8
  105.        9 =>[118,119,120,121,122,123,124,125], # << Actor 9
  106.       10 =>[118,119,120,121,122,123,124,125], # << Actor 10
  107.   }
  108.   #-----------------------------------------------------------------------------
  109.   # [ end module ]
  110.   #-----------------------------------------------------------------------------
  111. end
  112. #===============================================================================
  113. module Text_Color
  114. #===============================================================================
  115.   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  116.   # ☆ Color Settings
  117.   #-----------------------------------------------------------------------------
  118.   # You can use these colors in any of my scripts that offer color customisation.
  119.   # simply put Text_Color::THE_COLOR_YOU_WANT as the setting.
  120.   # eg.
  121.   # Text_Color::Pure_White
  122.   #-----------------------------------------------------------------------------
  123.   # Shade's
  124.   Pure_White  = Color.new(255,255,255)
  125.   White       = Color.new(222,222,222)
  126.   Grey        = Color.new(111,111,111)
  127.   Black       = Color.new(0  ,0  ,0  )
  128.   #-----------------------------------------------------------------------------
  129.   # Yellow's
  130.   Yellow      = Color.new(255,255,0)
  131.   Gold        = Color.new(212,212,64)
  132.   Orange      = Color.new(255,182,0)
  133.   Deep_Orange = Color.new(212,64,0)
  134.   Dirt_Orange = Color.new(182,64,0)
  135.   Brown       = Color.new(128,32,0)
  136.   #-----------------------------------------------------------------------------
  137.   # Red's
  138.   Red         = Color.new(251,111,111)
  139.   Deep_Red    = Color.new(222,60,60)
  140.   Pure_Red    = Color.new(255,0,0)
  141.   Pink        = Color.new(255,0,255)
  142.   Dark_Pink   = Color.new(182,0,156)
  143.   #-----------------------------------------------------------------------------
  144.   # Blue's
  145.   Sky_Blue    = Color.new(0,182,255)
  146.   Light_Blue  = Color.new(64,128,255)
  147.   Dark_Blue   = Color.new(32,64,255)
  148.   Purple      = Color.new(182,64,255)
  149.   Magenta     = Color.new(156,156,255)
  150.   #-----------------------------------------------------------------------------
  151.   # Green's
  152.   Green       = Color.new(111,251,111)
  153.   Candy_Green = Color.new(0,255,0)
  154.   Dirty_Green = Color.new(128,182,0)
  155.   Khaki_Green = Color.new(111,156,64)
  156.   Turquoise   = Color.new(0,255,182)
  157.   #-----------------------------------------------------------------------------
  158.   # [ end module ]
  159.   #-----------------------------------------------------------------------------
  160. end
  161. #===============================================================================
  162. module Vocanicon
  163. #===============================================================================
  164.   #-----------------------------------------------------------------------------
  165.   # Actor Info
  166.   # Format    = ["Name:"            , Text_Color::White,  icon,  hue]
  167.   #-----------------------------------------------------------------------------
  168.   Name        = ["Name:"            , Text_Color::White,  0,  0]
  169.   Nick        = ["Alias:"           , Text_Color::White,  0,  0]
  170.   Clas        = ["Class:"           , Text_Color::White,  0,  0]
  171.   Stts        = ["↓ Status ↓"       , Text_Color::White,  0,  0]
  172.   Level       = ['Level:'           , Text_Color::White,  0,  0]
  173.   TP          = ["Chi"              , Text_Color::White,119,  0]
  174.   Exp         = ["Exp"              , Text_Color::White, 60,  0]
  175.   #-----------------------------------------------------------------------------
  176.   # Parameters
  177.   def self.param(param_id)
  178.     case param_id
  179.     when 0 then ["Health"           , Text_Color::White, 117, 0]
  180.     when 1 then ["Mana"             , Text_Color::White, 118, 0]
  181.     end
  182.   end
  183.   #-----------------------------------------------------------------------------
  184.   # [ end module ]
  185.   #-----------------------------------------------------------------------------
  186. end
  187. #===============================================================================
  188. module General
  189. #===============================================================================
  190.   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  191.   # ☆ General Settings
  192.   #-----------------------------------------------------------------------------
  193.   # Gauges  = [ Color 1                 , Color 2               ]
  194.   Hp_Colors = [ Text_Color::Dirt_Orange , Text_Color::Gold      ]
  195.   Mp_Colors = [ Text_Color::Dark_Blue   , Text_Color::Sky_Blue  ]
  196.   Tp_Colors = [ Text_Color::Grey        , Text_Color::Pure_Red  ]
  197.   Exp_Color = [ Text_Color::Deep_Red    , Text_Color::Dark_Pink ]
  198.   #-----------------------------------------------------------------------------
  199.   # Customization Section End.
  200.   # There is really no point in trying to edit below this line...
  201.   #-----------------------------------------------------------------------------
  202. end
  203. #===============================================================================
  204. # // Customization Section Has Ceased.
  205. # // Only edit the code below if you are able to comprehend its processing.
  206. # // This is a precaution to ensure your sanity remains intact. :)
  207. #===============================================================================
  208. # [url]www.dekyde.com[/url]
  209. # [url]www.dekitarpg.wordpress.com[/url]
  210. #===============================================================================
  211. class RPG::State < RPG::BaseItem
  212. #===============================================================================
  213.   #-----------------------------------------------------------------------------
  214.   #
  215.   #-----------------------------------------------------------------------------
  216.   def unbreakable?
  217.     if @unbreakable.nil?
  218.       @unbreakable = false
  219.       if self.note =~ Limit_Break::Notetag
  220.         @unbreakable = true
  221.       end
  222.     end
  223.     @unbreakable
  224.   end
  225.   #-----------------------------------------------------------------------------
  226.   #
  227.   #-----------------------------------------------------------------------------
  228. end
  229. #===============================================================================
  230. class Game_Battler < Game_BattlerBase
  231. #===============================================================================
  232.   #-----------------------------------------------------------------------------
  233.   #
  234.   #-----------------------------------------------------------------------------
  235.   alias :use_item_for_limit :use_item
  236.   #-----------------------------------------------------------------------------
  237.   #
  238.   #-----------------------------------------------------------------------------
  239.   def use_item(item)
  240.     process_limit_counter(item)
  241.     use_item_for_limit(item)
  242.   end
  243.   #-----------------------------------------------------------------------------
  244.   #
  245.   #-----------------------------------------------------------------------------
  246.   def process_limit_counter(i)
  247.     return unless self.is_a?(Game_Actor)
  248.     add_limit_counter if can_process_limit_count?(i)
  249.   end
  250.   #-----------------------------------------------------------------------------
  251.   #
  252.   #-----------------------------------------------------------------------------
  253.   def can_process_limit_count?(i)
  254.     all_limit_skills.include?(i.id)
  255.   end
  256.   #-----------------------------------------------------------------------------
  257.   #
  258.   #-----------------------------------------------------------------------------
  259. end
  260. #===============================================================================
  261. class Game_Actor < Game_Battler
  262. #===============================================================================
  263.   #-----------------------------------------------------------------------------
  264.   #
  265.   #-----------------------------------------------------------------------------
  266.   alias :setup_limits :setup
  267.   #-----------------------------------------------------------------------------
  268.   #
  269.   #-----------------------------------------------------------------------------
  270.   def setup(actor_id)
  271.     setup_limits(actor_id)
  272.     setup_limit_break
  273.   end
  274.   #-----------------------------------------------------------------------------
  275.   #
  276.   #-----------------------------------------------------------------------------
  277.   def setup_limit_break
  278.     @current_limit_skill_id = Limit_Break::Limits[@actor_id].first
  279.     @current_limit_arraypos = 0
  280.     @times_used_limits = [0] * Limit_Break::Limits[@actor_id].size
  281.   end
  282.   #-----------------------------------------------------------------------------
  283.   #
  284.   #-----------------------------------------------------------------------------
  285.   def all_limit_skills
  286.     Limit_Break::Limits[@actor_id]
  287.   end
  288.   #-----------------------------------------------------------------------------
  289.   #
  290.   #-----------------------------------------------------------------------------
  291.   def limit_skill
  292.     $data_skills[@current_limit_skill_id]
  293.   end
  294.   #-----------------------------------------------------------------------------
  295.   #
  296.   #-----------------------------------------------------------------------------
  297.   def limit_count(limit_id)
  298.     @times_used_limits[limit_id]
  299.   end
  300.   #-----------------------------------------------------------------------------
  301.   #
  302.   #-----------------------------------------------------------------------------
  303.   def limit_unlocked?(limit_id)
  304.     return true if limit_id == 0
  305.     return @times_used_limits[limit_id-1] >= ((limit_id) * 10)
  306.   end
  307.   #-----------------------------------------------------------------------------
  308.   #
  309.   #-----------------------------------------------------------------------------
  310.   def add_limit_counter
  311.     @times_used_limits[@current_limit_arraypos] += 1
  312.   end
  313.   #-----------------------------------------------------------------------------
  314.   #
  315.   #-----------------------------------------------------------------------------
  316.   def set_limit_skill(array_pos)
  317.     return unless Limit_Break::Limits[@actor_id][array_pos]
  318.     return unless Limit_Break::Limits[@actor_id][array_pos] != @current_limit_skill_id
  319.     @current_limit_skill_id = Limit_Break::Limits[@actor_id][array_pos]
  320.     @current_limit_arraypos = array_pos
  321.   end
  322.   #-----------------------------------------------------------------------------
  323.   #
  324.   #-----------------------------------------------------------------------------
  325.   def can_limit_break?
  326.     return false unless tp >= max_tp
  327.     return false if states.compact.any? {|s| s.unbreakable? }
  328.     return true
  329.   end
  330.   #-----------------------------------------------------------------------------
  331.   #
  332.   #-----------------------------------------------------------------------------
  333. end
  334. #==============================================================================
  335. class Window_Base < Window
  336. #==============================================================================
  337.   #--------------------------------------------------------------------------
  338.   # Draw Gauge (w/height)
  339.   #--------------------------------------------------------------------------
  340.   def draw_deki_gauge(gx, gy, gw, gh, rate, color1, color2)
  341.     empty_gauge_color = Color.new(0,0,0,128)
  342.     fill_w = [(gw * rate).to_i, gw].min
  343.     gauge_h = gh
  344.     gauge_y = gy + line_height - 2 - gauge_h
  345.     contents.fill_rect(gx, gauge_y, gw, gauge_h, empty_gauge_color)
  346.     contents.gradient_fill_rect(gx, gauge_y, fill_w, gauge_h, color1, color2)
  347.   end
  348.   #--------------------------------------------------------------------------
  349.   # Draw Hp
  350.   #--------------------------------------------------------------------------
  351.   def draw_de_hp(x, y, wid = nil)
  352.     wid = self.width/2 - (standard_padding*2) if wid == nil
  353.     rate = @actor.hp_rate
  354.     color1 = General::Hp_Colors[0]
  355.     color2 = General::Hp_Colors[1]
  356.     draw_deki_gauge(x, y, wid-x-2, 2, rate, color1, color2)
  357.     draw_text(x+4, y, wid, line_height, Vocanicon.param(0)[0])
  358.     draw_text(x, y, wid-x-6, line_height, "#{@actor.hp}/#{@actor.mhp}",2)
  359.   end
  360.   #--------------------------------------------------------------------------
  361.   # Draw Mp
  362.   #--------------------------------------------------------------------------
  363.     def draw_de_mp(x, y, wid = nil)
  364.     wid = self.width/2 - (standard_padding*2) if wid == nil
  365.     rate = @actor.mp_rate
  366.     color1 = General::Mp_Colors[0]
  367.     color2 = General::Mp_Colors[1]
  368.     draw_deki_gauge(x, y, wid-x-2, 2, rate, color1, color2)
  369.     draw_text(x+4, y, wid, line_height, Vocanicon.param(1)[0])
  370.     draw_text(x, y, wid-x-6, line_height, "#{@actor.mp}/#{@actor.mmp}",2)
  371.   end
  372.   #--------------------------------------------------------------------------
  373.   # Draw Tp
  374.   #--------------------------------------------------------------------------
  375.     def draw_de_tp(x, y, wid = nil)
  376.     wid = self.width/2 - (standard_padding*2) if wid == nil
  377.     rate = @actor.max_tp == 0 ? 0 : @actor.tp.to_i.to_f / @actor.max_tp.to_i
  378.     color1 = General::Tp_Colors[0]
  379.     color2 = General::Tp_Colors[1]
  380.     draw_deki_gauge(x, y, wid-x-2, 2, rate, color1, color2)
  381.     draw_text(x+4, y, wid, line_height, Vocanicon::TP[0])
  382.     text = "#{(@actor.tp).to_i}/#{@actor.max_tp.to_i}"
  383.     draw_text(x, y, wid-x-6, line_height, text,2)
  384.   end
  385.   #--------------------------------------------------------------------------
  386.   # Draw Exp (w/gauge)
  387.   #--------------------------------------------------------------------------
  388.   def draw_de_xp(x, y, gauge = true)
  389.     s1 = @actor.current_level_exp
  390.     s2 = @actor.next_level_exp
  391.     s1_g = @actor.exp - @actor.current_level_exp
  392.     s2_g = @actor.next_level_exp - @actor.current_level_exp
  393.     wid = self.width/2 - (standard_padding*2)
  394.     wid_b = self.width/2 - (standard_padding)
  395.     rate = (s1_g).to_f / (s2_g)
  396.     color1 = General::Exp_Color[0]
  397.     color2 = General::Exp_Color[1]
  398.     draw_deki_gauge(wid_b, y, wid-x-2, 2, rate, color1, color2) if gauge
  399.     draw_text(wid_b+4, y, wid, line_height, Vocanicon::Exp[0])
  400.     draw_text(wid_b, y, wid-x-2, line_height, "#{@actor.exp}/#{s2}",2)
  401.   end
  402.   #--------------------------------------------------------------------------
  403.   # Draw Icon (w/Hue)
  404.   #--------------------------------------------------------------------------
  405.   def draw_de_icon(icon_index, x, y, hue = 0, enabled = true)
  406.     bitmap = Cache.icon("IconSet",hue)
  407.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  408.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  409.   end
  410. end
  411. #===============================================================================
  412. class Window_CurrentLimit < Window_Selectable
  413. #===============================================================================
  414.   #-----------------------------------------------------------------------------
  415.   #
  416.   #-----------------------------------------------------------------------------
  417.   def initialize(actor,y)
  418.     super(0, y, Graphics.width, fitting_height(1))
  419.     @actor = actor
  420.     refresh
  421.   end
  422.   #-----------------------------------------------------------------------------
  423.   #
  424.   #-----------------------------------------------------------------------------
  425.   def actor=(actor)
  426.     return if @actor == actor
  427.     @actor = actor
  428.     refresh
  429.   end
  430.   #-----------------------------------------------------------------------------
  431.   #
  432.   #-----------------------------------------------------------------------------
  433.   def refresh
  434.     contents.clear
  435.     text = "Current Limit : #{@actor.limit_skill.name}"
  436.     draw_text(0, 0, contents_width, line_height, text ,1)
  437.   end
  438.   #-----------------------------------------------------------------------------
  439.   #
  440.   #-----------------------------------------------------------------------------
  441. end
  442. #===============================================================================
  443. class Window_LimitCommand < Window_Command
  444. #===============================================================================
  445.   #-----------------------------------------------------------------------------
  446.   #
  447.   #-----------------------------------------------------------------------------
  448.   def initialize
  449.     super(0, 0)
  450.   end
  451.   #-----------------------------------------------------------------------------
  452.   #
  453.   #-----------------------------------------------------------------------------
  454.   def window_width
  455.     return Graphics.width / 4
  456.   end
  457.   #-----------------------------------------------------------------------------
  458.   #
  459.   #-----------------------------------------------------------------------------
  460.   def visible_line_number
  461.     return 2
  462.   end
  463.   #-----------------------------------------------------------------------------
  464.   #
  465.   #-----------------------------------------------------------------------------
  466.   def make_command_list
  467.     add_command("Change Limit", :change)
  468.     add_command("Leave",        :leave)
  469.   end
  470.   #-----------------------------------------------------------------------------
  471.   #
  472.   #-----------------------------------------------------------------------------
  473. end
  474. #===============================================================================
  475. class Window_LimitSelect < Window_Command
  476. #===============================================================================
  477.   #-----------------------------------------------------------------------------
  478.   #
  479.   #-----------------------------------------------------------------------------
  480.   def initialize(actor,y)
  481.     @actor = actor
  482.     @window_y = y
  483.     super(0, y)
  484.     deactivate
  485.     unselect
  486.   end
  487.   #-----------------------------------------------------------------------------
  488.   #
  489.   #-----------------------------------------------------------------------------
  490.   def actor=(actor)
  491.     return unless @actor != actor
  492.     @actor = actor
  493.     refresh
  494.   end
  495.   #-----------------------------------------------------------------------------
  496.   #
  497.   #-----------------------------------------------------------------------------
  498.   def window_width
  499.     return Graphics.width
  500.   end
  501.   #-----------------------------------------------------------------------------
  502.   #
  503.   #-----------------------------------------------------------------------------
  504.   def window_height
  505.     return Graphics.height - @window_y
  506.   end
  507.   #-----------------------------------------------------------------------------
  508.   #
  509.   #-----------------------------------------------------------------------------
  510.   def col_max
  511.     return 2
  512.   end
  513.   #-----------------------------------------------------------------------------
  514.   #
  515.   #-----------------------------------------------------------------------------
  516.   def make_command_list
  517.     return unless @actor && Limit_Break::Limits[@actor.id]
  518.     i = 0
  519.     Limit_Break::Limits[@actor.id].each do |val|
  520.       add_command($data_skills[val].name, :limit_change, limit_locked?(i), val)
  521.       i += 1
  522.     end
  523.   end
  524.   #-----------------------------------------------------------------------------
  525.   #
  526.   #-----------------------------------------------------------------------------
  527.   def limit_locked?(id)
  528.     @actor.limit_unlocked?(id)
  529.   end
  530.   #-----------------------------------------------------------------------------
  531.   #
  532.   #-----------------------------------------------------------------------------
  533.   def current_limit
  534.     command_skill(@index)
  535.   end
  536.   #-----------------------------------------------------------------------------
  537.   #
  538.   #-----------------------------------------------------------------------------
  539.   def command_skill(index)
  540.     return $data_skills[0] unless @list[index] && @list[index][:ext]
  541.     return $data_skills[@list[index][:ext]]
  542.   end
  543.   #-----------------------------------------------------------------------------
  544.   #
  545.   #-----------------------------------------------------------------------------
  546.   def draw_item(index)
  547.     change_color(normal_color, limit_locked?(index))
  548.     p = item_rect_for_text(index)
  549.     draw_text(p.x,p.y,p.width,line_height,command_skill(index).name, 1)
  550.     draw_text(p.x,p.y+20,p.width,line_height,@actor.limit_count(index).to_s, 1)
  551.   end
  552.   #-----------------------------------------------------------------------------
  553.   #
  554.   #-----------------------------------------------------------------------------
  555.   def item_height
  556.     (self.height - 24) / 4
  557.   end
  558.   #-----------------------------------------------------------------------------
  559.   #
  560.   #-----------------------------------------------------------------------------
  561. end
  562. #==============================================================================
  563. class Limit_Help < Window_Base
  564. #==============================================================================
  565.   #--------------------------------------------------------------------------
  566.   # Object Initialization
  567.   #--------------------------------------------------------------------------
  568.   def initialize(line_number = 2)
  569.     super(0, 0, Graphics.width/4*3, fitting_height(line_number))
  570.     @item = nil
  571.   end
  572.   #--------------------------------------------------------------------------
  573.   # Set Text
  574.   #--------------------------------------------------------------------------
  575.   def set_text(text)
  576.     if text != @text
  577.       @text = text
  578.       refresh
  579.     end
  580.   end
  581.   #--------------------------------------------------------------------------
  582.   # Clear
  583.   #--------------------------------------------------------------------------
  584.   def clear
  585.     set_text("")
  586.   end
  587.   #--------------------------------------------------------------------------
  588.   # Set Item  , item : Skills and items etc.
  589.   #--------------------------------------------------------------------------
  590.   def set_item(item)
  591.     return if @item == item
  592.     @item = item
  593.     refresh
  594.     set_text(item ? item.description : "")
  595.   end
  596.   #--------------------------------------------------------------------------
  597.   # Refresh
  598.   #--------------------------------------------------------------------------
  599.   def refresh
  600.     contents.clear
  601.     draw_text_ex(4, 0, @text)
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # Reset Font Settings
  605.   #--------------------------------------------------------------------------
  606.   def reset_font_settings
  607.     change_color(normal_color)
  608.     self.contents.font.name =  ["VL Gothic","Serif","Arial"]
  609.     self.contents.font.size = 18
  610.     self.contents.font.bold = false
  611.   end
  612. end
  613. #===============================================================================
  614. class Window_StatusLimit < Window_Selectable
  615. #===============================================================================
  616.   #-----------------------------------------------------------------------------
  617.   # Initialization
  618.   #-----------------------------------------------------------------------------
  619.   def initialize(actor, y)
  620.     super(0, y, Graphics.width, 104)
  621.     @actor = actor
  622.     refresh
  623.   end
  624.   #-----------------------------------------------------------------------------
  625.   # Line Height
  626.   #-----------------------------------------------------------------------------
  627.   def line_height
  628.     return 22
  629.   end
  630.   #-----------------------------------------------------------------------------
  631.   # Window Padding
  632.   #-----------------------------------------------------------------------------
  633.   def standard_padding
  634.     return 8
  635.   end
  636.   #-----------------------------------------------------------------------------
  637.   # Set Actor
  638.   #-----------------------------------------------------------------------------
  639.   def actor=(actor)
  640.     return unless @actor != actor
  641.     @actor = actor
  642.     refresh
  643.   end
  644.   #-----------------------------------------------------------------------------
  645.   # Do Refresh
  646.   #-----------------------------------------------------------------------------
  647.   def refresh
  648.     contents.clear
  649.     return unless @actor
  650.     self.contents.font.name =  ["VL Gothic","Serif","Arial"]
  651.     self.contents.font.size = 18
  652.     self.contents.font.bold = false
  653.     draw_actor_face(@actor,0,-2,enabled = true)   
  654.     draw_names
  655.     draw_infonshit
  656.   end
  657.   #-----------------------------------------------------------------------------
  658.   # Draw Info And Shit
  659.   #-----------------------------------------------------------------------------
  660.   def draw_infonshit
  661.     x = 104
  662.     y = line_height
  663.     w = self.width/2 - (standard_padding*2)
  664.     draw_info_box(x,y * 1,w-100)
  665.     draw_de_hp(x,y*1,w+6)
  666.     draw_info_box(x,y * 2,w-100)
  667.     draw_de_mp(x,y*2,w+6)
  668.     draw_info_box(x,y * 3,w-100)
  669.     draw_de_tp(x,y*3,w+6)
  670.   end
  671.   #-----------------------------------------------------------------------------
  672.   # Draw Names ( and Lv )
  673.   #-----------------------------------------------------------------------------
  674.   def draw_names
  675.     x = self.width/2-(standard_padding)+4
  676.     y = line_height
  677.     nx = self.width/2 - (standard_padding*2)
  678.     # // Name
  679.     draw_info_box(104,0,nx-100)
  680.     draw_text(108, 0, nx, line_height, Vocanicon::Name[0])
  681.     draw_text(108, 0, nx-108, line_height, @actor.name.to_s, 2)
  682.     # // NickName
  683.     draw_info_box(x,0,nx/2-2)
  684.     draw_text(x+4, 0, nx/2-2, line_height, Vocanicon::Nick[0])
  685.     draw_text(x, 0, nx/2-6, line_height, @actor.nickname.to_s, 2)
  686.     # // Class
  687.     draw_info_box(x,y*1,nx/2-2)
  688.     draw_text(x+4, y*1, nx/2-2, line_height, Vocanicon::Clas[0])
  689.     draw_text(x, y*1, nx/2-6, line_height, @actor.class.name,2)
  690.     # // Status(s)
  691.     draw_info_box(x+(nx/2),0,nx/2+4)
  692.     draw_text(x+(nx/2), 0, nx/2-4, line_height, Vocanicon::Stts[0],1)
  693.     draw_info_box(x+(nx/2),y*1,nx/2+4)
  694.     draw_actor_icons(@actor, x+(nx/2), line_height * 1 - 2,nx/2)
  695.     # // Level
  696.     lw = nx/3-2
  697.     draw_info_box(x,y*2,nx/3-2)
  698.     draw_text(x+4, y*2, nx/3-2, line_height, Vocanicon::Level[0])
  699.     draw_text(x  , y*2, nx/3-6, line_height, "#{@actor.level}",2)
  700.     # // SPDS Stats
  701.     draw_info_box(x+(nx/3),y*2,nx/3)
  702.     if $D13x[:ISPDS]
  703.       draw_text(x+(nx/3)+2, y*2, nx/3, line_height, SPDS::DP_Vocab[0])
  704.       draw_text(x+(nx/3), y*2, nx/3-4, line_height, "#{@actor.points}", 2)
  705.     end
  706.     # // SUG Stats
  707.     draw_info_box(x+(nx/3*2)+2,y*2,nx/3+6)
  708.     if $D13x[:SUG]
  709.       draw_text(x+(nx/3*2)+6, y*2, nx/3, line_height, Skill_Upgrade::SP_Vocab[2])
  710.       draw_text(x+(nx/3*2), y*2, nx/3, line_height, "#{@actor.skill_points.to_i}", 2)
  711.     end
  712.     # // Exp
  713.     draw_info_box(x,y*3,nx+4)
  714.     draw_de_xp(x, y * 3)
  715.   end
  716.   #-----------------------------------------------------------------------------
  717.   # Draw Info Box
  718.   #-----------------------------------------------------------------------------
  719.   def draw_info_box(x,y,w)
  720.     contents.fill_rect(x,y+1,w,line_height-2,Color.new(0,0,0,64))
  721.   end
  722.   #-----------------------------------------------------------------------------
  723.   # Draw Exp (w/gauge)
  724.   #-----------------------------------------------------------------------------
  725.   def draw_de_xp(x, y, gauge = true)
  726.     s1 = @actor.exp # current_level_exp
  727.     s2 = @actor.next_level_exp
  728.     s1_g = @actor.exp - @actor.current_level_exp
  729.     s2_g = @actor.next_level_exp - @actor.current_level_exp
  730.     wid = self.width/2 - (standard_padding*2)
  731.     wid_b = self.width/2 - (standard_padding)
  732.     rate = (s1_g).to_f / (s2_g)
  733.     color1 = General::Exp_Color[0]
  734.     color2 = General::Exp_Color[1]
  735.     draw_deki_gauge(x, y, wid+4, 2, rate, color1, color2) if gauge
  736.     draw_text(x+4, y, wid, line_height, Vocanicon::Exp[0])
  737.     draw_text(x, y, wid, line_height, "#{s1}/#{s2}",2)
  738.   end
  739. end
  740. #===============================================================================
  741. class Scene_Limit < Scene_MenuBase
  742. #===============================================================================
  743.   #-----------------------------------------------------------------------------
  744.   #
  745.   #-----------------------------------------------------------------------------
  746.   def start
  747.     super
  748.     make_command_window
  749.     make_help_window
  750.     make_status_window
  751.     make_current_window
  752.     make_select_window
  753.   end
  754.   #-----------------------------------------------------------------------------
  755.   #
  756.   #-----------------------------------------------------------------------------
  757.   def make_command_window
  758.     @command_window = Window_LimitCommand.new
  759.     @command_window.set_handler(:change,  method(:change_limit))
  760.     @command_window.set_handler(:leave,   method(:return_scene))
  761.     @command_window.set_handler(:cancel,  method(:return_scene))
  762.     @command_window.set_handler(:pagedown, method(:next_actor))
  763.     @command_window.set_handler(:pageup,   method(:prev_actor))
  764.   end
  765.   #-----------------------------------------------------------------------------
  766.   #
  767.   #-----------------------------------------------------------------------------
  768.   def make_help_window
  769.     @help_window = Limit_Help.new
  770.     @help_window.x = Graphics.width / 4
  771.   end
  772.   #-----------------------------------------------------------------------------
  773.   #
  774.   #-----------------------------------------------------------------------------
  775.   def make_status_window
  776.     @status_window = Window_StatusLimit.new(@actor,@help_window.height)
  777.   end
  778.   #-----------------------------------------------------------------------------
  779.   #
  780.   #-----------------------------------------------------------------------------
  781.   def make_current_window
  782.     y = @status_window.y + @status_window.height
  783.     @current_window = Window_CurrentLimit.new(@actor,y)
  784.   end
  785.   #-----------------------------------------------------------------------------
  786.   #
  787.   #-----------------------------------------------------------------------------
  788.   def make_select_window
  789.     y = @current_window.y + @current_window.height
  790.     @select_window = Window_LimitSelect.new(@actor,y)
  791.     @select_window.set_handler(:limit_change,  method(:set_limit))
  792.     @select_window.set_handler(:cancel      ,  method(:bk2com))
  793.   end
  794.   #-----------------------------------------------------------------------------
  795.   #
  796.   #-----------------------------------------------------------------------------
  797.   def change_limit
  798.     @command_window.deactivate
  799.     @select_window.select(0)
  800.     @select_window.activate
  801.   end
  802.   #-----------------------------------------------------------------------------
  803.   #
  804.   #-----------------------------------------------------------------------------
  805.   def set_limit
  806.     Sound.play_equip
  807.     @actor.set_limit_skill(@select_window.index)
  808.     @status_window.refresh
  809.     @current_window.refresh
  810.     bk2com
  811.   end
  812.   #-----------------------------------------------------------------------------
  813.   #
  814.   #-----------------------------------------------------------------------------
  815.   def bk2com
  816.     @select_window.deactivate
  817.     @select_window.unselect
  818.     @command_window.activate
  819.   end
  820.   #-----------------------------------------------------------------------------
  821.   #
  822.   #-----------------------------------------------------------------------------
  823.   def update
  824.     super
  825.     updt_help
  826.   end
  827.   #-----------------------------------------------------------------------------
  828.   #
  829.   #-----------------------------------------------------------------------------
  830.   def updt_help
  831.     if @select_window.active
  832.       @help_window.set_text(@select_window.current_limit.description)
  833.     elsif @command_window.active
  834.       case @command_window.current_symbol
  835.       when :change then @help_window.set_text(Limit_Break::Vocab[:change_help])
  836.       when :leave  then @help_window.set_text(Limit_Break::Vocab[:leave_help])
  837.       end
  838.     else  
  839.       @help_window.set_text("")
  840.     end
  841.   end
  842.   #-----------------------------------------------------------------------------
  843.   #
  844.   #-----------------------------------------------------------------------------
  845.   def on_actor_change
  846.     @status_window.actor  = @actor
  847.     @current_window.actor = @actor
  848.     @select_window.actor  = @actor
  849.     @command_window.activate
  850.   end
  851.   #-----------------------------------------------------------------------------
  852.   #
  853.   #-----------------------------------------------------------------------------
  854. end
  855. #===============================================================================
  856. class Window_MenuCommand < Window_Command
  857. #===============================================================================
  858.   #-----------------------------------------------------------------------------
  859.   #
  860.   #-----------------------------------------------------------------------------
  861.   alias :amc_limits :add_main_commands
  862.   #-----------------------------------------------------------------------------
  863.   #
  864.   #-----------------------------------------------------------------------------
  865.   def add_main_commands
  866.     amc_limits
  867.     add_command(Limit_Break::Vocab[:menu_command],:limit,main_commands_enabled)
  868.   end
  869.   #-----------------------------------------------------------------------------
  870.   #
  871.   #-----------------------------------------------------------------------------
  872. end
  873. #===============================================================================
  874. class Scene_Menu < Scene_MenuBase
  875. #===============================================================================
  876.   #-----------------------------------------------------------------------------
  877.   #
  878.   #-----------------------------------------------------------------------------
  879.   alias :ccw_limits_longassaliasname :create_command_window
  880.   alias :opoklimitz_longassaliasname :on_personal_ok
  881.   #-----------------------------------------------------------------------------
  882.   #
  883.   #-----------------------------------------------------------------------------
  884.   def create_command_window
  885.     ccw_limits_longassaliasname
  886.     @command_window.set_handler(:limit, method(:command_personal))
  887.   end
  888.   #-----------------------------------------------------------------------------
  889.   #
  890.   #-----------------------------------------------------------------------------
  891.   def on_personal_ok
  892.     opoklimitz_longassaliasname
  893.     if @command_window.current_symbol == :limit
  894.       SceneManager.call(Scene_Limit)
  895.     end
  896.   end
  897.   #-----------------------------------------------------------------------------
  898.   #
  899.   #-----------------------------------------------------------------------------
  900. end
  901. #===============================================================================
  902. class Window_ActorCommand < Window_Command
  903. #===============================================================================
  904.   #-----------------------------------------------------------------------------
  905.   #
  906.   #-----------------------------------------------------------------------------
  907.   def add_attack_command
  908.     if @actor.can_limit_break?
  909.       add_command(Limit_Break::Vocab[:battle_command], :limit)
  910.       unless Limit_Break::Override
  911.         add_command(Vocab::attack, :attack, @actor.attack_usable?)
  912.       end
  913.     else
  914.       add_command(Vocab::attack, :attack, @actor.attack_usable?)
  915.     end
  916.   end
  917.   #-----------------------------------------------------------------------------
  918.   #
  919.   #-----------------------------------------------------------------------------
  920.   def draw_item(index)
  921.     if index == 0 && @actor.can_limit_break?
  922.       change_color(Text_Color::Deep_Orange)
  923.     else
  924.       change_color(normal_color, command_enabled?(index))
  925.     end
  926.     draw_text(item_rect_for_text(index), command_name(index), alignment)
  927.   end
  928.   #-----------------------------------------------------------------------------
  929.   #
  930.   #-----------------------------------------------------------------------------
  931. end
  932. #===============================================================================
  933. class Scene_Battle < Scene_Base
  934. #===============================================================================
  935.   #-----------------------------------------------------------------------------
  936.   #
  937.   #-----------------------------------------------------------------------------
  938.   alias :limit_command :create_actor_command_window
  939.   #-----------------------------------------------------------------------------
  940.   #
  941.   #-----------------------------------------------------------------------------
  942.   def create_actor_command_window
  943.     limit_command
  944.     @actor_command_window.set_handler(:limit,  method(:command_limit))
  945.   end
  946.   #-----------------------------------------------------------------------------
  947.   #
  948.   #-----------------------------------------------------------------------------
  949.   def command_limit
  950.     @skill = BattleManager.actor.limit_skill
  951.     BattleManager.actor.input.set_skill(@skill.id)
  952.     BattleManager.actor.last_skill.object = @skill
  953.     if !@skill.need_selection?
  954.       @skill_window.hide
  955.       next_command
  956.     elsif @skill.for_opponent?
  957.       select_enemy_selection
  958.     else
  959.       select_actor_selection
  960.     end
  961.   end
  962.   #-----------------------------------------------------------------------------
  963.   #
  964.   #-----------------------------------------------------------------------------
  965. end
  966. #===============================================================================
  967. #                      [url]http://dekitarpg.wordpress.com/[/url]
  968. #===============================================================================
  969. end # if false / true

QQ图片20160513103155.png (380.9 KB, 下载次数: 20)

QQ图片20160513103155.png

QQ图片20160508113828.png (21.3 KB, 下载次数: 19)

QQ图片20160508113828.png

Lv1.梦旅人

梦石
0
星屑
50
在线时间
38 小时
注册时间
2016-2-21
帖子
24
2
 楼主| 发表于 2016-5-13 10:36:49 | 只看该作者
如果能夠得到幫助的話非常感謝
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21631
在线时间
9415 小时
注册时间
2012-6-19
帖子
7118

开拓者短篇九导演组冠军

3
发表于 2016-5-13 13:00:05 | 只看该作者
检查该脚本是否还要求插入作者的其他脚本

或者尝试在脚本顶部插入这句代码(不推荐):
  1. $D13x = {}
复制代码

评分

参与人数 1梦石 +1 收起 理由
丿梁丶小柒 + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
38 小时
注册时间
2016-2-21
帖子
24
4
 楼主| 发表于 2016-5-13 13:10:31 | 只看该作者
喵呜喵5 发表于 2016-5-13 13:00
检查该脚本是否还要求插入作者的其他脚本

或者尝试在脚本顶部插入这句代码(不推荐): ...

嗚啊非常感謝!嘗試添加了代碼ji就可以了呢
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
38 小时
注册时间
2016-2-21
帖子
24
5
 楼主| 发表于 2016-5-14 20:47:36 | 只看该作者
喵呜喵5 发表于 2016-5-13 13:00
检查该脚本是否还要求插入作者的其他脚本

或者尝试在脚本顶部插入这句代码(不推荐): ...

對了......還有請問下這個參數加點的參數分配......那些點數怎麼來呢?【腳本廢】
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 15:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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