HardTrox Posté(e) le 20 juin 2016 Posté(e) le 20 juin 2016 Salut à tous je crée un serveur The Walking Dead et j'ai besoins d'un truc : 1 ) 5 Liste avec des items à ajouter avec une commandes Loots Normal Loots Medicals Loots rare loots millitaire loots A Commandes /additems <normal> <Medicals> <rare> <millitaire> <A> (items dans la main On dois faire ensuite /addchest <normal> <Medicals> <rare> <millitaire> <A> ensuite toutes les 3 minutes les coffres normales se reset et sa met 1 ou 2 ou 3 ou 4 items de la liste normal ensuite toutes les 2 minutes les coffres medicals se reset et sa met 1 ou 3 items de la liste medicals ensuite toutes les 5 minutes les coffres rare se reset et sa met 1 ou 2 items de la liste rare ensuite toutes les 8 minutes les coffres millitaire se reset et sa met 1 items de la liste militaire ensuite toutes les 1 minutes les coffres A se reset et sa met 1 ou 2 items de la liste A Merci beaucoup à celui qui m'aide a faire sa il me manque que sa et le serveur ouvre :) 1
Floxiik Posté(e) le 21 juin 2016 Posté(e) le 21 juin 2016 Je pensse que si personne ne te répond c'est parceque c'est pas si facile que sa a faire, il y a un skript de skywars dans les ressources avec le systeme que tu cherche je crois, tu peut y faire un tour pour prendre un bout de code je pensse.
HardTrox Posté(e) le 21 juin 2016 Auteur Posté(e) le 21 juin 2016 d'accord sinon j'ai un autre idée c'est de loop tout les coffre de la map et mettre un % et de mettre une liste avec des truc random de la liste Plus simple ?
Soufreur78 Posté(e) le 21 juin 2016 Posté(e) le 21 juin 2016 Cc , je te rappelle que quand il y a des histoires de coffre random et autre il faut m'appeller c'est mon dada :p Bref , je te fais ça 1
Soufreur78 Posté(e) le 21 juin 2016 Posté(e) le 21 juin 2016 Et voila ! Bref je t'explique : J'ai une commande générale /randomchest avec la permission : randomchest.use Il y a 6 premiers arguments : "Additem" pour ajouter une item "Addchest" pour ajouter une position de coffre "Removeliste" pour supprimer les items et positions des coffres "View" pour voir les items (dans un gui) "SpawnChest" pour forcer le spawn d'un chest "Info" pour avoir toute les infos, nombre de coffre et nombre d'item de chaque serie Il y a 5 argument 2 : normal, A, medicals, rare, militaire Voila ! Tu dois à chaque fois rentrer l'argument 1 (L'action à faire) et l'argument 2 (La serie de coffre visée) à part pour "info" il n'y a pas besoin de mettre une second argument ! Bref , Optimisation au top <3 ! Aucun bug chez moi ! Addons basique (SkQuery,Umbaska) Au moindre problème , appelle moi ! command /randomchest [<text>] [<text>]: permission: randomchest.use trigger: if arg 1 is not set: message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" else: if arg 1 is not "additem" or "addchest" or "view" or "removelist" or "info" or "spawnchest": message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" stop else: if arg 1 is "info": message "&8[&cRandomChest&8] &eVoici les informations sur les &c5 &elistes !" set {_list::*} to "a" and "militaire" and "rare" and "medicals" and "normal" loop {_list::*}: set {_info1} to size of {RandomChest.%loop-value%::*} if {_info1} is not set: set {_info1} to "Aucun" set {_info2} to size of {randomchest.location.%loop-value%::*} if {_info2} is not set: set {_info2} to "Aucun" message "&e- &c%loop-value% &9➤ &c%{_info1}% &eitem(s) &7| &c%{_info2}% &ecoffre(s)" stop if arg 2 is "normal" or "medicals" or "rare" or "militaire" or "A": if arg 1 is "additem": if player's tool is not air: set {_p} to player's tool set {_nbr} to amount of the tool of the player message "&8[&cRandomChest&8] &3Vous avez ajouté &c%{_p}% &3à la liste &c%arg 2%" add {_p} to {RandomChest.%arg 2%::*} else: message "&8[&cRandomChest&8] &cVous devez tenir un item en main !" if arg 1 is "view": open chest with 6 rows named "&cChest &9➤ &c%arg 2%" to player wait 3 tick set {_nbr} to 0 loop {RandomChest.%arg 2%::*}: format slot {_nbr} of player with loop-value named "&3%loop-value%" to be unstealable add 1 to {_nbr} if arg 1 is "addchest": add location of player to {randomchest.location.%arg 2%::*} set {_size} to size of {randomchest.location.%arg 2%::*} message "&8[&cRandomChest&8] &3Vous avez ajouté votre position pour les coffres &c%arg 2% &3 !" message "&8[&cRandomChest&8] &3La liste &c%arg 2% &3a maintenant &c%{_size}% coffre(s) !" if arg 1 is "removelist": clear {randomchest.location.%arg 2%::*} clear {RandomChest.%arg 2%::*} message "&8[&cRandomChest&8] &eLes &ccoffres &eet les &citems &ede la liste &c%arg 2% &eont été reset !" if arg 1 is "spawnchest": loop {randomchest.location.%arg 2%::*}: set block at loop-value to air clear drops wait 2 tick set block at loop-value to chest set {_liste::*} to {RandomChest.%arg 2%::*} loop (a random integer between 1 and 4) times: set {_random} to a random element out of {_liste::*} remove {_random} from {_liste::*} add {_random} to inventory of block at loop-value-1 message "&8[&cRandomChest&8] &eLes coffres &c%arg 2% &eont bien été remplient !" else: message "&8[&cRandomChest&8] &cQuels listes ?" message "&8[&cRandomChest&8] &3/randomchest %arg 1% &3<normal>&7/&3<Medicals>&7/&3<rare>&7/&3<militaire>&7/&3<A>" every 1 minutes: if {RandomChest.a::*} is set: make console execute command "/randomchest spawnchest a" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cA &eont spawnent !" every 2 minutes: if {RandomChest.medicals::*} is set: make console execute command "/randomchest spawnchest medicals" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMedicals &eont spawnent !" every 3 minutes: if {RandomChest.normal::*} is set: make console execute command "/randomchest spawnchest normal" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cNormal &eont spawnent !" every 5 minutes: if {RandomChest.rare::*} is set: make console execute command "/randomchest spawnchest rare" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cRare &eont spawnent !" every 8 minutes: if {RandomChest.militaire::*} is set: make console execute command "/randomchest spawnchest militaire" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMilitaire &eont spawnent !" 1
HardTrox Posté(e) le 22 juin 2016 Auteur Posté(e) le 22 juin 2016 Et voila ! Bref je t'explique : J'ai une commande générale /randomchest avec la permission : randomchest.use Il y a 6 premiers arguments : "Additem" pour ajouter une item "Addchest" pour ajouter une position "Removeliste" pour supprimer les items et positions des coffres "View" pour les items "SpawnChest" pour forcer le spawn d'un chest "Info" pour avoir toute les infos, nombre de coffre et nombre d'item de chaque serie Il y a 5 argument 2 : normal, A, medicals, rare, militaire Voila ! Tu dois à chaque fois rentrer l'argument 1 (L'action à faire) et l'argument 2 (La serie de coffre visé) a part pour info il n'y a pas besoin de mettre une second argument ! Bref , Optimisation au top <3 ! Aucun bug chez moi ! Addons basique (SkQuery,Umbaska) Au moindre problème , appelle moi ! command /randomchest [<text>] [<text>]: permission: randomchest.use trigger: if arg 1 is not set: message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" else: if arg 1 is not "additem" or "addchest" or "view" or "removelist" or "info" or "spawnchest": message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" stop else: if arg 1 is "info": message "&8[&cRandomChest&8] &eVoici les informations sur les &c5 &elistes !" set {_list::*} to "a" and "militaire" and "rare" and "medicals" and "normal" loop {_list::*}: set {_info1} to size of {RandomChest.%loop-value%::*} if {_info1} is not set: set {_info1} to "Aucun" set {_info2} to size of {randomchest.location.%loop-value%::*} if {_info2} is not set: set {_info2} to "Aucun" message "&e- &c%loop-value% &9➤ &c%{_info1}% &eitem(s) &7| &c%{_info2}% &ecoffre(s)" stop if arg 2 is "normal" or "medicals" or "rare" or "militaire" or "A": if arg 1 is "additem": if player's tool is not air: set {_p} to player's tool set {_nbr} to amount of the tool of the player message "&8[&cRandomChest&8] &3Vous avez ajouté &c%{_p}% &3à la liste &c%arg 2%" add {_p} to {RandomChest.%arg 2%::*} else: message "&8[&cRandomChest&8] &cVous devez tenir un item en main !" if arg 1 is "view": open chest with 6 rows named "&cChest &9➤ &c%arg 2%" to player wait 3 tick set {_nbr} to 0 loop {RandomChest.%arg 2%::*}: format slot {_nbr} of player with loop-value named "&3%loop-value%" to be unstealable add 1 to {_nbr} if arg 1 is "addchest": add location of player to {randomchest.location.%arg 2%::*} set {_size} to size of {randomchest.location.%arg 2%::*} message "&8[&cRandomChest&8] &3Vous avez ajouté votre position pour les coffres &c%arg 2% &3 !" message "&8[&cRandomChest&8] &3La liste &c%arg 2% &3a maintenant &c%{_size}% coffre(s) !" if arg 1 is "removelist": clear {randomchest.location.%arg 2%::*} clear {RandomChest.%arg 2%::*} message "&8[&cRandomChest&8] &eLes &ccoffres &eet les &citems &ede la liste &c%arg 2% &eont été reset !" if arg 1 is "spawnchest": loop {randomchest.location.%arg 2%::*}: set block at loop-value to air clear drops wait 2 tick set block at loop-value to chest set {_liste::*} to {RandomChest.%arg 2%::*} loop (a random integer between 1 and 4) times: set {_random} to a random element out of {_liste::*} remove {_random} from {_liste::*} add {_random} to inventory of block at loop-value-1 message "&8[&cRandomChest&8] &eLes coffres &c%arg 2% &eont bien été remplient !" else: message "&8[&cRandomChest&8] &cQuels listes ?" message "&8[&cRandomChest&8] &3/randomchest %arg 1% &3<normal>&7/&3<Medicals>&7/&3<rare>&7/&3<militaire>&7/&3<A>" every 1 minutes: if {RandomChest.a::*} is set: make console execute command "/randomchest spawnchest a" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cA &eont spawnent !" every 2 minutes: if {RandomChest.medicals::*} is set: make console execute command "/randomchest spawnchest medicals" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMedicals &eont spawnent !" every 3 minutes: if {RandomChest.normal::*} is set: make console execute command "/randomchest spawnchest normal" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cNormal &eont spawnent !" every 5 minutes: if {RandomChest.rare::*} is set: make console execute command "/randomchest spawnchest rare" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cRare &eont spawnent !" every 8 minutes: if {RandomChest.militaire::*} is set: make console execute command "/randomchest spawnchest militaire" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMilitaire &eont spawnent !" Frenchement toi, je t'adore on pourrais pas ce contacter sur skype au cas ou si tu le veut le mien est HardTroxPvP Merci beaucoup ! Mais si ses possible je voudrais que les coffre ne dispawn pas je veut juste qu'il se remplissent :p
Soufreur78 Posté(e) le 22 juin 2016 Posté(e) le 22 juin 2016 Salut , Mon skype : Guillaume7877 si besoin. Tu veux que je ne casse pas le coffre avec les items qu'il contenait à chaque fois que je remet des items ? 1
HardTrox Posté(e) le 22 juin 2016 Auteur Posté(e) le 22 juin 2016 Salut , Mon skype : Guillaume7877 si besoin. Tu veux que je ne casse pas le coffre avec les items qu'il contenait à chaque fois que je remet des items ? bref en gros si il reste des items dans le coffre tu les supprime et tu re met des nouveaux items
Soufreur78 Posté(e) le 22 juin 2016 Posté(e) le 22 juin 2016 Normalement ça devait déjà le faire mais j'avais fail d'expression Tien : command /randomchest [<text>] [<text>]: permission: randomchest.use trigger: if arg 1 is not set: message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" else: if arg 1 is not "additem" or "addchest" or "view" or "removelist" or "info" or "spawnchest": message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" stop else: if arg 1 is "info": message "&8[&cRandomChest&8] &eVoici les informations sur les &c5 &elistes !" set {_list::*} to "a" and "militaire" and "rare" and "medicals" and "normal" loop {_list::*}: set {_info1} to size of {RandomChest.%loop-value%::*} if {_info1} is not set: set {_info1} to "Aucun" set {_info2} to size of {randomchest.location.%loop-value%::*} if {_info2} is not set: set {_info2} to "Aucun" message "&e- &c%loop-value% &9➤ &c%{_info1}% &eitem(s) &7| &c%{_info2}% &ecoffre(s)" stop if arg 2 is "normal" or "medicals" or "rare" or "militaire" or "A": if arg 1 is "additem": if player's tool is not air: set {_p} to player's tool set {_nbr} to amount of the tool of the player message "&8[&cRandomChest&8] &3Vous avez ajouté &c%{_p}% &3à la liste &c%arg 2%" add {_p} to {RandomChest.%arg 2%::*} else: message "&8[&cRandomChest&8] &cVous devez tenir un item en main !" if arg 1 is "view": open chest with 6 rows named "&cChest &9➤ &c%arg 2%" to player wait 3 tick set {_nbr} to 0 loop {RandomChest.%arg 2%::*}: format slot {_nbr} of player with loop-value named "&3%loop-value%" to be unstealable add 1 to {_nbr} if arg 1 is "addchest": add location of player to {randomchest.location.%arg 2%::*} set {_size} to size of {randomchest.location.%arg 2%::*} message "&8[&cRandomChest&8] &3Vous avez ajouté votre position pour les coffres &c%arg 2% &3 !" message "&8[&cRandomChest&8] &3La liste &c%arg 2% &3a maintenant &c%{_size}% coffre(s) !" if arg 1 is "removelist": clear {randomchest.location.%arg 2%::*} clear {RandomChest.%arg 2%::*} message "&8[&cRandomChest&8] &eLes &ccoffres &eet les &citems &ede la liste &c%arg 2% &eont été reset !" if arg 1 is "spawnchest": loop {randomchest.location.%arg 2%::*}: set block at loop-value to air clear entities wait 2 tick set block at loop-value to chest set {_liste::*} to {RandomChest.%arg 2%::*} loop (a random integer between 1 and 4) times: set {_random} to a random element out of {_liste::*} remove {_random} from {_liste::*} add {_random} to inventory of block at loop-value-1 message "&8[&cRandomChest&8] &eLes coffres &c%arg 2% &eont bien été remplient !" else: message "&8[&cRandomChest&8] &cQuels listes ?" message "&8[&cRandomChest&8] &3/randomchest %arg 1% &3<normal>&7/&3<Medicals>&7/&3<rare>&7/&3<militaire>&7/&3<A>" every 1 minutes: if {RandomChest.a::*} is set: make console execute command "/randomchest spawnchest a" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cA &eont spawnent !" every 2 minutes: if {RandomChest.medicals::*} is set: make console execute command "/randomchest spawnchest medicals" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMedicals &eont spawnent !" every 3 minutes: if {RandomChest.normal::*} is set: make console execute command "/randomchest spawnchest normal" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cNormal &eont spawnent !" every 5 minutes: if {RandomChest.rare::*} is set: make console execute command "/randomchest spawnchest rare" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cRare &eont spawnent !" every 8 minutes: if {RandomChest.militaire::*} is set: make console execute command "/randomchest spawnchest militaire" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMilitaire &eont spawnent !" 2
HardTrox Posté(e) le 22 juin 2016 Auteur Posté(e) le 22 juin 2016 Normalement ça devait déjà le faire mais j'avais fail d'expression Tien : command /randomchest [<text>] [<text>]: permission: randomchest.use trigger: if arg 1 is not set: message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" else: if arg 1 is not "additem" or "addchest" or "view" or "removelist" or "info" or "spawnchest": message "&8[&cRandomChest&8] &3/randomchest &3<additem>&7/&3<removelist>&7/&3<addchest>&7/&3<view>&7/&3<spawnchest>&7/&3<info>" stop else: if arg 1 is "info": message "&8[&cRandomChest&8] &eVoici les informations sur les &c5 &elistes !" set {_list::*} to "a" and "militaire" and "rare" and "medicals" and "normal" loop {_list::*}: set {_info1} to size of {RandomChest.%loop-value%::*} if {_info1} is not set: set {_info1} to "Aucun" set {_info2} to size of {randomchest.location.%loop-value%::*} if {_info2} is not set: set {_info2} to "Aucun" message "&e- &c%loop-value% &9➤ &c%{_info1}% &eitem(s) &7| &c%{_info2}% &ecoffre(s)" stop if arg 2 is "normal" or "medicals" or "rare" or "militaire" or "A": if arg 1 is "additem": if player's tool is not air: set {_p} to player's tool set {_nbr} to amount of the tool of the player message "&8[&cRandomChest&8] &3Vous avez ajouté &c%{_p}% &3à la liste &c%arg 2%" add {_p} to {RandomChest.%arg 2%::*} else: message "&8[&cRandomChest&8] &cVous devez tenir un item en main !" if arg 1 is "view": open chest with 6 rows named "&cChest &9➤ &c%arg 2%" to player wait 3 tick set {_nbr} to 0 loop {RandomChest.%arg 2%::*}: format slot {_nbr} of player with loop-value named "&3%loop-value%" to be unstealable add 1 to {_nbr} if arg 1 is "addchest": add location of player to {randomchest.location.%arg 2%::*} set {_size} to size of {randomchest.location.%arg 2%::*} message "&8[&cRandomChest&8] &3Vous avez ajouté votre position pour les coffres &c%arg 2% &3 !" message "&8[&cRandomChest&8] &3La liste &c%arg 2% &3a maintenant &c%{_size}% coffre(s) !" if arg 1 is "removelist": clear {randomchest.location.%arg 2%::*} clear {RandomChest.%arg 2%::*} message "&8[&cRandomChest&8] &eLes &ccoffres &eet les &citems &ede la liste &c%arg 2% &eont été reset !" if arg 1 is "spawnchest": loop {randomchest.location.%arg 2%::*}: set block at loop-value to air clear entities wait 2 tick set block at loop-value to chest set {_liste::*} to {RandomChest.%arg 2%::*} loop (a random integer between 1 and 4) times: set {_random} to a random element out of {_liste::*} remove {_random} from {_liste::*} add {_random} to inventory of block at loop-value-1 message "&8[&cRandomChest&8] &eLes coffres &c%arg 2% &eont bien été remplient !" else: message "&8[&cRandomChest&8] &cQuels listes ?" message "&8[&cRandomChest&8] &3/randomchest %arg 1% &3<normal>&7/&3<Medicals>&7/&3<rare>&7/&3<militaire>&7/&3<A>" every 1 minutes: if {RandomChest.a::*} is set: make console execute command "/randomchest spawnchest a" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cA &eont spawnent !" every 2 minutes: if {RandomChest.medicals::*} is set: make console execute command "/randomchest spawnchest medicals" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMedicals &eont spawnent !" every 3 minutes: if {RandomChest.normal::*} is set: make console execute command "/randomchest spawnchest normal" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cNormal &eont spawnent !" every 5 minutes: if {RandomChest.rare::*} is set: make console execute command "/randomchest spawnchest rare" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cRare &eont spawnent !" every 8 minutes: if {RandomChest.militaire::*} is set: make console execute command "/randomchest spawnchest militaire" broadcast "&8[&cRandomChest&8] &eLes coffres de type &cMilitaire &eont spawnent !" C'est cool merci je le testerais Vendredi :p
Messages recommandés