Aller au contenu
  • 0

PvPSmash problème fin de combat


Question

Posté(e)

Bonjour,

J'ai créer un skript de PvP Smash et j'aimerais faire plusieurs choses avec ce skript:

- Dans /pvpsmash stop je voudrais que ça stop tous les "wait 1 minutes" en cour [Non Résolu]

- Quand un joueur est tué je veux qu'il passe en spectateur [Non Résolu]

- Quand tous les joueurs sont tué la partie ce stop (On pourrait réutiliser le /PvPSmash stop) [Non Résolu]

Pour l'optimisation j'aimerais déjà d'abord que le skript soit fonctionnel.

command /pvpsmash <text> [<text>]:
   usage: &6Utilise: &e/pvpsmash help
   trigger:
       if arg 1 is "start":
           set player's gamemode to adventure
           execute player command "wxcvbn"
           equip player with diamond chestplate
           equip player with diamond helmet
           equip player with diamond boots
           equip player with diamond leggings
           give player 1 diamond sword of sharpness 2
           give player 1 fishing rod
           give player 64 cooked beef
           give player 1 splash potion of healing 1
           give player 1 splash potion of healing 1
           give player 1 splash potion of damage 1
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a4 &cminutes"
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a3 &cminutes"
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a2 &cminutes"
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a1 &cminute"
           wait 1 minutes
           set {joinpvp} to 0
           clear player's inventory
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a3 &csecondes"
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a2 &csecondes"
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a1 &cseconde"
           teleport player to {lobby}
       if arg 1 is "stop":
           set {joinpvp} to 0
           clear player's inventory
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a3 &csecondes"
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a2 &csecondes"
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a1 &cseconde"
           teleport player to {lobby}
       if arg 1 is "setspawn":
           if arg 2 is "1":
               set {pvpsmashspawn1} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a1 &ceffectué avec succès"
           if arg 2 is "2":
               set {pvpsmashspawn2} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a2 &ceffectué avec succès"
           if arg 2 is "3":
               set {pvpsmashspawn3} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a3 &ceffectué avec succès"
           if arg 2 is "4":
               set {pvpsmashspawn4} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a4 &ceffectué avec succès"
           if arg 2 is "5":
               set {pvpsmashspawn5} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a5 &ceffectué avec succès"
           if arg 2 is "6":
               set {pvpsmashspawn6} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a6 &ceffectué avec succès"
           if arg 2 is "7":
               set {pvpsmashspawn7} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a7 &ceffectué avec succès"
           if arg 2 is "8":
               set {pvpsmashspawn8} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a8 &ceffectué avec succès"
       if arg 1 is "help":
           send "&6------------------------------------------------"
           send "&6Aide: PvP-Smash"
           send "&e /pvpsmash help &f- Voir l'aide"
           send "&e /pvpsmash start &f- Lancer une partie"
           send "&e /pvpsmash stop &f- Stoper une partie"
           send "&e /pvpsmash setspawn &b<1-8> &f- Définir les spawns"
           send "&e /pvpsmash setlobby &f- Définir le lobby du serveur"
           send "&e /pvpsmash setborder &f- Définir les bordures"
           send "&e /pvpsmash update &f- Vérifier la mise a jour"
           send "&6Page &b1&6/1"
           send "&6------------------------------------------------"
       if arg 1 is "update":
           send "&cVous utilisez la version 0.2, Skript-MC: https://skript-mc.fr/forum/resources/pvp-smash.1475/"
       if arg 1 is "setborder":
           execute player command "/worldborder set 30"
       if arg 1 is "setlobby":
           set {lobby} to location of player
           send "&6[PvP-Smash] &4> &cAjout du &blobby &ceffectué avec succès"

command /wxcvbn:
   trigger:
       add 1 to {joinpvp}
       wait 1 ticks
       if {joinpvp} = 1:
           teleport player to {pvpsmashspawn1}
       if {joinpvp} = 2:
           teleport player to {pvpsmashspawn2}
       if {joinpvp} = 3:
           teleport player to {pvpsmashspawn3}
       if {joinpvp} = 4:
           teleport player to {pvpsmashspawn4}
       if {joinpvp} = 5:
           teleport player to {pvpsmashspawn5}
       if {joinpvp} = 6:
           teleport player to {pvpsmashspawn6}
       if {joinpvp} = 7:
           teleport player to {pvpsmashspawn7}
       if {joinpvp} = 8:
           teleport player to {pvpsmashspawn8}
           wait 10 minutes
           set {joinpvp} to 0
       if {joinpvp} = 9:
           send "&6[PvP-Smash] &4> &cC'est au complet"    

Merci,

3 réponses à cette question

Messages recommandés

  • 0
Posté(e)
command /pvpsmash <text> [<text>]:
   usage: &6Utilise: &e/pvpsmash help
   trigger:
       if arg 1 is "start":
           set player's gamemode to adventure
           execute player command "wxcvbn"
           equip player with diamond chestplate
           equip player with diamond helmet
           equip player with diamond boots
           equip player with diamond leggings
           give player 1 diamond sword of sharpness 2
           give player 1 fishing rod
           give player 64 cooked beef
           give player 1 splash potion of healing 1
           give player 1 splash potion of healing 1
           give player 1 splash potion of damage 1
           {stop.pvp} isn't set
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a4 &cminutes" to {joinpvp::Vivant::*}
           {stop.pvp} isn't set
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a3 &cminutes" to {joinpvp::Vivant::*}
           {stop.pvp} isn't set
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a2 &cminutes" to {joinpvp::Vivant::*}
           {stop.pvp} isn't set
           wait 1 minutes
           send "&6[PvP-Smash] &4> &cIl reste &a1 &cminute" to {joinpvp::Vivant::*}
           {stop.pvp} isn't set
           wait 1 minutes
           loop {joinpvp::*}:
               clear loop-value's inventory
           {stop.pvp} isn't set
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a3 &csecondes" to {joinpvp::*}
           {stop.pvp} isn't set
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a2 &csecondes"to {joinpvp::*}
           {stop.pvp} isn't set
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a1 &cseconde"to {joinpvp::*}
           teleport player to {lobby}
           loop {joinpvp::*}:
               set loop-value's gamemode to survival
           clear {joinpvp::*}
       if arg 1 is "stop":
           set {stop.pvp} to true
           loop {joinpvp::*}:
               clear loop-value's inventory
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a3 &csecondes" to {joinpvp::*}
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a2 &csecondes" to {joinpvp::*}
           wait 1 second
           send "&6[PvP-Smash] &4> &cTéléporation au lobby dans &a1 &cseconde" to {joinpvp::*}
           teleport player to {lobby}
           clear {joinpvp::*}
           wait 20 seconds
           clear {stop.pvp}
       if arg 1 is "setspawn":
           if arg 2 is "1":
               set {pvpsmashspawn1} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a1 &ceffectué avec succès"
           if arg 2 is "2":
               set {pvpsmashspawn2} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a2 &ceffectué avec succès"
           if arg 2 is "3":
               set {pvpsmashspawn3} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a3 &ceffectué avec succès"
           if arg 2 is "4":
               set {pvpsmashspawn4} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a4 &ceffectué avec succès"
           if arg 2 is "5":
               set {pvpsmashspawn5} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a5 &ceffectué avec succès"
           if arg 2 is "6":
               set {pvpsmashspawn6} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a6 &ceffectué avec succès"
           if arg 2 is "7":
               set {pvpsmashspawn7} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a7 &ceffectué avec succès"
           if arg 2 is "8":
               set {pvpsmashspawn8} to location of player
               send "&6[PvP-Smash] &4> &cAjout du spawn &a8 &ceffectué avec succès"
       if arg 1 is "help":
           send "&6------------------------------------------------"
           send "&6Aide: PvP-Smash"
           send "&e /pvpsmash help &f- Voir l'aide"
           send "&e /pvpsmash start &f- Lancer une partie"
           send "&e /pvpsmash stop &f- Stoper une partie"
           send "&e /pvpsmash setspawn &b<1-8> &f- Définir les spawns"
           send "&e /pvpsmash setlobby &f- Définir le lobby du serveur"
           send "&e /pvpsmash setborder &f- Définir les bordures"
           send "&e /pvpsmash update &f- Vérifier la mise a jour"
           send "&6Page &b1&6/1"
           send "&6------------------------------------------------"
       if arg 1 is "update":
           send "&cVous utilisez la version 0.2, Skript-MC: https://skript-mc.fr/forum/resources/pvp-smash.1475/"
       if arg 1 is "setborder":
           execute player command "/worldborder set 30"
       if arg 1 is "setlobby":
           set {lobby} to location of player
           send "&6[PvP-Smash] &4> &cAjout du &blobby &ceffectué avec succès"

on death:
   if size of {joinpvp::Vivant::*} isn't 2:
       loop {joinpvp::Vivant::*}:
           loop-value is victim
           set victim's gamemode to spectator
           broadcast "&4Kill > &2%attacker% &7à tué &6%victim% &7!"
           send "&3Vous êtes mort, vous êtes passer en mode spectateur."
           remove victim from {joinpvp::Vivant::*}
           add victim to {joinpvp::Décédé::*}
   else:
       make player execute command "/pvpsmash stop"

command /wxcvbn:
   trigger:
       add player to {joinpvp::Vivant::*}
       wait 1 ticks
       if size of {joinpvp::Vivant::*} = 1:
           teleport player to {pvpsmashspawn1}
       if size of {joinpvp::Vivant::*} = 2:
           teleport player to {pvpsmashspawn2}
       if size of {joinpvp::Vivant::*} = 3:
           teleport player to {pvpsmashspawn3}
       if size of {joinpvp::Vivant::*} = 4:
           teleport player to {pvpsmashspawn4}
       if size of {joinpvp::Vivant::*} = 5:
           teleport player to {pvpsmashspawn5}
       if size of {joinpvp::Vivant::*} = 6:
           teleport player to {pvpsmashspawn6}
       if size of {joinpvp::Vivant::*} = 7:
           teleport player to {pvpsmashspawn7}
       if size of {joinpvp::Vivant::*} = 8:
           teleport player to {pvpsmashspawn8}
           wait 10 minutes
           clear {joinpvp::Vivant::*}
       if size of {joinpvp::Vivant::*} = 9:
           send "&6[PvP-Smash] &4> &cC'est au complet"    

  • J'aime 1
×
×
  • 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.