Aller au contenu
FurioGamer

résolu ✔ Demande de skript (atm)

Messages recommandés

Version de Minecraft : 1.12.2
Version de Skript : dernière version

Type du skript : Skript atm

Description du script :

Bonjour, je souhaiterai faire un skript atm mais j'ai un problème. voici mon code (je vous joins des photo plus bah). Mais quand je fais la command et que je clique sur le block de concrete vert ou rouge après dans le gui retirer ou déposer je peux prendre les items comme jeux alors que je voudrais que sa ne bouge pas. Merci

Cordialement FurioGamer

 

 

options:
 
    carte:
    atm:
 
on right click with {@atm}:
    if player's tool is "{@carte}":
        player execute command "/furio_atm_open %player%"
 
command /furio_atm_open <player>:
    trigger:
    close the arg 1's inventory
        wait 1 tick
        open chest with 3 row named "ATM" to arg 1
    wait 1 tick
        format slot 11 of arg 1 with lime concrete named "&a&lDéposer de l'argent" to run [make player execute command "furio_atm_dep %arg 1%"]
        format slot 13 of arg 1 with bedrock named "&3&lBienvenue sur ton compte" with lore "&6Tu a &f%player%" to be unstealable
        format slot 15 of arg 1 with red concrete named "&c&lRetirer de l'argent" to run [make player execute command "furio_atm_ret %arg 1%"]
 
command /furio_atm_ret <player>:
    trigger:
    close the arg 1's inventory
        wait 1 tick
        open chest with 3 row named "&c&lRetirer" to arg 1
    wait 1 tick
        format slot 1 of arg 1 with dirt named "Retirer 5€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 5"]
        format slot 3 of arg 1 with grass named "Retirer 10€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 10"]
        format slot 5 of arg 1 with stone named "Retirer 20€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 20"]
        format slot 7 of arg 1 with bedrock named "Retirer 50€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 50"]
        format slot 11 of arg 1 with dirt named "Retirer 100€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 100"]
        format slot 13 of arg 1 with grass named "Retirer 200€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 200"]
        format slot 15 of arg 1 with stone named "Retirer 500€" with lore "&6Clique droit pour retirer" to run [make console execute command "furio_atm_money ret %arg 1% 500"]
        format slot 22 of arg 1 with red concrete named "&c&lRetour" to run [make player execute command "furio_atm_open %arg 1%"]
 
command /furio_atm_dep <player>:
    trigger:
    close the arg 1's inventory
        wait 1 tick
        open chest with 3 row named "&a&lDéposer" to arg 1
    wait 1 tick
        format slot 1 of arg 1 with dirt named "Déposer 5€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 5"]
        format slot 3 of arg 1 with grass named "Déposer 10€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 10"]
        format slot 5 of arg 1 with stone named "Déposer 20€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 20"]
        format slot 7 of arg 1 with bedrock named "Déposer 50€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 50"]
        format slot 11 of arg 1 with dirt named "Déposer 100€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 100"]
        format slot 13 of arg 1 with grass named "Déposer 200€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 200"]
        format slot 15 of arg 1 with stone named "Déposer 500€" with lore "&6Clique droit pour déposer" to run [make console execute command "furio_atm_money dep %arg 1% 500"]
        format slot 22 of arg 1 with red concrete named "&c&lRetour" to run [make player execute command "furio_atm_open %arg 1%"]
 
command /furio_atm_money <text> <player> <text>:
    trigger:
    wait 1 tick
        if arg 1 is "dep":
            if arg 3 is "5":
                if player's inventory contains "dirt":
                    remove 1 dirt from player's inventory
                    make console execute command "eco give %arg 2% 5"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
            if arg 3 is "10":
                if player's inventory contains "grass":
                    remove 1 grass from player's inventory
                    make console execute command "eco give %arg 2% 10"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
            if arg 3 is "20":
                if player's inventory contains "stone":
                    remove 1 stone from player's inventory
                    make console execute command "eco give %arg 2% 20"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
            if arg 3 is "50":
                if player's inventory contains "bedrock":
                    remove 1 bedrock from player's inventory
                    make console execute command "eco give %arg 2% 50"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
            if arg 3 is "100":
                if player's inventory contains "dirt":
                    remove 1 dirt from player's inventory
                    make console execute command "eco give %arg 3% 100"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
            if arg 3 is "200":
                if player's inventory contains "grass":
                    remove 1 grass from player's inventory
                    make console execute command "eco give %arg 3% 200"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
            if arg 3 is "500":
                if player's inventory contains "stone":
                    remove 1 stone from player's inventory
                    make console execute command "eco give %arg 3% 500"
                    stop
                else:
                    send "&c&lDésoler, tu n'as pas assez de billet dans ton inventaire" to arg 2
                    stop
        else:
            if arg 1 is "ret":
                if arg 3 is "5":
                    if player's balance is greater or equal to "5":
                        give 1 dirt to player's inventory
                        make console execute command "eco give %arg 3% 5"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop
                if arg 3 is "10":
                    if player's balance is greater or equal to "10":
                        give 1 grass to player's inventory
                        make console execute command "eco give %arg 3% 10"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop
                if arg 3 is "20":
                    if player's balance is greater or equal to "20":
                        give 1 stone to player's inventory
                        make console execute command "eco give %player% 20"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop
                if arg 3 is "50":
                    if player's balance is greater or equal to "50":
                        give 1 bedrock to player's inventory
                        make console execute command "eco give %arg 3% 50"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop
                if arg 3 if "100":
                    if player's balance is greater or equal to "100":
                        give 1 dirt to player's inventory
                        make console execute command "eco give %arg 3% 100"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop
                if arg 3 is "200":
                    if player's balance is greater or equal to "200":
                        give 1 grass to player's inventory
                        make console execute command "eco give %arg 3% 200"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop
                if arg 3 is "500":
                    is player's balance is greater or equal to "500":
                        give 1 stone to player's inventory
                        make console execute command "eco give %arg 3% 500"
                        stop
                    else:
                        send "&c&lDésoler, tu n'as pas assez d'argent sur ton compte" to arg 2
                        stop

2021-08-14_18.18.27.png

2021-08-14_18.18.36.png

2021-08-14_18.18.43.png

Modifié par FurioGamer

Partager ce message


Lien à poster
Partager sur d’autres sites
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.