Advertisement
RaZoRiX06

ATM

May 24th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.20 KB | None | 0 0
  1. #=========== Options ===========#
  2.  
  3. options:
  4. # ID "NAME" "LORE"
  5. debitCard: 339 named "&6Carte de crédit" with lore "&7Carte certifiée"
  6.  
  7. 1: 175 named "&6Pièce d'&c1€" with lore "&7Pièce de monnaie certifiée"
  8. 10: 339 named "&6Billet d'&c10€" with lore "&7Billet de monnaie certifiée"
  9. 50: 339 named "&6Billet d'&c50€" with lore "&7Billet de monnaie certifiée"
  10. 100: 339 named "&6Billet d'&c100€" with lore "&7Billet de monnaie certifiée"
  11. 500: 339 named "&6Billet d'&c500€" with lore "&7Billet de monnaie certifiée"
  12.  
  13. language: fr
  14.  
  15. #=========== Ne pas toucher ! :p ===========#
  16.  
  17. ver: 0.1
  18.  
  19. #=========== Mises-à-jours ===========#
  20.  
  21. on script load:
  22. wait 3 seconds
  23. if text from "https://pastebin.com/raw/HxieDd72" isn't "{@ver}":
  24. loop all players:
  25. if loop-player has permission "*":
  26. send "{@logo} &aMise-à-jour en cours..." to loop-player
  27. set {_time} to now
  28. wait 0.5 tick
  29. download from "https://pastebin.com/raw/fNgrfFzv" to "plugins/Skript/scripts/%script%.sk"
  30. execute console command "/sk reload %script%"
  31. wait 0.5 tick
  32. send "{@logo} Mise-à-jour installée en &b%difference between {_time} and now% !"
  33.  
  34. #=========== Events ===========#
  35.  
  36. on rightclick on dropper:
  37. loop {atms::*}:
  38. if targeted block's location is loop-value:
  39. cancel event
  40. if player's tool is 1 {@debitCard}:
  41. execute console command "/atm %player%"
  42. else:
  43. send "&cVous n'avez pas votre carte de crédit !"
  44.  
  45. on break of dropper:
  46. loop {atms::*}:
  47. if targeted block's location is loop-value:
  48. cancel event
  49. if player has permission "atm.reg":
  50. send "&cPour détruire cet A.T.M veuillez le supprimer avec la commande &4/atmunreg !"
  51. else:
  52. send "&cVous n'avez pas la permission de détruire cet A.T.M !"
  53.  
  54. #=========== Commandes de créations/déstructions des ATM ===========#
  55.  
  56. command /atmreg:
  57. permission: atm.reg
  58. permission message: &4Vous n'avez pas la permission
  59. trigger:
  60. if targeted block is a dropper:
  61. add targeted block's location to {atms::*}
  62. send "&cCe bloc est dorénavant un ATM !"
  63. else:
  64. send "&cCe n'est pas un dropper !"
  65.  
  66. command /atmunreg:
  67. permission: atm.reg
  68. permission message: &4Vous n'avez pas la permission
  69. trigger:
  70. if targeted block is a dropper:
  71. remove targeted block's location from {atms::*}
  72. send "&cCe bloc n'est dorénavant plus un ATM !"
  73. else:
  74. send "&cCe n'est pas un dropper !"
  75.  
  76. #=========== Commande d'achat de cartes de crédits ===========#
  77.  
  78. command /atmbuy [<player>] [<text>]:
  79. permission: atm.card.use
  80. permission message: &4Vous n'avez pas la permission
  81. trigger:
  82. if arg 1 is set:
  83. if arg 2 isn't set:
  84. open chest with 3 rows named "&4Banquier" to arg 1
  85. set {_s} to 0
  86. loop 27 times:
  87. format gui slot {_s} of arg 1 with 1 red glass named " "
  88. add 1 to {_s}
  89. set {_s} to 10
  90. loop 7 times:
  91. format gui slot {_s} of arg 1 with air
  92. add 1 to {_s}
  93. format gui slot 13 of arg 1 with 1 {@debitCard} to close then run console command "/atmbuy %arg-1% buy"
  94.  
  95. else if arg 2 is "buy":
  96. if {firsttime.%player%} isn't set:
  97. give 1 {@debitCard} to arg 1
  98. set {firsttime.%player%} to false
  99.  
  100. else if arg 1's account >= 10:
  101. remove 10 from arg 1's account
  102. give 1 {@debitCard} to arg 1
  103. else:
  104. send "&cVous n'avez pas assez d'argent !" to arg 1
  105.  
  106. #=========== Commande principale (ATM et give de la carte de crédit) ===========#
  107.  
  108. command /atm [<player>] [<text>] [<text>]:
  109. permission: atm.use
  110. permission message: &4Vous n'avez pas la permission
  111. trigger:
  112. if arg 1 is set:
  113. if arg 2 isn't set:
  114. open "dispenser" with 3 rows named "&4A.T.M &c| Accueil | &4%arg 1's account%" to arg 1
  115. 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"
  116. 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"
  117. format gui slot 6 of arg 1 with 1 stone button named " "
  118. format gui slot 2 of arg 1 with 1 stone button named " "
  119. format gui slot 5 of arg 1 with 1 stone button named " "
  120. format gui slot 8 of arg 1 with 1 stone button named " "
  121.  
  122. #=========== Retrait ===========#
  123.  
  124. else if arg 2 is "r":
  125. if arg 3 isn't set:
  126. open "dispenser" with 3 rows named "&4A.T.M &c| Retirer de l'argent" to arg 1
  127. format gui slot 0 of arg 1 with 1 stone button named "&6Retirer &c1€" to run console command "/atm %arg-1% r 1"
  128. format gui slot 3 of arg 1 with 1 stone button named "&6Retirer &c10€" to run console command "/atm %arg-1% r 10"
  129. format gui slot 6 of arg 1 with 1 stone button named "&6Retirer &c50€" to run console command "/atm %arg-1% r 50"
  130. format gui slot 2 of arg 1 with 1 stone button named "&6Retirer &c100€" to run console command "/atm %arg-1% r 100"
  131. format gui slot 5 of arg 1 with 1 stone button named "&6Retirer &c500€" to run console command "/atm %arg-1% r 500"
  132. format gui slot 8 of arg 1 with 1 stone button named "&6Retour" to close then run console command "/atm %arg-1%"
  133.  
  134. else if arg 3 is "1":
  135. if arg 1's account >= 1:
  136. remove 1 from arg 1's account
  137. give 1 {@1} to arg 1
  138. send " " to arg 1
  139. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  140. send " " to arg 1
  141. else:
  142. send "&cVous n'avez pas assez d'argent !" to arg 1
  143.  
  144. else if arg 3 is "10":
  145. if arg 1's account >= 10:
  146. remove 10 from arg 1's account
  147. give 1 {@10} to arg 1
  148. send " " to arg 1
  149. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  150. send " " to arg 1
  151. else:
  152. send "&cVous n'avez pas assez d'argent !" to arg 1
  153.  
  154. else if arg 3 is "50":
  155. if arg 1's account >= 50:
  156. remove 50 from arg 1's account
  157. give 1 {@50} to arg 1
  158. send " " to arg 1
  159. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  160. send " " to arg 1
  161. else:
  162. send "&cVous n'avez pas assez d'argent !" to arg 1
  163.  
  164. else if arg 3 is "100":
  165. if arg 1's account >= 100:
  166. remove 100 from arg 1's account
  167. give 1 {@100} to arg 1
  168. send " " to arg 1
  169. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  170. send " " to arg 1
  171. else:
  172. send "&cVous n'avez pas assez d'argent !" to arg 1
  173.  
  174. else if arg 3 is "500":
  175. if arg 1's account >= 500:
  176. remove 500 from arg 1's account
  177. give 1 {@500} to arg 1
  178. send " " to arg 1
  179. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  180. send " " to arg 1
  181. else:
  182. send "&cVous n'avez pas assez d'argent !" to arg 1
  183.  
  184. #=========== Dépôt ===========#
  185.  
  186. else if arg 2 is "d":
  187. if arg 3 isn't set:
  188. open "dispenser" with 3 rows named "&4A.T.M &c| Déposer de l'argent" to arg 1
  189. format gui slot 0 of arg 1 with 1 stone button named "&6Déposer &c1€" to run console command "/atm %arg-1% d 1"
  190. format gui slot 3 of arg 1 with 1 stone button named "&6Déposer &c10€" to run console command "/atm %arg-1% d 10"
  191. format gui slot 6 of arg 1 with 1 stone button named "&6Déposer &c50€" to run console command "/atm %arg-1% d 50"
  192. format gui slot 2 of arg 1 with 1 stone button named "&6Déposer &c100€" to run console command "/atm %arg-1% d 100"
  193. format gui slot 5 of arg 1 with 1 stone button named "&6Déposer &c500€" to run console command "/atm %arg-1% d 500"
  194. format gui slot 8 of arg 1 with 1 stone button named "&6Retour" to close then run console command "/atm %arg-1%"
  195.  
  196. else if arg 3 is "1":
  197. if arg-1 has 1 {@1}:
  198. remove 1 {@1} from arg-1's inventory
  199. add 1 to arg-1's money
  200. send " " to arg 1
  201. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  202. send " " to arg 1
  203. else:
  204. send "&cVous n'avez pas de quoi déposer !" to arg 1
  205.  
  206. else if arg 3 is "10":
  207. if arg-1 has 1 {@10}:
  208. remove 1 {@10} from arg-1's inventory
  209. add 10 to arg-1's money
  210. send " " to arg 1
  211. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  212. send " " to arg 1
  213. else:
  214. send "&cVous n'avez pas de quoi déposer !" to arg 1
  215.  
  216. else if arg 3 is "50":
  217. if arg-1 has 1 {@50}:
  218. remove 1 {@50} from arg-1's inventory
  219. add 50 to arg-1's money
  220. send " " to arg 1
  221. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  222. send " " to arg 1
  223. else:
  224. send "&cVous n'avez pas de quoi déposer !" to arg 1
  225.  
  226. else if arg 3 is "100":
  227. if arg-1 has 1 {@100}:
  228. remove 1 {@100} from arg-1's inventory
  229. add 100 to arg-1's money
  230. send " " to arg 1
  231. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  232. send " " to arg 1
  233. else:
  234. send "&cVous n'avez pas de quoi déposer !" to arg 1
  235.  
  236. else if arg 3 is "500":
  237. if arg-1 has 1 {@500}:
  238. remove 1 {@500} from arg-1's inventory
  239. add 500 to arg-1's money
  240. send " " to arg 1
  241. send "&6Nouveau solde: &c%arg 1's account%" to arg 1
  242. send " " to arg 1
  243. else:
  244. send "&cVous n'avez pas de quoi déposer !" to arg 1
  245.  
  246. #=========== Give de la carte ===========#
  247.  
  248. else if arg 2 is "card":
  249. give 1 {@debitCard} to arg 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement