Furibard Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 Bonjour et merci d'avance Version: 1.12.2 Add on: n'importe je rajouterais si il faut Je voudrais qu'un PNJ puisse racheter les items a des joueurs le seul probleme c'est que je ne sais pas comment faire pour qu'il donne un montant x le nombre d'item et c'est pour sa que je demande un skript Item/Prix: Ble: 18 Patate: 15 Carotte: 15 Canne a Sucre: 13 J'ai vu plusieur skript mais quand j'essaye sa me marque que je peux pas ajouter la valeur a mon bal utiliser si possible {bal.%player's UUID%} ou du moins "bal"
Wineker Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 (modifié) bal c'est le nom de le monnaie ? J'peux te faire ça edit: en fait là je peux pas désolé x) Modifié le 31 août 2018 par Wineker
Wineker Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 il y a 25 minutes, Furibard a dit : @Wineker Tu pourrais demain ?? oui mais juste pour être sûr tu veux que quand tu cliques droit sur un villageois avec du blé ou les autres items ce dernier soit remove et qu'il gagne de l'argent ? Ou alors remove par stack ?
Furibard Posté(e) le 31 août 2018 Auteur Posté(e) le 31 août 2018 ah zut oublier de précisez sa enfaite sa fais avec un chest with 5 row et tu clique d'abord sur le ble puis tu vend par stack ou en entier (tout le ble) si sa t'arrange
Wineker Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 il y a 1 minute, Furibard a dit : ah zut oublier de précisez sa enfaite sa fais avec un chest with 5 row et tu clique d'abord sur le ble puis tu vend par stack ou en entier (tout le ble) si sa t'arrange dac
Wineker Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 (modifié) il y a une heure, Furibard a dit : Cool merci Fait ! j'ai même ajouter les items enchant pour faire comprendre qu'ils sont bloqués si le joueur n'a pas l'item sur lui enfin bref .Seul problème j'ai pas idée de pourquoi mais pour script les gold carrots= carrot, pareil pour les patates pas cuite=cuite, du coup si t'as des patates cuites et pas cuites dans ton inventaire ça peut prendre l'un des deux, ça doit être une question d'id spéciaux voilà: on right click on a villager: cancel event make console execute command "/vendre %player%" command /vendre [<player>] [<text>]: executable by: console trigger: if arg 1 is a player: if arg 2 is not set: wait 2 ticks open chest with 5 rows named "&2&lVendeur" to arg 1 wait 1 tick if arg 1's inventory contain wheat: set {_n} to amount of wheat in arg 1's inventory set {$.%arg 1%} to {_n}*18 format slot 19 of arg 1 with wheat_item named "&r&e&lBlé" with lore "&rtout vendre:||&r&2%{$.%arg 1%}% bal" to close then run [make console execute command "/vendre %arg 1% blé"] else: format slot 19 of arg 1 with wheat_item of unbreaking 1 named "&r&e&lBlé" with lore "&r&cvous ne possédez pas de blé" to be unstealable if arg 1's inventory contain carrot_item: set {_n} to amount of carrot in arg 1's inventory set {$.%arg 1%} to {_n}*15 format slot 21 of arg 1 with carrot_item named "&r&e&lCarrote" with lore "&rtout vendre:||&r&2%{$.%arg 1%}% bal" to close then run [make console execute command "/vendre %arg 1% carrot"] else: format slot 21 of arg 1 with carrots_item of unbreaking 1 named "&r&e&lCarrote" with lore "&r&cvous ne possédez pas de carrotes" to be unstealable if arg 1's inventory contain potato: set {_n} to amount of potato in arg 1's inventory set {$.%arg 1%} to {_n}*15 format slot 23 of arg 1 with potato_item named "&r&e&lPatates" with lore "&rtout vendre:||&r&2%{$.%arg 1%}% bal" to close then run [make console execute command "/vendre %arg 1% potato"] else: format slot 23 of arg 1 with potato_item of unbreaking 1 named "&r&e&lPatates" with lore "&r&cvous ne possédez pas de patates" to be unstealable if arg 1's inventory contain sugar_cane_item: set {_n} to amount of sugar_cane_item in arg 1's inventory set {$.%arg 1%} to {_n}*13 format slot 25 of arg 1 with sugar_cane_item named "&r&e&lCanne à suce" with lore "&rtout vendre:||&r&2%{$.%arg 1%}% bal" to close then run [make console execute command "/vendre %arg 1% sugar"] else: format slot 25 of arg 1 with sugar_cane_item of unbreaking 1 named "&r&e&lCanne à sucre" with lore "&r&cvous ne possédez pas de canne à sucre" to be unstealable if arg 2 is "blé": remove all wheat from arg 1 add {$.%arg 1%} to {bal.%arg 1's uuid%} message "&2+%{$.%arg 1%}% bal" to arg 1 if arg 2 is "carrot": remove all carrot_item from arg 1 add {$.%arg 1%} to {bal.%arg 1's uuid%} message "&2+%{$.%arg 1%}% bal" to arg 1 if arg 2 is "potato": remove all potato from arg 1 add {$.%arg 1%} to {bal.%arg 1's uuid%} message "&2+%{$.%arg 1%}% bal" to arg 1 if arg 2 is "sugar": remove all sugar_cane_item from arg 1 add {$.%arg 1%} to {bal.%arg 1's uuid%} message "&2+%{$.%arg 1%}% bal" to arg 1 Modifié le 31 août 2018 par Wineker
noftaly Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 Non !! Tu utilises SkQuery, il ne faut SURTOUT pas l'utiliser pour faire des guis. Il faut uniquement utiliser TuSKe. Donc refait ton skript avec TuSKe ^^ en plus ça optimisera beaucoup bcp 1
Wineker Posté(e) le 31 août 2018 Posté(e) le 31 août 2018 il y a 19 minutes, noftaly a dit : Non !! Tu utilises SkQuery, il ne faut SURTOUT pas l'utiliser pour faire des guis. Il faut uniquement utiliser TuSKe. Donc refait ton skript avec TuSKe ^^ en plus ça optimisera beaucoup bcp woooow x), qu'est ce qu'il ne va pas ? il fonctionne très bien je l'ai essayé
noftaly Posté(e) le 1 septembre 2018 Posté(e) le 1 septembre 2018 Oh mon dieu ?♂️ Ce n'est pas une question de fonction. Oui ça marche. Mais 1) c'est pas du tout optimisé 2) ya BEAUCOUP de bug. 3) ils ne sont pas fiables : avec un peu d'habitude on peut dupliquer les items Donc oui, n'utilise plus jamais Skquery 1
Wineker Posté(e) le 1 septembre 2018 Posté(e) le 1 septembre 2018 (modifié) ok autant pour moi, je savais pas ? J'ai un p'tit problème skript comprend les lignes où il n'y a pas d'actions à effectuer mais celles finissant par 'to run:' il fait can't understand. ex: make a gui slot 23 of player with 1 potato_item named "&r&e&lPatates" with lore "&rtout vendre &r&2%{_$}% bal" to run: close player's inventory remove all potato_item from player add {_$} to {bal.%player's uuid%} message "&2+%{_$}% bal" to player Modifié le 1 septembre 2018 par Wineker
noftaly Posté(e) le 1 septembre 2018 Posté(e) le 1 septembre 2018 Tu as TuSKe ? En quelle version ? Quelle version skript ? Quelle version minecraft ?
Wineker Posté(e) le 1 septembre 2018 Posté(e) le 1 septembre 2018 minecraft: 1.12.2 skript: 2.2-dev37c turske: 1.11
noftaly Posté(e) le 1 septembre 2018 Posté(e) le 1 septembre 2018 (modifié) TuSke 1.11 ? /ver TuSKe Si tu n'as pas 1.8.3-pikachu-patch-v3, alors supprime tuske et met celui la Modifié le 1 septembre 2018 par noftaly 1
Wineker Posté(e) le 1 septembre 2018 Posté(e) le 1 septembre 2018 (modifié) c'était ça le problème ça fonctionne maintenant on right click on a villager: cancel event open chest with 5 rows named "&2&lVendeur" to player if player's inventory contain wheat: set {_n} to amount of wheat in player's inventory set {_$} to {_n}*13 make a gui slot 19 of player with 1 wheat_item named "&r&e&lBlé" with lore "&rtout vendre &r&2%{_$}% bal" to run: close player's inventory remove all wheat from player add {_$} to {bal.%player's uuid%} message "&2+%{_$}% bal" to player else: make a gui slot 19 of player with 1 wheat_item of unbreaking 1 named "&r&e&lBlé" with lore "&cvous n'en possédez pas" if player's inventory contain carrot_item: set {_n} to amount of carrot in player's inventory set {_$} to {_n}*15 make a gui slot 21 of player with 1 carrots_item named "&r&e&lCarrote" with lore "&rtout vendre &r&2%{_$}% bal" to run: close player's inventory remove all carrot_item from player add {_$} to {bal.%player's uuid%} message "&2+%{_$}% bal" to player else: make a gui slot 21 of player with 1 carrots_item of unbreaking 1 named "&r&e&lCarrote" with lore "&cvous n'en possédez pas" if player's inventory contain potato: set {_n} to amount of potato in player's inventory set {_$} to {_n}*13 make a gui slot 23 of player with 1 potato_item named "&r&e&lPatates" with lore "&rtout vendre &r&2%{_$}% bal" to run: close player's inventory remove all potato_item from player add {_$} to {bal.%player's uuid%} message "&2+%{_$}% bal" to player else: make a gui slot 23 of player with 1 potato_item of unbreaking 1 named "&r&e&lPatates" with lore "&cvous n'en possédez pas" if player's inventory contain sugar_cane_item: set {_n} to amount of sugar_cane_item in player's inventory set {_$} to {_n}*13 make a gui slot 25 of player with 1 sugar_cane_item named "&r&e&lCanne à sucre" with lore "&rtout vendre &r&2%{_$}% bal" to run: close player's inventory remove all sugar_cane_item from player add {_$} to {bal.%player's uuid%} message "&2+%{_$}% bal" to player else: make a gui slot 25 of player with 1 sugar_cane_item of unbreaking 1 named "&r&e&lCanne à sucre" with lore "&cvous n'en possédez pas" Modifié le 1 septembre 2018 par Wineker 1
Furibard Posté(e) le 1 septembre 2018 Auteur Posté(e) le 1 septembre 2018 Franchement merci beaucoup @Wineker et @noftaly (d'ailleur noftaly j'ai installé Tuske sauf que je vois pas le dossier y'a juste le truc .jar tu as discord stp ?? )
Messages recommandés