不加蓝色这行无错,加上蓝色这行就出错,求解!
function MagicBuff_E(ActName,TagName,play)
if(TagName:getRace()~=0 and TagName:getRace()~=66) then
for i in pairs(Buff_5) do
if Buff_5.name == ActName:getFasguinWeapon() then
if s.share.getRandom(1,Buff_5.buff) == 1 then
local omaxhp = TagName:getMaxHp()
local ohp = TagName:getHp()
local ohpf = math.round(ohp / omaxhp * 100)
--print("怪物剩余百分百血量:"..ohpf.." 他的血量"..omaxhp.."-"..ohp)
if ohpf < 9 then
TagName:setHp(0)
play:sendCenterMsg(0,254,play:getCharName().."佩戴["..ActName:getFasguinWeapon().."]斩首buff生效,直接斩杀目标!",1, 3, 3)
end
end
end
end
end
补充内容 (2021-5-13 01:29):
字体斜了看不清,看二楼! |