-
Compteur de contenus
90 -
Inscription
-
Dernière visite
-
Jours gagnés
8 -
Crédits
10 [Faire un don]
Type de contenu
Profils
Forums
Téléchargements
Downloads Plus Support
module__dplus_manager
Tout ce qui a été posté par McLincoln2
-
Le java c'est cool à développer pour ceux qui n'en n'ont jamais fait.
-
Essaie: block above block at player isn't air #ou block above block above block at player isn't air
-
Remplir ligne(s) et/ou colonne(s) dans un GUI
McLincoln2 a répondu à un sujet de McLincoln2 dans Fragments codes
Intéressant, quelques questions: Pour ça: [make] [a] square of %itemstack% [named %-string%] (for|to) %players% [without click [effect]] [[and] stuck inventory] Cela fait le contour ? J'ai pas trop compris. Je pense que cela peut être intéressant de globaliser un peu les lignes et colonnes en en remplissant plusieurs d'un coup: [make] column %integers% of %itemstack% [named %-string%] (for|to) %players% [without click [effect]] [[and] stuck inventory] Au lieu de: [make] column %integer% of %itemstack% [named %-string%] (for|to) %players% [without click [effect]] [[and] stuck inventory] Pourquoi pas rajouter: loop (row|column)s %integers% of %players%: Pour récupérer les items étant dedans. J'éditerais si des choses me viennent, bonne soirée. -
[spoiler=Code] function slines(lines:numbers) :: numbers: loop {_lines::*}: add integers between 9*((loop-value)-1) and 9*(loop-value)-1 to {_results::*} return {_results::*} function fillines(player:player,item:item,lines:numbers): loop slines({_lines::*}): format gui slot loop-value of {_player} with {_item} function scolumns(columns:numbers) :: numbers: loop {_columns::*}: loop 6 times: add loop-value-1+9*((loop-value-2)-1)-1 to {_results::*} return {_results::*} function fillcolumns(player:player,item:item,columns:numbers): loop scolumns({_columns::*}): format gui slot loop-value of {_player} with {_item} Ce code contient 2 fonctions utilisables n'importe où à la condition de bien le faire. Vous pouvez remplir plusieurs lignes d'un coup et/ou plusieurs colonnes d'un coup. Syntaxes: fillines(%player%,%item stack%,%numbers%) fillcolumns(%player%,%item stack%,%numbers%) fillines() permet de remplir une/des ligne(s), fillcolumns() permet de remplir une/des colonne(s). Exemple de code: command /fills [<number=6>]: trigger: open virtual chest inventory with size argument to player fillines(player,stone,(1 and argument)) fillcolumns(player,stone,(1 and 9)) Cet exemple permet de remplir le contour d'un coffre de hauteur X ici %argument%. Image: [ATTACH=full]8395[/ATTACH] [spoiler=Aller plus loin] Ce code contient deux autres fonctions, qui servent à obtenir les slots correspondants à une/des (ligne(s)|colonne(s)): Syntaxes: slines(%numbers%) scolumns(%numbers%) Exemple de code: command /fills [<number=6>]: trigger: open virtual chest inventory with size argument to player loop slines(1): format gui slot loop-value of player with loop-value of stone loop scolumns(1): format gui slot loop-value of player with loop-value of stone Image: [ATTACH=full]8396[/ATTACH]
-
C'est possible mais je ne pourrais pas te le faire désolé.
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 21/05/2018 19:02 Read the rest of this update entry...
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 21/05/2018 17:54 'Esthétique' Read the rest of this update entry...
-
Tu peux utiliser ce script sinon: scoreboards
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 21/05/2018 11:54 Read the rest of this update entry...
-
Mon script (ici), dans la function 'start' plus précisément.
-
C'est utile dans les boucles, mais pas ici visiblement.
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 20/05/2018 10:34 Read the rest of this update entry...
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 20/05/2018 Read the rest of this update entry...
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 19/05/2018 18:31 Read the rest of this update entry...
-
McLincoln2 updated maze - Tournament between teams with a new update entry: 19/05/2018 13:41 Read the rest of this update entry...
-
McLincoln2 submitted a new resource: [plain]maze - Tournament between teams[/plain] - [plain]Créer vos propres tournois dans un jeu de labyrinthe.[/plain] [spoiler=Vidéo] - Le script - Ce script permet la création de tournois dans un jeu... Read more about this resource...
-
Exemple de configuration pour mon petit jeu avec autant de partie possbile; https://pastebin.com/raw/EgeFYWXe
-
J'ai bien avancé dans mon petit jeu pour ceux que ça peut intéresser je vous montre demain :p
-
Je viens de voir cela avec TuSKe 1.0 loop alphabetical order of all players: send "%loop-object%" Donc on a: function players(permissions:objects) :: players: loop {_permissions::*}: loop alphabetical order of all players: if loop-object has permission "%loop-value-1%": if {_players::%loop-object%} is not set: set {_players::%loop-object%} to loop-object add loop-object to {_R::*} return {_R::*} C'est pas bien ça pour trier en fonction des permissions ? command /tri: trigger: set {_permissions::*} to "a", "b", "c" and "d" loop players({_permissions::*}): #ETC
-
Petit jeu: https://www.youtube.com/watch?v=v15QfS2qzmk&feature=youtu.be Merci @[3033:@4rno] pour l'algorithme du labyrinthe.
-
McLincoln2 submitted a new resource: [plain]sKalendar[/plain] - [plain]Avoir un calendrier sur son serveur est désormais possible.[/plain] Read more about this resource...
-
[Shop/Spawners/SkyBlock] Skript de spawners pour un skybloc
McLincoln2 a répondu à un sujet de Ertonia dans Inactifs
@MaxDu56YT @Ertonia J'ai réalisé ce script, il marche pour moi. Version de mon serveur: 1.11.2 Add-ons: - TuSKe 1.8.3-PikachuPatch-v1 - Skript 2.2-dev32d - SkStuff - skript-yaml Dans 'plugins/Skript/scripts/' load: load yaml "plugins/sS/config.yml" as "sSConfig" function spawners() :: objects: loop skript-yaml nodes with keys "GUI.spawners" from "sSConfig" without string checks: if loop-value is not "global item": add loop-value to {_S::*} return {_S::*} function decorations() :: objects: set {_R::*} to skript-yaml list "GUI.decoration" from "sSConfig" return {_R::*} function d(S:string) :: string: set {_R} to skript-yaml value "GUI.spawners.%{_S}%.data" from "sSConfig" return {_R} function s(S:string) :: number: set {_R} to skript-yaml value "GUI.spawners.%{_S}%.slot" from "sSConfig" return {_R} function p(S:string) :: number: set {_R} to skript-yaml value "GUI.spawners.%{_S}%.price" from "sSConfig" return {_R} function nbt(S:object) :: string: set {_R} to skript-yaml value "GUI.spawners.%{_S}%.nbt" from "sSConfig" replace all "$s" with "%s({_S})%" in {_R} replace all "$p" with "%p({_S})%" in {_R} replace all "$id" with "%{_S}%" in {_R} return {_R} on command: set {_CMD} to skript-yaml value "command" from "sSConfig" if command is {_CMD}: cancel event set {_NAME} to skript-yaml value "GUI.name" from "sSConfig" set {_S} to skript-yaml value "GUI.height" from "sSConfig" set {_B} to "%skript-yaml value ""GUI.spawners.global item"" from ""sSConfig""%" parsed as item open virtual chest inventory with size {_S} named "%{_NAME}%" to player loop spawners(): set {_S} to loop-value format gui slot s({_S}) of player with {_B} with custom nbt "%nbt({_S})%" to run: if targeted block of player is a mob spawner: set {_E} to "%nbt of targeted block%" set {_E::*} to {_E} split by ":{Entity:{id:""" set {_F} to first element of {_E::2} split by """}" if d({_S}) is not "%{_F}%": replace all "%{_F}%" with "%d({_S})%" in {_E} if money of player is bigger or equal to p({_S}): remove p({_S}) from money of player set block at targeted block to mob spawner add "%{_E}%" to nbt of targeted block loop decorations(): set {_I} to loop-value set {_I::*} to {_I} split by "|" if {_I::4} is "confirmation": format gui slot {_I::1} parsed as number of player with "%{_I::2}%" parsed as item with custom nbt "%{_I::3}%" to run: set {_P} to skript-yaml value "GUI.basic spawner.price" from "sSConfig" set {_NAME} to skript-yaml value "GUI.basic spawner.confirmation.name" from "sSConfig" set {_S} to skript-yaml value "GUI.basic spawner.confirmation.height" from "sSConfig" open virtual chest inventory with size {_S} named "%{_NAME}%" to player set {_I::*} to "GUI.basic spawner.confirmation.accept" and "GUI.basic spawner.confirmation.deny" set {_I2::*} to "slot", "item" and "nbt" loop {_I::*}: loop {_I2::*}: set {_I3::%loop-value-3%} to skript-yaml value "%loop-value-2%.%loop-value-3%" from "sSConfig" set {_A} to loop-value-2 format gui slot {_I3::slot} of player with "%{_I3::item}%" parsed as item with custom nbt "%{_I3::nbt}%" to run: if {_A} is "GUI.basic spawner.confirmation.accept": if player's money is bigger or equal to {_P}: remove {_P} from money of player execute console command "/give %player% mob_spawner 1 0 {BlockEntityTag:{EntityId:minecraft:pig}}" else: execute player command "%{_CMD}%" clear {_I3::*} loop skript-yaml list "GUI.basic spawner.decoration" from "sSConfig": set {_F} to loop-value-2 set {_F::*} to {_F} split by "|" format gui slot {_F::1} parsed as number of player with "%{_F::2}%" parsed as item with custom nbt "%{_F::3}%" else: format gui slot {_I::1} parsed as number of player with "%{_I::2}%" parsed as item with custom nbt "%{_I::3}%" 'plugins/sS/config.yml' command: sS-edit GUI: name: '§3Spawners' height: 6 basic spawner: price: 50000 confirmation: name: '§3Spawners' height: 3 # between 1 and 6 accept: slot: 15 item: emerald nbt: '{display:{Name:"§2Valider l''achat"}}' deny: slot: 11 item: rose red nbt: '{display:{Name:"§4Annuler l''achat"}}' decoration: - '4|mob spawner|{display:{Name:"§3Achat Spawner Cochon"}}|confirmation' decoration: - '53|mob spawner|{display:{Name:"§3Achat Spawner Cochon"}}|confirmation' # You can add others decoration tools spawners: global item: 'spawn egg' # do not edit this # [Contenu masqué] # $p is price # $s is slot # $id is ID, for llama is 'llama' llama: slot: 0 data: 'minecraft:llama' nbt: '{EntityTag:{id:minecraft:llama},display:{Name:"$id",Lore:["$p$"]}}' price: 5000 enderman: slot: 1 data: 'minecraft:enderman' nbt: '{EntityTag:{id:minecraft:enderman},display:{Name:"$id",Lore:["$p$"]}}' price: 10000 endermite: slot: 2 data: 'minecraft:endermite' nbt: '{EntityTag:{id:minecraft:endermite},display:{Name:"$id",Lore:["$p$"]}}' price: 5000 spider: slot: 3 data: 'minecraft:spider' nbt: '{EntityTag:{id:minecraft:spider},display:{Name:"$id",Lore:["$p$"]}}' price: 2500 blaze: slot: 4 data: 'minecraft:blaze' nbt: '{EntityTag:{id:minecraft:blaze},display:{Name:"$id",Lore:["$p$"]}}' price: 5000 chicken: slot: 5 data: 'minecraft:chicken' nbt: '{EntityTag:{id:minecraft:chicken},display:{Name:"$id",Lore:["$p$"]}}' price: 1000 cow: slot: 6 data: 'minecraft:cow' nbt: '{EntityTag:{id:minecraft:cow},display:{Name:"$id",Lore:["$p$"]}}' price: 2500 -
TuSKe suffit amplement.
-
options: gui name: <MM>/<YY> <M> function G(MM:number,DD:number,YY:number) :: number: if {_MM} >= 3: set {_z} to {_YY} else if {_MM} is 1 or 2: set {_z} to {_YY}-1 set {_A} to floor(23*{_MM}/9) set {_B::*} to floor({_z}/4), floor({_z}/100) and floor({_z}/400) if {_MM} is 1 or 2: set {_D} to {_A}+{_DD}+4+{_YY}+{_B::1}-{_B::2}+{_B::3} else: set {_D} to {_A}+{_DD}+4+{_YY}+{_B::1}-{_B::2}+{_B::3}-2 return mod({_D},7) function JDay(JJ:number) :: string: set {_d::*} to "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" and "Dimanche" if {_JJ} is 0: set {_JJ} to 7 return {_d::%{_JJ}%} function MMonth(MM:number) :: string: set {_m::*} to "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre" and "Décembre" return {_m::%{_MM}%} function isB(YY:number) :: boolean: if mod({_YY},4) != 0: return false else if mod({_YY},100) != 0: return true else if mod({_YY},400) != 0: return false else: return true function nbMY(MM:number,YY:number) :: number: set {_n::*} to 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 and 31 if isB({_YY}) is true: set {_n::2} to {_n::2}+1 return {_n::%{_MM}%} on command: if command is "jour": cancel event set {_a::*} to arguments split by " " if {_a::1} is set: if {_a::2} parsed as number is set: if {_a::3} parsed as number is set: # /MM /DD /YY if {_a::1} parsed as number is smaller or equal to 12: send "%JDay(G({_a::1} parsed as number,{_a::2} parsed as number,{_a::3} parsed as number))% %{_a::2}% %MMonth({_a::1} parsed as number)% %{_a::3}%" to player else: set {_n} to "%now%" set {_t::*} to first element of {_n} split by " " split by "/" set {_t::1} to {_t::1} parsed as number set {_t::2} to {_t::2} parsed as number set {_t::3} to {_t::3} parsed as number+2000 execute player command "/jour %{_t::2}% %{_t::1}% %{_t::3}%" else if command is "calendrier": cancel event set {_a::*} to arguments split by " " if {_a::1} is set: if {_a::2} parsed as number is set: # /MM /YY set {_MM} to {_a::1} parsed as number set {_YY} to {_a::2} parsed as number set {_i::*} to "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" and "Dimanche" loop all numbers between 1 and nbMY({_MM},{_YY}): set {_N} to loop-number loop {_i::*}: if loop-value-2 is JDay(G({_MM},{_N},{_YY})): add {_N} to {_i::%loop-index%::*} set {_NAME} to "{@gui name}" replace all "<M>" with "%MMonth({_MM})%" in {_NAME} if {_MM} is smaller than 10: replace all "<MM>" with "0%{_MM}%" in {_NAME} else: replace all "<MM>" with "%{_MM}%" in {_NAME} replace all "<YY>" with "%{_YY}%" in {_NAME} open virtual chest inventory with size 6 named "%{_NAME}%" to player loop 7 times: loop {_i::%loop-value%::*}: if loop-value-2 is 1: set {_S} to loop-value-1 loop {_i::%loop-value%::*}: if loop-value-2 parsed as number - {_S} < 0: format gui slot loop-value-1 + (loop-index parsed as number-1) * 9 of player with loop-value-2 of glass pane named "%{_i::%loop-value-1%}% %loop-value-2%" else: format gui slot loop-value-1 + loop-index parsed as number * 9 of player with loop-value-2 of glass pane named "%{_i::%loop-value-1%}% %loop-value-2%" if {_MM} is not 1: format gui slot 45 of player with paper named "§fMois précédent" to run player command "/%command% %{_MM}-1% %{_YY}%" if {_MM} is not 12: format gui slot 53 of player with paper named "§fMois suivant" to run player command "/%command% %{_MM}+1% %{_YY}%" else: format gui slot 53 of player with paper named "§fMois suivant" to run player command "/%command% 1 %{_YY}+1%" stop format gui slot 45 of player with paper named "§fMois précédent" to run player command "/%command% 12 %{_YY}-1%" format gui slot 53 of player with paper named "§fMois suivant" to run player command "/%command% %{_MM}+1% %{_YY}%" else: execute player command "/calendrier" else: set {_n} to "%now%" set {_t::*} to first element of {_n} split by " " split by "/" set {_t::2} to {_t::2} parsed as number set {_t::3} to {_t::3} parsed as number+2000 execute player command "/calendrier %{_t::2}% %{_t::3}%" Plus besoin de faire (J+1).