Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=========== Options ===========#
- options:
- # ID "NAME" "LORE"
- debitCard: 339 named "&6Carte de crédit" with lore "&7Carte certifiée"
- 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"
- language: fr
- #=========== Ne pas toucher ! :p ===========#
- ver: 0.1
- #=========== Mises-à-jours ===========#
- 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 dropper:
- 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 dropper:
- loop {atms::*}:
- if targeted block's location is loop-value:
- cancel event
- if player has permission "atm.reg":
- 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: atm.reg
- permission message: &4Vous n'avez pas la permission
- trigger:
- if targeted block is a dropper:
- add targeted block's location to {atms::*}
- send "&cCe bloc est dorénavant un ATM !"
- else:
- send "&cCe n'est pas un dropper !"
- command /atmunreg:
- permission: atm.reg
- permission message: &4Vous n'avez pas la permission
- trigger:
- if targeted block is a dropper:
- remove targeted block's location from {atms::*}
- send "&cCe bloc n'est dorénavant plus un ATM !"
- else:
- send "&cCe n'est pas un dropper !"
- #=========== Commande d'achat de cartes de crédits ===========#
- command /atmbuy [<player>] [<text>]:
- permission: atm.card.use
- 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 {@debitCard} to close then run console command "/atmbuy %arg-1% buy"
- else if arg 2 is "buy":
- if {firsttime.%player%} isn't set:
- give 1 {@debitCard} to arg 1
- set {firsttime.%player%} to false
- else if arg 1's account >= 10:
- remove 10 from arg 1's account
- give 1 {@debitCard} to arg 1
- 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: atm.use
- 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 1 stone 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 1 stone button named "&6Retirer de l'argent" to close then run console command "/atm %arg-1% r"
- format gui slot 6 of arg 1 with 1 stone button named " "
- format gui slot 2 of arg 1 with 1 stone button named " "
- format gui slot 5 of arg 1 with 1 stone button named " "
- format gui slot 8 of arg 1 with 1 stone 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 1 stone button named "&6Retirer &c1€" to run console command "/atm %arg-1% r 1"
- format gui slot 3 of arg 1 with 1 stone button named "&6Retirer &c10€" to run console command "/atm %arg-1% r 10"
- format gui slot 6 of arg 1 with 1 stone button named "&6Retirer &c50€" to run console command "/atm %arg-1% r 50"
- format gui slot 2 of arg 1 with 1 stone button named "&6Retirer &c100€" to run console command "/atm %arg-1% r 100"
- format gui slot 5 of arg 1 with 1 stone button named "&6Retirer &c500€" to run console command "/atm %arg-1% r 500"
- format gui slot 8 of arg 1 with 1 stone 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 1 stone button named "&6Déposer &c1€" to run console command "/atm %arg-1% d 1"
- format gui slot 3 of arg 1 with 1 stone button named "&6Déposer &c10€" to run console command "/atm %arg-1% d 10"
- format gui slot 6 of arg 1 with 1 stone button named "&6Déposer &c50€" to run console command "/atm %arg-1% d 50"
- format gui slot 2 of arg 1 with 1 stone button named "&6Déposer &c100€" to run console command "/atm %arg-1% d 100"
- format gui slot 5 of arg 1 with 1 stone button named "&6Déposer &c500€" to run console command "/atm %arg-1% d 500"
- format gui slot 8 of arg 1 with 1 stone 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement