Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- &item = cobblestone
- #itemslot = 0
- //size of ender chest (one minus total size)
- #echestsize = 44
- //size of backpacks (must all be the same size) (one minus total size)
- #bpsize = 26
- //number of backpacks (one minus total)
- #bpnum = 3
- //backpack indexer
- #bp = 0
- //refill slot
- #refill = #bpsize + 8
- //full stacks
- #start = #bpsize + 29
- #stop = #bpsize + 35
- //buy
- do
- gui()
- slot(1)
- look(90,0)
- wait(200ms)
- key(attack)
- wait(500ms)
- if(%#itemslot% = 0)
- getslot(%&item%,#i)
- #itemslot = #i
- endif
- slotclick(80,left)
- do
- wait(100ms)
- getslotitem(%#itemslot%,&check)
- until(%&check% = %&item%)
- slotclick(%#itemslot%,right)
- wait(200ms)
- do
- getslotitem(80,&fullcheck)
- slotclick(24,left)
- #rand = random(#r,30,50)
- wait(%#rand%ms)
- until(%&fullcheck% = %&item%)
- wait(50ms)
- gui()
- wait(200ms)
- echo(/sbmenu)
- do
- wait(100ms)
- getslotitem(31,&check2)
- until(%&check2% = "crafting_table")
- slotclick(31,left)
- do
- wait(100ms)
- getslotitem(24,&check3)
- until(%&check3% = "barrier")
- #cc = 0
- wait(300ms)
- for(#i,54,80)
- getslotitem(%#i%,&name,#ss)
- if((%#i% != 61) && (%#i% != 62))
- if(%&name% = %&item%)
- wait(40ms)
- slotclick(%#i%,left,true)
- #cc = #cc + 1
- if((%#cc% = 5))
- #wait = 0
- do
- wait(100ms)
- getslotitem(24,&name3)
- #wait = #wait + 1
- until((%&name3% = %&item%) || (%#wait% = 15))
- slotclick(24,left,true)
- #cc = 0
- endif
- endif
- endif
- next
- getslotitem(88,&name2,#ss2)
- getslotitem(61,&refill,#ss3)
- if((%#ss2% = 64) && (%#ss3% > 32))
- press(escape)
- wait(500ms)
- //filling backpack
- look(90,80)
- slot(1)
- wait(500ms)
- key(use)
- wait(200ms)
- getslotitem(%#bpsize%,&item2)
- if(%&item2% != "air")
- press(escape)
- wait(200ms)
- echo(/sbmenu)
- do
- wait(300ms)
- getslotitem(25,&check3)
- until(%&check3% = "ender_chest")
- slotclick(25,left)
- wait(200ms)
- for(#l,0,%#bpnum%)
- getslotitem(%#l%,&bpcheck)
- #next = #l + 1
- getslotitem(%#next%,&bpcheck2)
- if((%&bpcheck% = "air") && (%&bpcheck2% != "air"))
- #bpslot = #echestsize + 28
- slotclick(%#bpslot%,left,true)
- wait(200ms)
- slotclick(%#next%,left)
- wait(200ms)
- slotclick(%#bpslot%,left)
- wait(200ms)
- press(escape)
- wait(200ms)
- slot(1)
- wait(200ms)
- key(use)
- wait(200ms)
- break
- endif
- if((%&bpcheck% = "air") && (%&bpcheck2% = "air"))
- log("Stopping script")
- stop(all)
- endif
- next
- endif
- for(#j,%#start%,%#stop%)
- slotclick(%#j%,left,true)
- wait(200ms)
- next
- wait(200ms)
- slotclick(%#refill%,left)
- wait(200ms)
- //refilling
- for(#k,%#start%,%#stop%)
- getslotitem(%#k%,&aircheck)
- if(%&aircheck% = "air")
- slotclick(%#k%,right)
- wait(200ms)
- endif
- next
- slotclick(%#refill%,left)
- wait(200ms)
- gui()
- endif
- loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement