Project1

标题: 装备耐久度 更新 [打印本页]

作者: 沉影不器    时间: 2008-2-24 05:05
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-2-24 05:06
提示: 作者被禁止或删除 内容自动屏蔽
作者: 亿万星辰    时间: 2008-2-24 05:51
啊哈,终于有人把这个东西做出来了{/qiang}{/qiang}

顺便问下:
⑥ 损坏的装备将在大地图上显示
这个是何意思?{/fd}
作者: 踏水无痕    时间: 2008-2-24 06:03
不会用
作者: 英俊de狗    时间: 2008-2-24 17:20
提示: 作者被禁止或删除 内容自动屏蔽
作者: 亿万星辰    时间: 2008-2-24 19:06
用了一下大致明白了。。。
我还在想损坏以后会直接扔到地图上{/hx}那效果就华丽了。。。
作者: 越前リョーマ    时间: 2008-2-24 19:19
损坏了显示一段时间就够了吧……

破坏环境……
作者: 沉影不器    时间: 2008-2-24 23:15
提示: 作者被禁止或删除 内容自动屏蔽
作者: 亿万星辰    时间: 2008-2-25 01:29
以下引用沉影不器于2008-2-24 15:15:51的发言:
有一个美兽的四处留情什么什么的那么个脚本...看名字很像您描述的功能

没事没事,丫丫岭里就有那种邪恶的效果了...{/hx}
作者: zzd    时间: 2008-3-1 02:40
好,真好{/kuk}
作者: 沉影不器    时间: 2008-3-10 05:41
提示: 作者被禁止或删除 内容自动屏蔽
作者: 火鸡三毛老大    时间: 2008-3-14 04:27
不过那些提示损坏的装备显示信息  闪烁一下效果比较好...吸引眼球...{/cy}
作者: 十六夜月华    时间: 2008-3-20 19:48
在下用了柳殿那个物品分类脚本后,装备的耐久度就显示不出来了……
望楼主帮帮在下{/pz}
作者: 沉影不器    时间: 2008-3-20 23:27
提示: 作者被禁止或删除 内容自动屏蔽
作者: 十六夜月华    时间: 2008-3-21 00:13
多谢了,在下去试试
作者: 十六夜月华    时间: 2008-3-21 00:14
以下引用沉影不器于2008-3-20 15:27:37的发言:

您使用的物品分类脚本拿什么符号分裂文本了?该脚本使用了英文豆号,修改splite分裂式,脚本再往下放应该就解决

物品分类是用@
那个脚本是下面这样的,
如果实在不行就算了,在下放弃物品分类也要保耐久度
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. #==============================================================================
  5. # ■ Harts_Window_ItemTitle
  6. #==============================================================================

  7. class Harts_Window_ItemTitle < Window_Base
  8.   def initialize
  9.     super(0, 0, 160, 64)
  10.     self.contents = Bitmap.new(width - 32, height - 32)
  11.     self.contents.clear
  12.     self.contents.font.color = normal_color
  13.     self.contents.draw_text(4, 0, 120, 32, $data_system.words.item, 1)
  14.   end
  15. end

  16. #==============================================================================
  17. # ■ Harts_Window_ItemCommand
  18. #==============================================================================

  19. class Harts_Window_ItemCommand < Window_Selectable
  20.   attr_accessor :commands
  21.   #--------------------------------------------------------------------------
  22.   # ● 初始化,生成commands窗口
  23.   #--------------------------------------------------------------------------
  24.   def initialize
  25.     super(0, 64, 160, 352)
  26.     @commands = []
  27.     #————————生成commands窗口
  28.     for i in 1...$data_items.size
  29.       if $game_party.item_number(i) > 0
  30.         push = true
  31.         for com in @commands
  32.           if com == $data_items[i].desc
  33.             push = false
  34.           end
  35.         end
  36.         if push == true
  37.           @commands.push($data_items[i].desc)
  38.         end
  39.       end
  40.     end
  41.     for i in 1...$data_weapons.size
  42.       if $game_party.weapon_number(i) > 0
  43.         push = true
  44.         for com in @commands
  45.           if com == $data_weapons[i].desc
  46.             push = false
  47.           end
  48.         end
  49.         if push == true
  50.           @commands.push($data_weapons[i].desc)
  51.         end
  52.       end
  53.     end
  54.     for i in 1...$data_armors.size
  55.       if $game_party.armor_number(i) > 0
  56.         push = true
  57.         for com in @commands
  58.           if com == $data_armors[i].desc
  59.             push = false
  60.           end
  61.         end
  62.         if push == true
  63.           @commands.push($data_armors[i].desc)
  64.         end
  65.       end
  66.     end
  67.     if @commands == []
  68.       @commands.push("普通物品")
  69.     end      
  70.     @item_max = @commands.size
  71.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  72.     refresh
  73.     self.index = 0
  74.   end
  75.   #--------------------------------------------------------------------------
  76.   #--------------------------------------------------------------------------
  77.   def refresh
  78.     self.contents.clear
  79.     for i in 0...@item_max
  80.       draw_item(i, normal_color)
  81.     end
  82.   end
  83.   #--------------------------------------------------------------------------
  84.   #--------------------------------------------------------------------------
  85.   def draw_item(index, color)
  86.     self.contents.font.color = color
  87.     y = index * 32
  88.     self.contents.draw_text(4, y, 128, 32, @commands[index])
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # 只描绘原文字
  92.   #--------------------------------------------------------------------------
  93.   def update_help
  94.     @help_window.set_text(@commands[self.index])
  95.   end
  96. end

  97. #==============================================================================
  98. # ■ Window_Item
  99. #==============================================================================

  100. class Harts_Window_ItemList < Window_Selectable
  101.   #--------------------------------------------------------------------------
  102.   #--------------------------------------------------------------------------
  103.   def initialize
  104.     super(160, 0, 480, 416)
  105.     refresh
  106.     self.index = 0
  107.   end
  108.   #--------------------------------------------------------------------------
  109.   #--------------------------------------------------------------------------
  110.   def item
  111.     return @data[self.index]
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   #--------------------------------------------------------------------------
  115.   def refresh
  116.     if self.contents != nil
  117.       self.contents.dispose
  118.       self.contents = nil
  119.     end
  120.     @data = []
  121.   end
  122.   #--------------------------------------------------------------------------
  123.   #--------------------------------------------------------------------------
  124.   def set_item(command)
  125.     refresh
  126.     for i in 1...$data_items.size
  127.       if $game_party.item_number(i) > 0 and $data_items[i].desc == command
  128.         @data.push($data_items[i])
  129.       end
  130.     end
  131.     for i in 1...$data_weapons.size
  132.       if $game_party.weapon_number(i) > 0 and $data_weapons[i].desc == command
  133.         @data.push($data_weapons[i])
  134.       end
  135.     end
  136.     for i in 1...$data_armors.size
  137.       if $game_party.armor_number(i) > 0 and $data_armors[i].desc == command
  138.         @data.push($data_armors[i])
  139.       end
  140.     end
  141.     @item_max = @data.size
  142.     if @item_max > 0
  143.       self.contents = Bitmap.new(width - 32, row_max * 32)
  144.       self.contents.clear
  145.       for i in 0...@item_max
  146.         draw_item(i)
  147.       end
  148.     end
  149.   end
  150.   #--------------------------------------------------------------------------
  151.   #--------------------------------------------------------------------------
  152.   def item_number
  153.     return @item_max
  154.   end
  155.   #--------------------------------------------------------------------------
  156.   #--------------------------------------------------------------------------
  157.   def draw_item(index)
  158.     item = @data[index]
  159.     case item
  160.     when RPG::Item
  161.       number = $game_party.item_number(item.id)
  162.     when RPG::Weapon
  163.       number = $game_party.weapon_number(item.id)
  164.     when RPG::Armor
  165.       number = $game_party.armor_number(item.id)
  166.     end
  167.     if item.is_a?(RPG::Item) and
  168.       $game_party.item_can_use?(item.id)
  169.       self.contents.font.color = normal_color
  170.     else
  171.       self.contents.font.color = disabled_color
  172.     end
  173.     x = 4
  174.     y = index * 32
  175.     bitmap = RPG::Cache.icon(item.icon_name)
  176.     opacity = self.contents.font.color == normal_color ? 255 : 128
  177.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  178.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  179.     self.contents.draw_text(x + 400, y, 16, 32, ":", 1)
  180.     self.contents.draw_text(x + 416, y, 24, 32, number.to_s, 2)
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   #--------------------------------------------------------------------------
  184.   def update_help
  185.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  186.   end
  187. end

  188. #==============================================================================
  189. # ■ Harts_Scene_Item
  190. #==============================================================================

  191. class Scene_Item
  192.   #--------------------------------------------------------------------------
  193.   #--------------------------------------------------------------------------
  194.   def main
  195.     @itemtitle_window = Harts_Window_ItemTitle.new
  196.     @itemcommand_window = Harts_Window_ItemCommand.new
  197.     @command_index = @itemcommand_window.index
  198.     @itemlist_window = Harts_Window_ItemList.new
  199.     @itemlist_window.active = false
  200.     @help_window = Window_Help.new
  201.     @help_window.x = 0
  202.     @help_window.y = 416
  203.     @itemcommand_window.help_window = @help_window
  204.     @itemlist_window.help_window = @help_window
  205.     @target_window = Window_Target.new
  206.     @target_window.visible = false
  207.     @target_window.active = false
  208.     @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  209.     Graphics.transition
  210.     loop do
  211.       Graphics.update
  212.       Input.update
  213.       update
  214.       if $scene != self
  215.         break
  216.       end
  217.     end
  218.     Graphics.freeze
  219.     @itemtitle_window.dispose
  220.     @itemcommand_window.dispose
  221.     @itemlist_window.dispose
  222.     @help_window.dispose
  223.     @target_window.dispose
  224.   end
  225.   #--------------------------------------------------------------------------
  226.   #--------------------------------------------------------------------------
  227.   def update
  228.     @itemtitle_window.update
  229.     @itemcommand_window.update
  230.     @itemlist_window.update
  231.     @help_window.update
  232.     @target_window.update
  233.     if @command_index != @itemcommand_window.index
  234.       @command_index = @itemcommand_window.index
  235.       @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  236.     end
  237.     if @itemcommand_window.active
  238.       update_itemcommand
  239.       return
  240.     end
  241.     if @itemlist_window.active
  242.       update_itemlist
  243.       return
  244.     end
  245.     if @target_window.active
  246.       update_target
  247.       return
  248.     end
  249.   end
  250.   #--------------------------------------------------------------------------
  251.   #--------------------------------------------------------------------------
  252.   def update_itemcommand
  253.     if Input.trigger?(Input::B)
  254.       $game_system.se_play($data_system.cancel_se)
  255.       $scene = Scene_Menu.new(0)
  256.       return
  257.     end
  258.     if Input.trigger?(Input::C)
  259.       if @itemlist_window.item_number == 0
  260.         $game_system.se_play($data_system.buzzer_se)
  261.         return
  262.       end
  263.       $game_system.se_play($data_system.decision_se)
  264.       @itemcommand_window.active = false
  265.       @itemlist_window.active = true
  266.       @itemlist_window.index = 0
  267.       return
  268.     end
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   #--------------------------------------------------------------------------
  272.   def update_itemlist
  273.     if Input.trigger?(Input::B)
  274.       $game_system.se_play($data_system.cancel_se)
  275.       @itemcommand_window.active = true
  276.       @itemlist_window.active = false
  277.       @itemlist_window.index = 0
  278.       @itemcommand_window.index = @command_index
  279.       return
  280.     end
  281.     if Input.trigger?(Input::C)
  282.       @item = @itemlist_window.item
  283.       unless @item.is_a?(RPG::Item)
  284.         $game_system.se_play($data_system.buzzer_se)
  285.         return
  286.       end
  287.       unless $game_party.item_can_use?(@item.id)
  288.         $game_system.se_play($data_system.buzzer_se)
  289.         return
  290.       end
  291.       $game_system.se_play($data_system.decision_se)
  292.       if @item.scope >= 3
  293.         @itemlist_window.active = false
  294.         @target_window.x = 304
  295.         @target_window.visible = true
  296.         @target_window.active = true
  297.         if @item.scope == 4 || @item.scope == 6
  298.           @target_window.index = -1
  299.         else
  300.           @target_window.index = 0
  301.         end
  302.       else
  303.         if @item.common_event_id > 0
  304.           $game_temp.common_event_id = @item.common_event_id
  305.           $game_system.se_play(@item.menu_se)
  306.             if @item.consumable
  307.               $game_party.lose_item(@item.id, 1)
  308.               @itemlist_window.draw_item(@itemlist_window.index)
  309.             end
  310.           $scene = Scene_Map.new
  311.           return
  312.         end
  313.       end
  314.       return
  315.     end
  316.   end
  317.   #--------------------------------------------------------------------------
  318.   #--------------------------------------------------------------------------
  319.   def update_target
  320.     if Input.trigger?(Input::B)
  321.       $game_system.se_play($data_system.cancel_se)
  322.       unless $game_party.item_can_use?(@item.id)
  323.         @itemlist_window.refresh
  324.       end
  325.       @itemlist_window.active = true
  326.       @target_window.visible = false
  327.       @target_window.active = false
  328.       @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  329.       return
  330.     end
  331.     if Input.trigger?(Input::C)
  332.       if $game_party.item_number(@item.id) == 0
  333.         $game_system.se_play($data_system.buzzer_se)
  334.         return
  335.       end
  336.       if @target_window.index == -1
  337.         used = false
  338.         for i in $game_party.actors
  339.           used |= i.item_effect(@item)
  340.         end
  341.       end
  342.       if @target_window.index >= 0
  343.         target = $game_party.actors[@target_window.index]
  344.         used = target.item_effect(@item)
  345.       end
  346.       if used
  347.         $game_system.se_play(@item.menu_se)
  348.         if @item.consumable
  349.           $game_party.lose_item(@item.id, 1)
  350.           @itemlist_window.draw_item(@itemlist_window.index)
  351.           @itemlist_window.set_item(@itemcommand_window.commands[@command_index])
  352.         end
  353.         @target_window.refresh
  354.         if $game_party.all_dead?
  355.           $scene = Scene_Gameover.new
  356.           return
  357.         end
  358.         if @item.common_event_id > 0
  359.           $game_temp.common_event_id = @item.common_event_id
  360.           $scene = Scene_Map.new
  361.           return
  362.         end
  363.       end
  364.       unless used
  365.         $game_system.se_play($data_system.buzzer_se)
  366.       end
  367.     return
  368.     end
  369.   end
  370. end

  371. #==============================================================================
  372. # ■ RPG追加定义,使用@符号分类
  373. #==============================================================================

  374. module RPG
  375.   class Weapon
  376.     def description
  377.       description = @description.split(/@/)[0]
  378.       return description != nil ? description : ''
  379.     end
  380.     def desc
  381.       desc = @description.split(/@/)[1]
  382.       return desc != nil ? desc : "普通物品"
  383.     end
  384.   end
  385.   class Item
  386.     def description
  387.       description = @description.split(/@/)[0]
  388.       return description != nil ? description : ''
  389.     end
  390.     def desc
  391.       desc = @description.split(/@/)[1]
  392.       return desc != nil ? desc : "普通物品"
  393.     end
  394.   end
  395.   class Armor
  396.     def description
  397.       description = @description.split(/@/)[0]
  398.       return description != nil ? description : ''
  399.     end
  400.     def desc
  401.       desc = @description.split(/@/)[1]
  402.       return desc != nil ? desc : "普通物品"
  403.     end
  404.   end
  405. end

  406. #==============================================================================
  407. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  408. #==============================================================================
复制代码

作者: 沉影不器    时间: 2008-3-21 02:54
提示: 作者被禁止或删除 内容自动屏蔽
作者: 风雪优游    时间: 2008-3-21 20:37
应该无什么问题了吧?有什么更新请放在一楼....
今天晚上即可发布......
作者: 十六夜月华    时间: 2008-3-21 22:16
问题解决了,十分感谢楼主的帮忙{/qiang}{/qiang}
作者: 做游戏的新手    时间: 2008-3-22 00:59
...晕,似乎第3条没有什么作用呢!
作者: 沉影不器    时间: 2008-3-22 03:50
提示: 作者被禁止或删除 内容自动屏蔽
作者: 风雪优游    时间: 2008-3-22 03:59
发布完成,VIP+2
http://rpg.blue/web/htm/news1026.htm
作者: 风雪优游    时间: 2008-3-22 04:01
以下引用沉影不器于2008-3-21 19:50:30的发言:


以下引用风雪优游于2008-3-21 12:37:20的发言:

应该无什么问题了吧?有什么更新请放在一楼....
今天晚上即可发布......


不急,一直有个修复的窗口没写,先扔着好了
倒是已发布的东西有个更新需要麻烦:
http://rpg.blue/viewthread.php?tid=80303
2.增加从外部设置内部编号的功能
↑甭小看这条...除了第1条纠错,这关键更新


以下引用做游戏的新手于2008-3-21 16:59:52的发言:

...晕,似乎第3条没有什么作用呢!


没听懂


= =慢了一步,更新后请PM我
作者: 心情de对白    时间: 2008-3-22 05:08
这个脚本很不错的说{/hx}.我的游戏里至少肯定会用到.不过害怕测试脚本会有很多未知的问题
作者: 沉影不器    时间: 2008-3-22 05:26
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-3-23 04:34
提示: 作者被禁止或删除 内容自动屏蔽
作者: yzlsym    时间: 2008-3-25 02:51
BUG
范例中买了回复剂再卖出就出错咯```
作者: yzlsym    时间: 2008-3-25 02:55
BUG2
范例中棉袍无法修复
作者: 沉影不器    时间: 2008-3-25 05:45
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-3-26 03:48
提示: 作者被禁止或删除 内容自动屏蔽
作者: 电鳗    时间: 2008-4-13 21:03
如果修复的时候顺便把耐久最大上限给减掉一点点了{/tp}{/tp}...那就......
我见过一些网游就是这样.
还可以设置找某NPC提高耐久上限,那就更好..
此脚本很有潜力...{/wx}{/wx}
作者: 星界走私者    时间: 2008-4-20 21:10
有BUG!有耐久的装备卖出会有BUG!
作者: yzlsym    时间: 2008-4-21 00:37
很简单``初始装备不给就是了
作者: 沉影不器    时间: 2008-4-22 20:32
提示: 作者被禁止或删除 内容自动屏蔽
作者: 阿莱    时间: 2008-5-8 10:24
這腳本用不到在我的RTAB遊戲上{/dk}
作者: shinliwei    时间: 2008-8-7 04:18
VX不能用....
作者: lpylhy    时间: 2008-8-7 16:11
{/qiang}{/qiang}{/qiang}
作者: 沉影不器    时间: 2008-8-9 04:17
提示: 作者被禁止或删除 内容自动屏蔽
作者: a0995955874    时间: 2008-8-10 08:01
提示: 作者被禁止或删除 内容自动屏蔽
作者: 沉影不器    时间: 2008-8-10 17:28
提示: 作者被禁止或删除 内容自动屏蔽
作者: 越前リョーマ    时间: 2009-6-12 08:00
以下引用shinliwei于2008-8-6 20:18:24的发言:

VX不能用....

pia,你这是废话!




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1