Aller au contenu

Messages recommandés

Posté(e)

Noshigo submitted a new resource:

 

[plain]RéparateurGUI - Noshigo[/plain] - [plain]Un GUI permettant de réparer vos item contre un ticket[/plain]

 

Hello !

RéparateurGUI est un script qui permet de réparer vos items grâce à un GUI lorsque le joueur clique sur un certain PNJ.

Commandes:

/repair spawn : pour faire spawner un PNJ réparateur

/repair kill : pour tuer tous les réparateurs

/repair ticket : give un ticket de réparage

 

Le principe:

Une fois le PNJ créé avec la...

 

Read more about this resource...

  • J'aime 2
Posté(e)

Pour ton problème, tu peux peut-être le régler avec:

on close inventory:
   while "%inventory name of player's current inventory%" contains "Forgeron":
       if slot 10 of current inventory of player is any sword or any axe or any shovel or any pickaxe or any hoe or fishing rod or any helmet or any chestplate or any leggings or any boots or shears or bow or flint and steel:
           set {_item} to slot 10 of current inventory of player
           give {_item} to player
           stop
       if slot 16 of current inventory of player is any sword or any axe or any shovel or any pickaxe or any hoe or fishing rod or any helmet or any chestplate or any leggings or any boots or shears or bow or flint and steel:
           set {_item} to slot 16 of current inventory of player
           give {_item} to player
           stop

Posté(e)

Tu peux même faire :

            while "%inventory name of player's current inventory%" contains "Forgeron":
               wait 2 ticks
               if slot 10 of current inventory of player is any sword or any axe or any shovel or any pickaxe or any hoe or fishing rod or any helmet or any chestplate or any leggings or any boots or shears or bow or flint and steel:
                   if slot 13 of current inventory of player is {@ticket}:
                       set {_item} to slot 10 of current inventory of player
                       if data value of {_item} is 0:
                           close the player's inventory
                           send "&aVotre &6%{_item}% &an'est pas endommagé." to player
                           give {_item} to player
                           stop
                       else:
                           set data value of {_item} to 0
                           format slot 10 of player with Shiny barrier named "  " to be unstealable
                           format slot 13 of player with Shiny barrier named "  " to be unstealable
                           set slot 16 of current inventory of player to {_item}                   
                           stop    

 

on close inventory:
   while "%inventory name of player's current inventory%" contains "Forgeron":
       if slot 16 of current inventory of player is any sword or any axe or any shovel or any pickaxe or any hoe or fishing rod or any helmet or any chestplate or any leggings or any boots or shears or bow or flint and steel:
           set {_item} to slot 16 of current inventory of player
           give {_item} to player
           stop

Enfin un truc comme ça. J'ai testé sur mon serveur, c'est fonctionnel. Mais doit y avoir quelques choses dans le skript qui fait crash mon serveur (Sachant que je me suis servit de ton skript pour le déporter vers autres choses, mais, ça reste dans l'esprit du forgeron :D:D).

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