function I6602134_GiftBag(MapID, InstanceID, TypeID, TargetID) local GuildLevel = role.GetGuildAtt(TargetID, 1) local guildID = guild.GetRoleGuildID(TargetID) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 102,900205) msg.AddMsgEvent(MsgID, 2, TargetID) msg.AddMsgEvent(MsgID, 19, guildID) msg.AddMsgEvent(MsgID, 9, GuildLevel) msg.DispatchWorldMsgEvent(MsgID) end aux.RegisterItemEvent(6600365, 1, "I6602134_GiftBag") function I6602134_CanUse(MapID, InstanceID, TypeID, TargetID) local Guild = guild.GetRoleGuildID(TargetID) local GuildPos = guild.GetRoleGuildPos(Guild, TargetID) if Guild == nil or Guild == -1 or Guild == 4294967295 or GuildPos == 0 or GuildPos == 1 or GuildPos == 4 or GuildPos == 5 or GuildPos == 6 then return 38, false else return 0, false end end aux.RegisterItemEvent(6600365, 0, "I6602134_CanUse")