Aller au contenu

[Boutique] Bouitque avec un menu GUI


Messages recommandés

Posté(e)

Version de minecraft:1.8/ version de skript 2.2

type du skript: menu gui

description du script:

Bonjour, j'ai essayer de faire un menu gui permettant d'acheter des grades, kit, spawner, et items avec de la money (money d'essential).

mais je n'arrive pas a faire en sorte qu'une fois que la personne a cliquer sur le grade qui veut il perdent sa money, qu'il reçoivent le grades et que sa mettent un broadcast disant "&e[boutique] <le joueur> as acheter le grades <nom du grades> !", Mais si il as pas de money sa lui envoie un message disant "&e[boutique] tu n'as pas assez d'argent pour acheter ce grade !".

 

il faut une commande le /boutique pour accéder au premier menu gui

puis d'autres commandes pour accéder au section suivant (grades kits spawner et items).

 

j'utilise skript et les add-ons wildskript, skrayfall et skquerry.

 

merci a tous ceux qui ont lus et repondus a ce poste

Posté(e)

Je t'ai fait pour le grade soldier je crois bien, tu as juste a faire ça pour tout.

 

command /boutique:
   trigger:
       open chest with 2 rows named "&eBoutique du serveur" to player
       wait 3 ticks
       format slot 0 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 1 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 2 of player with diamond sword named "&9Grades" to run [make player execute command "/achatgrade"]
       format slot 3 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 4 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 5 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 6 of player with diamond chestplate named "&9Kits" to run [make player execute command "/achatkit"]
       format slot 7 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 8 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 9 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 10 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 11 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 12 of player with mob spawners named "&9Spawners" to run [make player execute command "/achatspawner"]
       format slot 13 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 14 of player with golden apple named "&9Items" to run [make player execute command "/achatitems"]
       format slot 15 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 16 of player with blue stained glass named "&8Boutique" to be unstealable
       format slot 17 of player with blue stained glass named "&8Boutique" to be unstealable



on command "/achatgrade":
   open chest with 1 rows named "&eAchat de Grades" to player
   wait 3 ticks
   format slot 0 of player with blue stained glass named "&8achat de grades" to be unstealable
   format slot 1 of player with blue stained glass named "&8achat de grades" to be unstealable
   format slot 2 of player with golden sword named "&9Grade Soldier" to run [make player execute command "testa"]
   format slot 3 of player with blue stained glass named "&8achat de grades" to be unstealable
   format slot 4 of player with iron sword named "&9Grade Aventurier" to run [make server execute command "eco take %player% 90000"]
   format slot 5 of player with blue stained glass named "&8achat de grades" to be unstealable
   format slot 6 of player with diamond sword named "&9Grade Mercenaire" to run [make server execute command "eco take %player% 135000"]
   format slot 7 of player with blue stained glass named "&8achat de grades" to be unstealable
   format slot 8 of player with blue stained glass named "&8achat de grades" to be unstealable

on command "/achatkit":
   open chest with 3 rows named "&eAchat de Kits" to player
   wait 3 ticks

command /testa:
   trigger:
       if player's balance is bigger than 45000:
           make server execute command "eco take %player% 45000"
           #ta commande de grade
           broadcast "%player% a acheté le grade machin"
       else:
           send "&cTu n'as pas assez d'argent" 

Posté(e)

Bonjour,

sa me dit qu'il y as 2 erreur

la premiere: player's balance is not an entity type (boutique-ig.sk, line 45: if player's balance is bigger than 45000)

la deuxieme: else has to be placed just after an 'if' or 'else if' section (boutique-ig.sk, line 49: else)

Posté(e)

fait ça :

command /testa:
   trigger:
       if player's balance > 45000:
           remove 45000 from player's balance
           #ta commande de grade
           broadcast "%player% a acheté le grade machin"
       else:
           send "&cTu n'as pas assez d'argent"

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