function I6600869_GiftBag(MapID, InstanceID, TypeID, TargetID) aux.MultiRateReward(1, 300, 9600000) aux.MultiRateReward(0, 1500, 9600000) end function I6600869_CanUseGiftBag(MapID, InstanceID, TypeID, TargetID) local bRet, bIgnore = 0, false local FreeSize = role.GetBagFreeSize(TargetID) if(FreeSize < 1) then bRet = 40 end return bRet, bIgnore end aux.RegisterItemEvent(6600869, 1, "I6600869_GiftBag") aux.RegisterItemEvent(6600869, 0, "I6600869_CanUseGiftBag") function I6600834_GiftBag(MapID, InstanceID, TypeID, TargetID) local inmap = {1266372430,1266371662,1266371918,1266371150,1266371406,2835478787,2818701571,1266370638,1216039502,1266370894,1266370126,1266370382,1232817742,619033530,619032762,619034298,1826990631,1826990375,1826990119,1826991911,3870157173,619034554,619033786,870054631,3373741608,3373740840,3510278698,1174895199,1845506816,1845508352,1795174656,1795174912,1795175168,3911351072,2453654675,3772027712} for i=1, 36 do map.DeleteInstance(inmap[i], InstanceID) end end aux.RegisterItemEvent(6600834, 1, "I6600834_GiftBag") function I3070010_OnUse(MapID, InstanceID, TypeID, RoleID) end aux.RegisterItemEvent(3070010, 1, "I3070010_OnUse") function I3070010_canUse(MapID, InstanceID, TypeID, TargetID) local bRet, bIgnore = 0, false -- local map = {3424071976,3424072232,3424075048} local temp = false for i = 1,#map do if MapID == map[i] then temp = true end end if(temp == false) then --提示场景使用错误 bRet = 47 end return bRet, bIgnore end aux.RegisterItemEvent(3070010, 0, "I3070010_canUse") aux.RegisterItemEvent(3070013, 0, "I3070010_canUse") function I3070014_canUse(MapID, InstanceID, TypeID, TargetID) local bRet, bIgnore = 0, false -- local map = {3424073256,3424071976,3424071720,3424072488,3424072232,3000521423,3424072744,3424075048,3440849960,3424074792} local temp = false for i = 1,#map do if MapID == map[i] then temp = true end end if(temp == false) then --提示场景使用错误 bRet = 47 end return bRet, bIgnore end aux.RegisterItemEvent(3070014, 0, "I3070014_canUse")