Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # MH - Upgrade
- # By Pewax
- #
- variables:
- {kit.rank.%player%} = 0
- {kills.%player%} = 0
- {donator.%player%} = false
- # Setspawn
- command /MHsetspawn:
- trigger:
- if player is op:
- set {MHspawn} to location of player
- command /MHdonator <text> <player>:
- #executable by: console
- trigger:
- if arg-1 is "give":
- set {donator.%arg-2%} to true
- else if arg-1 is "take":
- set {donator.%arg-2%} to false
- else:
- stop
- # On join give starter kit
- on join:
- apply saturation 20 to the event-player for 9999 seconds
- teleport event-player to {MHspawn}
- make console execute "/mhkit 0 %event-player%"
- # On kill rankup kit
- on damage:
- if victim is a player:
- if attacker is a player:
- wait 1 tick
- if victim is dead:
- add 1 to {kills.%attacker%}
- heal the attacker
- if {donator.%attacker%} is true:
- add 2 to {kit.rank.%attacker%}
- else:
- add 1 to {kit.rank.%attacker%}
- wait 3 ticks
- make console execute "/mhkit %{kit.rank.%attacker%}% %attacker%"
- on respawn:
- teleport event-player to {MHspawn}
- wait 3 ticks
- clear inventory of the event-player
- set {kit.rank.%event-player%} to 0
- make console execute "/mhkit 0 %event-player%"
- # Kills command
- command /kills <offline player>:
- trigger:
- if arg-1 is set:
- if {kills.%arg-1%} is set:
- send "&e%arg-1% &6has got &e%{kills.%arg-1%}% &6kills!" to player
- else:
- send "&cThat player has never been on the server!" to player
- else:
- send "&eYou &6have got &e%{kills.%arg-1%}% &6kills!" to player
- # Kits
- command /MHkit <integer> <player>:
- executable by: console
- trigger:
- heal arg-2
- if arg-1 is 0:
- clear inventory of arg-2
- make console execute "/give %arg-2% minecraft:wooden_axe 1 0 {Unbreakable:1}"
- else if arg-1 is 1:
- remove a wooden axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:wooden_sword 1 0 {Unbreakable:1}"
- else if arg-1 is 2:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest leather_chestplate 1 0 {Unbreakable:1}"
- else if arg-1 is 3:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet leather_boots 1 0 {Unbreakable:1}"
- else if arg-1 is 4:
- make console execute "/replaceitem entity %arg-2% slot.armor.head leather_helmet 1 0 {Unbreakable:1}"
- else if arg-1 is 5:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs leather_leggings 1 0 {Unbreakable:1}"
- else if arg-1 is 6:
- remove a wooden sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:wooden_axe 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 7:
- remove a wooden axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:wooden_sword 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 8:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest golden_chestplate 1 0 {Unbreakable:1}"
- else if arg-1 is 9:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet golden_boots 1 0 {Unbreakable:1}"
- else if arg-1 is 10:
- make console execute "/replaceitem entity %arg-2% slot.armor.head golden_helmet 1 0 {Unbreakable:1}"
- else if arg-1 is 11:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs golden_leggings 1 0 {Unbreakable:1}"
- else if arg-1 is 12:
- remove a wooden sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:golden_axe 1 0 {Unbreakable:1}"
- else if arg-1 is 13:
- remove a golden axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:golden_sword 1 0 {Unbreakable:1}"
- else if arg-1 is 14:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest golden_chestplate 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 15:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet golden_boots 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 16:
- make console execute "/replaceitem entity %arg-2% slot.armor.head golden_helmet 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 17:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs golden_leggings 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 18:
- remove a golden sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:golden_axe 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 19:
- remove a golden axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:golden_sword 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 20:
- remove a golden sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:stone_axe 1 0 {Unbreakable:1}"
- else if arg-1 is 21:
- remove a stone axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:stone_sword 1 0 {Unbreakable:1}"
- else if arg-1 is 22:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest chainmail_chestplate 1 0 {Unbreakable:1}"
- else if arg-1 is 23:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet chainmail_boots 1 0 {Unbreakable:1}"
- else if arg-1 is 24:
- make console execute "/replaceitem entity %arg-2% slot.armor.head chainmail_helmet 1 0 {Unbreakable:1}"
- else if arg-1 is 25:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs chainmail_leggings 1 0 {Unbreakable:1}"
- else if arg-1 is 26:
- remove a stone sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:stone_axe 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 27:
- remove a stone axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:stone_sword 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 28:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest chainmail_chestplate 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 29:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet chainmail_boots 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 30:
- make console execute "/replaceitem entity %arg-2% slot.armor.head chainmail_helmet 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 31:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs chainmail_leggings 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 32:
- remove a stone sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:iron_axe 1 0 {Unbreakable:1}"
- else if arg-1 is 33:
- remove a iron axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:iron_sword 1 0 {Unbreakable:1}"
- else if arg-1 is 34:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest iron_chestplate 1 0 {Unbreakable:1}"
- else if arg-1 is 35:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet iron_boots 1 0 {Unbreakable:1}"
- else if arg-1 is 36:
- make console execute "/replaceitem entity %arg-2% slot.armor.head iron_helmet 1 0 {Unbreakable:1}"
- else if arg-1 is 37:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs iron_leggings 1 0 {Unbreakable:1}"
- else if arg-1 is 38:
- remove a iron sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:iron_axe 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 39:
- remove a iron axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:iron_sword 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 40:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest iron_chestplate 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 41:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet iron_boots 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 42:
- make console execute "/replaceitem entity %arg-2% slot.armor.head iron_helmet 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 43:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs iron_leggings 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 44:
- remove a iron sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:diamond_axe 1 0 {Unbreakable:1}"
- else if arg-1 is 45:
- remove a diamond axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:diamond_sword 1 0 {Unbreakable:1}"
- else if arg-1 is 46:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest diamond_chestplate 1 0 {Unbreakable:1}"
- else if arg-1 is 47:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet diamond_boots 1 0 {Unbreakable:1}"
- else if arg-1 is 48:
- make console execute "/replaceitem entity %arg-2% slot.armor.head diamond_helmet 1 0 {Unbreakable:1}"
- else if arg-1 is 49:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs diamond_leggings 1 0 {Unbreakable:1}"
- else if arg-1 is 50:
- remove a diamond sword from arg-2's inventory
- make console execute "/give %arg-2% minecraft:diamond_axe 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 51:
- remove a diamond axe from arg-2's inventory
- make console execute "/give %arg-2% minecraft:diamond_sword 1 0 {Unbreakable:1,ench:[{id:16,lvl:1}]}"
- else if arg-1 is 52:
- make console execute "/replaceitem entity %arg-2% slot.armor.chest diamond_chestplate 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 53:
- make console execute "/replaceitem entity %arg-2% slot.armor.feet diamond_boots 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 54:
- make console execute "/replaceitem entity %arg-2% slot.armor.head diamond_helmet 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else if arg-1 is 55:
- make console execute "/replaceitem entity %arg-2% slot.armor.legs diamond_leggings 1 0 {Unbreakable:1,ench:[{id:0,lvl:1}]}"
- else:
- send "&cYou have reached the max rank and can no longer advance!"
Advertisement
Add Comment
Please, Sign In to add comment