Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. AntiTrash = Module("Anti-Trash", function(mod)
  2. if Casino_Started then
  3. local die_count = 0
  4. x = Self.Position().x
  5. y = Self.Position().y
  6. z = Self.Position().z
  7. local deco_count = 0
  8. local posx, posy, posz = 0, 0, 0
  9. for _, die in ipairs(Dice_IDs) do
  10. die_count = die_count + Container_Index.Locker:CountItemsOfID(die)
  11. end
  12. for i, deco in pairs(_Decoration_Items) do
  13. deco_count = deco_count + Container_Index.Locker:CountItemsOfID(Item.GetID(deco))
  14. end
  15. for i = Container_Index.Locker:ItemCount() - 1, 0, -1 do
  16. local Spot = Container_Index.Locker:GetItemData(i)
  17. posx, posy, posz = Positions.Counter_Pos.x, Positions.Counter_Pos.y, Positions.Counter_Pos.z
  18.  
  19. if Spot.id == 3043 then
  20. wait(100)
  21. Container_Index.Locker:MoveItemToGround(i, posx, posy, posz, Spot.count)
  22. end
  23. if die_count > 1 and table.contains(Dice_IDs, Spot.id) and 1 < CountItemsOfIDs(Container_Index.Locker, {
  24. 5792,
  25. 5793,
  26. 5794,
  27. 5795,
  28. 5796,
  29. 5797
  30. }) then
  31. print("Movendo " .. Item.GetName(Spot.id) .. " " .. Spot.count .. "x.")
  32. Container_Index.Locker:MoveItemToContainer(i, Container_Index.Trash:Index(), Container_Index.Trash:ItemCapacity() - 1, Spot.count)
  33. die_count = die_count - 1
  34. elseif deco_count > #_Decoration_Items and table.contains(_Decoration_Items, Item.GetName(Spot.id)) then
  35. print("Movendo " .. Item.GetName(Spot.id) .. " " .. Spot.count .. "x.")
  36. Container_Index.Locker:MoveItemToContainer(i, Container_Index.Trash:Index(), Container_Index.Trash:ItemCapacity() - 1, Spot.count)
  37. deco_count = deco_count - 1
  38. end
  39. end
  40. for i = 0, Container_Index.Locker:ItemCount() - 1 do
  41. local Spot = Container_Index.Locker:GetItemData(i)
  42. if not table.contains(Depot_IDs, Spot.id) and not table.contains(_Decoration_Items, Item.GetName(Spot.id)) and not table.contains(Dice_IDs, Spot.id) then
  43. Container_Index.Locker:MoveItemToGround(2, x, y, z, 100)
  44. break
  45. end
  46. end
  47. end
  48. mod:Delay(Self.Ping())
  49. end, false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement