Aller au contenu
  • 0

Regeneration d'un monde tout les x Minutes


Question

Posté(e)

Salut :à J'ai un projet en tête et il me manque plus que ce que je vien de marquer plus :) Je n'ai malheureusement pas de code à vous proposer car je ne sait pas si cela est possible ni comment donc une petite aide sera aprécié :)

14 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Salut skyox,

Cela devrai te satisfaire :

every 30 seconds:
   execute console command "regen"



on break:
       if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.casse.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true

command /regen:
   trigger:
       loop {bloc.casse.location::*}:
           set {_loc} to loop-value
           set block at {_loc} to {bloc.type::%loop-index%}
       delete {bloc.casse.location::*}
       delete {bloc.type::*}
       delete {bloc.location::*}

 

N'oublie pas de laisser un J'aime ;)

  • J'aime 1
  • 0
Posté(e)

Merci MinecaftHero mais j'ai cette erreur

 

 

[16:15:22 WARN]: Possible name conflict of variables {bloc.type::%loop-index%} and {bloc.type::*} (there might be more conflicts). (Regen.sk, line 16: set block at {_loc} to {bloc.type::%loop-index%}')[16:15:22 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (Regen.sk, line 7: if {bloc.location::%location of event-block%} is not set:')

 

PS: En attendant ton Skript fonctionne très bien mais je crois que quand tu pose un bloc puis tu le re casse puis tu fait un regen les bloc possé casser reviennent normale ?

  • 0
Posté(e)

Laisse tombé "l'erreur" puisque ce n'en ai pas une c'est juste une possibilité de conflit, pour ne plus avoir ce message tu as juste à changer le nom des variables.

Oui une fois que tu casses le bloc, tu fais /regen et ça le remet.

 

Ps: je te laisse mettre le sujet en résolu.

  • 0
Posté(e)

on peut faire comme ceci:

 

every 30 seconds:
   execute console command "regen"



on break:
       if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.casse.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true

on place:
       if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.place.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true


command /regen:
   trigger:
       loop {bloc.casse.location::*}:
           set {_loccasse} to loop-value
           set block at {_loccasse} to {bloc.type::%loop-index%}
       loop {bloc.place.location::*}:
           set {_locplace} to loop-value
           set block at {_locplace} to {bloc.type::%loop-index%}
       delete {bloc.place.location::*}
       delete {bloc.type::*}
       delete {bloc.location::*}

  • J'aime 1
  • 0
Posté(e)

every 1200 seconds
execute console command "regen"

on break:
   if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.casse.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true

on place:
   if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.place.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true


command /regen:
   trigger:
       loop {bloc.casse.location::*}:
           set {_loccasse} to loop-value
           set block at {_loccasse} to {bloc.type::%loop-index%}
       loop {bloc.place.location::*}:
           set {_locplace} to loop-value
           set block at {_locplace} to {bloc.type::%loop-index%}
       delete {bloc.place.location::*}
       delete {bloc.type::*}
       delete {bloc.location::*}

 

J'ai essayer de corriger le max mais j'ai cette erreur :

 

 

[10:52:14 WARN]: Possible name conflict of variables {bloc.type::%loop-index%} and {bloc.type::*} (there might be more conflicts). (regen.sk, line 21: set block at {_loccasse} to {bloc.type::%loop-index%}')[10:52:14 ERROR]: invalid line - all code has to be put into triggers (regen.sk, line 2: execute console command "regen"')invalid line - all code has to be put into triggers (regen.sk, line 1: every 1200 seconds')

  • 0
Posté(e)

Oui merci mais n'empeche que j'ai cette erreure là

invalid line - all code has to be put into triggers (regen.sk, line 2: execute console command "regen"')invalid line - all code has to be put into triggers (regen.sk, line 1: every 1200 seconds')
  • 0
Posté(e)

Et là ?

 

every 1200 seconds:
   execute console command "regen"

on break:
   if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.casse.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true

on place:
   if {bloc.location::%location of event-block%} is not set:
       add location of block to {bloc.place.location::*}
       add type of block to {bloc.type::*}
       set {bloc.location::%location of event-block%} to true


command /regen:
   trigger:
       loop {bloc.casse.location::*}:
           set {_loccasse} to loop-value
           set block at {_loccasse} to {bloc.type::%loop-index%}
       loop {bloc.place.location::*}:
           set {_locplace} to loop-value
           set block at {_locplace} to {bloc.type::%loop-index%}
       delete {bloc.place.location::*}
       delete {bloc.type::*}
       delete {bloc.location::*}

  • J'aime 1
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.