Advertisement
Guest User

Untitled

a guest
Sep 1st, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 10.36 KB | None | 0 0
  1. options:
  2.     notMinion: &eThis is not your minion!
  3.     minionName: %player%'s minion
  4.     minionNameColor: yellow
  5.     armorColor: 16759145
  6.     balance: player's balance
  7.     balanceInFunction: {_p}'s balance
  8.  
  9. # /summon armor_stand ~ ~ ~ {Invulnerable:1b,NoBasePlate:1b,ShowArms:1b,Small:1b,ArmorItems:[{id:"leather_boots",Count:1b,tag:{display:{color:16759145}}},{id:"leather_leggings",Count:1b,tag:{display:{color:16759145}}},{id:"leather_chestplate",Count:1b,tag:{display:{color:16759145}}},{id:"leather_helmet",Count:1b,tag:{display:{color:16759145}}}],HandItems:[{id:"minecraft:diamond_pickaxe",Count:1b},{}],CustomName:"{\"text\":\"%player%'s minion\",\"color\":\"yellow\"}",CustomNameVisible:1b,Pose:{Head:[357f,0f,0f],RightArm:[354f,0f,0f]}}
  10.  
  11. on place of iron block:
  12.     spawn armor stand at block above event-block
  13.     add "{Type:iron,MinionOwner:[{%player's uuid%}],Invulnerable:1b,NoBasePlate:1b,ShowArms:1b,Small:1b,ArmorItems:[{id:""leather_boots"",Count:1b,tag:{display:{color:{@armorColor}}}},{id:""leather_leggings"",Count:1b,tag:{display:{color:{@armorColor}}}},{id:""leather_chestplate"",Count:1b,tag:{display:{color:{@armorColor}}}},{id:""leather_helmet"",Count:1b,tag:{display:{color:{@armorColor}}}}],HandItems:[{id:""minecraft:iron_pickaxe"",Count:1b},{}],Pose:{Head:[357f,0f,0f],RightArm:[354f,0f,0f]}, Slots:1,CustomName:""{\""text\"":\""{@minionName}\"",\""color\"":\""{@minionNameColor}\""}"",CustomNameVisible:1b}" to nbt of last spawned entity
  14.     set {blocksmined.stack.1::%last spawned entity%} to 0
  15.     set {blocksmined.stack.2::%last spawned entity%} to 0
  16.     set {blocksmined.stack.3::%last spawned entity%} to 0
  17.     set {blocksmined.stack.4::%last spawned entity%} to 0
  18.     set {blocksmined.stack.5::%last spawned entity%} to 0
  19.     set {blocksmined.stack.6::%last spawned entity%} to 0
  20.     set {blocksmined.stack.7::%last spawned entity%} to 0
  21.     set {blocksmined.stack.8::%last spawned entity%} to 0
  22.     set {blocksmined.stack.9::%last spawned entity%} to 0
  23.     loop all blocks within radius 5 of block under last spaned entity:
  24.         y axis of loop-block = y axis of block under event-entity
  25.         loop-block is not iron block
  26.         set loop-block to iron ore
  27.  
  28. every 15 seconds:
  29.     loop all entities:
  30.         loop-entity is armor stand
  31.         if nbt of loop-entity contains "Type:iron":
  32.             mine(loop-entity, iron)
  33.  
  34. on right click on armor stand:
  35.     nbt of event-entity contains "MinionOwner:[{%player's uuid%}]":
  36.         nbt of event-entity contains "Type:iron":
  37.             open virtual chest inventory with size 5 named "Iron Minion" to player
  38.             format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 36, 37, 38, 39, 40, 41, 42, 43, and 44 with black stained glass pane named " "
  39.             format gui slot 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, and 32 with dark gray stained glass pane named  " "
  40.             if nbt of event-entity contains "Slots:1":
  41.                 format gui slot 16, 17, 24, 25, 26, 33, 34, and 35 of player with barrier named " "
  42.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  43.             else if nbt of event-entity contains "Slots:2":
  44.                 format gui slot 17, 24, 25, 26, 33, 34, and 35 of player with barrier named " "
  45.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  46.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  47.             else if nbt of event-entity contains "Slots:3":
  48.                 format gui slot 24, 25, 26, 33, 34, and 35 of player with barrier named " "
  49.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  50.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  51.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  52.             else if nbt of event-entity contains "Slots:4":
  53.                 format gui slot 25, 26, 33, 34, and 35 of player with barrier named " "
  54.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  55.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  56.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  57.                 format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
  58.             else if nbt of event-entity contains "Slots:5":
  59.                 format gui slot 26, 33, 34, and 35 of player with barrier named " "
  60.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  61.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  62.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  63.                 format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
  64.                 format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
  65.             else if nbt of event-entity contains "Slots:6":
  66.                 format gui slot 33, 34, and 35 of player with barrier named " "
  67.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  68.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  69.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  70.                 format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
  71.                 format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
  72.                 format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
  73.             else if nbt of event-entity contains "Slots:7":
  74.                 format gui slot 34 and 35 of player with barrier named " "
  75.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  76.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  77.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  78.                 format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
  79.                 format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
  80.                 format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
  81.                 format gui slot 33 of player with {blocksmined.stack.7::%event-entity%} of iron ore named "&7Iron Ore"
  82.             else if nbt of event-entity contains "Slots:8":
  83.                 format gui slot 25 of player with barrier named " "
  84.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  85.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  86.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  87.                 format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
  88.                 format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
  89.                 format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
  90.                 format gui slot 33 of player with {blocksmined.stack.7::%event-entity%} of iron ore named "&7Iron Ore"
  91.                 format gui slot 34 of player with {blocksmined.stack.8::%event-entity%} of iron ore named "&7Iron Ore"
  92.             else if nbt of event-entity contains "Slots:9":
  93.                 format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
  94.                 format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
  95.                 format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
  96.                 format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
  97.                 format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
  98.                 format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
  99.                 format gui slot 33 of player with {blocksmined.stack.7::%event-entity%} of iron ore named "&7Iron Ore"
  100.                 format gui slot 34 of player with {blocksmined.stack.8::%event-entity%} of iron ore named "&7Iron Ore"
  101.                 format gui slot 35 of player with {blocksmined.stack.9::%event-entity%} of iron ore named "&7Iron Ore"
  102.     else:
  103.         send "&eThat is not your minion!"
  104.  
  105. function mine(a: entity, t: item):
  106.     loop all blocks within radius 5 of {_a}:
  107.         y axis of loop-block = y axis of {_a} - 1:
  108.         event-block is {_t}
  109.         chance of 30%:
  110.             if {blocksmined.stack.1::%{_a}%} < 64:
  111.                 add 1 to {blocksmined.stack.1::%{_a}%}
  112.                 set event-block to air
  113.             else if {blocksmined.stack.2::%{_a}%} < 64:
  114.                 nbt of {_a} contains "Slots:2", "Slots:3", "Slots:4", "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
  115.                 add 1 to {blocksmined.stack.2::%{_a}%}
  116.                 set event-block to air
  117.             else if {blocksmined.stack.3::%{_a}%} < 64:
  118.                 nbt of {_a} contains "Slots:3", "Slots:4", "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
  119.                 add 1 to {blocksmined.stack.3::%{_a}%}
  120.                 set event-block to air
  121.             else if {blocksmined.stack.4::%{_a}%} < 64:
  122.                 nbt of {_a} contains "Slots:4", "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
  123.                 add 1 to {blocksmined.stack.4::%{_a}%}
  124.                 set event-block to air
  125.             else if {blocksmined.stack.5::%{_a}%} < 64:
  126.                 nbt of {_a} contains "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
  127.                 add 1 to {blocksmined.stack.5::%{_a}%}
  128.                 set event-block to air
  129.             else if {blocksmined.stack.6::%{_a}%} < 64:
  130.                 nbt of {_a} contains "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
  131.                 add 1 to {blocksmined.stack.6::%{_a}%}
  132.                 set event-block to air
  133.             else if {blocksmined.stack.7::%{_a}%} < 64:
  134.                 nbt of {_a} contains "Slots:7", "Slots:8", or "Slots:9"
  135.                 add 1 to {blocksmined.stack.7::%{_a}%}
  136.                 set event-block to air
  137.             else if {blocksmined.stack.8::%{_a}%} < 64:
  138.                 nbt of {_a} contains "Slots:8" or "Slots:9"
  139.                 add 1 to {blocksmined.stack.8::%{_a}%}
  140.                 set event-block to air
  141.             else if {blocksmined.stack.9::%{_a}%} < 64:
  142.                 nbt of {_a} contains "Slots:9"
  143.                 add 1 to {blocksmined.stack.9::%{_a}%}
  144.                 set event-block to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement