第一步
自己找个脚本写入以下函数 注意更改 x900009 为你的脚本编号
--宝宝自言自语
function x900009_OnSceneTimer(sceneId,selfId)
local pgH , pgL = LuaFnGetCurrentPetGUID(sceneId,selfId)
if pgH ~= nil and pgL ~= nil and pgH > 0 and pgL > 0 then
local nPetObjID = LuaFnGetPetObjIdByGUID(sceneId,selfId,pgH,pgL)
if nPetObjID >= 0 then
local ret = random(100)
local neirong=""
if ret < 31 then
neirong = "464"
elseif ret<61 then
neirong ="465"
else
neirong ="466"
end
Msg2Player( sceneId, selfId,"@*;npcpaopao;"..nPetObjID..";"..neirong,MSG2PLAYER_PARA )
end
end
end
***付费内容***
剩余 40% 内容需要支付 20.00
金币 后可完整阅读
支持付费阅读,激励作者创作更好的作品。
|