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
class RPG::BaseItem
def word_color
self.note.split(/[\r\n]+/).each { |line|
if line =~ /\[word color H (\d+), (\d+), (\d+)\]/i
return Color.new($1.to_i, $2.to_i, $3.to_i)
elsif line =~ /\[wordcolor (\d+)\]/i
x = 64 + ($1.to_i % 8) * 8
y = 96 + ($1.to_i / 8) * 8
return Cache.system("Window").get_pixel(x, y)
end}
return Color.new(255, 255, 255)
end
end
class Window_Base < Window
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = item.word_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
end
end
end
复制代码
使用方法:
在备注栏里面写
[word color 颜色ID]
或
[word color H R, G, B]
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1