|
发表于 2010-11-27 12:38:05
|
显示全部楼层
如果是mush的话,我这里有个现成的,我自己写的。
触发器:
enabled="y"
match="^[>]*\s*看起来(.*)想杀死你!.*$"
regexp="y"
send_to="12"
sequence="999"
>
BeKilledBy("%1")
enabled="y"
keep_evaluating="y"
match="^[>]*(\S*)\s*=\s*(\w*\s*\w*).*$"
regexp="y"
repeat="y"
send_to="12"
sequence="999"
>
CheckKiller("%1","%2")
脚本函数:
function BeKilledBy(name)
Killername = name;
DoAfter(0.3,"id here");
end
function CheckKiller(name,id)
if (name == Killername) then
temp = split(id,",");
if (table.getn(temp) > 0) then
StartFight(temp[1],0.1);
end
end
end
function StartFight(name,tm)
pfbusy = GetAliasInfo("pfbusy",2)
if (pfbusy ~= nil) then
if (string.sub(pfbusy,string.len(pfbusy)) == "1") then
pfbusy = string.sub(pfbusy,1,sttring.len(pfbusy) - 2) .. name;
end
DoAfterSpecial(tm,"RunBusyPerform(\"busy_timer\",\""..pfbusy.."\")",12);
end
pfbusy1 = GetAliasInfo("pfbusy1",2)
if (pfbusy1 ~= nil) then
if (string.sub(pfbusy1,string.len(pfbusy1)) == "1") then
pfbusy1 = string.sub(pfbusy1,1,string.len(pfbusy1) - 2) .. name;
end
DoAfterSpecial(tm+0.5,"RunBusyPerform(\"busy_timer1\",\""..pfbusy1.."\")",12);
end
AddTimer("ls_timer",0,0,1,"yun recover\nyun regenerate",1,"")
end
我这里没有叫杀,而是被叫杀的时候启动战斗。 战斗的话,就是设置出busy perform的timer(支持2个),以及每秒一次的吸气。 |
|