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

Project1

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

[RMXP发布] [微小创新]物品分类+自定义颜色+自定义品质

[复制链接]

Lv1.梦旅人

薄凉看客

梦石
0
星屑
50
在线时间
1269 小时
注册时间
2010-6-20
帖子
1316
跳转到指定楼层
1
发表于 2013-9-20 01:31:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 恐惧剑刃 于 2014-10-12 19:15 编辑

新人脚本极不推荐!!!!!差不多可以删贴了
  1. # -----------------------------------------------------------------------------
  2. # Item_Menu
  3. # -----------------------------------------------------------------------------
  4. # 1.物品分类(菜单、战斗双项分类。在名称后使用“,”直接追加分类)
  5. # 2.物品颜色(在说明后用“@”定义,使用的是text_color所以@后的数字不要超过7)
  6. # 3.物品品质(在物品颜色后用“@”定义,低、中或高。)
  7. # 4.简洁说明(附加、解除状态,恢复HP、SP等,直接在window中简单显示。)
  8. # 5.DEBUG   (满物品、满装备)
  9. # 6.冲突可能:未知
  10. # -----------------------------------------------------------------------------
  11. # PS 此脚本重定义了N多方法,注意要修改相关内容的话,请从这里修改,
  12. # 请按说明,给全部物品定义分类、颜色和品质,如果不这样可能要出错!
  13. # -----------只要按上方说明的做,脚本不会报错(除冲突)!
  14. #==============================================================================
  15. # Window_Base
  16. class Window_Base < Window
  17.   alias initialize_old_blkk_old initialize
  18.   def initialize(x, y, width, height)
  19.     initialize_old_blkk_old(x, y, width, height)
  20.     if $scene.is_a?(Scene_Item)
  21.       self.opacity = 200
  22.     end  
  23.   end
  24. end
  25. #==============================================================================
  26. # Scene_Item
  27. class Scene_Item
  28.   alias main_main_old_blkk main
  29.   def main
  30.     map_spriteset = Spriteset_Map.new
  31.     main_main_old_blkk
  32.     map_spriteset.dispose
  33.   end  
  34. end  
  35. #==============================================================================
  36. # Scene_Title
  37. class Scene_Title
  38.   alias command_new_game_blkk_old command_new_game
  39.   def command_new_game
  40.     command_new_game_blkk_old
  41.     #——DEBUG is true?
  42.     debug_true = true# false ?
  43.     #———DEBUG
  44.     if $-d and debug_true
  45.     for i in 1...$data_items.size
  46.     $game_party.gain_item(i,i * 2)
  47.     end
  48.     for i in 1...$data_weapons.size
  49.     $game_party.gain_weapon(i,i * 2)
  50.     end
  51.     for i in 1...$data_armors.size
  52.     $game_party.gain_armor(i,i * 2)
  53.     end
  54.     end
  55.   end  
  56. end  
  57. #==============================================================================
  58. # Scene_Battle
  59. class Scene_Battle
  60.   alias main_blkk_old_main main
  61.   #--------------------------------------------------------------------------
  62.   # main
  63.   def main
  64.     main_blkk_old_main
  65.     if @item_window != nil
  66.       @item_window.dispose
  67.     end
  68.   end  
  69.   #--------------------------------------------------------------------------
  70.   # update_phase3
  71.   def update_phase3
  72.     if @enemy_arrow != nil
  73.       update_phase3_enemy_select
  74.     elsif @actor_arrow != nil
  75.       update_phase3_actor_select
  76.     elsif @skill_window != nil
  77.       update_phase3_skill_select
  78.     elsif @item_window != nil and @command_item != nil
  79.       update_phase3_item_select
  80.     elsif @actor_command_window.active
  81.       update_phase3_basic_command
  82.     end
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # start_item_select
  86.   def start_item_select
  87.     @data = ["全部物品"]
  88.     for i in 1...$data_items.size
  89.       if $game_party.item_number(i) > 0 and $data_items[i].name_plus != "" and
  90.         $data_items[i].occasion != 3 and $data_items[i].occasion != 2
  91.         kind = $data_items[i].name_plus
  92.         @data.push($data_items[i].name_plus) unless @data.include?(kind)
  93.       end
  94.     end
  95.     @data.push("战斗中")
  96.     @command_item = Window_Command.new(132, @data)
  97.     @command_item.opacity = 160
  98.     @item_window = Window_Item.new
  99.     @item_window.active = false
  100.     @item_window.index = -1
  101.     @item_window.help_window = @help_window
  102.     @command_item.help_window = @help_window
  103.     @actor_command_window.active = false
  104.     @actor_command_window.visible = false
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # update_phase3_item_select
  108.   def update_phase3_item_select
  109.     if @old_index != @command_item.index
  110.     $data_name_battle = @data[@command_item.index] if @command_item.index >= 0
  111.     @item_window.refresh
  112.     @old_index = @command_item.index
  113.     end
  114.     @item_window.visible = true
  115.     @command_item.visible = true
  116.     @item_window.update
  117.     @command_item.update
  118.     if @command_item.active
  119.     if Input.trigger?(Input::B)
  120.       $game_system.se_play($data_system.cancel_se)
  121.       @command_item.visible = false
  122.       end_item_select
  123.       return
  124.     end
  125.     if Input.trigger?(Input::C)
  126.       $game_system.se_play($data_system.decision_se)
  127.       @item_window.index = 0
  128.       @item_window.active = true
  129.       @command_item.active = false
  130.     end  
  131.     elsif @item_window.active
  132.     if Input.trigger?(Input::B)
  133.       $game_system.se_play($data_system.cancel_se)
  134.       @item_window.active = false
  135.       @item_window.index = -1
  136.       @command_item.active = true
  137.       return
  138.     end
  139.     if Input.trigger?(Input::C)
  140.       @item = @item_window.item
  141.       unless $game_party.item_can_use?(@item.id)
  142.         $game_system.se_play($data_system.buzzer_se)
  143.         return
  144.       end
  145.       $game_system.se_play($data_system.decision_se)
  146.       @active_battler.current_action.item_id = @item.id
  147.       @item_window.visible = false
  148.       @command_item.visible = false
  149.       if @item.scope == 1
  150.         start_enemy_select
  151.       elsif @item.scope == 3 or @item.scope == 5
  152.         start_actor_select
  153.       else
  154.         end_item_select
  155.         phase3_next_actor
  156.       end
  157.       return
  158.     end
  159.     end
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # update_phase3_actor_select
  163.   def update_phase3_actor_select
  164.     @actor_arrow.update
  165.     if Input.trigger?(Input::B)
  166.       $game_system.se_play($data_system.cancel_se)
  167.       end_actor_select
  168.       return
  169.     end
  170.     if Input.trigger?(Input::C)
  171.       $game_system.se_play($data_system.decision_se)
  172.       @active_battler.current_action.target_index = @actor_arrow.index
  173.       end_actor_select
  174.       if @skill_window != nil
  175.         end_skill_select
  176.       end
  177.       if @item_window != nil and @command_item != nil
  178.         end_item_select
  179.       end
  180.       phase3_next_actor
  181.     end
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # end_item_select
  185.   alias end_item_select_old_blkk end_item_select
  186.   def end_item_select
  187.     @command_item.dispose
  188.     end_item_select_old_blkk
  189.     @command_item = nil
  190.   end
  191. end
  192. #==============================================================================
  193. # Window_Item
  194. class Window_Item < Window_Selectable
  195.   #--------------------------------------------------------------------------
  196.   # initialize
  197.   def initialize
  198.     super(0, 64, 640, 416)
  199.     @column_max = 1
  200.     refresh
  201.     self.index = 0
  202.     if $game_temp.in_battle
  203.       self.x = 132
  204.       self.y = 64
  205.       self.height = 256
  206.       self.width = 640 - 132
  207.       self.opacity = 160
  208.     end
  209.   end
  210.   #--------------------------------------------------------------------------
  211.   # refresh
  212.   def refresh
  213.     if self.contents != nil
  214.       self.contents.dispose
  215.       self.contents = nil
  216.     end
  217.     @data = []
  218.       if $game_temp.in_battle and $data_name_battle != "全部物品"
  219.         for i in 1...$data_items.size
  220.           if $game_party.item_number(i) > 0 and
  221.             $data_items[i].occasion != 3 and $data_items[i].occasion != 2 and
  222.             $data_name_battle == $data_items[i].name_plus
  223.             @data.push($data_items[i])
  224.           end
  225.         end
  226.       elsif $data_name == "全部物品" and $game_temp.in_battle == false
  227.         for i in 1...$data_items.size
  228.           if $game_party.item_number(i) > 0
  229.             @data.push($data_items[i])
  230.           end
  231.         end
  232.         unless $game_temp.in_battle
  233.           for i in 1...$data_weapons.size
  234.             if $game_party.weapon_number(i) > 0
  235.           @data.push($data_weapons[i])
  236.             end
  237.           end
  238.           for i in 1...$data_armors.size
  239.             if $game_party.armor_number(i) > 0
  240.             @data.push($data_armors[i])
  241.             end
  242.           end
  243.         end
  244.       elsif $data_name_battle == "全部物品" and $game_temp.in_battle
  245.         for i in 1...$data_items.size
  246.           if $game_party.item_number(i) > 0 and
  247.             $data_items[i].occasion != 3 and $data_items[i].occasion != 2
  248.             @data.push($data_items[i])
  249.           end
  250.         end
  251.       end
  252.     unless $data_name == "全部物品" and $game_temp.in_battle
  253.     for i in 1...$data_items.size
  254.       if $game_party.item_number(i) > 0
  255.         @data.push($data_items[i]) if $data_name == $data_items[i].name_plus
  256.       end
  257.     end
  258.     unless $game_temp.in_battle
  259.       for i in 1...$data_weapons.size
  260.         if $game_party.weapon_number(i) > 0
  261.       @data.push($data_weapons[i]) if $data_name == $data_weapons[i].name_plus
  262.         end
  263.       end
  264.       for i in 1...$data_armors.size
  265.         if $game_party.armor_number(i) > 0
  266.         @data.push($data_armors[i]) if $data_name == $data_armors[i].name_plus
  267.         end
  268.       end
  269.     end
  270.     end
  271.     @item_max = @data.size
  272.     if @item_max > 0
  273.       self.contents = Bitmap.new(width - 32, row_max * 32)
  274.       for i in 0...@item_max
  275.         draw_item(i)
  276.       end
  277.     end
  278.   end
  279.   #--------------------------------------------------------------------------
  280.   # draw_item
  281.   def draw_item(index)
  282.     item = @data[index]
  283.     $item = item
  284.     case item
  285.     when RPG::Item
  286.       number = $game_party.item_number(item.id)
  287.     when RPG::Weapon
  288.       number = $game_party.weapon_number(item.id)
  289.     when RPG::Armor
  290.       number = $game_party.armor_number(item.id)
  291.     end
  292.     self.contents.font.color = normal_color
  293.     x = 4 + index % 1 * (225 + 32)
  294.     ax = x
  295.     y = index / @column_max * 32
  296.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  297.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  298.     bitmap = RPG::Cache.icon(item.icon_name)
  299.     opacity = self.contents.font.color == normal_color ? 255 : 128
  300.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  301.     self.contents.font.size = 15
  302.     cx = contents.text_size("持有数 ×").width
  303.     self.contents.draw_text(x + 126, y, cx, 32, "持有数 ×", 1)
  304.     case number
  305.     when 1 .. 5
  306.     self.contents.font.color = text_color(2)
  307.     when 6 .. 10
  308.     self.contents.font.color = text_color(5)
  309.     when 11 .. 30
  310.     self.contents.font.color = text_color(6)
  311.     when 30 .. 99
  312.     self.contents.font.color = text_color(3)
  313.     end
  314.     self.contents.draw_text(x + 126 + cx, y, 24, 32, number.to_s, 2)
  315. if item.description_plus != "" and item.description_plus.to_i <= 7 and
  316.   item.description_plus.to_i >= 0
  317. self.contents.font.color = text_color(item.description_plus.to_i)
  318. else
  319.   self.contents.font.color = text_color(0)
  320. end
  321. self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  322. if item.is_a?(RPG::Item)
  323. self.contents.font.color = text_color(3)
  324. re_hp = item.recover_hp
  325. re_hp_rate = item.recover_hp_rate
  326. re_sp = item.recover_sp
  327. re_sp_rate = item.recover_sp_rate
  328. if re_hp > 0 or re_hp_rate > 0 or re_sp > 0 or re_sp_rate > 0 and
  329.   item.minus_state_set != []
  330. self.contents.draw_text(x + 266, y, width - 8, 32, "[复活]")
  331. elsif re_hp > 0 or re_hp_rate > 0 or re_sp > 0 or re_sp_rate > 0
  332. self.contents.draw_text(x + 266, y, width - 8, 32, "[恢复]")  
  333. recover =
  334. [re_hp, re_hp_rate, re_sp, re_hp_rate].max
  335. case recover
  336. when 0 .. 100
  337. self.contents.font.color = text_color(2)
  338. when 101 .. 500
  339. self.contents.font.color = text_color(5)
  340. when 501 .. 1000
  341. self.contents.font.color = text_color(6)
  342. when 1001 .. 3000
  343. self.contents.font.color = text_color(4)
  344. when 3001 .. 9999
  345. self.contents.font.color = text_color(3)  
  346. end  
  347. self.contents.draw_text(x + 326, y, width - 8, 32, recover.to_s)
  348. elsif re_hp < 0 or re_hp_rate < 0
  349. self.contents.draw_text(x + 266, y, width - 8, 32, "[暗器]")
  350. recover = re_hp.abs
  351. case recover
  352. when 0 .. 100
  353. self.contents.font.color = text_color(2)
  354. when 101 .. 500
  355. self.contents.font.color = text_color(5)
  356. when 501 .. 1000
  357. self.contents.font.color = text_color(6)
  358. when 1001 .. 3000
  359. self.contents.font.color = text_color(4)
  360. when 3001 .. 9999
  361. self.contents.font.color = text_color(3)  
  362. end  
  363. self.contents.draw_text(x + 326, y, width - 8, 32, recover.to_s)
  364. elsif item.minus_state_set != []
  365. self.contents.draw_text(x + 266, y, width - 8, 32, "[状态-]")
  366. elsif item.plus_state_set != []
  367. self.contents.draw_text(x + 266, y, width - 8, 32, "[状态+]")
  368. end
  369. self.contents.font.color = text_color(3)
  370. self.contents.draw_text(x+390, y, width-8, 32, "[品质]") if item.occasion != 3
  371. case item.description_plus_2
  372. when "低"
  373. self.contents.font.color = text_color(2)
  374. when "中"
  375. self.contents.font.color = text_color(6)
  376. when "高"
  377. self.contents.font.color = text_color(4)
  378. end
  379. if item.occasion != 3
  380. self.contents.draw_text(x + 450, y, width - 8, 32, item.description_plus_2)
  381. end
  382. end
  383. if item.is_a?(RPG::Item) and item.parameter_points > 0
  384.   self.contents.font.color = text_color(3)
  385.   self.contents.draw_text(x + 266, y, width - 8, 32, "[能力+]")
  386.   self.contents.font.color = text_color(4)
  387.   self.contents.draw_text(ax + 326, y, 182, 32, item.parameter_points.to_s)
  388. end
  389. if item.is_a?(RPG::Item) and
  390.   (item.plus_state_set != [] or item.minus_state_set != [])
  391. for i in item.plus_state_set
  392.   if i > 0
  393.     txt = $data_states[i].name
  394.     self.contents.font.color = text_color(5)
  395.     self.contents.draw_text(x + 326, y, 182, 32, txt)
  396.   end
  397. end
  398. for i in item.minus_state_set
  399.   if i > 0
  400.     txt = $data_states[i].name
  401.     self.contents.font.color = text_color(3)
  402.     self.contents.draw_text(ax + 326, y, 182, 32, txt)
  403.     ax += 500
  404.   end
  405. end
  406. end
  407. if item.is_a?(RPG::Weapon)
  408.   self.contents.font.color = text_color(3)
  409.   self.contents.draw_text(x + 266, y, width - 8, 32, "[武器]")
  410.   self.contents.font.color = text_color(4)
  411.   self.contents.draw_text(ax + 326, y, 182, 32, "atk:" << item.atk.to_s)
  412.   self.contents.font.color = text_color(3)
  413.   self.contents.draw_text(x + 390, y, width - 8, 32, "[品质]")
  414. case item.description_plus_2
  415. when "低"
  416. self.contents.font.color = text_color(2)
  417. when "中"
  418. self.contents.font.color = text_color(6)
  419. when "高"
  420. self.contents.font.color = text_color(4)
  421. end
  422. self.contents.draw_text(x + 450, y, width - 8, 32, item.description_plus_2)
  423. end
  424. if item.is_a?(RPG::Armor)
  425.   self.contents.font.color = text_color(3)
  426.   unless item.pdef == 0 and item.mdef == 0
  427.   self.contents.draw_text(x + 266, y, width - 8, 32, "[护具]")
  428.   self.contents.font.color = text_color(4)
  429.   self.contents.draw_text(ax + 326, y, 182, 32, "pdef:" << item.pdef.to_s +
  430.   "  " << "mdef:" << item.mdef.to_s)
  431.   else
  432.   self.contents.draw_text(x + 266, y, width - 8, 32, "[饰品]")
  433.   num1 = item.str_plus
  434.   num2 = item.dex_plus
  435.   num3 = item.agi_plus
  436.   num4 = item.int_plus
  437.   num_max = [num1, num2, num3, num4].max
  438.   self.contents.font.color = text_color(4)
  439.   self.contents.draw_text(ax + 326, y, 182, 32, num_max.to_s)
  440.   end
  441.   self.contents.font.color = text_color(3)
  442.   if item.is_a?(RPG::Armor) and item.pdef == 0 and item.mdef == 0
  443.   cx = x - 120
  444.   else
  445.   cx = x
  446.   end
  447.   self.contents.draw_text(cx + 480, y, width - 8, 32, "[品质]")
  448. case item.description_plus_2
  449. when "低"
  450. self.contents.font.color = text_color(2)
  451. when "中"
  452. self.contents.font.color = text_color(6)
  453. when "高"
  454. self.contents.font.color = text_color(4)
  455. end
  456. self.contents.draw_text(cx + 540, y, width - 8, 32, item.description_plus_2)
  457. end
  458. if item.is_a?(RPG::Item) and item.occasion == 3
  459.   self.contents.font.color = text_color(3)
  460.   self.contents.draw_text(x + 266, y, width - 8, 32, "[剧情任务]")
  461.   self.contents.font.color = text_color(4)
  462.   self.contents.draw_text(ax + 356, y, 182, 32, "这是" << item.name.to_s)
  463. end  
  464. end
  465. end
  466. #==============================================================================
  467. #  Window_Command
  468. class Window_Command < Window_Selectable
  469.   #--------------------------------------------------------------------------
  470.   #  initialize
  471.   def initialize(width, commands)
  472.     if commands.include?(nil)
  473.     super(0, 0, width, 6 * 32 + 32)
  474.     new_commands = commands.compact
  475.     else
  476.     if commands.include?("战斗中")
  477.     if commands.size * 32 + 32 > 256
  478.     super(0, 64, width, 256)  
  479.     else  
  480.     super(0, 64, width, (commands.size - 1) * 32 + 32)
  481.     end
  482.     new_commands = commands
  483.     $battle = new_commands
  484.     else  
  485.     super(0, 0, width, commands.size * 32 + 32)
  486.     new_commands = commands
  487.     end
  488.     end
  489.     if new_commands.include?("战斗中")
  490.     @item_max = new_commands.size - 1
  491.     else
  492.     @item_max = new_commands.size
  493.     end
  494.     @commands = new_commands
  495.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  496.     refresh
  497.     self.index = 0
  498.   end
  499.   #--------------------------------------------------------------------------
  500.   #  update_help
  501.   def update_help
  502.     @help_window.set_text("[系统]" + @commands[self.index])
  503.   end  
  504. end
  505. #==============================================================================
  506. #  module RPG
  507. module RPG
  508.   class Item
  509.     def name
  510.       name = @name.split(/,/)[0]
  511.       return name != nil ? name : ""
  512.     end
  513.     def name_plus
  514.       name_plus = @name.split(/,/)[1]
  515.       return name_plus != nil ? name_plus : ""
  516.     end
  517.     def description
  518.       description = @description.split(/@/)[0]
  519.       return description != nil ? description : ""
  520.     end
  521.     def description_plus
  522.       description_plus = @description.split(/@/)[1]
  523.       return description_plus != nil ? description_plus : ""
  524.     end
  525.     def description_plus_2
  526.       description_plus_2 = @description.split(/@/)[2]
  527.       return description_plus_2 != nil ? description_plus_2 : "请定义品质"
  528.     end
  529.   end
  530.   class Weapon
  531.     def name
  532.       name = @name.split(/,/)[0]
  533.       return name != nil ? name : ""
  534.     end
  535.     def name_plus
  536.       name_plus = @name.split(/,/)[1]
  537.       return name_plus != nil ? name_plus : ""
  538.     end
  539.     def description
  540.       description = @description.split(/@/)[0]
  541.       return description != nil ? description : ""
  542.     end
  543.     def description_plus
  544.       description_plus = @description.split(/@/)[1]
  545.       return description_plus != nil ? description_plus : ""
  546.     end
  547.     def description_plus_2
  548.       description_plus_2 = @description.split(/@/)[2]
  549.       return description_plus_2 != nil ? description_plus_2 : "请定义品质"
  550.     end
  551.   end
  552.   class Armor
  553.     def name
  554.       name = @name.split(/,/)[0]
  555.       return name != nil ? name : ""
  556.     end
  557.     def name_plus
  558.       name_plus = @name.split(/,/)[1]
  559.       return name_plus != nil ? name_plus : ""
  560.     end
  561.     def description
  562.       description = @description.split(/@/)[0]
  563.       return description != nil ? description : ""
  564.     end
  565.     def description_plus
  566.       description_plus = @description.split(/@/)[1]
  567.       return description_plus != nil ? description_plus : ""
  568.     end
  569.     def description_plus_2
  570.       description_plus_2 = @description.split(/@/)[2]
  571.       return description_plus_2 != nil ? description_plus_2 : "请定义品质"
  572.     end
  573.   end
  574. end
  575. #==============================================================================
  576. #  Scene_Menu
  577. class Scene_Menu
  578.   #--------------------------------------------------------------------------
  579.   #  initialize
  580.   def initialize(menu_index = 0)
  581.     @menu_index = menu_index
  582.   end
  583.   #--------------------------------------------------------------------------
  584.   #  main
  585.   def main
  586.     s1 = $data_system.words.item
  587.     s2 = $data_system.words.skill
  588.     s3 = $data_system.words.equip
  589.     s4 = "状态"
  590.     s5 = "存档"
  591.     s6 = "结束游戏"
  592.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  593.     @command_window.index = @menu_index
  594.     @data = ["全部物品"]
  595.     for i in 1...$data_items.size
  596.       if $game_party.item_number(i) > 0 and $data_items[i].name_plus != ""
  597.         kind = $data_items[i].name_plus
  598.         @data.push($data_items[i].name_plus) unless @data.include?(kind)
  599.       end
  600.     end
  601.     unless $game_temp.in_battle
  602.       for i in 1...$data_weapons.size
  603.       if $game_party.weapon_number(i) > 0 and $data_weapons[i].name_plus != ""
  604.           kind = $data_weapons[i].name_plus
  605.           @data.push($data_weapons[i].name_plus) unless @data.include?(kind)
  606.         end
  607.       end
  608.       for i in 1...$data_armors.size
  609.         if $game_party.armor_number(i) > 0 and $data_armors[i].name_plus != ""
  610.           kind = $data_armors[i].name_plus
  611.           @data.push($data_armors[i].name_plus) unless @data.include?(kind)
  612.         end
  613.       end
  614.     end
  615.     if @data.size > 6
  616.       @data.push(nil)
  617.       @data_2 = @data.compact
  618.     else
  619.       @data_2 = @data
  620.     end
  621.     if @data.size > 6 then @data_2 = @data.compact else @data_2 = @data end  
  622.     @item_command = Window_Command.new(132, @data)
  623.     @item_command.x = 160;@item_command.z = 160
  624.     @item_command.opacity = 160
  625.     @item_command.active = false
  626.     @item_command.visible = false
  627.     @item_command.index = -1
  628.     if $game_party.actors.size == 0
  629.       @command_window.disable_item(0)
  630.       @command_window.disable_item(1)
  631.       @command_window.disable_item(2)
  632.       @command_window.disable_item(3)
  633.     end
  634.     if $game_system.save_disabled
  635.       @command_window.disable_item(4)
  636.     end
  637.     @playtime_window = Window_PlayTime.new
  638.     @playtime_window.x = 0
  639.     @playtime_window.y = 224
  640.     @steps_window = Window_Steps.new
  641.     @steps_window.x = 0
  642.     @steps_window.y = 320
  643.     @gold_window = Window_Gold.new
  644.     @gold_window.x = 0
  645.     @gold_window.y = 416
  646.     @status_window = Window_MenuStatus.new
  647.     @status_window.x = 160
  648.     @status_window.y = 0
  649.     Graphics.transition
  650.     loop do
  651.       Graphics.update
  652.       Input.update
  653.       update
  654.       if $scene != self
  655.         break
  656.       end
  657.     end
  658.     Graphics.freeze
  659.     @command_window.dispose
  660.     @playtime_window.dispose
  661.     @steps_window.dispose
  662.     @gold_window.dispose
  663.     @status_window.dispose
  664.     @item_command.dispose
  665.   end
  666.   #----------------------------------------------------------------------------
  667.   #  update
  668.   def update
  669.     @item_command.update
  670.     @command_window.update
  671.     @playtime_window.update
  672.     @steps_window.update
  673.     @gold_window.update
  674.     @status_window.update
  675.     if @item_command.active
  676.       item_command
  677.       return
  678.     end
  679.     if @command_window.active
  680.       update_command
  681.       return
  682.     end
  683.     if @status_window.active
  684.       update_status
  685.       return
  686.     end
  687.   end
  688.   #----------------------------------------------------------------------------
  689.   #  item_command
  690.   def item_command
  691.     if Input.trigger?(Input::B)
  692.       $game_system.se_play($data_system.cancel_se)
  693.       @item_command.index = -1
  694.       @item_command.active = false
  695.       @item_command.visible = false
  696.       @command_window.active = true
  697.     end
  698.     if Input.trigger?(Input::C)
  699.       $game_system.se_play($data_system.decision_se)
  700.       $data_name = @data_2[@item_command.index]
  701.       $scene = Scene_Item.new
  702.     end
  703.   end
  704.   #----------------------------------------------------------------------------
  705.   #  update_command
  706.   def update_command
  707.     if Input.trigger?(Input::B)
  708.       $game_system.se_play($data_system.cancel_se)
  709.       $scene = Scene_Map.new
  710.       return
  711.     end
  712.     if Input.trigger?(Input::C)
  713.       if $game_party.actors.size == 0 and @command_window.index < 4
  714.         $game_system.se_play($data_system.buzzer_se)
  715.         return
  716.       end
  717.       case @command_window.index
  718.       when 0
  719.         $game_system.se_play($data_system.decision_se)
  720.         @command_window.active = false
  721.         @item_command.index = 0
  722.         @item_command.active = true
  723.         @item_command.visible = true
  724.       when 1
  725.         $game_system.se_play($data_system.decision_se)
  726.         @command_window.active = false
  727.         @status_window.active = true
  728.         @status_window.index = 0
  729.       when 2
  730.         $game_system.se_play($data_system.decision_se)
  731.         @command_window.active = false
  732.         @status_window.active = true
  733.         @status_window.index = 0
  734.       when 3
  735.         $game_system.se_play($data_system.decision_se)
  736.         @command_window.active = false
  737.         @status_window.active = true
  738.         @status_window.index = 0
  739.       when 4
  740.         if $game_system.save_disabled
  741.           $game_system.se_play($data_system.buzzer_se)
  742.           return
  743.         end
  744.         $game_system.se_play($data_system.decision_se)
  745.         $scene = Scene_Save.new
  746.       when 5
  747.         $game_system.se_play($data_system.decision_se)
  748.         $scene = Scene_End.new
  749.       end
  750.       return
  751.     end
  752.   end
  753. end
复制代码

评分

参与人数 3星屑 +318 收起 理由
邪月长啸 + 30 支持恋大
feizhaodan + 180 奖赏条例
king + 108 塞糖~~描述和品质我喜欢

查看全部评分

Lv1.梦旅人

梦石
0
星屑
76
在线时间
1379 小时
注册时间
2012-7-5
帖子
1698

开拓者

2
发表于 2013-9-20 09:18:49 | 只看该作者
一看就是做大游戏(眼花缭乱类)的产物

  -fk: -azogi:
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
14 小时
注册时间
2013-8-8
帖子
13
3
发表于 2014-2-17 10:49:03 | 只看该作者
你好楼主,我下载了你的测试工程,然后从脚本页复制到自己的游戏中,但是所有的物品分类的品质全都清空了。
请问要怎样设置品质和分类?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
49
在线时间
50 小时
注册时间
2014-9-14
帖子
38
4
发表于 2014-10-11 13:29:27 | 只看该作者
罪恶ぺ殇痕 发表于 2014-2-17 10:49
你好楼主,我下载了你的测试工程,然后从脚本页复制到自己的游戏中,但是所有的物品分类的品质全都清空了。 ...

1.物品分类(菜单、战斗双项分类。在名称后使用“,”直接追加分类)
2.物品颜色(在说明后用“@”定义,使用的是text_color所以@后的数字不要超过7)
3.物品品质(在物品颜色后用“@”定义,低、中或高。)
4.简洁说明(附加、解除状态,恢复HP、SP等,直接在window中简单显示。)
以上是脚本里的原话。。那个,物品分类是直接在物品名称后面加的,不需要改动脚本( ゚ω゚)
希望对你有帮助吧,好吧其实我就是菜鸟。。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
305
在线时间
853 小时
注册时间
2014-5-5
帖子
948
5
发表于 2014-10-13 18:57:57 | 只看该作者
额,恋大的作风就是只发脚本不上图的。。。。

支持下,抱走试试啥效果

点评

初学RGSS1搞的。现在感觉挺糟糕的。。。  发表于 2014-10-13 21:51
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-22 13:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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