Aller au contenu
  • 0

Mettre un message


Question

Posté(e)

Bonjours , j'ai trouver un skript de (Braquage) sur le forum est j'aimerais ajouter des choses dedans , est j'aimerais savoir comment faire et ou le mettre:

 

Code:

 

options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               while distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop
           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

 

j'ai vue que quand on s'éloigne du panneau de 2 block sa annule le crochetage , j'aimerais que quand il s'annule sa mais un message du genre "Le crochetage est annuler , vous vous êtes trop éloigner de la banque"

et j'aimerais aussi que quand le crochetage et annuler sa remet le crochetage a 0 car la même qu'on s'éloigne quand on re clique sur le panneau sa remet ou on été arriver avant de s’éloigner , merci ^^

16 réponses à cette question

Messages recommandés

  • 0
Posté(e)

options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               while distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop
               else:
                   send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque" to player
                   set {BraquageInP.%event-block%} to false
                   set {Braquage.%event-block%} to 0
                   stop
           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

 

Je ne sais pas si c'est ce que tu veux mais je crois que oui ;)

  • 0
Posté(e)
options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               while distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop
               else:
                   send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque" to player
                   set {BraquageInP.%event-block%} to false
                   set {Braquage.%event-block%} to 0
                   stop
           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

 

Je ne sais pas si c'est ce que tu veux mais je crois que oui ;)

Bonjours , merci de ta réponse , mais il y a une erreur ^^screen : http://prntscr.com/dppe8r

  • 0
Posté(e)

options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               if distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop
               else:
                   send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque" to player
                   set {BraquageInP.%event-block%} to false
                   set {Braquage.%event-block%} to 0
                   stop
           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

Cela marche mais je ne sais pas si c'est ce que tu veux -_-

  • 0
Posté(e)
options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               if distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop
               else:
                   send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque" to player
                   set {BraquageInP.%event-block%} to false
                   set {Braquage.%event-block%} to 0
                   stop
           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

Cela marche mais je ne sais pas si c'est ce que tu veux -_-

Ce n'est pas exactement sa , la ce que tu ma fait c'est que je peux pas cliquer a plus de 2 block , moi j'veux que quand on s'éloigne du panneau banque de 2 block sa affiche le message "Le crochetage est annuler , vous vous êtes trop éloigner de la banque" et aussi je veux que quand on c'est éloigner le crochetage se remai a 0 il faut le re faire

  • 0
Posté(e)

Juste comme ca, je ne suis pas sûr mais il me semble que les évènement avec des panneaux ne marchent qu'en étant op, deop toi et dis moi. Car ca serait bête de faire un code si seul les personnes op peuvent l'utiliser.

 

ps: Cela m'est arrivé

  • 0
Posté(e)
Juste comme ca, je ne suis pas sûr mais il me semble que les évènement avec des panneaux ne marchent qu'en étant op, deop toi et dis moi. Car ca serait bête de faire un code si seul les personnes op peuvent l'utiliser.

 

ps: Cela m'est arrivé

Non , j'ai essayer et même en étant deop sa fonctionne trés bien ^^

  • 0
Posté(e)
UP ^^

Tu pourrais regarder la distance séparant les deux entités quand elle est plus grande que deux tu fais toutes les secondes:

#{var}  = variable de distance
#{autre.var} = variable on/off
every 1 seconds:
   loop all players:
       if {autre.var} is true:
            if {var} is less than 2:
               #suite
            else:
                #suite
                clear {autre.var}

Je ne t'ai rien maché, d'après tes envies je pense t'avoir aidé, si c'est le cas n'hésites pas à liker :)

  • 0
Posté(e)
Tu pourrais regarder la distance séparant les deux entités quand elle est plus grande que deux tu fais toutes les secondes:

#{var}  = variable de distance
#{autre.var} = variable on/off
every 1 seconds:
   loop all players:
       if {autre.var} is true:
            if {var} is less than 2:
               #suite
            else:
                #suite
                clear {autre.var}

Je ne t'ai rien maché, d'après tes envies je pense t'avoir aidé, si c'est le cas n'hésites pas à liker :)

Merci de ta réponse , mais ce code je le mais ou dans le code que j'ai donner ? ^^

  • 0
Posté(e)

Yo yo yo !

Pas besoin de se compliqué la vie, une ligne suffirais à regler ton soucis ^^ Faut juste ajouté un " send " quand le while serra break, du coup :

options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               while distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop

               send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque"

           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

 

En faite, notre while check si le joueur est à une distance de 2 de la banque constament, quand le joueur n'est plus à cette distance, la boucle se casse, et le code continue, sauf que là il n'y pas d'autre instruction après la boucle, faut juste lui dire de send un message juste en bas de la boucle, en dehors de cette dernieres

 

Jaaaanaa !

  • 0
Posté(e)
Yo yo yo !

Pas besoin de se compliqué la vie, une ligne suffirais à regler ton soucis ^^ Faut juste ajouté un " send " quand le while serra break, du coup :

options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               while distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop

               send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque"

           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

 

En faite, notre while check si le joueur est à une distance de 2 de la banque constament, quand le joueur n'est plus à cette distance, la boucle se casse, et le code continue, sauf que là il n'y pas d'autre instruction après la boucle, faut juste lui dire de send un message juste en bas de la boucle, en dehors de cette dernieres

 

Jaaaanaa !

Fonctionne parfaitement le message , mais j'ai un autre problème , serais tu comment je peux faire pour quand on s'éloigne de c'est 2 blocks , le crochetage se remais a 0% ? ^^

  • 0
Posté(e)
Fonctionne parfaitement le message , mais j'ai un autre problème , serais tu comment je peux faire pour quand on s'éloigne de c'est 2 blocks , le crochetage se remais a 0% ? ^^

set {var} to 0

  • 0
Posté(e)

^^


options:
   SommeMin : 10
   SommeMax : 20
   Monnaie : roubles
   Temps : 2 #Temps entre deux étapes du crochetage
   Cooldown : 1 #En minutes

on right click on a sign:
   if line 1 is "[banque]":
       if {Braquage.%event-block%} isn't set:
           set {Braquage.%event-block%} to 0
       if {BraquageInP.%event-block%} isn't set:
           set {BraquageInP.%event-block%} to false
       if {BraquageLast.%event-block%} isn't set:
           set {BraquageLast.%event-block%} to now
           remove a day from {BraquageLast.%event-block%}
       if {BraquageInP.%event-block%} is false:
           set {_Différence} to difference between {BraquageLast.%event-block%} and now
           if difference between {BraquageLast.%event-block%} and now is more than {@Cooldown} minutes:
               while distance between player and event-block is less than 2:
                   set {BraquageInP.%event-block%} to true
                   add 5 to {Braquage.%event-block%}
                   broadcast "&eCoffre crocheté à &a%{Braquage.%event-block%}%&e%%"
                   wait {@Temps} seconds
                   set {BraquageInP.%event-block%} to false
                   if {Braquage.%event-block%} is more than 90:
                       set {_Volé} to a random integer between {@SommeMin} and {@SommeMax}
                       broadcast "&eLa banque a été braquée par &b%player%&e. Le voleur a emporté &a%{_Volé}% {@Monnaie}&e."
                       make console execute "/eco give %player% %{_Volé}%"
                       set {Braquage.%event-block%} to 0
                       set {BraquageLast.%event-block%} to now
                       stop

               set {Braquage.%event-block%} to 0
               send "&cLe crochetage est annuler , vous vous êtes trop éloigner de la banque"

           else:
               send "&cLa banque a déjà été braquée récemment, il n'y a plus rien." to player
       else:
           send "&cLe coffre est déjà en train d'être crocheté."

 

^^

×
×
  • 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.