bonjours j'ai un probléme avec l'ATM j'ai rien qui s'affiche sur l'atm
1.7.10
skript 2.2 dev 27
Options:
Erreur: "&7AirioRP&8> &cVous n'avez pas accès à cette commande."
NomCarteBleue: &3Carte Bancaire
ClefRebelle: &6Pinces à menottes
CarteAPiratage: &6USB Piratage
Aliases:
atm = 758
atm2 = 758
CarteBleue = 4144
ClefMenottesRebelle = 4109
CartePiratage = 4493
B1 = 4137
B2 = 4138
B3 = 4139
B4 = 4140
B5 = 4141
B6 = 4142
B7 = 4143
Variables:
{value1} = 1
{value2} = 5
{value3} = 10
{value4} = 20
{value5} = 50
{value6} = 100
{value7} = 200
{value8} = 500
{value9} = 1000
{TempsPiratageEnSecondes} = 60
{MoneyWon} = 100
function hasntBilletATM(p: player, a: integer):
send "&7Union &8- &6Roleplay &8> &cTu n'as pas de billet de %{_a}% €" to {_p}
#execute console command "atm %{_p}% show2 Déposer"
rightclick on atm:
cancel event
{brokenATM.%location of clicked block%} isn't set:
player's tool is CarteBleue:
name of player's tool is "{@NomCarteBleue}":
lore of player's tool is "&5Appartient à:||&7%player%":
execute console command "atm %player% show1"
else:
send "&7AirioRP&8> &cCette carte bleue n'est pas la votre !"
else:
send "&7AirioRP&8> &cVous devez tenir votre carte bleue."
else:
send "&7AirioRP&8> &cVous devez tenir votre carte bleue."
else:
send "&7AirioRP&8> &cCet ATM a été piraté et n'est pas utilisable actuellement."
function ATMAct(p: player, action: text):
format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 19, 20, 21, 22, 23, 24, 25 and 26 of {_p} with black stained glass pane named " " to do nothing
format gui slot 18 of {_p} with wooden door item named "&cRetour" to run console command "atm %{_p}% show1"
format gui slot 9 of {_p} with B1 named "&e%{_action}% %{value1}% €" to run console command "atm %{_p}% ~ %{_action}% %{value1}%"
format gui slot 10 of {_p} with B2 named "&e%{_action}% %{value2}% €" to run console command "atm %{_p}% ~ %{_action}% %{value2}%"
format gui slot 11 of {_p} with B3 named "&e%{_action}% %{value3}% €" to run console command "atm %{_p}% ~ %{_action}% %{value3}%"
format gui slot 12 of {_p} with B4 named "&e%{_action}% %{value4}% €" to run console command "atm %{_p}% ~ %{_action}% %{value4}%"
format gui slot 13 of {_p} with B5 named "&e%{_action}% %{value5}% €" to run console command "atm %{_p}% ~ %{_action}% %{value5}%"
format gui slot 14 of {_p} with B6 named "&e%{_action}% %{value6}% €" to run console command "atm %{_p}% ~ %{_action}% %{value6}%"
format gui slot 15 of {_p} with B7 named "&e%{_action}% %{value7}% €" to run console command "atm %{_p}% ~ %{_action}% %{value7}%"
command /atm [<player>] [<text>] [<text>] [<integer>]:
trigger:
sender is a player:
send {@Erreur}
else:
arg 2 is "show1":
open chest with 3 rows named "&6ATM | Distributeur" to arg 1
wait 1 tick
format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 and 26 of arg 1 with black stained glass pane named " " to do nothing
format gui slot 11 of arg 1 with B3 named "&aDéposer de l'argent" with lore " " to run console command "atm %arg 1% show2 Déposer"
format gui slot 13 of arg 1 with B10 named "&bBienvenue dans votre banque" with lore " " to do nothing
format gui slot 15 of arg 1 with B3 named "&aRetirer de l'argent" with lore " " to run console command "atm %arg 1% show2 Retirer"
else if arg 2 is "show2":
set {_number} to 1
set {_action} to arg 3
open chest with 3 rows named "&6ATM | Distributeur" to arg 1
wait 1 tick
#format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 19, 20, 21, 22, 23, 24, 25 and 26 of arg 1 with black stained glass pane named " " to do nothing
#format gui slot 18 of arg 1 with wooden door item named "&cRetour" to run console command "atm %arg 1% show1"
#format gui slot 9 of arg 1 with B1 named "&e%{_action}% %{value1}% €" to run console command "atm %arg 1% ~ %{_action}% %{value1}%"
#format gui slot 10 of arg 1 with B2 named "&e%{_action}% %{value2}% €" to run console command "atm %arg 1% ~ %{_action}% %{value2}%"
#format gui slot 11 of arg 1 with B3 named "&e%{_action}% %{value3}% €" to run console command "atm %arg 1% ~ %{_action}% %{value3}%"
#format gui slot 12 of arg 1 with B4 named "&e%{_action}% %{value4}% €" to run console command "atm %arg 1% ~ %{_action}% %{value4}%"
#format gui slot 13 of arg 1 with B5 named "&e%{_action}% %{value5}% €" to run console command "atm %arg 1% ~ %{_action}% %{value5}%"
#format gui slot 14 of arg 1 with B6 named "&e%{_action}% %{value6}% €" to run console command "atm %arg 1% ~ %{_action}% %{value6}%"
#format gui slot 15 of arg 1 with B7 named "&e%{_action}% %{value7}% €" to run console command "atm %arg 1% ~ %{_action}% %{value7}%"
ATMAct(arg 1, {_action})
else if arg 2 is "~":
arg 3 is "Déposer":
arg 4 is {value1}:
arg 1 has 1 B1 named "&6%arg 4% €":
remove 1 B1 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 4 is {value2}:
arg 1 has 1 B2 named "&6%arg 4% €":
remove 1 B2 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 4 is {value3}:
arg 1 has 1 B3 named "&6%arg 4% €":
remove 1 B3 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 4 is {value4}:
arg 1 has 1 B4 named "&6%arg 4% €":
remove 1 B4 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 4 is {value5}:
arg 1 has 1 B5 named "&6%arg 4% €":
remove 1 B5 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 4 is {value6}:
arg 1 has 1 B6 named "&6%arg 4% €":
remove 1 B6 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 4 is {value7}:
arg 1 has 1 B7 named "&6%arg 4% €":
remove 1 B7 named "&6%arg 4% €" from inventory of arg 1
add arg 4 to balance of arg 1
else:
hasntBilletATM(arg 1, arg 4)
else if arg 3 is "Retirer":
balance of arg 1 is bigger than or equal to arg 4:
inventory of arg 1 can hold 1 bedrock:
remove arg 4 from balance of arg 1
#execute console command "atm %arg 1% show2 Retirer"
arg 4 is {value1}:
give 1 B1 named "&6%arg 4% €" to arg 1
else if arg 4 is {value2}:
give 1 B2 named "&6%arg 4% €" to arg 1
else if arg 4 is {value3}:
give 1 B3 named "&6%arg 4% €" to arg 1
else if arg 4 is {value4}:
give 1 B4 named "&6%arg 4% €" to arg 1
else if arg 4 is {value5}:
give 1 B5 named "&6%arg 4% €" to arg 1
else if arg 4 is {value6}:
give 1 B6 named "&6%arg 4% €" to arg 1
else if arg 4 is {value7}:
give 1 B7 named "&6%arg 4% €" to arg 1
else if arg 4 is {value8}:
else:
send "&cTu n'as pas assez de place."
#execute console command "atm %arg 1% show2 Retirer"
else:
send "&cTu n'as que %balance of arg 1% € en banque." to arg 1
#execute console command "atm %arg 1% show2 Retirer"
#Piratage
on leftclick on atm:
{brokenATM.%location of clicked block%} isn't set:
player's tool is a CartePiratage:
name of player's tool is "{@CarteAPiratage}":
cancel event
{piratage.%location of event-block%} isn't set:
set {piratage.%location of event-block%} to {TempsPiratageEnSecondes}
set {pirate.%location of event-block%} to player
broadcast "&7AirioRP &8> &eL'ATM en %location of event-block% est en cours de piratage !"
send "&7AirioRP&8> &aVous commencez à pirater l'ATM, ne vous éloignez pas ou le piratage sera annulé" to {pirate.%location of event-block%}
while {piratage.%location of event-block%} is set:
distance between location of event-block and player is less than 10:
{piratage.%location of event-block%} is bigger than 0:
wait 1 second
remove 1 from {piratage.%location of event-block%}
{piratage.%location of event-block%} is 10:
broadcast "&7AirioRP&8> &eL'ATM en %location of event-block% est sur le point d'être piraté !"
else:
clear {piratage.%location of event-block%}
broadcast "&7AirioRP&8> &eLe piratage de l'ATM en %location of event-block% est terminé !"
add {MoneyWon} to balance of {pirate.%location of event-block%}
send "&7AirioRP&8> &aVous avez gagner %{MoneyWon}% € pour avoir piraté cet ATM" to {pirate.%location of event-block%}
clear {pirate.%location of event-block%}
set {brokenATM.%location of event-block%} to true
wait 2 minutes
clear {brokenATM.%location of event-block%}
else:
clear {piratage.%location of event-block%}
broadcast "&7AirioRP&8> &eLe piratage de l'ATM en %location of event-block% a été annulé."
send "&7AirioRP&8> &cVous ne piratez plus l'ATM en %location of event-block%" to {pirate.%location of event-block%}
else:
send "&7AirioRP&8> &cLe piratage de cet ATM a déja commencé."
else:
send "&7AirioRP&8> &cCet ATM a été piraté et n'est pas utilisable actuellement."
command /cb:
trigger:
send "&2Airio&7RP &8> Tu viens de de recevoir ta carte bleu !"
give 1 CarteBleue named "{@NomCarteBleue}" with lore "&5Appartient à:||&7%player%" to
player