Skocz do zawartości

Poprawa skryptu na teleportacje


Polecane posty

poprawi mi ktoś tak ten kod żeby po ruszeniu sie anulowało teleportacje?

 

command /spawn:
    trigger:
        if player has permission "great.lobby":
            wait 1 tick
            open chest with 1 rows named "&2&lLobby" to player
            format slot 4 of player with 1 of 159:5 named "&a&lAkceptuj" to close then run [execute player command "/tepam"]

 

command /tepam:
    trigger:
        if player has permission "great.tepam":
            set action bar of player to "&aRozgrzewam teleport!"
            wait 1 second
            set action bar of player to "&aTeleportacja nastapi za &c3"
            wait 1 second
            set action bar of player to "&aTeleportacja nastapi za &c2"
            wait 1 second
            set action bar of player to "&aTeleportacja nastapi za &c1"
            wait 1 second
            execute player command "warp spawn"
            clear the player's inventory
            heal player
            remove resistance from player
            remove speed from player
            remove strength from player
            remove absorption from player    
            remove fire resistance from player
            remove regeneration from player
            send "&8&m-----------------------------"
            send "&a&lZostales przeteleportowany!"
            send "&8&m-----------------------------"
            give iron helmet of protection 4 and unbreaking 2 to player's helmet
            give iron chestplate of protection 4 and unbreaking 2 to player's chestplate
            give iron leggings of protection 4 and unbreaking 2 to player's leggings
            give iron boots of protection 4 and unbreaking 2 to player's boots
            give iron sword of sharpness 4 and unbreaking 2 to player
            give iron sword of knockback 2 and unbreaking 2 to player
            give 15 golden apple:0 to player
            give fishing rod to player
            give water bucket to player
            give 64 cobblestone to player
            give 64 cobblestone to player
            give 2 ice to player
            give 1 278 to player
            give 16 cooked porkchop to player
            if player has permission "items.vip":
                give 1 ender pearl named "&6&lPerla VIPA" to player
                give bow of power 3 named "&6&lLuk VIPA" to player
                give 16 arrow to player
        else:
            set action bar of player to "&cNie posiadasz permisji!"
            stop

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

A spróbuj coś takiego

 

variables:
	{teleport.%player%} = false
	{teleport.anuluj.%player%} = false

on any move:
	if {teleport.%player%} is true:
		set {teleport.anuluj.%player%} to true
	else:
		stop

command /spawn:
	trigger:
		if player has permission "great.lobby":
			wait 1 tick
			open chest with 1 rows named "&2&lLobby" to player
			format slot 4 of player with 1 of 159:5 named "&a&lAkceptuj" to close then run [execute player command "/tepam"]

command /tepam:
	trigger:
		if player has permission "great.tepam":
			set {teleport.%player%} to true
			set action bar of player to "&aRozgrzewam teleport!"
			wait 1 second
			set action bar of player to "&aTeleportacja nastapi za &c3"
			wait 1 second
			set action bar of player to "&aTeleportacja nastapi za &c2"
			wait 1 second
			set action bar of player to "&aTeleportacja nastapi za &c1"
			wait 1 second
			if {teleport.anuluj.%player%} is false:
				execute player command "warp spawn"
				clear the player's inventory
				heal player
				remove resistance from player
				remove speed from player
				remove strength from player
				remove absorption from player    
				remove fire resistance from player
				remove regeneration from player
				send "&8&m-----------------------------"
				send "&a&lZostales przeteleportowany!"
				send "&8&m-----------------------------"
				give iron helmet of protection 4 and unbreaking 2 to player's helmet
				give iron chestplate of protection 4 and unbreaking 2 to player's chestplate
				give iron leggings of protection 4 and unbreaking 2 to player's leggings
				give iron boots of protection 4 and unbreaking 2 to player's boots
				give iron sword of sharpness 4 and unbreaking 2 to player
				give iron sword of knockback 2 and unbreaking 2 to player
				give 15 golden apple:0 to player
				give fishing rod to player
				give water bucket to player
				give 64 cobblestone to player
				give 64 cobblestone to player
				give 2 ice to player
				give 1 278 to player
				give 16 cooked porkchop to player
				if player has permission "items.vip":
					give 1 ender pearl named "&6&lPerla VIPA" to player
					give bow of power 3 named "&6&lLuk VIPA" to player
					give 16 arrow to player
				set {teleport.%player%} to false
			else:
				set action bar of player to "&cRuszyłeś się! Teleportacja przerwana"
				set {teleport.anuluj.%player%} to false
				set {teleport.%player%} to false
        else:
			set action bar of player to "&cNie posiadasz permisji!"
			stop

 

Edytowano przez AlexsanderARG
zapomniałem o zmiennej xd

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Bądź aktywny! Zaloguj się lub utwórz konto

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto

Zarejestruj nowe konto, to proste!

Zarejestruj nowe konto

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się
  • Kto przegląda   0 użytkowników

    Brak zalogowanych użytkowników przeglądających tę stronę.

×
Okienko zamknie się za 5 sekund...