Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Autor: MrPatryk07 #
- # Nazwa skryptu: 2vs2 #
- # Wersja: 1.0 #
- # Regulamin: #
- # Możesz: #
- #Edytować kod skryptu #
- #Nie wolno Usuwać tej stopki #
- # #
- command /2v2 [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is "create":
- add arg 2 to {areny::*}
- send "&eStworzyles arene %arg 2%"
- stop
- if arg 1 is "delete":
- remove arg 2 from {areny::*}
- send "&eUsunoles arene %arg 2%"
- stop
- if arg 1 is "setspawna":
- if arg 2 is set:
- if arg 3 is set:
- if arg 3 is "1":
- if {areny::*} contains arg 2:
- set {spawn.1.%arg 2%} to location of player
- send "&4Ustawiles spawn 1 dla areny %arg 2%"
- if arg 3 is "2":
- if {areny::*} contains arg 2:
- set {spawn.2.%arg 2%} to location of player
- send "&4Ustawiles spawn 2 dla areny %arg 2%"
- stop
- if arg 1 is "slobby":
- set {lobby} to location of player
- send "&eUstawiles lobby"
- stop
- if arg 1 is "setspawn":
- set {spawn} to location of player
- send "&eUstawiles spawn"
- stop
- if arg 1 is "join":
- if arg 2 is set:
- if {arena.start.%arg 2%} is false:
- if {areny::*} contains arg 2:
- if {gra.%player%} is false:
- add player to {lgracze.%arg 2%::*}
- send "&eDolaczyles do kolejki 2vs2!"
- send "&eWybierz nr Druzyny!"
- send "&e/2v2 team %arg 2% [nr teamu]"
- set {gra.%player%} to true
- teleport player to {lobby}
- set {inv.%player%} to player's serialized inventory
- set {helm.%player%} to "%helmet of player%"
- set {napiersnik.%player%} to "%chestplate of player%"
- set {spodnie.%player%} to "%legging of player%"
- set {buty.%player%} to "%boots of player%"
- set {inv.%player%} to serialized inventory of player
- clear player's inventory
- set the player's chestplate slot to diamond chestplate
- set the player's leggings slot to diamond leggings
- set the player's boots slot to diamond boots
- add diamond sword to player
- add golden apple to player
- add golden apple to player
- add golden apple to player
- add golden apple to player
- else:
- send "&4Juz grasz"
- else:
- send "&4Nie ma takiej areny"
- else:
- send "&4Arena wystartowala"
- else:
- send "&4/2v2 join [nr areny]"
- if arg 1 is "team":
- if arg 2 is set:
- if arg 3 is set:
- if {areny::*} contains arg 2:
- if {wybral.%player%} is false:
- if arg 3 is "1":
- if {lteam.1.%arg 2%} is equal to 2:
- send "&eTa druzyna jest pelna"
- else:
- add player to {team.1.%arg 2%::*}
- add 1 to {gracze.%arg 2%}
- add 1 to {lteam.1.%arg 2%}
- add player to {lgracze.%arg 2%::*}
- set {wybral.%player%} to true
- send "&eWybrales druzyne nr 1"
- if arg 3 is "2":
- if {lteam.2.%arg 2%} is equal to 2:
- send "&eTa druzyna jest pelna"
- else:
- add player to {team.2.%arg 2%::*}
- add 1 to {gracze.%arg 2%}
- add 1 to {lteam.2.%arg 2%}
- add player to {lgracze.%arg 2%::*}
- set {wybral.%player%} to true
- send "&eWybrales druzyne nr 2"
- else:
- send "&eWyrbales juz klase!"
- if arg 1 is "leave":
- if arg 2 is set:
- if {gra.%player%} is true:
- set {gra.%player%} to false
- remove player from {team.1.%arg 2%::*}
- remove player from {team.2.%arg 2%::*}
- remove 1 from {gracze.%arg 2%::*}
- if {team.1.%arg 2%::*} contains player:
- remove 1 from {lteam.1.%arg 2%}
- if {team.2.%arg 2%::*} contains player:
- remove 1 from {lteam.2.%arg 2%}
- remove player from {lgracze.%arg 2%::*}
- teleport player to {spawn}
- send "&eWyszles z gry"
- restore inventory of player from {inv.%player%}
- equip the player with {helm.%player%} parsed as item
- equip the player with {napiersnik.%player%} parsed as item
- equip the player with {spodnie.%player%} parsed as item
- equip the player with {buty.%player%} parsed as item
- restore inventory of player from {inv.%player%}
- stop
- else:
- send "&4Nie jestes podczas gry"
- if arg 1 is "stoparena":
- if arg 2 is set:
- set {arena.start.%arg 2%} to false
- loop {lgracze.%arg 2%::*}:
- set {gra.%loop-value%} to false
- teleport loop-value to {spawn}
- set {wybral.%loop-value%} to false
- send "&4Stop areny %arg 2% udal sie"
- clear {team.1.%arg 2%::*}
- clear {team.2.%arg 2%::*}
- clear {gracze.%arg 2%}
- clear {lgracze.%arg 2%::*}
- set {lteam.1.%arg 2%} to 0
- set {lteam.2.%arg 2%} to 0
- if arg 1 is "vote":
- if arg 2 is set:
- if {gracze.%arg 2%} is greater than or equal to 4:
- set {arena.start.%arg 2%} to true
- send "&4Walka rozpocznie sie za 10s" to {lgracze.%arg 2%::*}
- wait 5 seconds
- send "&eWalka rozpocznie sie za 4s" to {lgracze.%arg 2%::*}
- wait 1 seconds
- send "&eWalka rozpocznie sie za 3s" to {lgracze.%arg 2%::*}
- wait 1 seconds
- send "&eWalka rozpocznie sie za 2s" to {lgracze.%arg 2%::*}
- wait 1 seconds
- send "&eWalka rozpocznie sie za 1s" to {lgracze.%arg 2%::*}
- wait 1 seconds
- teleport {team.1.%arg 2%::*} to {spawn.1.%arg 2%}
- teleport {team.1.%arg 2%::*} to {spawn.1.%arg 2%}
- wait 1 ticks
- teleport {team.2.%arg 2%::*} to {spawn.2.%arg 2%}
- teleport {team.2.%arg 2%::*} to {spawn.2.%arg 2%}
- send "&eWALCZ!!!" to {lgracze.%arg 2%::*}
- if arg 1 is not set:
- send "&e&m---> &62 vs 2 &e&m<---"
- send "&e/2v2 join [nr areny] - Dolącza gracza do kolejki"
- send "&e/2v2 leave - Wychodzi z kolejki"
- send "&e/2v2 vote [nr areny] - Gdy jest full osób w teamach wpisz to, aby zaczeła się gra!"
- if player has permissions "2vs2.admin":
- send "&c/2v2 setspawn - ustawia spawn"
- send "&c/2v2 slobby - ustawia lobby"
- send "&c/2v2 create [nr areny/nazwa] - tworzy arene"
- send "&c/2v2 delete [nr areny/nazwa] - usuwa arene"
- send "&c/2v2 setspawna [nr areny] [1/2] - ustawia spawny dla danej areny"
- send "&c/2v2 stoparena [nr areny] - stopuje i teleportuje graczy na spawn, gdy arena wystartowała [gdy coś pójdzie nie tak użyj tego np gdy pisze, że jestes podczas gry itp]"
- on respawn:
- if {gra.%player%} is true:
- set {gra.%player%} to false
- remove player from {team.1.%arg 2%::*}
- remove player from {team.2.%arg 2%::*}
- remove 1 from {gracze.%arg 2%::*}
- if {team.1.%arg 2%::*} contains player:
- remove 1 from {lteam.1.%arg 2%}
- if {team.2.%arg 2%::*} contains player:
- remove 1 from {lteam.2.%arg 2%}
- remove player from {lgracze.%arg 2%::*}
- teleport player to {spawn}
- send "&eWyszles z gry"
- restore inventory of player from {inv.%player%}
- equip the player with {helm.%player%} parsed as item
- equip the player with {napiersnik.%player%} parsed as item
- equip the player with {spodnie.%player%} parsed as item
- equip the player with {buty.%player%} parsed as item
- restore inventory of player from {inv.%player%}
- stop
- on damage:
- attacker is player:
- if {gra.%victim%} is true:
- if {team.1.1} contains victim:
- if {team.1.1} contains attacker:
- cancel event
- on damage:
- attacker is player:
- if {gra.%victim%} is true:
- if {team.2.1} contains victim:
- if {team.2.1} contains attacker:
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment