Aller au contenu
  • 0

Question

5 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Salut, si tu pourrais dire s'il te plait et merci sa serait mieu, c'est la politesse !, Il nous faut ton code de ton atm pour t'aider, comme sa on peut rien, faire

  • 0
Posté(e)

oui excuse moi

je n'ai pas fait attention je corrige ça tout de suite

et pour le code le voici

 

encore dsl pour la politesse...

#=========== Options ===========#

options:
#              ID        "NAME"                        "LORE"
   debitCard: 339 named "&6Carte de crédit" with lore "&7Carte certifiée"

   debitCardPrice: 10            # Définit le prix de la carte de crédit

   1:         175 named "&6Pièce d'&c1€" with lore "&7Pièce de monnaie certifiée"
   10:        339 named "&6Billet d'&c10€" with lore "&7Billet de monnaie certifiée"
   50:        339 named "&6Billet d'&c50€" with lore "&7Billet de monnaie certifiée"
   100:       339 named "&6Billet d'&c100€" with lore "&7Billet de monnaie certifiée"
   500:       339 named "&6Billet d'&c500€" with lore "&7Billet de monnaie certifiée"

   atm: dropper                # Définit le bloc utilisé comme ATM

   button: 1 stone button        # Définit les boutons dans l'ATM

   permAtmReg: atm.reg            # Perm pour créer/détruire des ATM
   permCardBuy: atm.card.buy    # Perm pour ouvrir le menu d'achat de la carte
   permAtm*: atm.*                # Perm pour se give la carte et ouvrir l'atm

#=========== En dév. ===========#

   language: fr

   ver: 0.1

#=========== Mises-à -jours (en dév.) ===========#

#on script load:
#    wait 3 seconds
#    if text from "https://pastebin.com/raw/HxieDd72" isn't "{@ver}":
#        loop all players:
#            if loop-player has permission "*":
#                send "{@logo} &aMise-Ã -jour en cours..." to loop-player
#                set {_time} to now
#                wait 0.5 tick
#                download from "https://pastebin.com/raw/fNgrfFzv" to "plugins/Skript/scripts/%script%.sk"
#                execute console command "/sk reload %script%"
#                wait 0.5 tick
#                send "{@logo} Mise-à -jour installée en &b%difference between {_time} and now% !"

#=========== Events ===========#

on rightclick on {@atm}:
   loop {atms::*}:
       if targeted block's location is loop-value:
           cancel event
           if player's tool is 1 {@debitCard}:
               execute console command "/atm %player%"
           else:
               send "&cVous n'avez pas votre carte de crédit !"

on break of {@atm}:
   loop {atms::*}:
       if targeted block's location is loop-value:
           cancel event
           if player has permission "{@permAtmReg}":
               send "&cPour détruire cet A.T.M veuillez le supprimer avec la commande &4/atmunreg !"
           else:
               send "&cVous n'avez pas la permission de détruire cet A.T.M !"

#=========== Commandes de créations/déstructions des ATM ===========#

command /atmreg:
   permission: {@permAtmReg}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if targeted block is a {@atm}:
           add targeted block's location to {atms::*}
           send "&cCe bloc est dorénavant un ATM !"
       else:
           send "&cCe n'est pas un {@atm} !"

command /atmunreg:
   permission: {@permAtmReg}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if targeted block is a {@atm}:
           remove targeted block's location from {atms::*}
           send "&cCe bloc n'est dorénavant plus un ATM !"
       else:
           send "&cCe n'est pas un {@atm} !"

#=========== Commande d'achat de cartes de crédits ===========#

command /atmbuy <player> [<text>]:
   permission: {@permCardBuy}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if arg 1 is set:
           if arg 2 isn't set:
               open chest with 3 rows named "&4Banquier" to arg 1
               set {_s} to 0
               loop 27 times:
                   format gui slot {_s} of arg 1 with 1 red glass named " "
                   add 1 to {_s}
               set {_s} to 10
               loop 7 times:
                   format gui slot {_s} of arg 1 with air
                   add 1 to {_s}
               format gui slot 13 of arg 1 with 1 339 named "&6Voulez-vous acheter une carte de crédit pour &4{@debitCardPrice}€ &6?" with lore "&7La première est gratuite !" to close then run console command "/atmbuy %arg-1% buy"

           else if arg 2 is "buy":
               if {firsttime.%player%} isn't set:
                   execute console command "/atm %arg-1% card"
                   set {firsttime.%player%} to false

               else if arg 1's account >= {@debitCardPrice}:
                   remove {@debitCardPrice} from arg 1's account
                   execute console command "/atm %arg-1% card"
               else:
                   send "&cVous n'avez pas assez d'argent !" to arg 1

#=========== Commande principale (ATM et give de la carte de crédit) ===========#

command /atm <player> [<text>] [<text>]:
   permission: {@permAtm*}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if arg 1 is set:
           if arg 2 isn't set:
               open "dispenser" with 3 rows named "&4A.T.M &c| Accueil | &4%arg 1's account%" to arg 1
               format gui slot 0 of arg 1 with {@button} named "&6Déposer de l'argent" to close then run console command "/atm %arg-1% d"
               format gui slot 3 of arg 1 with {@button} named "&6Retirer de l'argent" to close then run console command "/atm %arg-1% r"
               format gui slot 6 of arg 1 with {@button} named " "
               format gui slot 2 of arg 1 with {@button} named " "
               format gui slot 5 of arg 1 with {@button} named " "
               format gui slot 8 of arg 1 with {@button} named " "

#=========== Retrait ===========#

           else if arg 2 is "r":
               if arg 3 isn't set:
                   open "dispenser" with 3 rows named "&4A.T.M &c| Retirer de l'argent" to arg 1
                   format gui slot 0 of arg 1 with {@button} named "&6Retirer &c1€" to run console command "/atm %arg-1% r 1"
                   format gui slot 3 of arg 1 with {@button} named "&6Retirer &c10€" to run console command "/atm %arg-1% r 10"
                   format gui slot 6 of arg 1 with {@button} named "&6Retirer &c50€" to run console command "/atm %arg-1% r 50"
                   format gui slot 2 of arg 1 with {@button} named "&6Retirer &c100€" to run console command "/atm %arg-1% r 100"
                   format gui slot 5 of arg 1 with {@button} named "&6Retirer &c500€" to run console command "/atm %arg-1% r 500"
                   format gui slot 8 of arg 1 with {@button} named "&6Retour" to close then run console command "/atm %arg-1%"

               else if arg 3 is "1":
                   if arg 1's account >= 1:
                       remove 1 from arg 1's account
                       give 1 {@1} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "10":
                   if arg 1's account >= 10:
                       remove 10 from arg 1's account
                       give 1 {@10} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "50":
                   if arg 1's account >= 50:
                       remove 50 from arg 1's account
                       give 1 {@50} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "100":
                   if arg 1's account >= 100:
                       remove 100 from arg 1's account
                       give 1 {@100} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "500":
                   if arg 1's account >= 500:
                       remove 500 from arg 1's account
                       give 1 {@500} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

#=========== Dépôt ===========#

           else if arg 2 is "d":
               if arg 3 isn't set:
                   open "dispenser" with 3 rows named "&4A.T.M &c| Déposer de l'argent" to arg 1
                   format gui slot 0 of arg 1 with {@button} named "&6Déposer &c1€" to run console command "/atm %arg-1% d 1"
                   format gui slot 3 of arg 1 with {@button} named "&6Déposer &c10€" to run console command "/atm %arg-1% d 10"
                   format gui slot 6 of arg 1 with {@button} named "&6Déposer &c50€" to run console command "/atm %arg-1% d 50"
                   format gui slot 2 of arg 1 with {@button} named "&6Déposer &c100€" to run console command "/atm %arg-1% d 100"
                   format gui slot 5 of arg 1 with {@button} named "&6Déposer &c500€" to run console command "/atm %arg-1% d 500"
                   format gui slot 8 of arg 1 with {@button} named "&6Retour" to close then run console command "/atm %arg-1%"

               else if arg 3 is "1":
                   if arg-1 has 1 {@1}:
                       remove 1 {@1} from arg-1's inventory
                       add 1 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "10":
                   if arg-1 has 1 {@10}:
                       remove 1 {@10} from arg-1's inventory
                       add 10 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "50":
                   if arg-1 has 1 {@50}:
                       remove 1 {@50} from arg-1's inventory
                       add 50 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "100":
                   if arg-1 has 1 {@100}:
                       remove 1 {@100} from arg-1's inventory
                       add 100 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "500":
                   if arg-1 has 1 {@500}:
                       remove 1 {@500} from arg-1's inventory
                       add 500 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

#=========== Give de la carte ===========#

           else if arg 2 is "card":
               give 1 {@debitCard} to arg 1

#=========== Commande du portefeuille (en dév.) ===========#

#command /wallet <player>:
#    trigger:
#        set {_inv} to chest with 1 row named "Portefeuille"
#        if {container::wallet::%arg-1%} is set:
#            set {_inv}'s serialized contents to {container::wallet::%arg-1%}
#        open {_inv} to arg-1
#        set {container::current::%arg-1%} to "wallet"
#
#on inventory close:
#    if {container::current::%player%} is set:
#        if "%event-inventory%" is "inventory of <none>":
#            set {container::%{container::current::%player%}%::%player%} to event-inventory's serialized contents
#            clear {container::current::%player%}
#
#on inventory click:
#    if {container::current::%player%} is set:
#        if event-item isn't {@debitCard}:
#            cancel event

  • 0
Posté(e)
oui excuse moi

je n'ai pas fait attention je corrige ça tout de suite

et pour le code le voici

 

encore dsl pour la politesse...

#=========== Options ===========#

options:
#              ID        "NAME"                        "LORE"
   debitCard: 339 named "&6Carte de crédit" with lore "&7Carte certifiée"

   debitCardPrice: 10            # Définit le prix de la carte de crédit

   1:         175 named "&6Pièce d'&c1€" with lore "&7Pièce de monnaie certifiée"
   10:        339 named "&6Billet d'&c10€" with lore "&7Billet de monnaie certifiée"
   50:        339 named "&6Billet d'&c50€" with lore "&7Billet de monnaie certifiée"
   100:       339 named "&6Billet d'&c100€" with lore "&7Billet de monnaie certifiée"
   500:       339 named "&6Billet d'&c500€" with lore "&7Billet de monnaie certifiée"

   atm: dropper                # Définit le bloc utilisé comme ATM

   button: 1 stone button        # Définit les boutons dans l'ATM

   permAtmReg: atm.reg            # Perm pour créer/détruire des ATM
   permCardBuy: atm.card.buy    # Perm pour ouvrir le menu d'achat de la carte
   permAtm*: atm.*                # Perm pour se give la carte et ouvrir l'atm

#=========== En dév. ===========#

   language: fr

   ver: 0.1

#=========== Mises-à -jours (en dév.) ===========#

#on script load:
#    wait 3 seconds
#    if text from "https://pastebin.com/raw/HxieDd72" isn't "{@ver}":
#        loop all players:
#            if loop-player has permission "*":
#                send "{@logo} &aMise-Ã -jour en cours..." to loop-player
#                set {_time} to now
#                wait 0.5 tick
#                download from "https://pastebin.com/raw/fNgrfFzv" to "plugins/Skript/scripts/%script%.sk"
#                execute console command "/sk reload %script%"
#                wait 0.5 tick
#                send "{@logo} Mise-à -jour installée en &b%difference between {_time} and now% !"

#=========== Events ===========#

on rightclick on {@atm}:
   loop {atms::*}:
       if targeted block's location is loop-value:
           cancel event
           if player's tool is 1 {@debitCard}:
               execute console command "/atm %player%"
           else:
               send "&cVous n'avez pas votre carte de crédit !"

on break of {@atm}:
   loop {atms::*}:
       if targeted block's location is loop-value:
           cancel event
           if player has permission "{@permAtmReg}":
               send "&cPour détruire cet A.T.M veuillez le supprimer avec la commande &4/atmunreg !"
           else:
               send "&cVous n'avez pas la permission de détruire cet A.T.M !"

#=========== Commandes de créations/déstructions des ATM ===========#

command /atmreg:
   permission: {@permAtmReg}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if targeted block is a {@atm}:
           add targeted block's location to {atms::*}
           send "&cCe bloc est dorénavant un ATM !"
       else:
           send "&cCe n'est pas un {@atm} !"

command /atmunreg:
   permission: {@permAtmReg}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if targeted block is a {@atm}:
           remove targeted block's location from {atms::*}
           send "&cCe bloc n'est dorénavant plus un ATM !"
       else:
           send "&cCe n'est pas un {@atm} !"

#=========== Commande d'achat de cartes de crédits ===========#

command /atmbuy <player> [<text>]:
   permission: {@permCardBuy}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if arg 1 is set:
           if arg 2 isn't set:
               open chest with 3 rows named "&4Banquier" to arg 1
               set {_s} to 0
               loop 27 times:
                   format gui slot {_s} of arg 1 with 1 red glass named " "
                   add 1 to {_s}
               set {_s} to 10
               loop 7 times:
                   format gui slot {_s} of arg 1 with air
                   add 1 to {_s}
               format gui slot 13 of arg 1 with 1 339 named "&6Voulez-vous acheter une carte de crédit pour &4{@debitCardPrice}€ &6?" with lore "&7La première est gratuite !" to close then run console command "/atmbuy %arg-1% buy"

           else if arg 2 is "buy":
               if {firsttime.%player%} isn't set:
                   execute console command "/atm %arg-1% card"
                   set {firsttime.%player%} to false

               else if arg 1's account >= {@debitCardPrice}:
                   remove {@debitCardPrice} from arg 1's account
                   execute console command "/atm %arg-1% card"
               else:
                   send "&cVous n'avez pas assez d'argent !" to arg 1

#=========== Commande principale (ATM et give de la carte de crédit) ===========#

command /atm <player> [<text>] [<text>]:
   permission: {@permAtm*}
   permission message: &4Vous n'avez pas la permission
   trigger:
       if arg 1 is set:
           if arg 2 isn't set:
               open "dispenser" with 3 rows named "&4A.T.M &c| Accueil | &4%arg 1's account%" to arg 1
               format gui slot 0 of arg 1 with {@button} named "&6Déposer de l'argent" to close then run console command "/atm %arg-1% d"
               format gui slot 3 of arg 1 with {@button} named "&6Retirer de l'argent" to close then run console command "/atm %arg-1% r"
               format gui slot 6 of arg 1 with {@button} named " "
               format gui slot 2 of arg 1 with {@button} named " "
               format gui slot 5 of arg 1 with {@button} named " "
               format gui slot 8 of arg 1 with {@button} named " "

#=========== Retrait ===========#

           else if arg 2 is "r":
               if arg 3 isn't set:
                   open "dispenser" with 3 rows named "&4A.T.M &c| Retirer de l'argent" to arg 1
                   format gui slot 0 of arg 1 with {@button} named "&6Retirer &c1€" to run console command "/atm %arg-1% r 1"
                   format gui slot 3 of arg 1 with {@button} named "&6Retirer &c10€" to run console command "/atm %arg-1% r 10"
                   format gui slot 6 of arg 1 with {@button} named "&6Retirer &c50€" to run console command "/atm %arg-1% r 50"
                   format gui slot 2 of arg 1 with {@button} named "&6Retirer &c100€" to run console command "/atm %arg-1% r 100"
                   format gui slot 5 of arg 1 with {@button} named "&6Retirer &c500€" to run console command "/atm %arg-1% r 500"
                   format gui slot 8 of arg 1 with {@button} named "&6Retour" to close then run console command "/atm %arg-1%"

               else if arg 3 is "1":
                   if arg 1's account >= 1:
                       remove 1 from arg 1's account
                       give 1 {@1} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "10":
                   if arg 1's account >= 10:
                       remove 10 from arg 1's account
                       give 1 {@10} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "50":
                   if arg 1's account >= 50:
                       remove 50 from arg 1's account
                       give 1 {@50} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "100":
                   if arg 1's account >= 100:
                       remove 100 from arg 1's account
                       give 1 {@100} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

               else if arg 3 is "500":
                   if arg 1's account >= 500:
                       remove 500 from arg 1's account
                       give 1 {@500} to arg 1
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas assez d'argent !" to arg 1

#=========== Dépôt ===========#

           else if arg 2 is "d":
               if arg 3 isn't set:
                   open "dispenser" with 3 rows named "&4A.T.M &c| Déposer de l'argent" to arg 1
                   format gui slot 0 of arg 1 with {@button} named "&6Déposer &c1€" to run console command "/atm %arg-1% d 1"
                   format gui slot 3 of arg 1 with {@button} named "&6Déposer &c10€" to run console command "/atm %arg-1% d 10"
                   format gui slot 6 of arg 1 with {@button} named "&6Déposer &c50€" to run console command "/atm %arg-1% d 50"
                   format gui slot 2 of arg 1 with {@button} named "&6Déposer &c100€" to run console command "/atm %arg-1% d 100"
                   format gui slot 5 of arg 1 with {@button} named "&6Déposer &c500€" to run console command "/atm %arg-1% d 500"
                   format gui slot 8 of arg 1 with {@button} named "&6Retour" to close then run console command "/atm %arg-1%"

               else if arg 3 is "1":
                   if arg-1 has 1 {@1}:
                       remove 1 {@1} from arg-1's inventory
                       add 1 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "10":
                   if arg-1 has 1 {@10}:
                       remove 1 {@10} from arg-1's inventory
                       add 10 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "50":
                   if arg-1 has 1 {@50}:
                       remove 1 {@50} from arg-1's inventory
                       add 50 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "100":
                   if arg-1 has 1 {@100}:
                       remove 1 {@100} from arg-1's inventory
                       add 100 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

               else if arg 3 is "500":
                   if arg-1 has 1 {@500}:
                       remove 1 {@500} from arg-1's inventory
                       add 500 to arg-1's money
                       send " " to arg 1
                       send "&6Nouveau solde: &c%arg 1's account%" to arg 1
                       send " " to arg 1
                   else:
                       send "&cVous n'avez pas de quoi déposer !" to arg 1

#=========== Give de la carte ===========#

           else if arg 2 is "card":
               give 1 {@debitCard} to arg 1

#=========== Commande du portefeuille (en dév.) ===========#

#command /wallet <player>:
#    trigger:
#        set {_inv} to chest with 1 row named "Portefeuille"
#        if {container::wallet::%arg-1%} is set:
#            set {_inv}'s serialized contents to {container::wallet::%arg-1%}
#        open {_inv} to arg-1
#        set {container::current::%arg-1%} to "wallet"
#
#on inventory close:
#    if {container::current::%player%} is set:
#        if "%event-inventory%" is "inventory of <none>":
#            set {container::%{container::current::%player%}%::%player%} to event-inventory's serialized contents
#            clear {container::current::%player%}
#
#on inventory click:
#    if {container::current::%player%} is set:
#        if event-item isn't {@debitCard}:
#            cancel event

J'vais regarder.

  • 0
Posté(e)
J'vais regarder.

 

alors maintenant il n'y a pas plus d'erreurs mais il ne give pas la carte de crédit...

quand je fais la commande /atmbuy MonPseudo il m'ouvre bien le GUI mais quand je clique pour prendre la carte il ne fais rien

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