Voili Voulou, j'espère que sa marchera car je ne l'ai pas testé ! :)
on join:
set {Iconomy::%player%} to true
options:
titremenu: &aTu as &e&l%{Iconomy::%player%}%
kit1: diams
prixkit1: 10000
itemkit1: diamond
kit2: Potion
prixkit2: 10000
itemkit2: splash Health Potion II
kit3: Enchanteur
prixkit3: 10000
itemkit3: Enchantment Table
kit4: Alchimiste
prixkit4: 10000
itemkit4: Brewing Stand
command /buykits:
trigger:
open chest with 6 rows named "{@titremenu}" to player
wait 1 tick
if player have permission "kits.all":
format slot 0 of player with book named "&4Vous avez déjà tous les kits" to close
if player doesn't have permission "kits.all":
#KITS
if player doesn't have permission "kit.{@kit1}":
format slot 0 of player with {@itemkit1} named "&3&lKit {@kit1} &6[&e&l{@prixkit1}$&r&6]" to close then run [make console execute command "addkit {@kit1} %player% {@prixkit1}"]
if player have permission "kit.{@kit1}":
format slot 0 of player with {@itemkit1} named "&3&lKit {@kit1} &6[&4Acheté!&r&6]" to close
if player doesn't have permission "kit.{@kit2}":
format slot 1 of player with {@itemkit2} named "&b&lKit {@kit2} &6[&e&l{@prixkit2}$&r&6]" to close then run [make console execute command "addkit {@kit2} %player% {@prixkit2}"]
if player have permission "kit.{@kit2}":
format slot 1 of player with {@itemkit2} named "&balKit {@kit2} &6[&4Acheté!&r&6]" to close
if player doesn't have permission "kit.{@kit3}":
format slot 2 of player with {@itemkit3} named "&c&lKit {@kit3} &6[&e&l{@prixkit3}$&r&6]" to close then run [make console execute command "addkit {@kit3} %player% {@prixkit3}"]
if player have permission "kit.{@kit3}":
format slot 2 of player with {@itemkit3} named "&c&lKit {@kit3} &6[&4Acheté!&r&6]" to close
if player doesn't have permission "kit.{@kit4}":
format slot 3 of player with {@itemkit4} named "&5&lKit {@kit4} &6[&e&l{@prixkit4}$&r&6]" to close then run [make console execute command "addkit {@kit4} %player% {@prixkit4}"]
if player have permission "kit.{@kit4}":
format slot 3 of player with {@itemkit4} named "&5&lKit {@kit4} &6[&4Acheté!&r&6]" to close
command /addkit <text> <player> <int>:
trigger:
if arg 1 is "{@kit1}":
if arg 2 is set:
if {Iconomy::%arg 2%} >= {@prixkit1}:
make console execute command "/pex user %arg 2% add kit.{@kit1}"
make console execute command "/manuaddp %arg 2% essentials.kits.%arg 1%"
send "&eTu as débloqué le kit &3%arg 1% &e!" to arg 2
remove arg 3 from {Iconomy::%arg 2%}
make console execute command "/pay arg 2 arg 3"
else:
send "&4Tu n'as pas assez d'argent" to arg 2
if arg 1 is "{@kit2}":
if arg 2 is set:
if {Iconomy::%arg 2%} >= {@prixkit2}:
make console execute command "/pex user %arg 2% add kit.{@kit2}"
make console execute command "/manuaddp %arg 2% essentials.kits.%arg 1%"
send "&eTu as débloqué le kit &3%arg 1% &e!" to arg 2
remove arg 3 from {Iconomy::%arg 2%}
else:
send "&4Tu n'as pas assez d'argent" to arg 2
if arg 1 is "{@kit3}":
if arg 2 is set:
if {Iconomy::%arg 2%} >= {@prixkit3}:
make console execute command "/pex user %arg 2% add kit.{@kit3}"
make console execute command "/manuaddp %arg 2% essentials.kits.%arg 1%"
send "&eTu as débloqué le kit &3%arg 1% &e!" to arg 2
remove arg 3 from {Iconomy::%arg 2%}
else:
send "&4Tu n'as pas assez d'argent" to arg 2
if arg 1 is "{@kit4}":
if arg 2 is set:
if {Iconomy::%arg 2%} >= {@prixkit4}:
make console execute command "/pex user %arg 2% add kit.{@kit4}"
make console execute command "/manuaddp %arg 2% essentials.kits.%arg 1%"
send "&eTu as débloqué le kit &3%arg 1% &e!" to arg 2
remove arg 3 from {Iconomy::%arg 2%}
else:
send "&4Tu n'as pas assez d'argent" to arg 2
#continuer avec: if arg 1 is "{@kit4}":
#etc...