Aller au contenu

Messages recommandés

Posté(e)

Bonjour, je suis entrains de créer un skript rush mais hélas je suis bloqué a une étape importante celle de voir si le joueur a encore son lit.Mais sil il n'a plus son lit je souhaiterai qu'a sa prochaine mort il ne respawn pas et perd la parti.Donc si vous pouvez m'aider cela serait vraiment gentil ! :D

Posté(e)

@PsYZiiK @Mastersfelix tenez:

#_____________________________________________________________[OryZzOn]_____________________________________________________________#
options:
   Prefix: &6[OryZzOn]
   name: &6[OryZzOn]
   item: diamond sword


on right click on player with diamond sword:
   if name of tool of player is "&6[OryZzOn]":
       world is "Lobby":
           send "{@Prefix} &9%player% te défie en duel" to clicked player
           send "{@Prefix} &9Tu as défié %clicked player% en duel" to player
           make player execute command "/duelrush duel %clicked player%"
           set {demande.%clicked player%} to true


on join:
   teleport player to {lobby.rush}
   wait 10 tick
   send "&3Bienvenue sur le serveur !" to player
   broadcast "&7[&b+&7] &a%player% &3 a rejoint le serveur ! "
   make player execute command "/duelrush"


command /duelrush [<text>] [<player>]:
   trigger:
       world is "Lobby":
           clear player's inventory
           give an diamond sword named "{@name}" to slot 0 of player's inventory
       else:
           make console execute command "/mv tp %player% Lobby"
           send "{@Prefix} &9Te voila au rush !" to player
           clear player's inventory
           give an diamond sword named "{@name}" to slot 0 of player's inventory
       if arg 1 is "duel":
           if arg 2 is set:
               if {demande.%player%} is false:
                   execute console command "/tellraw %arg 2% ["""",{""text"":""{@Prefix} &eAcceptez-vous le duel ? - &a""},{""text"":""&aOui"",""clickEvent"":{""action"":""run_command"",""value"":""/duelrush accept %player%""}},{""text"":"" &e- &c""},{""text"":""&4Non"",""clickEvent"":{""action"":""run_command"",""value"":""/duelrush deny %player%""}}]"
       if arg 1 is "accept":
           if {demande.%player%} is true:
               send "{@Prefix}&e Le combat commence !" to player
               send "{@Prefix}&e Le combat commence !" to arg 2
               clear player's inventory
               clear arg 2's inventory
               set arg 2's food level to 20
               set player's food level to 20
               wait 1 tick
               make arg 2 execute command "/rushkitduel Rouge"
               make player execute command "/rushkitduel Bleu"
               set {bed.rouge.%player%} to true
               set {bed.bleu.%arg 2%} to true
               set {demande.%player%} to false
               set {demande.%arg 2%} to false
               set {bleu.%arg 2%} to true
               set {rouge.%player%} to true
               set {enjeu.%arg 2%.vs.%player%} to true
               add player to {Rouge.%player%::*}
               add arg 2 to {Bleu.%arg 2%::*}
               if {join.rush1} is false:
                   teleport player to {spawn.1.Rush1}
                   teleport arg 2 to {spawn.2.Rush1}
               if {join.rush2} is false:
                   teleport player to {spawn.1.Rush2}
                   teleport arg 2 to {spawn.2.Rush2}
               if {join.rush3} is false:
                   teleport player to {spawn.1.Rush3}
                   teleport arg 2 to {spawn.2.Rush3}
               if {join.rush4} is false:
                   teleport player to {spawn.1.Rush4}
                   teleport arg 2 to {spawn.2.Rush4}
               if {join.rush5} is false:
                   teleport player to {spawn.1.Rush5}
                   teleport arg 2 to {spawn.2.Rush5}
               if {join.rush6} is false:
                   teleport player to {spawn.1.Rush6}
                   teleport arg 2 to {spawn.2.Rush6}
               if {join.rush1} is true:
                   if {join.rush2} is true:
                       if {join.rush3} is true:
                           if {join.rush4} is true:
                               if {join.rush5} is true:
                                   if {join.rush6} is true:
                                       send "{@Prefix}&9En attente qu'une partie ce finisse !" to player
                                       send "{@Prefix}&9En attente qu'une partie ce finisse !" to arg 2

           else:
               send "{@Prefix}&7 Tu n'as pas de demande" to player
       if arg 1 is "deny":
           if {demande.%player%} is true:
               send "{@Prefix}&4 Tu as refusé le combat !" to player
               send "{@Prefix}&4 %player% a refusé le combat !" to arg 2
               set {demande.%player%} to false
               set {demande.%arg 2%} to false
           else:
               send "{@Prefix}&7 Tu n'as pas de demande" to player
       if arg 1 is "leave":
           if arg 2 is set:
               if {enjeu.%arg 2%.vs.%player%} is true:
                   set {bed.rouge.%player%} to false
                   set {bed.bleu.%arg 2%} to false
                   set {demande.%player%} to true
                   set {demande.%arg 2%} to true
                   set {bleu.%arg 2%} to false
                   set {rouge.%player%} to false
                   send "{@Prefix}&2 Fin du match !" to player
                   send "{@Prefix}&2 Fin du match !" to arg 2
                   set {enjeu.%arg 2%.vs.%player%} to false

every 1 second:
   loop all players:
       if loop-player's world is "Rush1":
       add 1 to {_Rush1}
       if {_Rush1} >= 2:
           set {join.rush1} to false
       if loop-player's world is "Rush2":
       add 1 to {_Rush2}
       if {_Rush2} >= 2:
           set {join.rush2} to false
       if loop-player's world is "Rush3":
       add 1 to {_Rush3}
       if {_Rush3} >= 2:
           set {join.rush3} to  false
       if loop-player's world is "Rush4":
       add 1 to {_Rush4}
       if {_Rush4} >= 2:
           set {join.rush4} to false
       if loop-player's world is "Rush5":
       add 1 to {_Rush5}
       if {_Rush5} >= 2:
           set {join.rush5} to false
       if loop-player's world is "Rush6":
       add 1 to {_Rush6}
       if {_Rush6} >= 2:
           set {join.rush6} to false




command /duelrushadmin [<text>] [<text>]:
   trigger:
       if arg 1 is "setspawn":
           if arg 2 is set:
               world is "Rush1":
                   set {spawn.%arg 2%.Rush1} to player's location
                   send "{@Prefix}&8Tu as set le spawn %arg 2%/2" to player
       if arg 1 is "setlobby":
           set {lobby.rush} to player's location
           send "{@Prefix}&7Tu as set le lobby du rush" to player
       if arg 1 is "help":
           send "{@Prefix}&7 Set le spawn : &6/duelrushadmin setspawn (nombres) (arenes)" to player
           send "{@Prefix}&7 Set le lobby : &6/duelrushadmin setlobby" to player

command /rushkitduel <text>:
   trigger:
       if {enjeu.%player%} is true:
           if arg 1 is "Rouge":
               equip player with a leather helmet
               dye player's helmet red
               equip player with a leather leggings
               dye player's leggings red
               equip player with a leather boots
               dye player's boots red
           if arg 1 is "Bleu":
               equip player with a leather helmet
               dye player's helmet blue
               equip player with a leather leggings
               dye player's leggings blue
               equip player with a leather boots
               dye player's boots blue

on death of player:
   victim is a player
   set {_drops::*} to drops
   clear drops
   loop {_drops::*}:
       if loop-value is a chestplate:
           drop loop-value at player's location
   if {bed.rouge.%player%} is true:
   else:
       broadcast "{@Prefix} &9 %attacker% a gagné son duel contre %player%"
       make console execute command "/duelrush leave %attacker%"

on respawn:
   if {enjeu.%player%} is true:
       if {rouge.%player%} is true:
           make player execute command "/rushkitduel Rouge"
       if {bleu.%player%} is true:
           make player execute command "/rushkitduel Bleu"

Posté(e)
Salut, il y a une condition pour voir si le lit du joueur existe.


if bed of player exists:
[/Code]

Résolu ![/color][/font]

 

Une petite question même si c'est résolu comment détecter si le bed est détruit par de la tnt ?

Posté(e)
Tu mets "else:" qui signifie que le lit est détruit pour qu'il n'existe plus.

Oui mais si je fais ça le joueur pourrais le casser a la main.Sinon tu peux vocal sur discord au pire ?

×
×
  • 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.