ISolax Posté(e) le 18 août 2017 Posté(e) le 18 août 2017 Bonjour a tous, j'ai un petit problème avec mon skript totem, quand je le lance il est niquel mais quand je casse les blocks de quartz avec une épée en diamant ca ne met pas le message "player" de tel faction a casser 1 bloc du totem il en reste 4, et quand c fini ca ne fais rien. options: prefix: &8[&eTotem&8] permission: totem.use permissiondeny: &8[&eTotem&8] &cVous n'avez pas la permission d'executer cette commande #Mise en route du Skript on load: if {totem.cooldown} is not set: set {totem.cooldown} to 300 #300 = 5 Minutes set {totem.event} to false #Désactivé le totem au chargement du Skript if {totem.price} is not set: set {totem.price} to 10 diamond block #Récompense du totem if {totem.cd} is not set: set {totem.cd} to false on join: set {totem.points.%player%} to 0 #Point/Joueur a 0 set {totem.price.%player%} to 0 #Prix du joueur/victoire totem on quit: set {totem.points.%player%} to 0 #Point/Joueur a 0 #Commande du Skript command /totem [<text>] [<text>] [<number>]: permission: {@permission} permission message: {@permissiondeny} aliases: to, t trigger: if arg 1 is not set: message "&6Fait &c/totem give help &6pour avoir la liste des commandes" to player if arg 1 is "give": if arg 2 is "help": message " {@prefix} " message "&8/totem set on &aLancer le totem!" message "&8/totem set off &aDésactivé le totem!" message "&8/totem set cooldown &aMettre le temps de capture du totem!" message "&8/totem set now &aLancer le totem immédiatement!" message "&8/totem set off &aDésactivé le totem!" message "&8/totem scoreboard on &aActivé le scoreboard!" message "&8/totem scoreboard off &aDésactivé le scoreboard!" message "&8/totem give tool &aDonne les objets de délimitation!" message "&8/totem set price &aMettre la récompense du totem!" message "&8/totem price &aRecevoir la récompense du totem!" message "&8/totem give key &aDonner une clef totem a un joueur!" message "&8/totem set point &aMettre le point de spawn du pillier!" if arg 1 is "set": if arg 2 is "cooldown": if number-argument is set: set {totem.cooldown} to number-argument message "{@prefix} &6Le cooldown a été mit sur &a%{totem.cooldown}% &6secondes." if arg 2 is "point": set {loc} to player's location set block under player to red wool set {x.loc} to x-coordinate of player set {y.loc} to y-coordinate of player set {z.loc} to z-coordinate of player message "{@prefix} &6Tu viens de poser le point du pillier" if arg 2 is "price": set {totem.price} to player's tool message "{@prefix}&6 Tu viens de mettre %player's tool% comme récompense." if arg 2 is "on": loop all players: if {pilier.on} is true: message "{@prefix} &6Le totem est déja &aactivé&6!" stop else: make console execute "§setpillier" set {totem.cd} to true wait 5 ticks if {totem.cd} is true: broadcast "{@prefix} &6Le totem a été &aActivé&6." set {totem.points.%loop-player%} to 0 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a5 minute." wait 60 seconds broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a4 minute." wait 60 seconds broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a3 minute." wait 60 seconds broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a2 minute." wait 60 seconds broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a1 minute." wait 50 seconds broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a10 secondes." wait 5 seconds broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a5 secondes." play raw sound "note.pling" at player with pitch 1 volume 10 wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a4 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a3 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a2 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a1 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vient d'être lancé." set {totem.event} to true make loop-player execute "t scoreboard on" play raw sound "mob.bat.death" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le pillier viens d'apparaitre." if arg 2 is "now": loop all players: if {pilier.on} is true: message "{@prefix} &6Le totem est déja &aactivé&6!" stop else: make console execute "§setpillier" broadcast "{@prefix} &6Le totem a été &aActivé&6." set {totem.points.%loop-player%} to 0 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a5 secondes." play raw sound "note.pling" at player with pitch 1 volume 10 wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a4 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a3 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a2 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vas spawn dans &a1 secondes." wait 1 seconds play raw sound "note.pling" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le &eTotem &6vient d'être lancé." set {totem.event} to true play raw sound "mob.bat.death" at player with pitch 1 volume 10 broadcast "{@prefix} &6Le pillier viens d'apparaitre." make loop-player execute "t scoreboard on" if arg 2 is "off": loop all players: if {pilier.on} is false: message "{@prefix} &6Le totem est déja &cdésactivé&6!" stop else: make console execute "§rempillier" set {totem.cd} to false message "{@prefix} &6Le totem a été &cDésactivé&6." set {totem.points.%loop-player%} to 0 set {totem.event} to false set {totem.cooldown} to 300 make loop-player execute "§totemscoreboard" wait 2 seconds wipe loop-player sidebar wait 2 ticks make loop-player execute "§totemscoreboard2" wait 5 seconds wipe loop-player sidebar if arg 1 is "scoreboard": if arg 2 is "off": loop all players: wipe loop-player sidebar message "{@prefix} &6Scoreboard &cDésactivé&6." set {totem.points.%loop-player%} to 0 if arg 2 is "on": loop all players: wipe loop-player sidebar make loop-player execute "§totemscoreboard" set {totem.points.%loop-player%} to 0 if arg 1 is "give": if arg 2 is "tool": give golden hoe named "&8Zone de totem" to player if arg 2 is "key": give 1 tripwire hook named "&cClef totem" to player message "{@prefix} &6Tu viens de donner une clef totem a %arg 2%" if arg 1 is "price": if {totem.price.%player%} is less or equal to 0: message "{@prefix} &6Tu n'a plus de clef totem!" if {totem.price.%player%} is bigger or equal to 1: give {totem.price} to player remove 1 from {totem.price.%player%} if arg 1 is "menu": open chest with 1 row named "&cTotem &a>>" to player format slot 0 of player with golden hoe named "&aDéfinir les zones" with lore "&9Clique ici pour recevoir l'item de délimitation" to close then run [make player execute command "t give tool"] format slot 4 of player with beacon named "&aReload le skript" to close then run [make player execute command "skript reload %script name%"] format slot 2 of player with light green wool named "&aLancer le totem" with lore "&aCooldown de &65&a minutes." to close then run [make player execute command "totem set on"] format slot 6 of player with red wool named "&aArrèter le totem" with lore "&cStop immédiatement le totem" to close then run [make player execute command "totem set off"] format slot 8 of player with black wool named "&aDémare &cImmédiatement &ale totem" with lore "&cLance immédiatement le totem" to close then run [make player execute command "totem set now"] #Sécurité double commande! if arg 1 is "set": if arg 2 is "now" or "on": if {totem.on} is true: stop message "{@prefix} &6Le totem est déja &aactivé&6." to player if arg 1 is "set": if arg 2 is "off": if {totem.on} is false: stop message "{@prefix} &6Le totem est déja &aactivé&6." to player command /§totemscoreboard: trigger: display board named " {@prefix} " to player make score "&aPoints: &6%{totem.points.%player%}%" in board of player to 5 make score "&aTime: &6%{totem.cooldown}%" in board of player to 4 make score "&aCoordonées:" in board of player to 3 make score "&aX: &6%{x.loc}%" in board of player to 2 make score "&aY: &6%{y.loc}%" in board of player to 1 make score "&aZ: &6%{z.loc}%" in board of player to 0 move display of player to sidebar command /§totemscoreboard2: trigger: display board named " {@prefix} " to player make score "&aLe totem" in board of player to 2 make score "&avient de se" in board of player to 1 make score "&aterminer" in board of player to 0 move display of player to sidebar command /§setpillier: trigger: set {pilier.on} to true set block at {loc} to quartz add 1 to y-coordinate of {loc} wait 3 ticks set block at {loc} to quartz add 1 to y-coordinate of {loc} wait 3 ticks set block at {loc} to quartz add 1 to y-coordinate of {loc} wait 3 ticks set block at {loc} to quartz add 1 to y-coordinate of {loc} wait 3 ticks set block at {loc} to quartz command /§rempillier: trigger: set {pilier.on} to false set block at {loc} to air remove 1 from y-coordinate of {loc} wait 3 ticks set block at {loc} to air remove 1 from y-coordinate of {loc} wait 3 ticks set block at {loc} to air remove 1 from y-coordinate of {loc} wait 3 ticks set block at {loc} to air remove 1 from y-coordinate of {loc} wait 3 ticks set block at {loc} to air on right click: if name of player's tool is "&8Zone de totem": set {totem1} to location of targeted block send "{@prefix} &6Point &e1." on left click: if name of player's tool is "&8Zone de totem": cancel event set {totem2} to location of targeted block send "{@prefix} &6Point &e2." on break of nether quartz: loop all players: if loop-player's tool is a diamond sword: if {totem.event} is true: if loop-player is not within {totem1} to {totem2}: cancel event add 1 to {totem.points.%player%} broadcast "{@prefix} &6Le joueur &a%player% &6viens de gagner un points et est a &c%{totem.points.%player%}% &6points." make loop-player execute "§totemscoreboard" if {totem.points.%loop-player%} is equal to 5: message "{@prefix} &6Tu viens de recevoir une clef de totem" to player wait 5 ticks give 1 tripwire hook named "&cClef totem" to player else: cancel event message "{@prefix} &6Le totem est &cDésactivé&6." every second: loop all players: if {totem.points.%loop-player%} is equal to 5: make console execute "totem set off" broadcast "{@prefix} &6Le totem viens de se terminer!" wipe loop-player sidebar if {totem.event} is true: if {totem.cd} is true: remove 1 from {totem.cooldown} make loop-player execute "§totemscoreboard" if {totem.cooldown} is equal to 1: make console execute "totem set off" on rightclick on a diamond block: if player's tool is a tripwire hook named "&cClef totem": cancel event give {totem.price} to player remove tripwire hook named "&cClef totem" from player's inventory
Azer_Flaash Posté(e) le 19 août 2017 Posté(e) le 19 août 2017 Pourquoi fais-tu une boucle sur tous les joueurs lorsque une personne casse un bloc du totem ? Sinon, ton scoreboard n'est pas du tout optimisé là, je te conseille de suivre mon tutoriel !
ISolax Posté(e) le 19 août 2017 Auteur Posté(e) le 19 août 2017 Ce n'est pas mon skript mais celui d'un ami, je souhaite juste savoir les failles,
PlayFlopp Posté(e) le 19 août 2017 Posté(e) le 19 août 2017 C'est mon Skript, on est pas ami x) Pourquoi mentir ? dit moi ?
ISolax Posté(e) le 19 août 2017 Auteur Posté(e) le 19 août 2017 Bah un ami me l'a envoyer sur skype tout simplement x)
Messages recommandés