Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. --[[
  2. VENDA DE ITENS
  3. BY
  4. BORGES
  5. --]]
  6.  
  7. local toBackpack = "golden backpack" -- nome da backpack em que vai jogar os itens
  8.  
  9. ----------------------
  10. -- NÃO MECHA DAQUI----
  11. -----PARA BAIXO-------
  12. ----------------------
  13.  
  14. local contfrom = Container.New('Your Inbox')
  15.  
  16.  
  17.  
  18. print("*Venda de ITENS para Rock In A Hard Place - HEXERA*")
  19.  
  20. registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
  21.  
  22. local chat = Channel.Open("Borges Scripts", onSpeak, onClose)
  23. chat:SendOrangeMessage("Borges", "Esse script vende a maioria dos itens de Deeplings.")
  24. chat:SendOrangeMessage("Borges", "Servidor para qual foi feito: Hexera. Comece no Depot Gray Island.")
  25. chat:SendRedMessage("Borges", "Coloque todos os itens que vai vender no INBOX (coloque no market e tire que vai direto).")
  26.  
  27. Walker.Start()
  28.  
  29. function onWalkerSelectLabel(labelName)
  30.  
  31. if (labelName == "Withdraw") then
  32. Self.CloseContainers()
  33. wait(1000)
  34. Self.OpenMainBackpack(true)
  35. wait(1000)
  36. Container(0):OpenChildren(toBackpack)
  37. wait(1000)
  38. while not contfrom:isOpen() do
  39. locker = Container.New("Locker")
  40. if not locker:isOpen() then -- opens locker
  41. Self.OpenLocker()
  42. wait(800, 1000)
  43. end
  44. local dp = Container.New('Locker')
  45. for mailspot, touse in dp:iItems() do
  46. if touse.id == 12902 then
  47. dp:UseItem(mailspot, true)
  48. wait(500, 1700)
  49. contfrom = Container.New('Your Inbox')
  50. end
  51. end
  52. end
  53. while contfrom:isOpen() do
  54. local DestinationBp = Container.GetByName(toBackpack)
  55. local item = contfrom:GetItemData(0)
  56. if not (Self.Cap() - Item.GetWeight(item.id)*item.count < 1) and contfrom:ItemCount() > 0 then
  57. if DestinationBp:ItemCount() == DestinationBp:ItemCapacity() then
  58. DestinationBp:UseItem(DestinationBp:ItemCount()-1,true)
  59. else
  60. contfrom:MoveItemToContainer(0,DestinationBp:Index(),DestinationBp:ItemCount())
  61. wait(500,550)
  62. end
  63. else
  64. Empty = true
  65. end
  66. if Empty then break end
  67.  
  68.  
  69. end
  70. elseif (labelName == "Fim") then
  71. print("Reload")
  72. loadSettings("#Vender ItensDeep", "All")
  73. end
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement