Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. --[[podmieniasz cala funkcje az do end end]]--
  2. function Close_Casino(force)
  3. if Casino_Started or force == true then
  4. for i = 0, Container_Index.Locker:ItemCount() - 1 do
  5. local Spot = Container_Index.Locker:GetItemData(i)
  6. if table.contains(_Decoration_Items, Item.GetName(Spot.id)) or Spot.id == 28915 then
  7. Container_Index.Locker:MoveItemToContainer(i, Container_Index.Depot:Index(), Container_Index.Depot:ItemCapacity() - 1, 50)
  8. wait(Self.Ping() + 350)
  9. for j = 1, #_Decoration_Items do
  10. if 0 < Container_Index.Locker:CountItemsOfID(Item.GetID(_Decoration_Items[j]:lower())) then
  11. Close_Casino()
  12. end
  13. end
  14. end
  15. end
  16. for i = 0, Container_Index.Locker:ItemCount() - 1 do
  17. local Spot = Container_Index.Locker:GetItemData(i)
  18. while table.contains(Dice_IDs, Spot.id) do
  19. Container_Index.Locker:MoveItemToContainer(i, Container_Index.Depot:Index(), Container_Index.Depot:ItemCapacity() - 1, Spot.count)
  20. wait(Self.Ping() + 100)
  21. break
  22. end
  23. end
  24. if _Casino_Depot == true then
  25. local TapestryID = Item.GetID(_Decoration_Tapestry:lower())
  26. if Map.GetTopMoveItem(Positions.Depot_Pos.x - 1, Positions.Depot_Pos.y, Positions.Depot_Pos.z).id == TapestryID then
  27. Map.PickupItem(Positions.Depot_Pos.x - 1, Positions.Depot_Pos.y, Positions.Depot_Pos.z, Container_Index.Depot:Index(), Container_Index.Depot:ItemCapacity() - 1)
  28. wait(Self.Ping() + 100)
  29. end
  30. end
  31. for i = 0, 15 do
  32. closeContainer(i)
  33. end
  34. Stop_Modules()
  35. Casino_Started = false
  36. end
  37. end
  38.  
  39.  
  40. --[[Podmieniasz cala funkcje az do konca]]--
  41.  
  42. function Decorations_Casino()
  43. for i = 1, #_Decoration_Items do
  44. local Decoration_ID = Item.GetID(_Decoration_Items[i]:lower())
  45. local Decoration_IDs = 28915
  46. if Container_Index.Locker:CountItemsOfID(Decoration_ID) == 0 then
  47. for slot = 0, Container_Index.Depot:ItemCount() - 1 do
  48. local slotItem = Container_Index.Depot:GetItemData(slot)
  49. local slotItemID = slotItem.id
  50. local slotItemName = Item.GetName(slotItemID)
  51. if Decoration_ID == slotItemID or Decoration_IDs == slotItemID then
  52. Container_Index.Depot:MoveItemToGround(slot, Positions.Depot_Pos.x, Positions.Depot_Pos.y, Positions.Depot_Pos.z, 50)
  53. wait(100)
  54. if Container_Index.Locker:CountItemsOfID(Decoration_ID) == 0 then
  55. print("Erro: Decora\231\227o n\227o colocada com sucesso, repetindo processo.")
  56. Decorations_Casino()
  57. else
  58. break
  59. end
  60. end
  61. end
  62. if Container_Index.Locker:CountItemsOfID(Decoration_ID) == 0 then
  63. print("Decoration [" .. _Decoration_Items[i] .. "] not found.")
  64. end
  65. end
  66. end
  67. for i = 1, #Dice_IDs do
  68. local Dice_ID = Dice_IDs[i]
  69. if CountItemsOfIDs(Container_Index.Locker, Dice_IDs) == 0 then
  70. for slot = 0, Container_Index.Depot:ItemCount() - 1 do
  71. local slotItem = Container_Index.Depot:GetItemData(slot)
  72. local slotItemID = slotItem.id
  73. if Dice_ID == slotItemID then
  74. Container_Index.Depot:MoveItemToGround(slot, Positions.Depot_Pos.x, Positions.Depot_Pos.y, Positions.Depot_Pos.z, 1)
  75. wait(100)
  76. if Container_Index.Locker:CountItemsOfID(Dice_ID) == 0 then
  77. print("Falha ao mover dado, tentando novamente.")
  78. Decorations_Casino()
  79. else
  80. break
  81. end
  82. end
  83. end
  84. end
  85. end
  86. if CountItemsOfIDs(Container_Index.Locker, Dice_IDs) == 0 then
  87. print("Zle otwarte kasyno otwieram jeszcze raz")
  88. Close_Casino()
  89. Stop_Casino = true
  90. SaveLog()
  91. wait(1000)
  92. Open_Casino:Start()
  93. Stop_Casino = false
  94. end
  95. if _Casino_Depot and Positions.Counter_Pos.x > Positions.Casino_Pos.x then
  96. for i = 0, Container_Index.Depot:ItemCount() - 1 do
  97. local Spot = Container_Index.Depot:GetItemData(i)
  98. while Spot.id == Item.GetID(_Decoration_Tapestry) do
  99. wait(Self.Ping() + 350)
  100. Container_Index.Depot:MoveItemToGround(i, Positions.Depot_Pos.x - 1, Positions.Depot_Pos.y, Positions.Depot_Pos.z, 1)
  101. break
  102. end
  103. end
  104. end
  105. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement