Aller au contenu
  • 0

Aide pour un skript de menu


Question

Posté(e)

désoler j'ai pas trouver la section aide je crois qu'elle est bloqué

bref voila mon problème est que je peux prendre les items dans le menu et je veux pas 

 

voici mon code:

on right click with blaze rod:
	if player has permission "use.speed":
		if name of tool of player is "&6Speed":
			open chest with 6 rows named "&6Menu &bEffets" to player
			format slot 20 of player with water bottle named "&bSpeed" with lore "&eeffet de speed" to run [make player execute command "/sprint"]
			format slot 22 of player with water bottle named "&aJump" with lore "&eeffet de jump" to run [make player execute command "/jump"]
			format slot 24 of player with water bottle named "&fFly" with lore "&eeffet de spped sur le fly" to run [make player execute command "/sprint_fly"]
			execute console command "eco take %player% 1500"
			send "&8[&aEffets&8] &7>> &a1500$ &eon était retirer pour l'ouverture du menu" to player

command /sprint:
	trigger:
		if player is player:
			open chest with 6 rows named "&bSprint" to player
			format slot 12 of player with glowstone dust named "&bspeed &f1" with lore "&0" to run [make console execute command "/speed1"]
			format slot 14 of player with glowstone dust named "&bspeed &f2" with lore "&0" to run [make console execute command "/speed2"]
			format slot 22 of player with glowstone dust named "&bspeed &f3" with lore "&0" to run [make console execute command "/speed3"]
			format slot 30 of player with glowstone dust named "&bspeed &f4" with lore "&0" to run [make console execute command "/speed4"]
			format slot 32 of player with glowstone dust named "&bspeed &f5" with lore "&0" to run [make console execute command "/speed5"]
			format slot 49 of player with barrier named "&cFermer" to close

command /speed1:
	trigger:
		if player is player:
			execute console command "/speed run 1 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a1 &7activer" to player
command /speed2:
	trigger:
		if player is player:
			execute console command "/speed run 2 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a2 &7activer" to player
command /speed3:
	trigger:
		if player is player:
			execute console command "/speed run 3 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a3 &7activer" to player
command /speed4:
	trigger:
		if player is player:
			execute console command "/speed run 4 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a4 &7activer" to player
command /speed5:
	trigger:
		if player is player:
			execute console command "/speed run 5 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a5 &7activer" to player

command /jump:
	trigger:
		if player is player:
			open chest with 6 rows named "&4Menu &bSprint" to player
			format slot 12 of player with glowstone dust named "&aJump &f1" with lore "&0" to run [make console execute command "/jump1"]
			format slot 14 of player with glowstone dust named "&aJump &f2" with lore "&0" to run [make console execute command "/jump2"]
			format slot 22 of player with glowstone dust named "&aJump &f3" with lore "&0" to run [make console execute command "/jump3"]
			format slot 30 of player with glowstone dust named "&aJump &f4" with lore "&0" to run [make console execute command "/jump4"]
			format slot 32 of player with glowstone dust named "&aJump &f5" with lore "&0" to run [make console execute command "/jump5"]
			format slot 49 of player with barrier named "&cFermer" to close

command /jump1:
	trigger:
		if player is player:
			execute console command "/effect %player% jump_boost 1000000 4"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a1 &7activer" to player
command /jump2:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 8"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a2 &7activer" to player
command /jump3:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 12"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a3 &7activer" to player
command /jump4:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 16"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a4 &7activer" to player
command /jump5:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 20"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a5 &7activer" to player
command /jump_off:
	trigger:
		if player is player:
			execute console command "/effect %player% clear"
			send "&8[&aJump&8] &7>> &7Les effets de &ajump &7ont était &cdésactiver avec succée" to player


command /sprint_fly:
	trigger:
		if player is player:
			open chest with 6 rows named "&4Menu &bSprint" to player
			format slot 12 of player with glowstone dust named "&fFly &a1" with lore "&0" to run [make console execute command "/fly1"]
			format slot 14 of player with glowstone dust named "&fFly &a2" with lore "&0" to run [make console execute command "/fly2"]
			format slot 22 of player with glowstone dust named "&fFly &a3" with lore "&0" to run [make console execute command "/fly3"]
			format slot 30 of player with glowstone dust named "&fFly &a4" with lore "&0" to run [make console execute command "/fly4"]
			format slot 32 of player with glowstone dust named "&fFly &a5" with lore "&0" to run [make console execute command "/fly5"]					
			format slot 49 of player with barrier named "&cFermer" to close

command /fly1:
	trigger:
		if player is player:
			execute console command "/speed fly 1 %player%"
			send "&8[&aSprint&8] &7>> &ffly &7niveau &a1 &7activer" to player
command /fly2:
	trigger:
		if player is player:
			execute console command "/speed fly 2 %player%"
			send "&8[&aSprint&8] &7>> &ffly &7niveau &a2 &7activer" to player
command /fly3:
	trigger:
		if player is player:
			execute console command "/speed fly 3 %player%"
			send "&8[&aSprint&8] &7>> &ffly &7niveau &a3 &7activer" to player
command /fly4:
	trigger:
		if player is player:
			execute console command "/speed fly 4 %player%"
			send "&8[&aSprint&8] &7>> &ffly &7niveau &a4 &7activer" to player
command /fly5:
	trigger:
		if player is player:
			execute console command "/speed fly 5 %player%"
			send "&8[&aSprint&8] &7>> &ffly &7niveau &a5 &7activer" to player

20 réponses à cette question

Messages recommandés

  • 0
Posté(e)
il y a 1 minute, noftaly a dit :

Pour ne pas trouver la section aide il faut être aveugle... Sérieusement tu as cherché ? C'est 2 forums en dessous du forum Suggestion

Je suis désoler ?

  • 0
Posté(e)

Je suis sur tel alors je ne peux rien te faire, mais je peux te conseiller.

1. Utilises TuSKe pour tes guis, c'est vrmt beaucoup beaucoup mieux. en plus tu n'auras plus ton pb, ils seront plus optimisés, et tu n'auras plus besoin de tes 10 commandes de fly, de jump, de Speed etc.

2. Quand tu peux, utilises les syntaxes skript plutôt que de passer par des consoles command. Je fais référence aux "/eco" et aux effets.

3. Je suis gentil je te dis d'où viens ton pb : il faut rajouter "wait 2 ticks" après les "open chest...". Mais utilises quand même TuSKe, tu n'auras pas besoin de ce wait, et ce sera mieux

  • J'aime 1
  • 0
Posté(e)

Alors petit soucis quand j'essaye de mettre:
 

apply speed 5 to the player

command /speed1:
	trigger:
		if player is player:
			apply speed 5 to the player
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a1 &7activer" to player

cela ne fonctionne pas
et le message ne s'affiche pas sachant que j'ai installé TuSke

  • 0
Posté(e) (modifié)

ok si tu souhaite corriger ^^' disons que j'essaye d'apprendre mais sur le tas et je sais qu'il ne faut jamais copié collé un code a cause des tabs ^^'. Mais je me suis lancer dans se code pour essayer de me débrouiller par moi même voili voilou.

on right click with blaze rod:
	if player has permission "use.speed":
		if name of tool of player is "&6Speed":
			open chest with 6 rows named "&6Menu &bEffets" to player
			wait 2 ticks
			format slot 20 of player with water bottle named "&bSpeed" with lore "&eeffet de speed" to run [make player execute command "/sprint"]
			format slot 22 of player with water bottle named "&aJump" with lore "&eeffet de jump" to run [make player execute command "/jump"]
			format slot 24 of player with water bottle named "&fFly" with lore "&eeffet de spped sur le fly" to run [make player execute command "/sprint_fly"]
			execute console command "eco take %player% 1500"
			send "&8[&aEffets&8] &7>> &a1500$ &eon était retirer pour l'ouverture du menu" to player

command /sprint:
	trigger:
		if player is player:
			open chest with 6 rows named "&bSprint" to player
			wait 2 ticks
			format slot 12 of player with glowstone dust named "&bspeed &f1" with lore "&0" to run [make console execute command "/speed1"]
			format slot 14 of player with glowstone dust named "&bspeed &f2" with lore "&0" to run [make console execute command "/speed2"]
			format slot 22 of player with glowstone dust named "&bspeed &f3" with lore "&0" to run [make console execute command "/speed3"]
			format slot 30 of player with glowstone dust named "&bspeed &f4" with lore "&0" to run [make console execute command "/speed4"]
			format slot 32 of player with glowstone dust named "&bspeed &f5" with lore "&0" to run [make console execute command "/speed5"]
			format slot 49 of player with barrier named "&cFermer" to close

command /speed1:
	trigger:
		if player is player:
			apply potion of speed of tier 30 to the player for 1 minute
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a1 &7activer" to player
command /speed2:
	trigger:
		if player is player:
			make console execute command "/speed run 2 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a2 &7activer" to player
command /speed3:
	trigger:
		if player is player:
			execute console command "/speed run 3 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a3 &7activer" to player
command /speed4:
	trigger:
		if player is player:
			execute console command "/speed run 4 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a4 &7activer" to player
command /speed5:
	trigger:
		if player is player:
			execute console command "/speed run 5 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a5 &7activer" to player

command /jump:
	trigger:
		if player is player:
			open chest with 6 rows named "&4Menu &bSprint" to player
			wait 2 ticks
			format slot 12 of player with glowstone dust named "&aJump &f1" with lore "&0" to run [make console execute command "/jump1"]
			format slot 14 of player with glowstone dust named "&aJump &f2" with lore "&0" to run [make console execute command "/jump2"]
			format slot 22 of player with glowstone dust named "&aJump &f3" with lore "&0" to run [make console execute command "/jump3"]
			format slot 30 of player with glowstone dust named "&aJump &f4" with lore "&0" to run [make console execute command "/jump4"]
			format slot 32 of player with glowstone dust named "&aJump &f5" with lore "&0" to run [make console execute command "/jump5"]
			format slot 49 of player with barrier named "&cFermer" to close

command /jump1:
	trigger:
		if player is player:
			execute console command "/effect %player% jump_boost 1000000 4"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a1 &7activer" to player
command /jump2:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 8"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a2 &7activer" to player
command /jump3:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 12"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a3 &7activer" to player
command /jump4:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 16"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a4 &7activer" to player
command /jump5:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 20"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a5 &7activer" to player
command /jump_off:
	trigger:
		if player is player:
			execute console command "/effect %player% clear"
			send "&8[&aJump&8] &7>> &7Les effets de &ajump &7ont était &cdésactiver avec succée" to player


command /sprint_fly:
	trigger:
		if player is player:
			open chest with 6 rows named "&4Menu &bSprint" to player
			wait 2 ticks
			format slot 12 of player with glowstone dust named "&fFly &a1" with lore "&0" to run [make console execute command "/fly1"]
			format slot 14 of player with glowstone dust named "&fFly &a2" with lore "&0" to run [make console execute command "/fly2"]
			format slot 22 of player with glowstone dust named "&fFly &a3" with lore "&0" to run [make console execute command "/fly3"]
			format slot 30 of player with glowstone dust named "&fFly &a4" with lore "&0" to run [make console execute command "/fly4"]
			format slot 32 of player with glowstone dust named "&fFly &a5" with lore "&0" to run [make console execute command "/fly5"]					
			format slot 49 of player with barrier named "&cFermer" to close

command /fly1:
	trigger:
		if player is player:
			execute console command "/speed fly 1 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a1 &7activer" to player
command /fly2:
	trigger:
		if player is player:
			execute console command "/speed fly 2 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a2 &7activer" to player
command /fly3:
	trigger:
		if player is player:
			execute console command "/speed fly 3 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a3 &7activer" to player
command /fly4:
	trigger:
		if player is player:
			execute console command "/speed fly 4 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a4 &7activer" to player
command /fly5:
	trigger:
		if player is player:
			execute console command "/speed fly 5 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a5 &7activer" to player

Modifié par Rush2Fer
  • 0
Posté(e) (modifié)

Je ne peux rien te faire je suis sur téléphone ^^

Bref sinon, fais /ver skript et /ver TuSKe et dis moi les versions ^^ et qu'elle est la version de ton serveur ? Je vais peut être pouvoir t'aider ?

Modifié par noftaly
  • 0
Posté(e) (modifié)
Il y a 14 heures, Blackbalrog a dit :

ok si tu souhaite corriger ^^' disons que j'essaye d'apprendre mais sur le tas et je sais qu'il ne faut jamais copié collé un code a cause des tabs ^^'. Mais je me suis lancer dans se code pour essayer de me débrouiller par moi même voili voilou.


on right click with blaze rod:
	if player has permission "use.speed":
		if name of tool of player is "&6Speed":
			open chest with 6 rows named "&6Menu &bEffets" to player
			wait 2 ticks
			format slot 20 of player with water bottle named "&bSpeed" with lore "&eeffet de speed" to run [make player execute command "/sprint"]
			format slot 22 of player with water bottle named "&aJump" with lore "&eeffet de jump" to run [make player execute command "/jump"]
			format slot 24 of player with water bottle named "&fFly" with lore "&eeffet de spped sur le fly" to run [make player execute command "/sprint_fly"]
			execute console command "eco take %player% 1500"
			send "&8[&aEffets&8] &7>> &a1500$ &eon était retirer pour l'ouverture du menu" to player

command /sprint:
	trigger:
		if player is player:
			open chest with 6 rows named "&bSprint" to player
			wait 2 ticks
			format slot 12 of player with glowstone dust named "&bspeed &f1" with lore "&0" to run [make console execute command "/speed1"]
			format slot 14 of player with glowstone dust named "&bspeed &f2" with lore "&0" to run [make console execute command "/speed2"]
			format slot 22 of player with glowstone dust named "&bspeed &f3" with lore "&0" to run [make console execute command "/speed3"]
			format slot 30 of player with glowstone dust named "&bspeed &f4" with lore "&0" to run [make console execute command "/speed4"]
			format slot 32 of player with glowstone dust named "&bspeed &f5" with lore "&0" to run [make console execute command "/speed5"]
			format slot 49 of player with barrier named "&cFermer" to close

command /speed1:
	trigger:
		if player is player:
			apply potion of speed of tier 30 to the player for 1 minute
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a1 &7activer" to player
command /speed2:
	trigger:
		if player is player:
			make console execute command "/speed run 2 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a2 &7activer" to player
command /speed3:
	trigger:
		if player is player:
			execute console command "/speed run 3 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a3 &7activer" to player
command /speed4:
	trigger:
		if player is player:
			execute console command "/speed run 4 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a4 &7activer" to player
command /speed5:
	trigger:
		if player is player:
			execute console command "/speed run 5 %player%"
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a5 &7activer" to player

command /jump:
	trigger:
		if player is player:
			open chest with 6 rows named "&4Menu &bSprint" to player
			wait 2 ticks
			format slot 12 of player with glowstone dust named "&aJump &f1" with lore "&0" to run [make console execute command "/jump1"]
			format slot 14 of player with glowstone dust named "&aJump &f2" with lore "&0" to run [make console execute command "/jump2"]
			format slot 22 of player with glowstone dust named "&aJump &f3" with lore "&0" to run [make console execute command "/jump3"]
			format slot 30 of player with glowstone dust named "&aJump &f4" with lore "&0" to run [make console execute command "/jump4"]
			format slot 32 of player with glowstone dust named "&aJump &f5" with lore "&0" to run [make console execute command "/jump5"]
			format slot 49 of player with barrier named "&cFermer" to close

command /jump1:
	trigger:
		if player is player:
			execute console command "/effect %player% jump_boost 1000000 4"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a1 &7activer" to player
command /jump2:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 8"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a2 &7activer" to player
command /jump3:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 12"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a3 &7activer" to player
command /jump4:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 16"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a4 &7activer" to player
command /jump5:
	trigger:
		if player is player:
			execute console command "/effect Blackbalrog jump_boost 1000000 20"
			send "&8[&aJump&8] &7>> &ajump &7niveau &a5 &7activer" to player
command /jump_off:
	trigger:
		if player is player:
			execute console command "/effect %player% clear"
			send "&8[&aJump&8] &7>> &7Les effets de &ajump &7ont était &cdésactiver avec succée" to player


command /sprint_fly:
	trigger:
		if player is player:
			open chest with 6 rows named "&4Menu &bSprint" to player
			wait 2 ticks
			format slot 12 of player with glowstone dust named "&fFly &a1" with lore "&0" to run [make console execute command "/fly1"]
			format slot 14 of player with glowstone dust named "&fFly &a2" with lore "&0" to run [make console execute command "/fly2"]
			format slot 22 of player with glowstone dust named "&fFly &a3" with lore "&0" to run [make console execute command "/fly3"]
			format slot 30 of player with glowstone dust named "&fFly &a4" with lore "&0" to run [make console execute command "/fly4"]
			format slot 32 of player with glowstone dust named "&fFly &a5" with lore "&0" to run [make console execute command "/fly5"]					
			format slot 49 of player with barrier named "&cFermer" to close

command /fly1:
	trigger:
		if player is player:
			execute console command "/speed fly 1 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a1 &7activer" to player
command /fly2:
	trigger:
		if player is player:
			execute console command "/speed fly 2 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a2 &7activer" to player
command /fly3:
	trigger:
		if player is player:
			execute console command "/speed fly 3 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a3 &7activer" to player
command /fly4:
	trigger:
		if player is player:
			execute console command "/speed fly 4 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a4 &7activer" to player
command /fly5:
	trigger:
		if player is player:
			execute console command "/speed fly 5 %player%"
			send "&8[&fFly&8] &7>> &ffly &7niveau &a5 &7activer" to player

UTILISE TUSKE

 

 

Il y a 14 heures, noftaly a dit :

Je ne peux rien te faire je suis sur téléphone ^^

Bref sinon, fais /ver skript et /ver TuSKe et dis moi les versions ^^ et qu'elle est la version de ton serveur ? Je vais peut être pouvoir t'aider ?

Tu vois bien que malgrès tout tes conseil il s’obstine à vouloir utiliser skquery pour les GUI... Peut tu vraiment l'aider du coup si il ne peut pas mettre du sien ?

Modifié par Rush2Fer
  • 0
Posté(e)

Oui, les guis c'est avec TuSKe sinon ya plein de pb. Et là par exemple il te faut TuSKe.

Il y a 3 heures, uiytt a dit :

UTILISE TUSKE

 

 

Tu vois bien que malgrès tout tes conseil il s’obstine à vouloir utiliser skquery pour les GUI... Peut tu vraiment l'aider du coup si il ne peut pas mettre du sien ?

c'est vrai ^^

  • 0
Posté(e) (modifié)

Hello, j'ai essayer le gui SkQuery en 1.12, ça foire pas mal du coup je te donne un code fait avec TuSke (qui lui fonctionne ? )

Je me suis également permis d'optimiser un peu le tout et ajouté une vérification si le joueur à l'argent requis pour ouvrir le menu.

 

function guiEffect(player: player, effect: text, value: integer):
	if {_effect} is "jump_boost":
		apply jump boost {_value} to {_player} for 1000000 seconds
		send "&8[&aJump&8] &7>> &ajump &7niveau &a%{_value}% &7activer" to {_player}
	else:
		{_effect} is "run":
			set {_player}'s walk speed to {_value}
			send "&8[&aSprint&8] &7>> &bspeed &7niveau &a%{_value}% &7activer" to {_player}
		{_effect} is "fly":
			set {_player}'s fly speed to {_value}
			send "&8[&fFly&8] &7>> &ffly &7niveau &a%{_value}% &7activer" to {_player}
		
function guiMenu(player: player, menu: text):
	open virtual chest inventory with size 6 named "&b%{_menu}%" to {_player}
	make gui slot 49 of {_player} with barrier named "&cFermer" to close
	{_menu} is "sprint":
		make gui slot 12 of {_player} with glowstone dust named "&b%{_menu}% &f1" to run function guiEffect({_player}, "run", 1)
		make gui slot 14 of {_player} with glowstone dust named "&b%{_menu}% &f2" to run function guiEffect({_player}, "run", 2)
		make gui slot 22 of {_player} with glowstone dust named "&b%{_menu}% &f3" to run function guiEffect({_player}, "run", 3)
		make gui slot 30 of {_player} with glowstone dust named "&b%{_menu}% &f4" to run function guiEffect({_player}, "run", 4)
		make gui slot 32 of {_player} with glowstone dust named "&b%{_menu}% &f5" to run function guiEffect({_player}, "run", 5)
	{_menu} is "jump":
		make gui slot 12 of {_player} with glowstone dust named "&b%{_menu}% &f1" to run function guiEffect({_player}, "jump_boost", 4)
		make gui slot 14 of {_player} with glowstone dust named "&b%{_menu}% &f2" to run function guiEffect({_player}, "jump_boost", 8)
		make gui slot 22 of {_player} with glowstone dust named "&b%{_menu}% &f3" to run function guiEffect({_player}, "jump_boost", 12)
		make gui slot 30 of {_player} with glowstone dust named "&b%{_menu}% &f4" to run function guiEffect({_player}, "jump_boost", 16)
		make gui slot 32 of {_player} with glowstone dust named "&b%{_menu}% &f5" to run function guiEffect({_player}, "jump_boost", 20)
	{_menu} is "sprint fly":
		make gui slot 12 of {_player} with glowstone dust named "&b%{_menu}% &f1" to run function guiEffect({_player}, "fly", 1)
		make gui slot 14 of {_player} with glowstone dust named "&b%{_menu}% &f2" to run function guiEffect({_player}, "fly", 2)
		make gui slot 22 of {_player} with glowstone dust named "&b%{_menu}% &f3" to run function guiEffect({_player}, "fly", 3)
		make gui slot 30 of {_player} with glowstone dust named "&b%{_menu}% &f4" to run function guiEffect({_player}, "fly", 4)
		make gui slot 32 of {_player} with glowstone dust named "&b%{_menu}% &f5" to run function guiEffect({_player}, "fly", 5)
	
	
on right click with blaze rod:
	player has permission "use.speed"
	name of event-item is "&6Speed"
	player's balance is greater or equal to 1500
	open virtual chest inventory with size 3 named "&6Menu &bEffets" to player
	make gui slot 11 of player with water bottle named "&bSpeed" with lore "&eEffet de speed" to close then run function guiMenu(player, "Sprint")
	make gui slot 13 of player with water bottle named "&aJump" with lore "&eEffet de jump" to close then run function guiMenu(player, "Jump")
	make gui slot 15 of player with water bottle named "&fFly" with lore "&eAugmente la vitesse de fly" to close then run function guiMenu(player, "Sprint fly")
	remove 1500 from player's balance
	send "&8[&aEffets&8] &7>> &a1500$ &eon était retirer pour l'ouverture du menu" to player

 

Modifié par WeBer_Le_Pecheur
  • J'aime 1
  • 0
Posté(e)
il y a 2 minutes, WeBer_Le_Pecheur a dit :

Hello, j'ai essayer le gui SkQuery en 1.12, ça foire pas mal du coup je te donne un code fait avec TuSke (qui lui fonctionne ? )

Je me suis également permis d'optimiser un peu le tout et ajouté une vérification si le joueur à l'argent requis pour ouvrir le menu.

 


function guiEffect(player: player, effect: text, value: integer):
	if {_effect} is "jump_boost":
		execute console command "/effect %{_player}% %{_effect}% 1000000 %{_value}%"
	else:
		execute console command "/speed %{_effect}% %{_value}% %{_player}%"
	if {_effect} is "run":
		send "&8[&aSprint&8] &7>> &bspeed &7niveau &a%{_value}% &7activer" to {_player}
	else if {_effect} is "sprint fly":
		send "&8[&fFly&8] &7>> &ffly &7niveau &a%{_value}% &7activer" to {_player}
		
function guiMenu(player: player, menu: text):
	open virtual chest inventory with size 6 named "&b%{_menu}%" to {_player}
	make gui slot 49 of {_player} with barrier named "&cFermer" to close
	{_menu} is "sprint":
		make gui slot 12 of {_player} with glowstone dust named "&b%{_menu}% &f1" to run function guiEffect({_player}, "run", 1)
		make gui slot 14 of {_player} with glowstone dust named "&b%{_menu}% &f2" to run function guiEffect({_player}, "run", 2)
		make gui slot 22 of {_player} with glowstone dust named "&b%{_menu}% &f3" to run function guiEffect({_player}, "run", 3)
		make gui slot 30 of {_player} with glowstone dust named "&b%{_menu}% &f4" to run function guiEffect({_player}, "run", 4)
		make gui slot 32 of {_player} with glowstone dust named "&b%{_menu}% &f5" to run function guiEffect({_player}, "run", 5)
	{_menu} is "jump":
		make gui slot 12 of {_player} with glowstone dust named "&b%{_menu}% &f1" to run function guiEffect({_player}, "jump_boost", 4)
		make gui slot 14 of {_player} with glowstone dust named "&b%{_menu}% &f2" to run function guiEffect({_player}, "jump_boost", 8)
		make gui slot 22 of {_player} with glowstone dust named "&b%{_menu}% &f3" to run function guiEffect({_player}, "jump_boost", 12)
		make gui slot 30 of {_player} with glowstone dust named "&b%{_menu}% &f4" to run function guiEffect({_player}, "jump_boost", 16)
		make gui slot 32 of {_player} with glowstone dust named "&b%{_menu}% &f5" to run function guiEffect({_player}, "jump_boost", 20)
	{_menu} is "sprint fly":
		make gui slot 12 of {_player} with glowstone dust named "&b%{_menu}% &f1" to run function guiEffect({_player}, "fly", 1)
		make gui slot 14 of {_player} with glowstone dust named "&b%{_menu}% &f2" to run function guiEffect({_player}, "fly", 2)
		make gui slot 22 of {_player} with glowstone dust named "&b%{_menu}% &f3" to run function guiEffect({_player}, "fly", 3)
		make gui slot 30 of {_player} with glowstone dust named "&b%{_menu}% &f4" to run function guiEffect({_player}, "fly", 4)
		make gui slot 32 of {_player} with glowstone dust named "&b%{_menu}% &f5" to run function guiEffect({_player}, "fly", 5)
	
	
on right click with blaze rod:
	player has permission "use.speed"
	name of event-item is "&6Speed"
	player's balance is greater or equal to 1500
	open virtual chest inventory with size 3 named "&6Menu &bEffets" to player
	make gui slot 11 of player with water bottle named "&bSpeed" with lore "&eEffet de speed" to close then run function guiMenu(player, "Sprint")
	make gui slot 13 of player with water bottle named "&aJump" with lore "&eEffet de jump" to close then run function guiMenu(player, "Jump")
	make gui slot 15 of player with water bottle named "&fFly" with lore "&eAugmente la vitesse de fly" to close then run function guiMenu(player, "Sprint fly")
	remove 1500 from player's balance
	send "&8[&aEffets&8] &7>> &a1500$ &eon était retirer pour l'ouverture du menu" to player

 

bell opti GG par contre pour donner un effet de potion utilise des syntaxes skript et pas un execute conso...

https://skripthub.net/docs/?id=1101

  • J'aime 1
  • 0
Posté(e) (modifié)
il y a 7 minutes, noftaly a dit :

Bien joué @WeBer_Le_Pecheur ? Belle optimisation ? et sinon c'est possible de changer le speed d'un joueur en skript sans Essentials ?

Oh oui, my bad. Je vais éditer ça.

 

EDIT: Voilà, jump et speed changé plus d'execute console!

Modifié par WeBer_Le_Pecheur
  • Merci 1
Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • 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.