Other available versions. Ordered by newest to oldest versions:
Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
on skript load:
set {arena.use} to false
command /duel [<text>] [<player>]:
trigger:
if arg-1 is not set:
send "&cCorrect usage: &e&l/duel (invite/accept/deny) (player)" to player
if arg-1 is "invite":
if arg-2 is not online:
send "%arg-2% is not online"
stop
if arg-2 is "%player%":
send "&c&lYou cant invite yourself to duel!"
stop
{duelarena.pos1} is set
{duelarena.pos2} is set
{duel.lobby} is set
if arg-2 is not set:
send "&cPlease give a player name. Correct usege: &e&l/duel (invite/accept/deny) (player)"
else:
set {%player%.inviteduel.%arg-2%} to true
send "&3Invite send to %arg-2%! &e&lInvite expires in &c30&e seconds!"
send "%player% wants challenge with you. &e&l/duel (accept/deny) %player%" to arg-2
wait "30 seconds" parsed as timespan
{%player%.inviteduel.%arg-2%} is true
send "&cYour Duel invite to &3%arg-2% &cis expired" to player
send "&cYour Duel invite from &3%player% &cis expired" to arg-2
set {%player%.inviteduel.%arg-2%} to false
if arg-1 is "accept":
if arg-2 is not set:
send "&cPlease give a player name. Correct usege: &e&l/duel (invite/accept/deny) (player)"
else:
if {%arg-2%.inviteduel.%player%} is true:
set {%arg-2%.inviteduel.%player%} to false
if {arena.use} is true:
send "Sorry, arena is on use. Wait small bit and try again" to player
send "Sorry, arena is on use. Wait small bit and try again" to arg-2
else:
set {arena.use} to true
send "&3Your Duel invite has accepted by &c&l%player%" to arg-2
clear player's inventory
clear arg-2's inventory
set {induel.%player's uuid%} to true
set {induel.%player's uuid%.player2} to arg-2
set {induel.%arg-2's uuid%} to true
set {induel.%arg-2's uuid%.player2} to player
add 1 to {gamesp.%arg-2's uuid%}
add 1 to {gamesp.%player's uuid%}
teleport player to {duelarena.pos1}
teleport arg-2 to {duelarena.pos2}
wait 5 tick
selectkit(arg-2, player)
else:
send "&3%arg-2% &care not send a invite to you or invite expired!"
if arg-1 is "deny":
if arg-2 is not set:
send "&cPlease give a player name. Correct usege: &e&l/duel (invite/accept/deny) (player)"
else:
if {%arg-2%.inviteduel.%player%} is true:
send "&3Your Duel invite has denyed by &c&l%player%" to arg-2
function selectkit(p: player , sp: player):
open chest with 1 row named "&cSelect kit" to {_p}
format slot 1 of {_p} with diamond sword named "&cDefault Kit" to close then run [set {%{_p}%.kit} to "Default"]
format slot 7 of {_p} with bow named "&cOnly Bows" to close then run [set {%{_p}%.kit} to "OnlyBow"]
if {%{_p}%.kit} is "Default":
set slot 0 of {_p} to diamond sword named "&c&lDuel Sword!"
set slot 1 of {_p} to bow named "&c&lDuel Bow"
set slot 8 of {_p} to 64 arrow named "&c&lDuel Arrow"
set {_p}'s helmet to diamond helmet of protection 2
set {_p}'s chestplate to diamond chestplate of protection 2
set {_p}'s leggings to diamond leggings of protection 2
set {_p}'s boots to diamond boots of protection 2
set slot 0 of {_sp} to diamond sword named "&c&lDuel Sword"
set slot 1 of {_sp} to bow named "&c&lDuel Bow"
set slot 8 of {_sp} to 64 arrow named "&c&lDuel Arrow"
set {_sp}'s helmet to diamond helmet of protection 2
set {_sp}'s chestplate to diamond chestplate of protection 2
set {_sp}'s leggings to diamond leggings of protection 2
set {_sp}'s boots to diamond boots of protection 2
send "&cGame can begin!" to {_p}
send "&c%{_p}% selected Default kit" to {_sp}
else if {%{_p}%.kit} is "Default":
set slot 0 of {_p} to bow of infinity 1
set slot 8 of {_p} to 64 arrow named "&c&lDuel Arrow"
set slot 0 of {_sp} to bow of infinity 2
set slot 8 of {_sp} to 64 arrow named "&c&lDuel Arrow"
send "&cGame can begin!" to {_p}
send "&c%{_p}% selected Only Bows" to {_sp}
command /duelsetspawn [<number>]:
trigger:
if player has permission "duel.admin":
if arg-1 is not set:
send "&cCorrect usege: &3&l/dueladmin (1-2)" to player
if arg-1 is not set:
send "&cCorrect usege: &3&l/dueladmin (setspawn) (1-2)" to player
if arg-1 is 1:
set {duelarena.pos1} to player's location
send "&3Spawn &l1 set" to player
if arg-1 is 2:
set {duelarena.pos2} to location of player
send "&3Spawn &l2 set" to player
else:
send "&cSorry, but you dont have permission to do that!" to player
command /duelsetlobby:
trigger:
if player has permission "duel.admin":
set {lobby} to location of player
send "&c&lLobby set to your location! (%player's location%)"
else:
send "&cSorry, but you dont have permission to do that!" to player
on death:
victim is player
{induel.%victim's uuid%} is true
set {induel.%victim's uuid%} to false
set {induel.%attacker's uuid%} to false
add 1 to {wins.%attacker's uuid%}
add 1 to {loses.%victim's uuid%}
send victim title "&cDefeat!" with subtitle "&eBetter luck next time!"
send victim title "&eVictory!" with subtitle "&eGG!"
set {arena.use} to false
clear victim's inventory
clear attacker's inventory
teleport attacker to {lobby}
force respawn player
wait 1 tick
teleport victim to {lobby}
clear victim's inventory
set victim's health to 20
command /profile:
trigger:
if {gamesp.%player's uuid%} is not set:
set {gamesp.%player's uuid%} to 0
if {wins.%player's uuid%} is not set:
set {wins.%player's uuid%} to 0
if {wins.%player's uuid%} is not set:
set {wins.%player's uuid%} to 0
wait 5 ticks
open chest with 1 row named "&3&lProfile: &b%player%" to player
wait 3 ticks
format slot 0 of player with red glass named "&" to close
format slot 1 of player with red glass named "&7" to close
format slot 2 of player with red glass named "&7" to close
format slot 3 of player with arrow named "&7Loses: &c&l%{loses.%player's uuid%}%" to close
format slot 4 of player with diamond named "&7Wins: &e&l%{wins.%player's uuid%}%" to close
format slot 5 of player with red glass named "&7" to close
format slot 6 of player with red glass named "&7" to close
format slot 7 of player with blaze rod named "&7Games played: &3&l%{gamesp.%player's uuid%}%" to close
command /duellobby:
trigger:
{induel.%player's uuid%} is false
teleport player to {lobby}