Advertisement
Sanwi

Craft3x3

Mar 29th, 2014
1,299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. $${
  2. set(@craft3x3)
  3.  
  4. // This script crafts items in a 3x3 grid. Useful for crafting hay bales, gold blocks, etc, etc
  5. // The first (top left) slot in your inventory should be filled with the item to be placed in the crafting grid
  6. // Here's a screenshot of the slot it should be placed in: http://prntscr.com/357f54
  7. // Do not have partial stacks of this item anywhere in your inventory
  8. // Face a crafting bench before launching the macro
  9.  
  10. // Config
  11.  
  12. // Wait this many milliseconds between actions. ttk recommended that I set this to 500 for civcraft, as to not violate cheating policy
  13. #wait = 500
  14.  
  15. // Make this many stacks of the output (set this to "$$?" to open a text box in game to define it when you launch the script)
  16. &make = $$?
  17.  
  18. // End Config
  19.  
  20. // Do not edit below this line
  21.  
  22. key(use);
  23. wait(500ms);
  24.  
  25. getslotitem(10,&item);
  26.  
  27. if(%&item% != "air");
  28. for(#for,1,%&make%);
  29. for(#forcraft,1,9);
  30. for(#forxp,10,44);
  31. getslot(%&item%,#stackslot,%#forxp%);
  32. getslotitem(%#stackslot%,#id,#stacksize);
  33. if(%#stacksize% = 64);
  34. slotclick(%#stackslot%);
  35. wait(%#wait%ms);
  36. break();
  37. else;
  38. gui();
  39. @&craft3x3 = false
  40. log("Out of items");
  41. stop();
  42. endif;
  43. next;
  44. slotclick(%#forcraft%);
  45. wait(%#wait%ms);
  46. next;
  47. slotclick(0,1,true);
  48. next;
  49. else;
  50. log("No item detected in first slot");
  51. gui();
  52. wait(500ms);
  53. @&craft3x3 = false
  54. stop();
  55. endif;
  56.  
  57. gui();
  58.  
  59. unset(@craft3x3)
  60. }$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement