Advertisement
Guest User

Script

a guest
Jan 25th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. &item = cobblestone
  2. #itemslot = 0
  3.  
  4. //size of ender chest (one minus total size)
  5. #echestsize = 44
  6.  
  7. //size of backpacks (must all be the same size) (one minus total size)
  8. #bpsize = 26
  9.  
  10. //number of backpacks (one minus total)
  11. #bpnum = 3
  12.  
  13. //backpack indexer
  14. #bp = 0
  15.  
  16. //refill slot
  17. #refill = #bpsize + 8
  18.  
  19. //full stacks
  20. #start = #bpsize + 29
  21. #stop = #bpsize + 35
  22.  
  23. //buy
  24. do
  25. gui()
  26. slot(1)
  27. look(90,0)
  28. wait(200ms)
  29. key(attack)
  30. wait(500ms)
  31. if(%#itemslot% = 0)
  32. getslot(%&item%,#i)
  33. #itemslot = #i
  34. endif
  35. slotclick(80,left)
  36.  
  37. do
  38. wait(100ms)
  39. getslotitem(%#itemslot%,&check)
  40. until(%&check% = %&item%)
  41.  
  42. slotclick(%#itemslot%,right)
  43. wait(200ms)
  44.  
  45. do
  46. getslotitem(80,&fullcheck)
  47. slotclick(24,left)
  48. #rand = random(#r,30,50)
  49. wait(%#rand%ms)
  50. until(%&fullcheck% = %&item%)
  51. wait(50ms)
  52. gui()
  53. wait(200ms)
  54. echo(/sbmenu)
  55. do
  56. wait(100ms)
  57. getslotitem(31,&check2)
  58. until(%&check2% = "crafting_table")
  59. slotclick(31,left)
  60.  
  61. do
  62. wait(100ms)
  63. getslotitem(24,&check3)
  64. until(%&check3% = "barrier")
  65.  
  66. #cc = 0
  67. wait(300ms)
  68. for(#i,54,80)
  69. getslotitem(%#i%,&name,#ss)
  70. if((%#i% != 61) && (%#i% != 62))
  71. if(%&name% = %&item%)
  72. wait(40ms)
  73. slotclick(%#i%,left,true)
  74. #cc = #cc + 1
  75. if((%#cc% = 5))
  76. #wait = 0
  77. do
  78. wait(100ms)
  79. getslotitem(24,&name3)
  80. #wait = #wait + 1
  81. until((%&name3% = %&item%) || (%#wait% = 15))
  82. slotclick(24,left,true)
  83. #cc = 0
  84. endif
  85. endif
  86. endif
  87. next
  88.  
  89.  
  90. getslotitem(88,&name2,#ss2)
  91. getslotitem(61,&refill,#ss3)
  92. if((%#ss2% = 64) && (%#ss3% > 32))
  93. press(escape)
  94. wait(500ms)
  95.  
  96. //filling backpack
  97. look(90,80)
  98. slot(1)
  99. wait(500ms)
  100. key(use)
  101. wait(200ms)
  102.  
  103. getslotitem(%#bpsize%,&item2)
  104. if(%&item2% != "air")
  105. press(escape)
  106. wait(200ms)
  107. echo(/sbmenu)
  108. do
  109. wait(300ms)
  110. getslotitem(25,&check3)
  111. until(%&check3% = "ender_chest")
  112. slotclick(25,left)
  113. wait(200ms)
  114. for(#l,0,%#bpnum%)
  115. getslotitem(%#l%,&bpcheck)
  116. #next = #l + 1
  117. getslotitem(%#next%,&bpcheck2)
  118. if((%&bpcheck% = "air") && (%&bpcheck2% != "air"))
  119. #bpslot = #echestsize + 28
  120. slotclick(%#bpslot%,left,true)
  121. wait(200ms)
  122. slotclick(%#next%,left)
  123. wait(200ms)
  124. slotclick(%#bpslot%,left)
  125. wait(200ms)
  126. press(escape)
  127. wait(200ms)
  128. slot(1)
  129. wait(200ms)
  130. key(use)
  131. wait(200ms)
  132. break
  133. endif
  134. if((%&bpcheck% = "air") && (%&bpcheck2% = "air"))
  135. log("Stopping script")
  136. stop(all)
  137. endif
  138. next
  139. endif
  140.  
  141. for(#j,%#start%,%#stop%)
  142. slotclick(%#j%,left,true)
  143. wait(200ms)
  144. next
  145. wait(200ms)
  146. slotclick(%#refill%,left)
  147. wait(200ms)
  148.  
  149. //refilling
  150. for(#k,%#start%,%#stop%)
  151. getslotitem(%#k%,&aircheck)
  152. if(%&aircheck% = "air")
  153. slotclick(%#k%,right)
  154. wait(200ms)
  155. endif
  156. next
  157. slotclick(%#refill%,left)
  158. wait(200ms)
  159. gui()
  160. endif
  161. loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement