人家都要你自己研究了 想告诉你早就说了
【Buff触发: \LuaScripts\System\Buff.Lua】
--添加Buff触发
function AddBuffFunc_1(actor, buffId, nTime)
local RaceId = actor:getRace()--种族ID
if RaceId == 0 then
actor:sendMsg(2,"添加Buff触发["..tostring(buffId).."]作用生效"..tostring(nTime).."秒", -1, -1)
end
end
--移除Buff触发
function DelBuffFunc_1(actor, buffId)
local RaceId = actor:getRace()--种族ID
if RaceId == 0 then
actor:sendMsg(2,"移除Buff触发["..tostring(buffId).."]恢复正常", -1, -1)
end
end
--受攻击Buff触发
function StruckBuffFunc_1(actor, tagActor, buffId)
local actorname = actor:getCharName()
local tagActorName = tagActor:getCharName()
print("["..actorname.."]被["..tagActorName.."]攻击["..tostring(buffId).."]--[受攻击Buff触发]")
if actor:checkSkill(58) == 1 then
--使用指定技能反击
actor:useSpellEx(58, tagActor:getX(), tagActor:getY(), tagActor)
end
end
不会LUA的话 就继续提建议把 |