Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- UNSAFE(0);
- #wait = 300
- PROMPT(&amount,"$$?","How many do you want to make?",true,"1")
- // The crafting bench is arranged like this:
- // [1] [2] [3]
- // [4] [5] [6]
- // [7] [8] [9]
- PROMPT(@&recipe_prompt,"$$?","Input a recipe. Recipes are split into horizontal rows. Use 'blank' to leave the slot blank. Hit escape to use the last recipe input.",true,"%@&recipe_prompt%")
- &default_item = "cobblestone"
- &recipe_items[] = split(" ","%@&recipe_prompt%")
- arraysize(&recipe_items,#recipesize)
- log("%@&recipe_prompt%")
- key(use);
- wait(500ms);
- // Make items
- for(#for,1,%&amount%);
- // Crafting grid
- for(#forcraft,0,%#recipesize%);
- // If item cued
- if(%&recipe_items[%#forcraft%]% != "blank");
- // Search for items
- for(#forsearch,10,45);
- getslot(%&recipe_items[%#forcraft%]%,#stackslot,10);
- getslotitem(%#stackslot%,&id,#stacksize);
- if("%&id%" = "%&recipe_items[%#forcraft%]%");
- // Pick up item
- log("Found %&recipe_items[%#forcraft%]%");
- slotclick(%#stackslot%);
- wait(50ms);
- break();
- endif;
- next;
- // Place item in crafting grid
- #current_craft_slot = (%#forcraft%) + (1)
- slotclick(%#current_craft_slot%);
- wait(%#wait%ms);
- endif;
- next;
- // Pick created items
- slotclick(0,1,true);
- next;
- gui();
- ENDUNSAFE;
- stop();
- }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement