Project1

标题: 技能不扣魔扣血脚本。 [打印本页]

作者: 852410388    时间: 2009-5-28 15:16
提示: 作者被禁止或删除 内容自动屏蔽
作者: 雪流星    时间: 2009-5-28 15:33
http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/skill&tech=mp_cost_alter
作者: 越前リョーマ    时间: 2009-5-28 15:44
其实可以用事件做的啊……
作者: 雪流星    时间: 2009-5-28 16:22
以下引用越前リョーマ于2009-5-28 7:44:12的发言:
其实可以用事件做的啊……

嗯.....典型事件派的回答啊{/tp}{/tp}

补充一下:
用事件的话,使用技能自带的公共事件,先补回消耗的MP,再减掉相对应的HP

建议用改变显示技能颜色的脚本
让人能够分辨这个技能是消耗HP还是MP
作者: 852410388    时间: 2009-5-28 19:20
提示: 作者被禁止或删除 内容自动屏蔽
作者: 852410388    时间: 2009-5-28 19:22
提示: 作者被禁止或删除 内容自动屏蔽
作者: 852410388    时间: 2009-5-28 19:34
提示: 作者被禁止或删除 内容自动屏蔽
作者: 雪流星    时间: 2009-5-28 19:53
  1. class RPG::BaseItem
  2.   def word_color
  3.     self.note.split(/[\r\n]+/).each { |line|
  4.       if line =~ /\[word color H (\d+), (\d+), (\d+)\]/i
  5.         return Color.new($1.to_i, $2.to_i, $3.to_i)
  6.       elsif line =~ /\[wordcolor (\d+)\]/i
  7.         x = 64 + ($1.to_i % 8) * 8
  8.         y = 96 + ($1.to_i / 8) * 8
  9.         return Cache.system("Window").get_pixel(x, y)
  10.       end}
  11.     return Color.new(255, 255, 255)
  12.   end
  13. end
  14. class Window_Base < Window
  15.   def draw_item_name(item, x, y, enabled = true)
  16.     if item != nil
  17.       draw_icon(item.icon_index, x, y, enabled)
  18.       self.contents.font.color = item.word_color
  19.       self.contents.font.color.alpha = enabled ? 255 : 128
  20.       self.contents.draw_text(x + 24, y, 172, WLH, item.name)
  21.     end
  22.   end
  23. end
复制代码

使用方法:
在备注栏里面写
[word color 颜色ID]

[word color H R, G, B]





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