Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #on command "/duel":
- # if player is in world "Duels":
- # send "&cYou cannot use that command while in a Duel!"
- # cancel event
- command /duel [<text>] [<text>]:
- permission: op
- trigger:
- if arg 1 is not set:
- send "&7&m---------------------------------------------------"
- send "&e&l&o/duel <player> &8- &c&l&oSend a duel request"
- send "&e&l&o/duel toggle &8- &c&l&oToggle receiving requests"
- send "&e&l&o/duel <accept/deny> <player> &8- &c&l&oAccept or Deny a request."
- send "&7&m---------------------------------------------------"
- if player is op:
- send "&9&l&oDuels Admin Commands&7:"
- send ""
- send "&e/duel create <arena name> &7- &cCreate an arena"
- send "&e/duel delete <arena name> &7- &cDelete an arena"
- send "&e/duel arenas &7- &cView all arenas"
- send "&e/duel setsp1 <arena name> &7- &cCreate and Set 1st spawn"
- send "&e/duel setsp2 <arena name> &7- &cSet 2nd spawn"
- send "&7&m---------------------------------------------------"
- stop
- if arg 1 is set:
- if arg 2 is not set:
- if arg 1 is "arenas":
- if {duels.arenas::*} is set:
- send "%{duels.arenas::*}%"
- else:
- send "&9&l&oDuels &7-> &c&l&oThere are currently no arenas!"
- stop
- if arg 1 is player:
- send "&9&l&oDuels &7-> &c&l&oYou cannot duel yourself!"
- stop
- if arg 1 is "toggle":
- if {duels.toggle.%player%} is not set:
- set {duels.toggle.%player%} to 1
- send "&9&l&oDuels &7-> &c&l&oDuel requests have been disabled!"
- stop
- else:
- clear {duels.toggle.%player%}
- send "&9&l&oDuels &7-> &a&l&oDuel requests have been enabled!"
- stop
- if {duels.toggle.%arg 1%} is set:
- send "&9&l&oDuels &7-> &c&l&o%arg 1% is currently not accepting duel requests."
- stop
- set {_player} to arg 1 parsed as offline player
- if {_player} is in world "Duels":
- send "&9&l&oDuels &7-> &c&l&o%arg 1% is currently in a Duel match!"
- stop
- set {_player} to arg 1 parsed as offline player
- if {_player} is online:
- send "&9&l&oDuels &7-> &a&l&oRequest sent to %arg 1%."
- send "&9&l&oDuels &7-> &a&l&o%player% would like to duel you with Kit %arg 2% &8- &fType /accept %player% to accept" to {_player}
- set {duels.opponent.%player%} to {_player}
- else:
- send "&9&l&oDuels &7-> &c&l&o%arg 1% is not online!"
- if arg 2 is set:
- if player is op:
- if arg 1 is "accept":
- set {_opponent} to arg 2 parsed as offline player
- if {duels.opponent.%arg 2%} is player:
- if {_opponent} is online:
- if player's gamemode is survival:
- if {_opponent}'s gamemode is survival:
- broadcast "%{_opponent}%'s GAMEMODE IS SURVIVAL"
- set {duels.tpback.%{_opponent}%} to {_opponent}'s location
- set {duels.tpback.%player%} to player's location
- teleport {_opponent} to {duels.arenas.poke.sp1}
- teleport player to {duels.arenas.poke.sp2}
- set {duels.opponent.%arg 2%} to player
- set {duels.opponent.%player%} to arg 2 parsed as offline player
- else:
- send "&9&l&oDuels &7-> &c&l&oCannot start match, %{_player}% is in Creative Mode!"
- stop
- else:
- send "&9&l&oDuels &7-> &c&l&oCannot start match, you''re in Creative Mode!"
- stop
- else:
- send "&9&l&oDuels &7-> &c&l&o%arg 2 % is no longer online."
- clear {duels.opponent.%arg 2%}
- stop
- else:
- send "&9&l&oDuels &7-> &c&l&oYou do not have a request from %arg 2%!"
- stop
- if arg 1 is "create":
- if {duels.arenas.%arg 2%} is set:
- send "&9&l&oDuels &7-> &c&l&oArena %arg 2% already exists!"
- stop
- else:
- set {duels.arenas.%arg 2%} to 0
- add arg 2 to {duels.arenas::*}
- send "&9&l&oDuels &7-> &a&l&oArena %arg 2% successfully created!"
- stop
- if arg 1 is "delete":
- if {duels.arenas.%arg 2%} is set:
- remove arg 2 from {duels.arenas::*}
- clear {duels.arenas.%arg 2%}
- clear {duels.arenas.%arg 2%.sp1}
- clear {duels.arenas.%arg 2%.sp2}
- send "&9&l&oDuels &7-> &a&l&oArena %arg 2% successfully deleted!"
- stop
- else:
- send "&9&l&oDuels &7-> &c&l&oArena %arg 2% does not exist!"
- stop
- if arg 1 is "setsp1":
- if {duels.arenas.%arg 2%} is set:
- set {duels.arenas.%arg 2%.sp1} to player's location
- send "&9&l&oDuels &7-> &a&l&oSpawn 1 of %arg 2% set/updated successfully!"
- stop
- else:
- send "&9&l&oDuels &7-> &c&l&oArena %arg 2% does not exist!"
- stop
- if arg 1 is "setsp2":
- if {duels.arenas.%arg 2%} is set:
- set {duels.arenas.%arg 2%.sp2} to player's location
- send "&9&l&oDuels &7-> &a&l&oSpawn 2 of %arg 2% set/updated successfully!"
- stop
- else:
- send "&9&l&oDuels &7-> &c&l&oArena %arg 2% does not exist!"
- stop
- else:
- make player execute command "duel"
- stop
- else:
- if arg 1 is "accept":
- if arg 1 is "deny":
- else:
- make player execute command "duel"
- on drop:
- if player is in world "Duels":
- cancel event
- on damage:
- if (victim's health - damage) is less than 0.1:
- cancel event
- clear victim's inventory
- make console execute command "gmsp %victim%"
- if attacker is in world "Duels":
- if {duels.opponent.%attacker%} is victim:
- strike lightning at the victim
- set the attacker's gamemode to creative
- apply mining fatigue 50 to the attacker for 5 seconds
- apply slowness 10 to the attacker for 5 seconds
- make console execute command "tm message %attacker% &a&lYou Win!\n&cDefeated %victim% with &b%attacker's health% hearts!"
- make console execute command "execute %attacker% ~ ~ ~ /particle fireworksSpark ~ ~ ~ 3 3 3 0.15 1000"
- broadcast "&9&l&oDuels &7-> &a&l&o%attacker% &7&l&owon the match against &c&l&o%victim% &7&l&owith &b&l&o%attacker's health% hearts!"
- wait 2 seconds
- teleport victim to {duels.tpback.%victim%}
- clear {duels.tpback.%victim%}
- clear {duels.opponent.%victim%}
- clear {duels.opponent.%attacker%}
- wait 4 seconds
- teleport attacker to {duels.tpback.%attacker%}
- clear {duels.tpback.%attacker%}
- on damage:
- if attacker is in world "Duels":
- make console execute command "tm amessage %attacker% &c&l&o%victim%s HP: %victim's health%"
- on world change:
- if player is in world "Duels":
- if {spec.%player%} is 1:
- stop
- else:
- if player is in world "Duels":
- make console execute command "tm message %player% &cMatch begins in &6&l5"
- make console execute command "xp -999999L %player%"
- make console execute command "xp 5L %player%"
- wait 1 second
- if player is in world "Duels":
- make console execute command "tm message %player% &cMatch begins in &6&l4"
- make console execute command "xp -1L %player%"
- wait 1 second
- if player is in world "Duels":
- make console execute command "tm message %player% &cMatch begins in &6&l3"
- make console execute command "xp -1L %player%"
- wait 1 second
- if player is in world "Duels":
- make console execute command "tm message %player% &cMatch begins in &6&l2"
- make console execute command "xp -1L %player%"
- wait 1 second
- if player is in world "Duels":
- make console execute command "tm message %player% &cMatch begins in &6&l1"
- make console execute command "xp -1L %player%"
- wait 1 second
- if player is in world "Duels":
- make console execute command "xp -1L %player%"
- make console execute command "tm message %player% &f\n&c&lF&4&lIGHT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFI&c&lG&4&lHT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFIG&c&lH&4&lT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFIGH&c&lT&4&l!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFIGHT&c&l!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFIGHT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&c&lFIGHT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFIGHT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&c&lFIGHT!"
- wait 0.1 second
- make console execute command "tm message %player% \n&4&lFIGHT!"
- wait 1 second
- make console execute command "tm message %player% &f\n&f"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement