Aller au contenu
  • 0

Teleportion / variables


Question

Posté(e)

Voila voila :D j'ai fait ca pour la téléporation mais ca ne marche pas :

 

					loop all players:
						send message "&7La partie commence dans &e%{_s}% secondes" to loop-player
						play raw sound "level_random" at player with pitch 1 volume 10
						wait 1 second
						loop all players:
							set {_r} to a random integer between 1 and 10  # Pour le random 
							wait 0.5 tick
							if player is in {ghost.start}:
								teleport loop value to {ghost.list::%{_random}%}
								apply invisibility to {ghost.fin::*} for 15 seconds

 

 

une idée ?

 

Voici l'erreur:

'to {ghost.list::%{_random}%}' is not an entity type

8 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Déjà tu n'utilises pas la même variable pour le random, tu attibue au début la varibale {_r} et tu utilises une variable nommée {_random}.

Ensuite tu ne peux pas mettre à un effet à une liste... Que contient-elle? Des joueurs?

Si tu veux qu'à chaque joueur loopé il obtienne l'effet invisibilité 15 secondes, tu remplaces la ligne en question par "apply invisibility to loop-player-2 for 15 seconds"

Pour la ligne d'avant tu dois mettre "teleport loop-player-2 to {ghost.list::%{_r}%}"

Enfin, je comprend pas du tout le but de ton Skript o.O

  • 0
Posté(e)

Oki :D:

 

command /ghost <text> [<text>]:
   trigger:
       if arg 1 is "join":
           if {ghost.join::%player%} is false:
               add 1 to {ghost.start}
               broadcast "&a%player% vient de rejoindre ! &b%{ghost.start}%/10"
               set {ghost.join::%player%} to true
               set {ghost.fin::%player%} to ""
               teleport player to {ghost.lobby}
               if {ghost.start} is equal to 10: #Pour le start
                   set {ghost.en.cours} to true
                   set {_s} to 10
                   loop 10 times:
                       remove 1 from {_s}
                       send message "&7La partie commence dans &e%{_s}% secondes" to loop-player
                       play raw sound "level_random" at player with pitch 1 volume 10
                       wait 1 second
                       loop all players:
                           set {_r} to a random integer between 1 and 10  # Pour le random
                           wait 0.5 tick
                           if player is in {ghost.start}:
                               teleport loop value to {ghost.list::%{_r}%}
                               apply invisibility to {ghost.fin::*} for 15 seconds
           else:
               send "&aTu a deja de rejoindre la file d'attente !"
       if arg 1 is "leave":
           remove 1 from {ghost.start}
           broadcast "&b[Ghost&4] &a%player% vient de quitté ! %{ghost.start}%/10"
           teleport player to {ghost.quit}
           set {ghost.join::%player%} to false
           if {ghot.spectator} is true:
               make console execute "/fly %player%"
               set {ghot.spectator} to false
               set {ghost.chat.spectator} to false
               reveal player to all players
       if arg 1 is "setlobby":
           set {ghost.lobby} to location of player
           send "Tu viens de set le Lobby de Jeux !"
       if arg 1 is "setquit":
           set {ghost.quit} to location of player
           send "Tu vient de set le spawn de fin !"
       if arg 1 is "spectactor":
           broadcast "&4[&bGhost&4] &a%player% vient de rejoindre en tant que spectacteur"
           set {ghost.chat.spectator} to true
           set {ghot.spectator} to true
           make console execute "/fly %player%"
           hide player to all players
       if arg 1 is "stop":
           if player has permissions "ghost.stop":
               teleport {ghost.fin::*} to {ghost.quit}
               delete {ghost.join::*}
               delete {ghost.fin::*}
               delete {ghost.start}
               set {ghost.en.cours} to false
               send "&4Tu vient de stoper le jeux !"


       if arg 1 is "setspawn":              
           if arg 2 is "1":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::1} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"
       if arg 1 is "setspawn":
           if arg 2 is "2":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::2} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "3":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::3} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "4":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::4} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "5":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::5} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "6":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::6} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "7":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::7} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "8":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::8} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "9":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::9} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if player has permissions "ghost.setspawn":           
               if arg 2 is "10":   
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::10} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

on break:
   if {ghost.join.%player%} is true:
       cancel event
on place:
   if {ghost.join.%player%} is true:
       cancel event

on death of player:
   if {ghost.join.%attacker%} is true:
       if {ghost.join.%victim%} is true:
           add 1 to {ghost.points.%attacker%}
           if {ghost.points.%attacker%} is equal to 10:
               broadcast "&a Fin de la partit: &b%player% &aVient de Win la partit !"
               teleport {ghost.fin::*} to {ghost.quit}
               delete {ghost.start}
               delete {ghost.join::%player%}





# Panneaux #

on rightclick on sign:
   if targeted block is a sign:
       if line 1 is "[Ghost]":
           if line 2 is "Join":
               wait 1 tick
               set line 3 to "&4%{ghost.start}%/10"
               make player execute "/ghost join"
               if {ghost.start} is equal to 10:
                   set line 2 to "&4En cours"
                   set line 3 to ""

on rightclick on sign:
   if targeted block is a sign:
       if line 1 is "[Ghost]":
           if line 2 is "&4En cours":
           make player execute "/ghost spectactor"
           if {ghost.en.cours} is false:
               set line 2 to "Join"
               set line 3 to ""

on chat:
   if {ghost.chat.spectator} is true:
       cancel event
       send "&4Tu ne peut pas parler quand tu et spectacteur !"



command /test:
   trigger:
       set {ghost.join::%player%} to false

command /test1:
   trigger:
       remove 1 from {ghost.start}

command /add:
   trigger:
       add 1 to {ghost.start}

  • 0
Posté(e)
command /ghost <text> [<text>]:
   trigger:
       if arg 1 is "join":
           if {ghost.join::%player%} is false:
               add 1 to {ghost.start}
               broadcast "&a%player% vient de rejoindre ! &b%{ghost.start}%/10"
               set {ghost.join::%player%} to true
               set {ghost.fin::%player%} to ""
               teleport player to {ghost.lobby}
               if {ghost.start} is equal to 10: #Pour le start
                   set {ghost.en.cours} to true
                   set {_s} to 10
                   loop 10 times:
                       remove 1 from {_s}
                       send message "&7La partie commence dans &e%{_s}% secondes" to loop-player
                       play raw sound "level_random" at player with pitch 1 volume 10
                       wait 1 second
                   loop all players:
                       set {_r} to a random integer between 1 and 10  # Pour le random
                       wait 0.5 tick
                        if loop-player is in {ghost.start}:
                           teleport loop-player to {ghost.list::%{_r}%}
                           apply invisibility to loop-player for 15 seconds
           else:
               send "&aTu a deja de rejoindre la file d'attente !"
       if arg 1 is "leave":
           remove 1 from {ghost.start}
           broadcast "&b[Ghost&4] &a%player% vient de quitté ! %{ghost.start}%/10"
           teleport player to {ghost.quit}
           set {ghost.join::%player%} to false
           if {ghot.spectator} is true:
               make console execute "/fly %player%"
               set {ghot.spectator} to false
               set {ghost.chat.spectator} to false
               reveal player to all players
       if arg 1 is "setlobby":
           set {ghost.lobby} to location of player
           send "Tu viens de set le Lobby de Jeux !"
       if arg 1 is "setquit":
           set {ghost.quit} to location of player
           send "Tu vient de set le spawn de fin !"
       if arg 1 is "spectactor":
           broadcast "&4[&bGhost&4] &a%player% vient de rejoindre en tant que spectacteur"
           set {ghost.chat.spectator} to true
           set {ghot.spectator} to true
           make console execute "/fly %player%"
           hide player to all players
       if arg 1 is "stop":
           if player has permissions "ghost.stop":
               teleport {ghost.fin::*} to {ghost.quit}
               delete {ghost.join::*}
               delete {ghost.fin::*}
               delete {ghost.start}
               set {ghost.en.cours} to false
               send "&4Tu vient de stoper le jeux !"


       if arg 1 is "setspawn":              
           if arg 2 is "1":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::1} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"
       if arg 1 is "setspawn":
           if arg 2 is "2":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::2} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "3":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::3} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "4":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::4} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "5":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::5} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "6":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::6} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "7":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::7} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "8":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::8} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if arg 2 is "9":
               if player has permissions "ghost.setspawn":
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::9} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

       if arg 1 is "setspawn":
           if player has permissions "ghost.setspawn":           
               if arg 2 is "10":   
                   add arg 2 to {ghost.loc::*}
                   set {ghost.loc::10} to location of player
                   send "&aTu vient de set le Spawn &b: %arg 2%"

on break:
   if {ghost.join.%player%} is true:
       cancel event
on place:
   if {ghost.join.%player%} is true:
       cancel event

on death of player:
   if {ghost.join.%attacker%} is true:
       if {ghost.join.%victim%} is true:
           add 1 to {ghost.points.%attacker%}
           if {ghost.points.%attacker%} is equal to 10:
               broadcast "&a Fin de la partit: &b%player% &aVient de Win la partit !"
               teleport {ghost.fin::*} to {ghost.quit}
               delete {ghost.start}
               delete {ghost.join::%player%}





# Panneaux #

on rightclick on sign:
   if targeted block is a sign:
       if line 1 is "[Ghost]":
           if line 2 is "Join":
               wait 1 tick
               set line 3 to "&4%{ghost.start}%/10"
               make player execute "/ghost join"
               if {ghost.start} is equal to 10:
                   set line 2 to "&4En cours"
                   set line 3 to ""

on rightclick on sign:
   if targeted block is a sign:
       if line 1 is "[Ghost]":
           if line 2 is "&4En cours":
           make player execute "/ghost spectactor"
           if {ghost.en.cours} is false:
               set line 2 to "Join"
               set line 3 to ""

on chat:
   if {ghost.chat.spectator} is true:
       cancel event
       send "&4Tu ne peut pas parler quand tu et spectacteur !"



command /test:
   trigger:
       set {ghost.join::%player%} to false

command /test1:
   trigger:
       remove 1 from {ghost.start}

command /add:
   trigger:
       add 1 to {ghost.start}

[/c0de]

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.