Aller au contenu

[Ratio] Skript de ratio / kdr


Messages recommandés

Posté(e)

options:
   Message.NoPerm: &cVous n'avez pas la permission
   Message.reset: &eVous avez reset les stats de %arg-2%
   Message.classement: &eFaite /classement kill/mort/ks

   Perm: admin.ks

   chat.format.kill.1: &6&m----------&a&o Classement Kills &6&m----------
   chat.format.kill.2:    &6» ##&b%loop-index% &c%loop-value%&7: &3%{killz::%loop-value%}% &eKills

   chat.format.death.1: &6&m----------&a&o Classement Morts &6&m----------
   chat.format.death.2:    &6» ##&b%loop-index% &c%loop-value%&7: &3%{deathz::%loop-value%}% &eMorts

   chat.format.KillsStreak.1: &6&m----------&a&o Classement KillStreak &6&m----------
   chat.format.KillsStreak.2:    &6» Indisponnible

   chat.format.1: &6&m----------&a&o KillsStreak %{_p}% &6&m----------
   chat.format.2: &c
   chat.format.3: &a» &eVous avez fait &c%{killz::%{_p}%}% &ekill(s)
   chat.format.4: &a» &eVous avez fait &c%{deathz::%{_p}%}% &eMort(s)
   chat.format.5: &a» &eVous etiez en KillsStreak de &c%{KillsStreak::%{_p}%}%&e.
   chat.format.6: &c
   chat.format.7: &6&m----------&a&o KillsStreak %{_p}% &6&m----------

on join:
   if {killz::%player%} is not set:
       set {killz::%player%} to 0
   if {deathz::%player%} is not set:
       set {deathz::%player%} to 0       
   if {KillsStreak::%player%} is not set:
       set {KillsStreak::%player%} to 0   



on death of player:
   add 1 to {deathz::%victim%}
   if attacker is a player:
       add 1 to {killz::%attacker%}
       add 1 to {KillsStreak::%attacker%}   

on death of player:
   set {KillsStreak::%victim%} to 0

command /ks [<offline player>]:
   trigger:
       if arg 1 is not set:
           set {_p} to player
           send "{@chat.format.1}"
           send "{@chat.format.2}"
           send "{@chat.format.3}"
           send "{@chat.format.4}"
           send "{@chat.format.5}"
           send "{@chat.format.6}"
           send "{@chat.format.7}"
       if arg 1 is set:
           set {_p} to arg 1
           send "{@chat.format.1}"
           send "{@chat.format.2}"
           send "{@chat.format.3}"
           send "{@chat.format.4}"
           send "{@chat.format.5}"
           send "{@chat.format.6}"
           send "{@chat.format.7}"   

command /ksclassement [<text>]:
   trigger:
       if arg 1 is not set:
           send "{@Message.classement}"
       if arg 1 is "kill" or "kills":
           loop {killz::*}:
               add 1 to {_size}
               if {_low.to.high.list::%loop-value%} is not set:
                   set {_low.to.high.list::%loop-value%} to loop-index
               else:
                   set {_n} to 0
                   loop {_size} times:
                       set {_n} to {_n}+1
                       {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                       set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                       stop loop
           wait 1 tick
           set {_n} to size of {_low.to.high.list::*}
           loop {_low.to.high.list::*}:
               set {_high.to.low.list::%{_n}%} to loop-value
               set {_n} to {_n}-1
           wait 1 tick
           send "{@chat.format.kill.1}"
           loop {_high.to.low.list::*}:
               add 1 to {_result}
               send "{@chat.format.kill.2}"
               if {_result} is 10:
                   stop       
       if arg 1 is "morts" or "mort" or "death":
           loop {deathz::*}:
               add 1 to {_size}
               if {_low.to.high.list::%loop-value%} is not set:
                   set {_low.to.high.list::%loop-value%} to loop-index
               else:
                   set {_n} to 0
                   loop {_size} times:
                       set {_n} to {_n}+1
                       {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                       set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                       stop loop
           wait 1 tick
           set {_n} to size of {_low.to.high.list::*}
           loop {_low.to.high.list::*}:
               set {_high.to.low.list::%{_n}%} to loop-value
               set {_n} to {_n}-1
           wait 1 tick
           send "{@chat.format.death.1}"
           loop {_high.to.low.list::*}:
               add 1 to {_result}
               send "{@chat.format.death.2}"
               if {_result} is 10:
                   stop   
       if arg 1 is "killstreak" or "ks":
           loop {KillSteak::*}:
               add 1 to {_size}
               if {_low.to.high.list::%loop-value%} is not set:
                   set {_low.to.high.list::%loop-value%} to loop-index
               else:
                   set {_n} to 0
                   loop {_size} times:
                       set {_n} to {_n}+1
                       {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                       set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                       stop loop
           wait 1 tick
           set {_n} to size of {_low.to.high.list::*}
           loop {_low.to.high.list::*}:
               set {_high.to.low.list::%{_n}%} to loop-value
               set {_n} to {_n}-1
           wait 1 tick
           send "{@chat.format.KillsStreak.1}"
           loop {_high.to.low.list::*}:
               add 1 to {_result}
               send "{@chat.format.KillsStreak.2}"
               if {_result} is 10:
                   stop   

command /adminks [<text>] [<offline player>]:
   trigger:
       if player has permission "{@Perm}":
           if arg 1 is "reset":
               if arg 2 is set:
                   set {KillsStreak::%arg-2%} to 0
                   set {deathz::%arg-2%} to 0
                   set {killz::%arg-2%} to 0
                   send "{@Message.reset}"
               else:
                   send "&c/adminks reset <player>"
           if arg 1 is "reload":
               make console execute command "/sk relaod %script name%"
       else:
           send "{@Message.NoPerm}"

Bonjour,

Version de MC > 1.8.8

Type de skript : Skript de ratio

Description:

Je souhaiterai un skript de ratio permettant de voir son ratio et celui d'un joueur

En gros je voudrais que la variable {killz} et {deathz] que jai mis sr un autre skript de kill et de mort

soit diviser donc nombre de kills / nb de morts et quand on fait /ratio (player) ça nous affiche le ratio

merci de votre aide

Posté(e)

command /ratio [<offline player>]:
 trigger:
   if argument is not set:
     execute sender command "/ratio %sender%"
   else:
     send "§aRatio de %arg%:§f %{killz.%arg%} / {deathz.%arg%}%" to sender

 

Par contre il faut que les variables soit différentes pour chacun des joueurs.

Au lieu de {killz} et {deathz}, plutôt mettre {killz.%attacker%} et {deathz%victim%}

 

Comme ca:

death:
 attacker is a player
 victim is a player
 add 1 to {killz.%attacker%}
 add 1 to {deathz.%victim%}

 

Et si tu laisses {killz} et {deathz}

Avec ce type de code

death:
 victim is a player
 attacker is a player
 add 1 to {killz}
 add 1 to {deathz}

 

Ton ratio sera toujours de 1, c'est logique.

Posté(e)
command /ratio [<offline player>]:
 trigger:
   if argument is not set:
     execute sender command "/ratio %sender%"
   else:
     send "§aRatio de %arg%:§f %{killz.%arg%} / {deathz.%arg%}%" to sender

 

Par contre il faut que les variables soit différentes pour chacun des joueurs.

Au lieu de {killz} et {deathz}, plutôt mettre {killz.%attacker%} et {deathz%victim%}

 

Comme ca:

death:
 attacker is a player
 victim is a player
 add 1 to {killz.%attacker%}
 add 1 to {deathz.%victim%}

 

Et si tu laisses {killz} et {deathz}

Avec ce type de code

death:
 victim is a player
 attacker is a player
 add 1 to {killz}
 add 1 to {deathz}

 

Ton ratio sera toujours de 1, c'est logique.

Merci , je test

Posté(e)

options:
   Message.NoPerm: &cVous n'avez pas la permission
   Message.reset: &eVous avez reset les stats de %arg-2%
   Message.classement: &eFaite /classement kill/mort/ks

   Perm: admin.ks

   chat.format.kill.1: &6&m----------&a&o Classement Kills &6&m----------
   chat.format.kill.2:    &6» ##&b%loop-index% &c%loop-value%&7: &3%{killz::%loop-value%}% &eKills

   chat.format.death.1: &6&m----------&a&o Classement Morts &6&m----------
   chat.format.death.2:    &6» ##&b%loop-index% &c%loop-value%&7: &3%{deathz::%loop-value%}% &eMorts

   chat.format.KillsStreak.1: &6&m----------&a&o Classement KillStreak &6&m----------
   chat.format.KillsStreak.2:    &6» Indisponnible

   chat.format.1: &6&m----------&a&o KillsStreak %{_p}% &6&m----------
   chat.format.2: &c
   chat.format.3: &a» &eVous avez fait &c%{killz::%{_p}%}% &ekill(s)
   chat.format.4: &a» &eVous avez fait &c%{deathz::%{_p}%}% &eMort(s)
   chat.format.5: &a» &eVous etiez en KillsStreak de &c%{KillsStreak::%{_p}%}%&e.
   chat.format.6: &c
   chat.format.7: &6&m----------&a&o KillsStreak %{_p}% &6&m----------

on join:
   if {killz::%player%} is not set:
       set {killz::%player%} to 0
   if {deathz::%player%} is not set:
       set {deathz::%player%} to 0       
   if {KillsStreak::%player%} is not set:
       set {KillsStreak::%player%} to 0   



on death of player:
   add 1 to {deathz::%victim%}
   if attacker is a player:
       add 1 to {killz::%attacker%}
       add 1 to {KillsStreak::%attacker%}   

on death of player:
   set {KillsStreak::%victim%} to 0

command /ks [<offline player>]:
   trigger:
       if arg 1 is not set:
           set {_p} to player
           send "{@chat.format.1}"
           send "{@chat.format.2}"
           send "{@chat.format.3}"
           send "{@chat.format.4}"
           send "{@chat.format.5}"
           send "{@chat.format.6}"
           send "{@chat.format.7}"
       if arg 1 is set:
           set {_p} to arg 1
           send "{@chat.format.1}"
           send "{@chat.format.2}"
           send "{@chat.format.3}"
           send "{@chat.format.4}"
           send "{@chat.format.5}"
           send "{@chat.format.6}"
           send "{@chat.format.7}"   

command /ksclassement [<text>]:
   trigger:
       if arg 1 is not set:
           send "{@Message.classement}"
       if arg 1 is "kill" or "kills":
           loop {killz::*}:
               add 1 to {_size}
               if {_low.to.high.list::%loop-value%} is not set:
                   set {_low.to.high.list::%loop-value%} to loop-index
               else:
                   set {_n} to 0
                   loop {_size} times:
                       set {_n} to {_n}+1
                       {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                       set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                       stop loop
           wait 1 tick
           set {_n} to size of {_low.to.high.list::*}
           loop {_low.to.high.list::*}:
               set {_high.to.low.list::%{_n}%} to loop-value
               set {_n} to {_n}-1
           wait 1 tick
           send "{@chat.format.kill.1}"
           loop {_high.to.low.list::*}:
               add 1 to {_result}
               send "{@chat.format.kill.2}"
               if {_result} is 10:
                   stop       
       if arg 1 is "morts" or "mort" or "death":
           loop {deathz::*}:
               add 1 to {_size}
               if {_low.to.high.list::%loop-value%} is not set:
                   set {_low.to.high.list::%loop-value%} to loop-index
               else:
                   set {_n} to 0
                   loop {_size} times:
                       set {_n} to {_n}+1
                       {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                       set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                       stop loop
           wait 1 tick
           set {_n} to size of {_low.to.high.list::*}
           loop {_low.to.high.list::*}:
               set {_high.to.low.list::%{_n}%} to loop-value
               set {_n} to {_n}-1
           wait 1 tick
           send "{@chat.format.death.1}"
           loop {_high.to.low.list::*}:
               add 1 to {_result}
               send "{@chat.format.death.2}"
               if {_result} is 10:
                   stop   
       if arg 1 is "killstreak" or "ks":
           loop {KillSteak::*}:
               add 1 to {_size}
               if {_low.to.high.list::%loop-value%} is not set:
                   set {_low.to.high.list::%loop-value%} to loop-index
               else:
                   set {_n} to 0
                   loop {_size} times:
                       set {_n} to {_n}+1
                       {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
                       set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
                       stop loop
           wait 1 tick
           set {_n} to size of {_low.to.high.list::*}
           loop {_low.to.high.list::*}:
               set {_high.to.low.list::%{_n}%} to loop-value
               set {_n} to {_n}-1
           wait 1 tick
           send "{@chat.format.KillsStreak.1}"
           loop {_high.to.low.list::*}:
               add 1 to {_result}
               send "{@chat.format.KillsStreak.2}"
               if {_result} is 10:
                   stop   

command /adminks [<text>] [<offline player>]:
   trigger:
       if player has permission "{@Perm}":
           if arg 1 is "reset":
               if arg 2 is set:
                   set {KillsStreak::%arg-2%} to 0
                   set {deathz::%arg-2%} to 0
                   set {killz::%arg-2%} to 0
                   send "{@Message.reset}"
               else:
                   send "&c/adminks reset <player>"
           if arg 1 is "reload":
               make console execute command "/sk relaod %script name%"
       else:
           send "{@Message.NoPerm}"

command /ratio [<offline player>]:
 trigger:
   if argument is not set:
     execute sender command "/ratio %sender%"
   else:
     send "§aRatio de %arg%:§f %{killz.%arg%} / {deathz.%arg%}%" to sender

 

Par contre il faut que les variables soit différentes pour chacun des joueurs.

Au lieu de {killz} et {deathz}, plutôt mettre {killz.%attacker%} et {deathz%victim%}

 

Comme ca:

death:
 attacker is a player
 victim is a player
 add 1 to {killz.%attacker%}
 add 1 to {deathz.%victim%}

 

Et si tu laisses {killz} et {deathz}

Avec ce type de code

death:
 victim is a player
 attacker is a player
 add 1 to {killz}
 add 1 to {deathz}

 

Ton ratio sera toujours de 1, c'est logique.

@iLaZz tu peux me le faire en fonction de ce code stp ?

 

 

options:

Message.NoPerm: &cVous n'avez pas la permission

Message.reset: &eVous avez reset les stats de %arg-2%

Message.classement: &eFaite /classement kill/mort/ks

 

Perm: admin.ks

 

chat.format.kill.1: &6&m----------&a&o Classement Kills &6&m----------

chat.format.kill.2: &6» ##&b%loop-index% &c%loop-value%&7: &3%{killz::%loop-value%}% &eKills

 

chat.format.death.1: &6&m----------&a&o Classement Morts &6&m----------

chat.format.death.2: &6» ##&b%loop-index% &c%loop-value%&7: &3%{deathz::%loop-value%}% &eMorts

 

chat.format.KillsStreak.1: &6&m----------&a&o Classement KillStreak &6&m----------

chat.format.KillsStreak.2: &6» Indisponnible

 

chat.format.1: &6&m----------&a&o KillsStreak %{_p}% &6&m----------

chat.format.2: &c

chat.format.3: &a» &eVous avez fait &c%{killz::%{_p}%}% &ekill(s)

chat.format.4: &a» &eVous avez fait &c%{deathz::%{_p}%}% &eMort(s)

chat.format.5: &a» &eVous etiez en KillsStreak de &c%{KillsStreak::%{_p}%}%&e.

chat.format.6: &c

chat.format.7: &6&m----------&a&o KillsStreak %{_p}% &6&m----------

 

on join:

if {killz::%player%} is not set:

set {killz::%player%} to 0

if {deathz::%player%} is not set:

set {deathz::%player%} to 0

if {KillsStreak::%player%} is not set:

set {KillsStreak::%player%} to 0

 

 

 

on death of player:

add 1 to {deathz::%victim%}

if attacker is a player:

add 1 to {killz::%attacker%}

add 1 to {KillsStreak::%attacker%}

 

on death of player:

set {KillsStreak::%victim%} to 0

 

command /ks [<offline player>]:

trigger:

if arg 1 is not set:

set {_p} to player

send "{@chat.format.1}"

send "{@chat.format.2}"

send "{@chat.format.3}"

send "{@chat.format.4}"

send "{@chat.format.5}"

send "{@chat.format.6}"

send "{@chat.format.7}"

if arg 1 is set:

set {_p} to arg 1

send "{@chat.format.1}"

send "{@chat.format.2}"

send "{@chat.format.3}"

send "{@chat.format.4}"

send "{@chat.format.5}"

send "{@chat.format.6}"

send "{@chat.format.7}"

 

command /ksclassement [<text>]:

trigger:

if arg 1 is not set:

send "{@Message.classement}"

if arg 1 is "kill" or "kills":

loop {killz::*}:

add 1 to {_size}

if {_low.to.high.list::%loop-value%} is not set:

set {_low.to.high.list::%loop-value%} to loop-index

else:

set {_n} to 0

loop {_size} times:

set {_n} to {_n}+1

{_low.to.high.list::%loop-value-1%.%{_n}%} is not set

set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index

stop loop

wait 1 tick

set {_n} to size of {_low.to.high.list::*}

loop {_low.to.high.list::*}:

set {_high.to.low.list::%{_n}%} to loop-value

set {_n} to {_n}-1

wait 1 tick

send "{@chat.format.kill.1}"

loop {_high.to.low.list::*}:

add 1 to {_result}

send "{@chat.format.kill.2}"

if {_result} is 10:

stop

if arg 1 is "morts" or "mort" or "death":

loop {deathz::*}:

add 1 to {_size}

if {_low.to.high.list::%loop-value%} is not set:

set {_low.to.high.list::%loop-value%} to loop-index

else:

set {_n} to 0

loop {_size} times:

set {_n} to {_n}+1

{_low.to.high.list::%loop-value-1%.%{_n}%} is not set

set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index

stop loop

wait 1 tick

set {_n} to size of {_low.to.high.list::*}

loop {_low.to.high.list::*}:

set {_high.to.low.list::%{_n}%} to loop-value

set {_n} to {_n}-1

wait 1 tick

send "{@chat.format.death.1}"

loop {_high.to.low.list::*}:

add 1 to {_result}

send "{@chat.format.death.2}"

if {_result} is 10:

stop

if arg 1 is "killstreak" or "ks":

loop {KillSteak::*}:

add 1 to {_size}

if {_low.to.high.list::%loop-value%} is not set:

set {_low.to.high.list::%loop-value%} to loop-index

else:

set {_n} to 0

loop {_size} times:

set {_n} to {_n}+1

{_low.to.high.list::%loop-value-1%.%{_n}%} is not set

set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index

stop loop

wait 1 tick

set {_n} to size of {_low.to.high.list::*}

loop {_low.to.high.list::*}:

set {_high.to.low.list::%{_n}%} to loop-value

set {_n} to {_n}-1

wait 1 tick

send "{@chat.format.KillsStreak.1}"

loop {_high.to.low.list::*}:

add 1 to {_result}

send "{@chat.format.KillsStreak.2}"

if {_result} is 10:

stop

 

command /adminks [<text>] [<offline player>]:

trigger:

if player has permission "{@Perm}":

if arg 1 is "reset":

if arg 2 is set:

set {KillsStreak::%arg-2%} to 0

set {deathz::%arg-2%} to 0

set {killz::%arg-2%} to 0

send "{@Message.reset}"

else:

send "&c/adminks reset <player>"

if arg 1 is "reload":

make console execute command "/sk relaod %script name%"

else:

send "{@Message.NoPerm}"

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