搜索
LUA

LUA

本版块未设置版块简介!请后台版块编辑添加。
  •  帖子: 115
  •  讨论: 115
  •  关注: 0

fb1.lua--宠物丢地删除

GA 发表于 2025-5-10 02:03:16 | 显示全部楼层 |阅读模式
103 0
--tbl_gl = tbl_gl or {};
--tbl_gl["哥布林"] = 1;
--tbl_gl["红帽哥布林"] = 1;
--tbl_gl["新手宠"] = 1;

Delegate.RegInit("fb1_Init");
function fb1_Init()
        Protocol.OnRecv("lua/Module/fb1.lua", "DropPet_Recv", %RECV_DP%);
end

function DropPet_Recv(fd,head,packet)
        local player = Protocol.GetCharByFd(fd);
        if Char.GetData(player,%对象_地图%) ~= 10 or Char.GetData(player,%对象_地图%) ~= 1000 then
                local SplitArray = Split(packet,":");
                local PetSlot = tonumber(SplitArray[3]);
                local _Pet = Char.GetPet(player,PetSlot);
                local bh = Char.GetData(_Pet,%对象_原名%);


                if tbl_gl[bh] ~= nil then
                        Char.DelSlotPet(player,PetSlot)
                        NLG.SystemMessage(player,"这类宠物丢地直接消失了。");
                        return 1;
                end
        end
end


回复

使用道具 举报

全部评论

暂无评论,期待您打破宁静

TA的帖子
相关帖子
发布 联系QQ