注册函数:LuaFnGetItemTableIndexByIndex
功能说明:取当前位置的物品索引(物品ID)
参数说明:
sceneId :场景编号
selfId :调用者ID
itemIndex :背包物品索引
***付费内容***
参考案例代码:
-- 获得装备点
local equip_point = LuaFnGetBagEquipType(sceneId,selfId, EquipIndex)
if equip_point == -1 then
return 1
end
-- 获取装备ID
local nKfsID116 = LuaFnGetItemTableIndexByIndex( sceneId, selfId, 116 )
-- 取消BUFF
if nKfsID116 == 10500010 then
LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId,selfId,20179,0)
end
案例:
--获取装备位是否装备武魂
local nKfsID = LuaFnGetItemTableIndexByIndex( sceneId, selfId, 110 )
if nKfsID == nil or nKfsID == 0 then --判断武魂是否装备
x900004_NotifyTip( sceneId, selfId, "你当前没有装备武魂" )
return 0
end
剩余 45% 内容需要支付 10.00
金币 后可完整阅读
支持付费阅读,激励作者创作更好的作品。
|