Jump to content

Trying to make bridge duels with skript


heinieman

Recommended Posts

basically, I want it so when {player.1} dies, it cancels the event and teleports them to (231, 152, -195, world). right now (no error message), it cancels the event but doesn't teleport {player.1}  . please help

 

#The duel command
command /bridgeduel <player>:
	trigger:
# putting players into variables
		clear {ingame}
		clear {player.1}
		clear {player.2}
		make player execute command "/p1"
		make arg-1 execute command "/p2"
		set {player.1} to player
		set {ingame} to player
		teleport player to location(231, 152, -195, world) 
		make player execute command "/gamemode survival"
		set {player.2} to arg-1
		set {ingame} to arg-1
		set {%player%.points} to 0
		teleport arg-1 to location(231, 152, -251, world) 
# setting up the kits
		clear player's inventory
		give player wooden sword 
		give player 64 blue wool 
		give player 3 golden apple
		give player bow
		give player 4 arrows
		make arg-1 execute command "/gamemode survival"
		clear arg-1's inventory
		give arg-1 wooden sword
		give arg-1 64 red wool 
		give arg-1 3 golden apple
		give arg-1 bow
		give arg-1 4 arrows
on step on black carpet:
	if player is {player.2}:
		heal {player.1}
		heal {player.2}
		add 1 to {%player%.points}
		broadcast "%player% Has &3%{%player%.points}% Points"
		teleport {player.1} to location(231, 152, -195, world) 
		teleport {player.2} to location(231, 152, -251, world) 
		if {%player%.points} >= 5:
			set {%player%.points} to 0
			broadcast "&a%player% &3Now has &45 &3Points and has Won the Game!" 
			send title "&2%player%" with subtitle "Has Scored 5 Points and Won the Game " for 3 seconds
		if {%player%.points} < 5:
			send title "&2%player%" with subtitle "Has Scored!" for 1 seconds
	if player is {player.1}:
		send "&4You can't score in your own goal!"
		teleport player to location(231, 152, -195, world) 
on death:
	if player is {ingame}:
		cancel event
		if player is {player.1}:
			teleport player to location(231, 152, -195, world) 
command /tpoop:
	trigger:
		teleport {player.1} to location(231, 152, -195, world) 
on step on red mushroom block:
	heal {player.1}
	heal {player.2}
	if player is {player.1}:	
		add 1 to {%player%.points}
		broadcast "%player% Has &3%{%player%.points}% Points"

#
#	send "points set to 0"
	if {%player%.points} >= 5:
		broadcast "&a%player% &3Now has &45 &3Points and has Won the Game!" 
		set {%player%.points} to 0
		broadcast "&a%player% &3Now has &45 &3Points and has Won the Game!" 
		send title "&2%player%" with subtitle "Has Scored 5 Points and Won the Game " for 3 seconds
		teleport {player.1} to location(231, 152, -195, world) 
		teleport {player.2} to location(231, 152, -251, world) 
		clear {player.1}
		clear {player.2}
	if {%player%.points} < 5:
		send title "&2%player%" with subtitle "Has Scored!" for 3 seconds
		teleport {player.1} to location(231, 152, -195, world) 
		teleport {player.2} to location(231, 152, -251, world) 
#	send "points set to 0"


command /p2:	
	trigger:
		set {player.2} to player

command /p1:	
	trigger:
		set {player.1} to player
command /test:
	trigger:
		if player is {ingame}:
			send "you are {ingame}"
command /test1:
	trigger:
		if {player.1} is player:
			send "hi" to {player.1}
command /resetplayer:
	trigger:
		clear {ingame}
		clear {player.1}
		clear {player.2}
command /ingame:
	trigger:
		set {ingame} to player
command /playersingame:
	trigger:
		if player is {player.1}:
			send "you are {player.1}" to {player.1}
		if player is {player.2}:
			send "you are {player.2}" to {player.2}
		if player is {player.3}:
			send "you are {player.3}" to {player.3}
		

 

Edited by heinieman
add stuff
Link to comment
Share on other sites

I was working on recreating Lunar's bridge duels, but I ran into some bugs and got lazy, here take it, you only have to fix a few bugs and add a few things, i've done most of it.

bridges.sk

  • Thanks 1

Youtube: https://www.youtube.com/c/83y123

Discord: 83y#2552

IGN: 83y

 

If your seeing this I am currently banned from Posting, the Discord and GitHub

I have helped out countless player's and been re-payed with multiple bans.

staff are attention seeking and biased, i'd just leave for your sake.

your just wasting your time.

like.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...