SHARE
TWEET

Untitled

a guest Oct 13th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #0.2.4
  2.  
  3.  
  4.  
  5. options:
  6.    
  7.     config-loc: plugins/ThePIT/config.yml
  8.    
  9.     messages-loc: plugins/ThePIT/messages.yml
  10.    
  11.     sb-loc: plugins/ThePIT/scoreboard.yml      
  12.    
  13.     titles-loc: plugins/ThePIT/titles.yml  
  14.        
  15.  
  16. on script load:
  17.     set {_&} to "&"
  18.     if yaml value "chat-enable" from file "{@config-loc}" is not set:
  19.         set yaml value "chat-enable" from file "{@config-loc}" to "true"
  20.     if yaml value "bungeecord" from file "{@config-loc}" is not set:
  21.         set yaml value "bungeecord" from file "{@config-loc}" to "false"           
  22.     if yaml value "chat-format" from file "{@config-loc}" is not set:  
  23.         set yaml value "chat-format" from file "{@config-loc}" to "%{_&}%7[%{_&}%e[level]%{_&}%7] [player] %{_&}%8%{_&}%l- %{_&}%7[message]"
  24.     if yaml value "SHOP-ID" from file "{@config-loc}" is not set:
  25.         set yaml value "SHOP-ID" from file "{@config-loc}" to 0
  26.     if yaml value "UPGRADE-ID" from file "{@config-loc}" is not set:
  27.         set yaml value "UPGRADE-ID" from file "{@config-loc}" to 1
  28.     if yaml value "USE-PRESSURE-PLATE" from file "{@config-loc}" is not set:
  29.         set yaml value "USE-PRESSURE-PLATE" from file "{@config-loc}" to "true"    
  30.     if yaml value "LEVE-UP-SOUND" from file "{@config-loc}" is not set:
  31.         set yaml value "LEVE-UP-SOUND" from file "{@config-loc}" to "LEVEL_UP" 
  32.     if yaml value "KILL-SOUND" from file "{@config-loc}" is not set:
  33.         set yaml value "KILL-SOUND" from file "{@config-loc}" to "ORB_PICKUP"  
  34.        
  35.     if yaml list "ENABLED-WORLDS" from file "{@config-loc}" is not set:
  36.         add "world" to yaml list "ENABLED-WORLDS" from file "{@config-loc}"
  37.         add "thepit" to yaml list "ENABLED-WORLDS" from file "{@config-loc}"
  38.  
  39.     if yaml value "KILL-XP" from file "{@config-loc}" is not set:
  40.         set yaml value "KILL-XP" from file "{@config-loc}" to 15
  41.        
  42.     if yaml value "KILL-GOLD" from file "{@config-loc}" is not set:
  43.         set yaml value "KILL-GOLD" from file "{@config-loc}" to 10 
  44.        
  45.     if yaml value "ASSIST-XP" from file "{@config-loc}" is not set:
  46.         set yaml value "ASSIST-XP" from file "{@config-loc}" to 10
  47.        
  48.     if yaml value "ENDER_CHEST-NEED-LEVEL" from file "{@config-loc}" is not set:
  49.         set yaml value "ENDER_CHEST-NEED-LEVEL" from file "{@config-loc}" to 50
  50.        
  51.     if yaml value "ASSIST-GOLD" from file "{@config-loc}" is not set:
  52.         set yaml value "ASSIST-GOLD" from file "{@config-loc}" to 5
  53.        
  54.     if yaml value "prefix" from file "{@messages-loc}" is not set:
  55.         set yaml value "prefix" from file "{@messages-loc}" to "%{_&}%e%{_&}%lTHE PIT %{_&}%8%{_&}%l- %{_&}%7" 
  56.        
  57.     if yaml value "kill-message" from file "{@messages-loc}" is not set:
  58.         set yaml value "kill-message" from file "{@messages-loc}" to "%{_&}%aKILL! %{_&}%7on [%{_&}%e[level]%{_&}%7] [victim] %{_&}%b%{_&}%l+[xp]XP %{_&}%6%{_&}%l+[gold]"     
  59.        
  60.     if yaml value "assist-message" from file "{@messages-loc}" is not set:
  61.         set yaml value "assist-message" from file "{@messages-loc}" to "%{_&}%aASSIST! %{_&}%7on [%{_&}%e[level]%{_&}%7] [player] %{_&}%b%{_&}%l+[xp]XP %{_&}%6%{_&}%l+[gold]" 
  62.        
  63.     if yaml value "kill-streak" from file "{@messages-loc}" is not set:
  64.         set yaml value "kill-streak" from file "{@messages-loc}" to "%{_&}%c%{_&}%lSTREAK! %{_&}%7of %{_&}%c[streak] %{_&}%7by [level] [player]"   
  65.  
  66.     if yaml value "level-up" from file "{@messages-loc}" is not set:
  67.         set yaml value "level-up" from file "{@messages-loc}" to "%{_&}%3%{_&}%lLEVEL UP! %{_&}%7[%{_&}%e[level]%{_&}%7]"  
  68.        
  69.     if yaml value "ENDER_CHEST-NEED-LEVEL-MSG" from file "{@messages-loc}" is not set:
  70.         set yaml value "ENDER_CHEST-NEED-LEVEL-MSG" from file "{@messages-loc}" to "%{_&}%cYou need level [level] to use ender chest!"         
  71.  
  72.     if yaml value "item-purchase" from file "{@messages-loc}" is not set:
  73.         set yaml value "item-purchase" from file "{@messages-loc}" to "%{_&}%aPURCHASE! %{_&}%6[item]" 
  74.        
  75.     if yaml value "perk-purchase" from file "{@messages-loc}" is not set:      
  76.         set yaml value "perk-purchase" from file "{@messages-loc}" to "%{_&}%aPURCHASED PERK!" 
  77.        
  78.     if yaml value "perk-selected" from file "{@messages-loc}" is not set:      
  79.         set yaml value "perk-selected" from file "{@messages-loc}" to "%{_&}%c%{_&}%lSELECTED PERK"        
  80.        
  81.     if yaml value "no-gold" from file "{@messages-loc}" is not set:    
  82.         set yaml value "no-gold" from file "{@messages-loc}" to "%{_&}%c%{_&}%lNOT ENOUGHT GOLD!"      
  83.  
  84.     if yaml value "in-game" from file "{@messages-loc}" is not set:    
  85.         set yaml value "in-game" from file "{@messages-loc}" to "%{_&}%aYou are in game."  
  86.  
  87.     if yaml value "not-in-game" from file "{@messages-loc}" is not set:    
  88.         set yaml value "not-in-game" from file "{@messages-loc}" to "%{_&}%c%{_&}%lYou are not in game."   
  89.  
  90.     if yaml value "in-fight-status" from file "{@messages-loc}" is not set:    
  91.         set yaml value "in-fight-status" from file "{@messages-loc}" to "%{_&}%3%{_&}%lYou are in %{_&}%cFighting %{_&}%3status."  
  92.        
  93.     if yaml value "level-up-title" from file "{@titles-loc}" is not set:       
  94.         set yaml value "level-up-title" from file "{@titles-loc}" to "%{_&}%b%{_&}%lLEVEL UP!"     
  95.  
  96.     if yaml value "level-up-subtitle" from file "{@titles-loc}" is not set:    
  97.         set yaml value "level-up-subtitle" from file "{@titles-loc}" to "%{_&}%7[%{_&}%e[old]%{_&}%7] %{_&}%3%{_&}%l-> %{_&}%7[%{_&}%e[new]%{_&}%7]"   
  98.        
  99.     if yaml value "death-title" from file "{@titles-loc}" is not set:  
  100.         set yaml value "death-title" from file "{@titles-loc}" to "%{_&}%c%{_&}%lYOU DIED"
  101.        
  102.     if yaml value "death-subtitle" from file "{@titles-loc}" is not set:   
  103.         set yaml value "death-subtitle" from file "{@titles-loc}" to "%{_&}%e" 
  104.        
  105.     if yaml value "website" from file "{@sb-loc}" is not set:  
  106.         set yaml value "website" from file "{@sb-loc}" to "%{_&}%eMC.SERVER.ORG"
  107.  
  108.        
  109.     delete {THEPIT::*}
  110.     set {THEPIT::CONFIG::CHAT} to yaml value "chat-enable" from file "{@config-loc}"
  111.     set {THEPIT::CONFIG::CHAT-FORMAT} to yaml value "chat-format" from file "{@config-loc}"
  112.     set {THEPIT::CONFIG::BUNGEECORD} to yaml value "bungeecord" from file "{@config-loc}"
  113.     set {THEPIT::CONFIG::SHOP-ID} to yaml value "SHOP-ID" from file "{@config-loc}"
  114.     set {THEPIT::CONFIG::UPGRADE-ID} to yaml value "UPGRADE-ID" from file "{@config-loc}"
  115.     set {THEPIT::CONFIG::PRESSURE-PLATE} to yaml value "USE-PRESSURE-PLATE" from file "{@config-loc}"
  116.     set {THEPIT::CONFIG::LEVE-UP-SOUND} to yaml value "LEVE-UP-SOUND" from file "{@config-loc}"
  117.     set {THEPIT::CONFIG::KILL-SOUND} to yaml value "KILL-SOUND" from file "{@config-loc}"      
  118.     set {THEPIT::CONFIG::ENABLED-WORLDS::*} to yaml list "ENABLED-WORLDS" from file "{@config-loc}"    
  119.     set {THEPIT::CONFIG::ENDER_CHEST-NEED-LEVEL} to yaml value "ENDER_CHEST-NEED-LEVEL" from file "{@config-loc}"
  120.    
  121.     set {THEPIT::CONFIG::KILL-XP} to yaml value "KILL-XP" from file "{@config-loc}"    
  122.     set {THEPIT::CONFIG::KILL-GOLD} to yaml value "KILL-GOLD" from file "{@config-loc}"
  123.     set {THEPIT::CONFIG::ASSIST-XP} to yaml value "ASSIST-XP" from file "{@config-loc}"    
  124.     set {THEPIT::CONFIG::ASSIST-GOLD} to yaml value "ASSIST-GOLD" from file "{@config-loc}"
  125.    
  126.     set {THEPIT::MESSAGES::PREFIX} to yaml value "prefix" from file "{@messages-loc}"
  127.     set {THEPIT::MESSAGES::KILL} to yaml value "kill-message" from file "{@messages-loc}"
  128.     set {THEPIT::MESSAGES::ASSIST} to yaml value "assist-message" from file "{@messages-loc}"  
  129.     set {THEPIT::MESSAGES::STREAK} to yaml value "kill-streak" from file "{@messages-loc}" 
  130.     set {THEPIT::MESSAGES::LEVEL-UP} to yaml value "level-up" from file "{@messages-loc}"  
  131.     set {THEPIT::MESSAGES::ITEM-PURCHASE} to yaml value "item-purchase" from file "{@messages-loc}"    
  132.     set {THEPIT::MESSAGES::PERK-PURCHASE} to yaml value "perk-purchase" from file "{@messages-loc}"    
  133.     set {THEPIT::MESSAGES::SELECTED-PERK} to yaml value "perk-selected" from file "{@messages-loc}"    
  134.     set {THEPIT::MESSAGES::NO-GOLD} to yaml value "no-gold" from file "{@messages-loc}"
  135.     set {THEPIT::MESSAGES::IN-GAME} to yaml value "in-game" from file "{@messages-loc}"    
  136.     set {THEPIT::MESSAGES::NOT-IN-GAME} to yaml value "not-in-game" from file "{@messages-loc}"    
  137.     set {THEPIT::MESSAGES::YOU-ARE-IN-FIGHT} to yaml value "in-fight-status" from file "{@messages-loc}"   
  138.     set {THEPIT::MESSAGES::ENDER_CHEST-NEED-LEVEL-MSG} to yaml value "ENDER_CHEST-NEED-LEVEL-MSG" from file "{@messages-loc}"  
  139.    
  140.     set {THEPIT::TITLES::LEVEL-UP-TITLE} to yaml value "level-up-title" from file "{@titles-loc}"  
  141.     set {THEPIT::TITLES::LEVEL-UP-SUBTITLE} to yaml value "level-up-subtitle" from file "{@titles-loc}"
  142.     set {THEPIT::TITLES::DEATH-TITLE} to yaml value "death-title" from file "{@titles-loc}"
  143.     set {THEPIT::TITLES::DEATH-SUBTITLE} to yaml value "death-subtitle" from file "{@titles-loc}"  
  144.    
  145.     set {THEPIT::SB::WEBSITE} to yaml value "website" from file "{@sb-loc}"
  146.  
  147.    
  148.        
  149. function pit_join(p: player):
  150.     set {_uuid} to uuid of {_p}
  151.     set {pit.%{_uuid}%.state} to "ingame"
  152.     teleport {_p} to {pit.spawn}
  153.     if {pit.%{_uuid}%.level} is not set:
  154.         set {pit.%{_uuid}%.level} to 1
  155.     if {pit.%{_uuid}%.xp} is not set:
  156.         set {pit.%{_uuid}%.xp} to 0    
  157.     if {pit.%{_uuid}%.xp-need} is not set:
  158.         set {pit.%{_uuid}%.xp-need} to 100 
  159.     if {pit.%{_uuid}%.gold} is not set:
  160.         set {pit.%{_uuid}%.gold} to 0  
  161.     set {pit.%{_uuid}%.streak} to 0
  162.     set {pit.%{_uuid}%.status} to "&aIdling"
  163.     pit_clear({_p})
  164.     pit_updatetag({_p})
  165.     pit_equip({_p})
  166.    
  167. function pit_leave(p: player):
  168.     set {_uuid} to uuid of {_p}
  169.     delete stylish scoreboard "PIT-%{_p}%"
  170.     delete {pit.%{_uuid}%.streak}
  171.     delete {pit.%{_uuid}%.state}
  172.     delete {pit.%{_uuid}%.damage::*}
  173.     pit_clear({_p})
  174.     make console execute command "nte player %{_p}% clear"     
  175.     teleport {_p} to {pit.leave}
  176.    
  177.    
  178. function pit_clear(p: player): 
  179.     clear {_p}'s inventory
  180.     clear {_p}'s level
  181.     remove all effects from {_p}   
  182.  
  183. on join:
  184.     if {THEPIT::CONFIG::BUNGEECORD} is "true":
  185.         pit_join(player)
  186.         stop
  187.     else:
  188.         stop
  189.        
  190. command /pit [<text>] [<player>] [<integer>]:
  191.     trigger:
  192.         if arg-1 is "join":
  193.             if {pit.%uuid of player%.state} is not set:
  194.                 pit_join(player)
  195.                 stop
  196.             else:
  197.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::IN-GAME}%"
  198.                 stop   
  199.         if arg-1 is "leave":
  200.             if {THEPIT::CONFIG::BUNGEECORD} is "false":
  201.                 if {pit.%uuid of player%.state} is "ingame":
  202.                     pit_leave(player)
  203.                     stop
  204.                 else:
  205.                     send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NOT-IN-GAME}%"
  206.                     stop
  207.             else:
  208.                 stop
  209.         if arg-1 is "setgold": 
  210.             if player has permission "PIT.SETGOLD":    
  211.                 if arg-2 is set:
  212.                     if arg-3 is set:
  213.                         set {pit.%uuid of arg-2%.gold} to arg-3
  214.                         send "%colored {THEPIT::MESSAGES::PREFIX}% &7Setted &b%arg-2%&b's &6&lGold &7have been set to &c%arg-3%"   
  215.                         stop
  216.                     else:
  217.                         send "%colored {THEPIT::MESSAGES::PREFIX}% &7Specify a number"     
  218.                         stop
  219.                 else:
  220.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &7Specify a player"
  221.                     stop
  222.         if arg-1 is "addgold": 
  223.             if player has permission "PIT.ADDGOLD":    
  224.                 if arg-2 is set:
  225.                     if arg-3 is set:
  226.                         add arg-3 to {pit.%uuid of arg-2%.gold}
  227.                         send "%colored {THEPIT::MESSAGES::PREFIX}% &7You added &6&l%arg-3% Gold &7to &c%arg-2%&b's &6&lGold"   
  228.                         stop
  229.                     else:
  230.                         send "%colored {THEPIT::MESSAGES::PREFIX}% &7Specify a number"     
  231.                         stop
  232.                 else:
  233.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &7Specify a player"
  234.                     stop                   
  235.         if arg-1 is "setlevel":
  236.             if player has permission "PIT.SETLEVEL":       
  237.                 if arg-2 is set:
  238.                     if arg-3 is set:
  239.                         if {pit.%uuid of arg-2%.level} is set:
  240.                             set {pit.%uuid of arg-2%.level} to arg-3
  241.                             set {pit.%uuid of arg-2%.xp} to 0
  242.                             set {pit.%uuid of arg-2%.xp-need} to 100*{pit.%uuid of arg-2%.level}
  243.                             pit_updatetag(arg-2)
  244.                             send "%colored {THEPIT::MESSAGES::PREFIX}% &7Setted &b%arg-2%&b's &bLevel &7have been set to &c%arg-3%"
  245.                             stop
  246.                         else:
  247.                             send "%colored {THEPIT::MESSAGES::PREFIX}% &c%arg-2% &anever played"
  248.                             stop
  249.                     else:
  250.                         send "%colored {THEPIT::MESSAGES::PREFIX}% &7Specify a number"     
  251.                         stop
  252.                 else:
  253.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &7Specify a player"
  254.                     stop                   
  255.         if arg-1 is "spawn":
  256.             if {pit.%uuid of player%.state} is "ingame":
  257.                 if {pit.%uuid of player%.status} is "&aIdling":
  258.                     remove all golden_apple from player
  259.                     remove all heads from player
  260.                     teleport player to {pit.spawn}
  261.                     stop
  262.                 else:
  263.                     send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::YOU-ARE-IN-FIGHT}%"
  264.                     stop
  265.             else:
  266.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NOT-IN-GAME}%"
  267.                 stop
  268.         if arg-1 is "setspawn":
  269.             if player has permission "PIT.ADMIN":
  270.                 set {pit.spawn} to player's location
  271.                 send "%colored {THEPIT::MESSAGES::PREFIX}% &cSpawn Set"
  272.                 stop
  273.         if arg-1 is "setshop":
  274.             if player has permission "PIT.ADMIN":
  275.                 if citizen id of target entity is set:
  276.                     set {THEPIT::CONFIG::SHOP-ID} to citizen id of target entity
  277.                     set yaml value "SHOP-ID" from file "{@config-loc}" to citizen id of target entity
  278.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &cShop Set"
  279.                     stop   
  280.                 else:
  281.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &aYou have to look at npc when you execute this command"
  282.                     stop
  283.         if arg-1 is "editmode":
  284.             if player has permission "PIT.EDITMODE":           
  285.                 if {THEPIT::CONFIG::BUNGEECORD} is "true":
  286.                     delete {pit.%uuid of player%.state}
  287.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &cYou are now able to build."
  288.             else:
  289.                 stop                   
  290.         if arg-1 is "setleave":
  291.             if player has permission "PIT.ADMIN":
  292.                 set {pit.leave} to location of player
  293.                 send "%colored {THEPIT::MESSAGES::PREFIX}% &cLeave location set"                   
  294.         if arg-1 is "setupgrade":
  295.             if player has permission "PIT.ADMIN":
  296.                 if citizen id of target entity is set:
  297.                     set {THEPIT::CONFIG::UPGRADE-ID} to citizen id of target entity
  298.                     set yaml value "UPGRADE-ID" from file "{@config-loc}" to citizen id of target entity
  299.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &cShop Set"
  300.                     stop   
  301.                 else:
  302.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &aYou have to look at npc when you execute this command"
  303.                     stop
  304.         else:
  305.             send "&3&l● &7&l------------------------------ &3&l●"  
  306.             send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7Join"
  307.             send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7Spawn"        
  308.             send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7Leave"    
  309.             if player has permission "PIT.ADMIN":
  310.                 send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7SetGold <PLAYER> <NUMBER>"
  311.                 send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7SetLevel <PLAYER> <NUMBER>"   
  312.                 if {THEPIT::CONFIG::BUNGEECORD} is "true":
  313.                     send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7EditMode" 
  314.                 send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7SetSpawn"
  315.                 send "%colored {THEPIT::MESSAGES::PREFIX}% &8&l● &7SetLeave"
  316.                 send "&3&l● &7&l------------------------------ &3&l●"
  317.                 stop
  318.             else:
  319.                 stop
  320.  
  321. on command:
  322.     if {pit.%uuid of player%.state} is "ingame":
  323.         if "%full command%" is "spawn":
  324.             cancel event
  325.             make player execute command "pit spawn"
  326.        
  327.  
  328.  
  329.  
  330. on quit:
  331.     pit_leave(player)
  332.     stop
  333.    
  334.    
  335.    
  336. on pressure plate:
  337.     if {pit.%uuid of player%.state} is "ingame":
  338.         if {THEPIT::CONFIG::PRESSURE-PLATE} is "true":
  339.             cancel event   
  340.             push the player upwards at speed 0.4
  341.             push the player forwards at speed 1.2
  342.         else:
  343.             stop               
  344.     else:
  345.         stop       
  346.    
  347.    
  348.    
  349.    
  350. every second:
  351.     loop all players:
  352.         if {pit.%uuid of loop-player%.state} is "ingame":
  353.             if stylish scoreboard "PIT-%loop-player%" does not exist:
  354.                 create new stylish scoreboard named "PIT-%loop-player%"
  355.                 loop 11 times:
  356.                     create a new id based score "PIT-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "PIT-%loop-player%"
  357.             set {_need} to {pit.%uuid of loop-player%.xp-need}-{pit.%uuid of loop-player%.xp}
  358.             set stylish scoreboard of loop-player to "PIT-%loop-player%"               
  359.             set title of stylish scoreboard "PIT-%loop-player%" to "&e&lTHE PIT"
  360.             set the text of id "PIT-%loop-player%Slot11" to "&7%now%"
  361.             set the text of id "PIT-%loop-player%Slot10" to "&1&e"
  362.             set the text of id "PIT-%loop-player%Slot9" to "&7Level &7[&e%{pit.%uuid of loop-player%.level}%&7]"
  363.             set the text of id "PIT-%loop-player%Slot8" to "&7Needed XP: &b%{_need}%"
  364.             set the text of id "PIT-%loop-player%Slot7" to "&2&9"
  365.             set the text of id "PIT-%loop-player%Slot6" to "&7Gold: &6&l%{pit.%uuid of loop-player%.gold}%"
  366.             set the text of id "PIT-%loop-player%Slot5" to "&3&9"
  367.             set the text of id "PIT-%loop-player%Slot4" to "&7Status: %{pit.%uuid of loop-player%.status}%"
  368.             set the text of id "PIT-%loop-player%Slot3" to "&7Streaks: &a%{pit.%uuid of loop-player%.streak}%"
  369.             set the text of id "PIT-%loop-player%Slot2" to "&4&9"
  370.             set the text of id "PIT-%loop-player%Slot1" to "%colored {THEPIT::SB::WEBSITE}%"
  371.  
  372.    
  373.    
  374.    
  375. on damage of player:
  376.     if {pit.%uuid of victim%.state} is "ingame":
  377.         if damage cause is fall:
  378.             cancel event
  379.         if damage cause is void:
  380.             cancel event
  381.             kill victim
  382.         if "%damage cause%" is "projectile":
  383.             if {pit.%uuid of attacker%.perk::slot-1} or {pit.%uuid of attacker%.perk::slot-2} is "ENDLESS-QUIVER": 
  384.                 give 3 arrows to attacker          
  385.         if attacker is player:
  386.             if attacker is not victim:
  387.                 wait 1 tick
  388.                 loop 20 times:
  389.                     set {_health.%loop-integer%.%victim%} to "&7❤"
  390.                     loop-integer is greater than max health of victim
  391.                     set {_health.%loop-integer%.%victim%} to ""
  392.                 loop rounded health of victim times:
  393.                     set {_health.%loop-integer%.%victim%} to "&4❤"
  394.                 set action bar of attacker to coloured "%{_health.1.%victim%}%%{_health.2.%victim%}%%{_health.3.%victim%}%%{_health.4.%victim%}%%{_health.5.%victim%}%%{_health.6.%victim%}%%{_health.7.%victim%}%%{_health.8.%victim%}%%{_health.9.%victim%}%%{_health.10.%victim%}%%{_health.11.%victim%}%%{_health.12.%victim%}%%{_health.13.%victim%}%%{_health.14.%victim%}%%{_health.15.%victim%}%%{_health.16.%victim%}%%{_health.17.%victim%}%%{_health.18.%victim%}%%{_health.19.%victim%}%%{_health.20.%victim%}%"
  395.                
  396.                 set {_sec.%uuid of victim%} to 10
  397.                 set {_sec.%uuid of attacker%} to 10
  398.                 if {pit.%uuid of victim%.status} is "&aIdling":
  399.                     set {pit.%uuid of victim%.status} to "&cFighting"
  400.                     while {pit.%uuid of victim%.status} is "&cFighting":
  401.                         remove 1 from {_sec.%uuid of victim%}
  402.                         wait 1 seconds
  403.                         if {_sec.%uuid of victim%} is 0:
  404.                             set {pit.%uuid of victim%.status} to "&aIdling"
  405.                            
  406.                 if {pit.%uuid of attacker%.status} is "&aIdling":
  407.                     set {pit.%uuid of attacker%.status} to "&cFighting"
  408.                     while {pit.%uuid of attacker%.status} is "&cFighting":
  409.                         remove 1 from {_sec.%uuid of attacker%}
  410.                         wait 1 seconds
  411.                         if {_sec.%uuid of attacker%} is 0:
  412.                             set {pit.%uuid of attacker%.status} to "&aIdling"
  413.                
  414.                 set {_dmg} to damage
  415.                 add rounded {_dmg} to {pit.%uuid of victim%.damage::%uuid of attacker%}
  416.                 if {pit.%uuid of victim%.damage::%uuid of attacker%}  > 10:
  417.                     set metadata value "ASSIST" of victim to attacker
  418.                     delete {pit.%uuid of victim%.damage::%uuid of attacker%}
  419.                    
  420.                     while {_sec.assist.%uuid of victim%} > 1:
  421.                         remove 1 from {_sec.assist.%uuid of victim%}
  422.                         wait 1 seconds
  423.                         {_sec.assist.%uuid of victim%} = 1:
  424.                             delete metadata value "ASSIST" of victim
  425.                        
  426.                    
  427.                    
  428.                    
  429.                        
  430.     else:
  431.         stop
  432.  
  433.  
  434.        
  435. function pit_give_gp(p: player):
  436.     set {_uuid} to uuid of {_p}
  437.     if {pit.%{_uuid}%.perk::slot-1} or {pit.%{_uuid}%.perk::slot-2} = "GOLDEN-HEADS":
  438.         if number of head in {_p}'s inventory = 0 or 1:
  439.             give skull of "StackedGold" parsed as offline player named "&6&lGolden Head" to {_p}
  440.     else:
  441.         if number of golden_apple in {_p}'s inventory = 0 or 1:
  442.             give 1 golden_apple to {_p}
  443.            
  444.        
  445. on death of player:
  446.     if {pit.%uuid of victim%.state} is "ingame":
  447.         set death message to ""
  448.         teleport victim to {pit.spawn}
  449.         clear drops
  450.         if metadata value "ASSIST" of victim is set:
  451.             set {_G} to metadata value "ASSIST" of victim
  452.             if {_G} is not attacker:
  453.                 set {_k} to {THEPIT::MESSAGES::ASSIST}
  454.                 set {_uuid} to uuid of {_G}
  455.                 replace all "[player]" in {_k} with "%victim%" 
  456.                 replace all "[level]" in {_k} with "%{pit.%{_uuid}%.level}%"
  457.                 replace all "[gold]" in {_k} with "%{THEPIT::CONFIG::ASSIST-GOLD}%"
  458.                 replace all "[xp]" in {_k} with "%{THEPIT::CONFIG::ASSIST-XP}%"                
  459.                 add {THEPIT::CONFIG::ASSIST-GOLD} to {pit.%{_uuid}%.gold}
  460.                 add {THEPIT::CONFIG::ASSIST-XP} to {pit.%{_uuid}%.xp}              
  461.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_k}%" to {_G}         
  462.         add 1 to {pit.%uuid of attacker%.streak}
  463.         add {THEPIT::CONFIG::KILL-GOLD} to {pit.%uuid of attacker%.gold}
  464.         add {THEPIT::CONFIG::KILL-XP} to {pit.%uuid of attacker%.xp}
  465.         set {pit.%uuid of victim%.streak} to 0
  466.         if {pit.%uuid of attacker%.streak} = 5 or 10 or 15 or 25 or 30 or 35 or 40 or 45 or 50:
  467.             set {_x} to {THEPIT::MESSAGES::STREAK}
  468.             replace all "[streak]" in {_x} with "%{pit.%uuid of attacker%.streak}%"        
  469.             replace all "[level]" in {_x} with "%{pit.%uuid of attacker%.level}%"
  470.             replace all "[player]" in {_x} with "%attacker's displayname%"         
  471.             loop all players in attacker's world:
  472.                 if {pit.%uuid of loop-player%.state} is "ingame":
  473.                     send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to loop-player  
  474.         set {_x} to {THEPIT::MESSAGES::KILL}
  475.         replace all "[level]" in {_x} with "%{pit.%uuid of victim%.level}%"
  476.         replace all "[victim]" in {_x} with "%victim's displayname%"
  477.         replace all "[gold]" in {_x} with "%{THEPIT::CONFIG::KILL-GOLD}%"
  478.         replace all "[xp]" in {_x} with "%{THEPIT::CONFIG::KILL-XP}%"      
  479.         send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to attacker 
  480.         bw_play_sound(attacker, {THEPIT::CONFIG::KILL-SOUND})
  481.         pit_give_gp(attacker)
  482.         pit_check_level(attacker)
  483.         send victim title "%colored {THEPIT::TITLES::DEATH-TITLE}%" with subtitle "%colored {THEPIT::TITLES::DEATH-SUBTITLE}%" for 1 seconds
  484.         wait 0.2 seconds
  485.         force victim to respawn
  486.         wait 0.2 seconds
  487.         teleport victim to {pit.spawn}
  488.         pit_updatetag(victim)
  489.         pit_equip(victim)      
  490.         set {pit.%uuid of victim%.status} to "&aIdling"
  491.         set action bar of attacker to coloured "&7&l%victim% &a&lKILL" 
  492.     else:
  493.         stop
  494.    
  495. on right click with head:
  496.     if {pit.%uuid of player%.state} is "ingame":
  497.         if name of event-item is "&6&lGolden Head":
  498.             if {pit.%uuid of player%.perk::slot-1} or {pit.%uuid of player%.perk::slot-2} = "GOLDEN-HEADS":
  499.                 cancel event
  500.                 remove regeneration from player
  501.                 remove absorption from player
  502.                 apply regeneration 2 to the player for 5 seconds
  503.                 apply absorption 1 to the player for 120 seconds
  504.                 remove event-item from player
  505.             else:
  506.                 stop
  507.         else:
  508.             stop               
  509.     else:
  510.         stop
  511.  
  512. on right click on ender_chest:
  513.     if {pit.%uuid of player%.state} is "ingame":
  514.         if {pit.%uuid of player%.level} < {THEPIT::CONFIG::ENDER_CHEST-NEED-LEVEL}:
  515.             cancel event
  516.             set {_x} to {THEPIT::MESSAGES::ENDER_CHEST-NEED-LEVEL-MSG}
  517.             replace all "[level]" in {_x} with "%{THEPIT::CONFIG::ENDER_CHEST-NEED-LEVEL}%"
  518.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" 
  519.  
  520. function pit_check_level(p: player):   
  521.     set {_uuid} to uuid of {_p}
  522.     if {pit.%{_uuid}%.xp} >= {pit.%{_uuid}%.xp-need}:
  523.         remove {pit.%{_uuid}%.xp-need} from {pit.%{_uuid}%.xp}
  524.         set {_old} to {pit.%{_uuid}%.level}
  525.         add 1 to {pit.%{_uuid}%.level}
  526.         pit_updatetag({_p})
  527.         set {_x} to {THEPIT::MESSAGES::LEVEL-UP}
  528.         replace all "[level]" with "%{pit.%{_uuid}%.level}%" in {_x}
  529.         send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to {_p}
  530.         set {_x} to {THEPIT::TITLES::LEVEL-UP-TITLE}
  531.         set {_y} to {THEPIT::TITLES::LEVEL-UP-SUBTITLE}
  532.         replace all "[old]" with "%{_old}%" in {_x}
  533.         replace all "[old]" with "%{_old}%" in {_y}    
  534.         replace all "[new]" with "%{pit.%{_uuid}%.level}%" in {_x}
  535.         replace all "[new]" with "%{pit.%{_uuid}%.level}%" in {_y}     
  536.         send {_p} title "%colored {_x}%" with subtitle "%colored {_y}%" for 3 seconds
  537.         bw_play_sound({_p}, {THEPIT::CONFIG::LEVE-UP-SOUND})
  538.         set {_p}'s level to {pit.%{_uuid}%.level}
  539.         if {pit.%{_uuid}%.level} > 1:
  540.             set {pit.%{_uuid}%.xp-need} to 100*{pit.%{_uuid}%.level}
  541.             stop
  542.         else:
  543.             add 100 to {pit.%{_uuid}%.xp-need}
  544.             stop
  545.  
  546. function bw_play_sound(p: player, sound: text):
  547.     play sound "%{_sound}%" to {_p} with volume 100 and pitch 100
  548.    
  549. function pit_perk_shop(p: player, slot: integer):  
  550.     set {_uuid} to uuid of {_p}
  551.     open virtual chest inventory with size 3 named "Chose a Perk" to {_p}
  552.     make a gui slot 10 of {_p} with gold block named "&cGolden Heads" with lore "||&7Golden apples you earn turn into &6Golden Heads||||&8&l- &7COST: &6&l500||" to run:   
  553.         if {pit.%{_uuid}%.perk::golden-heads} is not set:
  554.             if {pit.%{_uuid}%.gold} >= 500:
  555.                 set {pit.%{_uuid}%.perk::golden-heads} to true
  556.                 set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "GOLDEN-HEADS"
  557.                 remove 500 from {pit.%{_uuid}%.gold}
  558.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::PERK-PURCHASE}%"
  559.                 pit_upgrades_shop({_p})
  560.                 stop
  561.             else:
  562.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"  
  563.                 stop   
  564.         else:
  565.             set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "GOLDEN-HEADS"
  566.             pit_upgrades_shop({_p})
  567.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::SELECTED-PERK}%"
  568.             stop
  569.     make a gui slot 12 of {_p} with fishing rod named "&cFishing rod" with lore "||&7Spawn with a fishing rod||||&8&l- &7COST: &6&l1000||" to run: 
  570.         if {pit.%{_uuid}%.perk::fishing-rod} is not set:
  571.             if {pit.%{_uuid}%.gold} >= 1000:   
  572.                 set {pit.%{_uuid}%.perk::fishing-rod} to true
  573.                 set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "FISHING-ROD"
  574.                 remove 1000 from {pit.%{_uuid}%.gold}
  575.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::PERK-PURCHASE}%"
  576.                 pit_upgrades_shop({_p})
  577.                 stop
  578.             else:
  579.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"  
  580.                 stop   
  581.         else:
  582.             set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "FISHING-ROD"
  583.             pit_upgrades_shop({_p})
  584.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::SELECTED-PERK}%"
  585.             stop   
  586.     make a gui slot 14 of {_p} with lava bucket named "&cLava Bucket" with lore "||&7Spawn with a lava bucket||||&8&l- &7COST: &6&l1000||" to run: 
  587.         if {pit.%{_uuid}%.perk::lava-bucket} is not set:
  588.             if {pit.%{_uuid}%.gold} >= 1000:   
  589.                 set {pit.%{_uuid}%.perk::lava-bucket} to true
  590.                 set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "LAVA-BUCKET"
  591.                 remove 1000 from {pit.%{_uuid}%.gold}
  592.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::PERK-PURCHASE}%"
  593.                 pit_upgrades_shop({_p})
  594.                 stop
  595.             else:
  596.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"  
  597.                 stop   
  598.         else:
  599.             set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "LAVA-BUCKET"
  600.             pit_upgrades_shop({_p})
  601.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::SELECTED-PERK}%"
  602.             stop
  603.     make a gui slot 16 of {_p} with bow named "&cEndless Quiver" with lore "||&7Get 3 arrows on arrow hit||||&8&l- &7COST: &6&l2000||" to run: 
  604.         if {pit.%{_uuid}%.perk::endless-quiver} is not set:
  605.             if {pit.%{_uuid}%.gold} >= 2000:   
  606.                 set {pit.%{_uuid}%.perk::endless-quiver} to true
  607.                 set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "ENDLESS-QUIVER"
  608.                 remove 2000 from {pit.%{_uuid}%.gold}
  609.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::PERK-PURCHASE}%"
  610.                 pit_upgrades_shop({_p})
  611.                 stop
  612.             else:
  613.                 send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"  
  614.                 stop   
  615.         else:
  616.             set {pit.%{_uuid}%.perk::slot-%{_slot}%} to "ENDLESS-QUIVER"
  617.             pit_upgrades_shop({_p})
  618.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::SELECTED-PERK}%"
  619.             stop           
  620.  
  621.  
  622. function pit_upgrades_shop(p: player):
  623.     set {_uuid} to uuid of {_p}
  624.     open virtual chest inventory with size 5 named "Permanent upgrades" to {_p}
  625.     wait 1 ticks   
  626.     if {pit.%{_uuid}%.perk::slot-1} is not set:
  627.         make a gui slot 12 of {_p} with diamond block named "&aPERK SLOT ##1" with lore "||&7Select a perk to fill this slot||||&eClick to chose perk!||" to run function pit_perk_shop({_p}, 1)
  628.     if {pit.%{_uuid}%.perk::slot-2} is not set:
  629.         make a gui slot 14 of {_p} with diamond block named "&aPERK SLOT ##2" with lore "||&7Select a perk to fill this slot||||&eClick to chose perk!||" to run function pit_perk_shop({_p}, 2)   
  630.        
  631.     if {pit.%{_uuid}%.perk::slot-1} is set:
  632.         if {pit.%{_uuid}%.perk::slot-1} = "GOLDEN-HEADS":
  633.             make a gui slot 12 of {_p} with gold block named "&ePERK SLOT &3##1 &7- &6&lGOLDEN HEADS" to run function pit_perk_shop({_p}, 1)
  634.         if {pit.%{_uuid}%.perk::slot-1} = "FISHING-ROD":       
  635.             make a gui slot 12 of {_p} with fishing rod named "&ePERK SLOT &3##1 &7- &9&lFISHING ROD" to run function pit_perk_shop({_p}, 1)
  636.         if {pit.%{_uuid}%.perk::slot-1} = "LAVA-BUCKET":       
  637.             make a gui slot 12 of {_p} with lava bucket named "&ePERK SLOT &3##1 &7- &9&lLAVA BUCKET" to run function pit_perk_shop({_p}, 1)   
  638.         if {pit.%{_uuid}%.perk::slot-1} = "ENDLESS-QUIVER":    
  639.             make a gui slot 12 of {_p} with bow named "&ePERK SLOT &3##2 &7- &9&lENDLESS QUIVER" to run function pit_perk_shop({_p}, 1)
  640.            
  641.     if {pit.%{_uuid}%.perk::slot-2} is set:        
  642.         if {pit.%{_uuid}%.perk::slot-2} = "GOLDEN-HEADS":
  643.             make a gui slot 14 of {_p} with gold block named "&ePERK SLOT &3##2 &7- &6&lGOLDEN HEADS" to run function pit_perk_shop({_p}, 2)
  644.         if {pit.%{_uuid}%.perk::slot-2} = "FISHING-ROD":       
  645.             make a gui slot 14 of {_p} with fishing rod named "&ePERK SLOT &3##2 &7- &9&lFISHING ROD" to run function pit_perk_shop({_p}, 2)
  646.         if {pit.%{_uuid}%.perk::slot-2} = "LAVA-BUCKET":       
  647.             make a gui slot 14 of {_p} with lava bucket named "&ePERK SLOT &3##2 &7- &9&lLAVA BUCKET" to run function pit_perk_shop({_p}, 2)       
  648.         if {pit.%{_uuid}%.perk::slot-2} = "ENDLESS-QUIVER":    
  649.             make a gui slot 14 of {_p} with bow named "&ePERK SLOT &3##2 &7- &9&lENDLESS QUIVER" to run function pit_perk_shop({_p}, 2)        
  650.                
  651.        
  652.  
  653.        
  654. function pit_items_shop(p: player):
  655.     open virtual chest inventory with size 3 named "Non-permanent items" to {_p}
  656.     wait 1 ticks
  657.     make a gui slot 10 of {_p} with diamond_sword named "&e&lDIAMOND SWORD" with lore "||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l100" to run:
  658.         set {_uuid} to uuid of {_p}
  659.         if {pit.%{_uuid}%.gold} >= 100:
  660.             remove 100 from {pit.%{_uuid}%.gold}
  661.             give 1 diamond_sword to {_p}
  662.             set {_item} to "DIAMOND SWORD"
  663.             set {_x} to {THEPIT::MESSAGES::ITEM-PURCHASE}
  664.             replace all "[item]" with "%{_item}%" in {_x}
  665.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to {_p}
  666.         else:
  667.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"
  668.     make a gui slot 11 of {_p} with 8 obsidian named "&e&lOBSIDIAN" with lore "||&8&l- &7REMAINS FOR 120 SECONDS||||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l40" to run:
  669.         set {_uuid} to uuid of {_p}
  670.         if {pit.%{_uuid}%.gold} >= 40: 
  671.             remove 100 from {pit.%{_uuid}%.gold}
  672.             give 8 obsidian to {_p}
  673.             set {_item} to "OBSIDIAN"
  674.             set {_x} to {THEPIT::MESSAGES::ITEM-PURCHASE}
  675.             replace all "[item]" with "%{_item}%" in {_x}          
  676.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to {_p}
  677.         else:
  678.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"      
  679.  
  680.     make a gui slot 15 of {_p} with diamond_chestplate named "&e&lDIAMOND CHESTPLATE" with lore "||&8&l- &7AUTO EQUIP ON BUY||||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l250" to run:
  681.         set {_uuid} to uuid of {_p}
  682.         if {pit.%{_uuid}%.gold} >= 250:
  683.             remove 100 from {pit.%{_uuid}%.gold}
  684.             set {_p}'s chestplate to diamond_chestplate
  685.             set {_item} to "DIAMOND CHESTPLATE"
  686.             set {_x} to {THEPIT::MESSAGES::ITEM-PURCHASE}
  687.             replace all "[item]" with "%{_item}%" in {_x}          
  688.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to {_p}
  689.         else:
  690.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"      
  691.  
  692.     make a gui slot 16 of {_p} with diamond_boots named "&e&lDIAMOND BOOTS" with lore "||&8&l- &7AUTO EQUIP ON BUY||||&8&l- &7LOST ON DEATH||||&8&l- &7COST: &6&l150" to run:
  693.         set {_uuid} to uuid of {_p}
  694.         if {pit.%{_uuid}%.gold} >= 150:
  695.             remove 100 from {pit.%{_uuid}%.gold}
  696.             set {_p}'s boots to diamond_boots
  697.             set {_item} to "DIAMOND BOOTS"
  698.             set {_x} to {THEPIT::MESSAGES::ITEM-PURCHASE}
  699.             replace all "[item]" with "%{_item}%" in {_x}          
  700.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {_x}%" to {_p}
  701.         else:
  702.             send "%colored {THEPIT::MESSAGES::PREFIX}% %colored {THEPIT::MESSAGES::NO-GOLD}%"          
  703.  
  704.  
  705.  
  706. on plaece:
  707.     if {pit.%uuid of player%.state} is "ingame":
  708.         if event-block is obsidian:
  709.             wait 120 seconds
  710.             set event-block to air
  711.         if event-block is lava:
  712.             wait 2 seconds
  713.             set event-block to air
  714.         else:
  715.             cancel event
  716.     else:
  717.         stop
  718.        
  719. on block flow:
  720.     if event-block is lava:
  721.         loop {THEPIT::CONFIG::ENABLED-WORLDS::*}:
  722.             if event-world is loop-value:
  723.                 cancel event
  724. on breeak:
  725.     if {pit.%uuid of player%.state} is "ingame":
  726.         cancel event
  727.     else:
  728.         stop
  729.  
  730. on drop:
  731.     if {pit.%uuid of player%.state} is "ingame":
  732.         cancel event
  733.     else:
  734.         stop
  735.  
  736. on hunger bar change:
  737.     if {pit.%uuid of player%.state} is "ingame":
  738.         cancel event       
  739.         set player's hunger to 20
  740.        
  741.        
  742. on right click on entity:
  743.     if {pit.%uuid of player%.state} is "ingame":
  744.         if citizen id of event-entity is {THEPIT::CONFIG::SHOP-ID}:
  745.             pit_items_shop(player)
  746.         if citizen id of event-entity is {THEPIT::CONFIG::UPGRADE-ID}:
  747.             pit_upgrades_shop(player)
  748.     else:
  749.         stop
  750.    
  751.        
  752. function pit_updatetag(p: player):
  753.     set {_uuid} to uuid of {_p}
  754.     make console execute command "nte player %{_p}% prefix &7[&e%{pit.%{_uuid}%.level}%&7] &7"
  755.    
  756. function pit_equip(p: player): 
  757.     set {_uuid} to uuid of {_p}
  758.     set {_p}'s level to {pit.%{_uuid}%.level}
  759.     set slot 0 of {_p} to unbreakable iron_sword
  760.     set slot 1 of {_p} to unbreakable bow
  761.     if {pit.%{_uuid}%.perk::slot-1} or {pit.%{_uuid}%.perk::slot-2} = "FISHING-ROD":
  762.         set slot 2 of {_p} to unbreakable fishing rod
  763.     if {pit.%{_uuid}%.perk::slot-2} or {pit.%{_uuid}%.perk::slot-1} = "LAVA-BUCKET":
  764.         set slot 3 of {_p} to lava bucket      
  765.     set slot 8 of {_p} to 30 arrows
  766.     wait 0.5 seconds
  767.     set {_p}'s helmet to unbreakable chain_helmet
  768.     set {_p}'s chestplate to unbreakable chain_chestplate
  769.     set {_p}'s leggings to unbreakable iron_leggings
  770.     set {_p}'s boots to unbreakable iron_boots 
  771.    
  772.    
  773. on join:
  774.     set join message to ""
  775.    
  776. on quit:
  777.     set quit message to ""
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top