|
做技能状态大家都知道,只能给武器做成带上自动有状态,其实装备也可以这样
Interface\SelfEquip\SelfEquip.lua 客户端里的这个脚本大家打开可以看到有类似
-------------------------------------------------------------------------
if ActionNecklace:GetName() == "重楼链" then
Clear_XSCRIPT();
Set_XSCRIPT_Function_Name("AddImpact")
Set_XSCRIPT_ScriptID(892002)
Set_XSCRIPT_Parameter(0,800)
Set_XSCRIPT_ParamCount(1)
Send_XSCRIPT();
else
Clear_XSCRIPT();
Set_XSCRIPT_Function_Name("AddImpact")
Set_XSCRIPT_ScriptID(892002)
Set_XSCRIPT_Parameter(0,801)
Set_XSCRIPT_ParamCount(1)
Send_XSCRIPT();
end
if ActionRing:GetName() == "重楼戒" or ActionRing_2:GetName() == "重楼戒" then
Clear_XSCRIPT();
Set_XSCRIPT_Function_Name("AddImpact")
Set_XSCRIPT_ScriptID(892002)
Set_XSCRIPT_Parameter(0,802)
Set_XSCRIPT_ParamCount(1)
Send_XSCRIPT();
else
Clear_XSCRIPT();
Set_XSCRIPT_Function_Name("AddImpact")
Set_XSCRIPT_ScriptID(892002)
Set_XSCRIPT_Parameter(0,803)
Set_XSCRIPT_ParamCount(1)
Send_XSCRIPT();
end
-------------------------------------------------------------------------
这样的脚本,我们注意里面 重楼链 就是触发物品脚本的关键词,这个名字必须和你物品数据库里的名字完全一样。然后里面的 892002 就是服务端里的 892002 脚本触发。800 和801 就是触发内容
------------------------------
elseif type==801 then--重楼链
if LuaFnHaveImpactOfSpecificDataIndex(sceneId, selfId, 26512) == 1 then
LuaFnCancelSpecificImpact(sceneId,selfId,26512)
end
elseif type==802 then--重楼戒
if GetItemCount(sceneId, selfId, 10453255) < 1 then
return
end
if LuaFnHaveImpactOfSpecificDataIndex(sceneId, selfId, 26525) == 0 then
LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 26525, 0 )
end
--------------------------------
这样的,你注意看里面的 26512 就是给予技能ID 26512
|
|