Skocz do zawartości
  • 0

Ranking pvp


Mr_Bearrrr

Pytanie

Siemano, mam taki skrypt:

    set {_punkty} to rounded down {punkty::%attacker%} / {punkty::%victim%}
    remove {_punkty} from {punkty::%victim%}
    add {_punkty} to {punkty::%attacker%}

Chce ogółem żeby po zabiciu kogoś dostawało sie punkty do rankingu odpowiedne do rankingu twojego i osoby, którą zabiłeś.
Ale w tym jest problem, nie wiem jak to zrobić, próbowałem podzielić to przez siebie, dodać, pomnożyc * 10 itp. i żadne działania nie robiły, żeby było idealnie
Jak ktoś nie zrozumiał to chodzi o podobne dodawanie jak na serwerze duels "s2no-rules" czyli masz np. 1000 rankingu i zabiłeś kogoś kto ma tez 1000 to dostajesz np. +15 do rankingu ale jak masz np. 800 rankingu i zabiłeś kogoś kto ma 1200 to dostajesz +150 np. 

Można wysłać jakiś sk, z takim rankingiem pvp albo pokazać to na moim kodzie

Liczę na szybką pomoc

Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on death of player:
    set {_victim} to victim
    set {_attacker} to attacker
    if {_attacker} is a player:
        set {_victimPoints} to {punkty::%_victim%}
        set {_attackerPoints} to {punkty::%_attacker%}
        set {_difference} to {_attackerPoints} - {_victimPoints}
        set {_percentDifference} to {_difference} / {_attackerPoints} * 100
        if {_percentDifference} <= 10:
            set {_pointsEarned} to 15
        else:
            set {_pointsEarned} to 150 * ((_victimPoints} / {_attackerPoints})
        remove {_pointsEarned} from {punkty::%_victim%}
        add {_pointsEarned} to {punkty::%_attacker%}

mam nadzieję że pomogłem

Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/#findComment-331932
Udostępnij na innych stronach

  • 0
15 minut temu, TheStremty napisał:
on death of player:
    set {_victim} to victim
    set {_attacker} to attacker
    if {_attacker} is a player:
        set {_victimPoints} to {punkty::%_victim%}
        set {_attackerPoints} to {punkty::%_attacker%}
        set {_difference} to {_attackerPoints} - {_victimPoints}
        set {_percentDifference} to {_difference} / {_attackerPoints} * 100
        if {_percentDifference} <= 10:
            set {_pointsEarned} to 15
        else:
            set {_pointsEarned} to 150 * ((_victimPoints} / {_attackerPoints})
        remove {_pointsEarned} from {punkty::%_victim%}
        add {_pointsEarned} to {punkty::%_attacker%}

mam nadzieję że pomogłem

image.png

nie lepiej zamiast _attacker dac attacker?

Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/#findComment-331933
Udostępnij na innych stronach

  • 0
18 minut temu, TheStremty napisał:
on death of player:
    set {_victim} to victim
    set {_attacker} to attacker
    if {_attacker} is a player:
        set {_victimPoints} to {punkty::%_victim%}
        set {_attackerPoints} to {punkty::%_attacker%}
        set {_difference} to {_attackerPoints} - {_victimPoints}
        set {_percentDifference} to {_difference} / {_attackerPoints} * 100
        if {_percentDifference} <= 10:
            set {_pointsEarned} to 15
        else:
            set {_pointsEarned} to 150 * ((_victimPoints} / {_attackerPoints})
        remove {_pointsEarned} from {punkty::%_victim%}
        add {_pointsEarned} to {punkty::%_attacker%}

mam nadzieję że pomogłem

dobra zmienilem troche, i caly czas 15 odejmuje image.png

Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/#findComment-331934
Udostępnij na innych stronach

  • 0
on death of player:
    set {_victim} to victim
    set {_attacker} to attacker
    if {_attacker} is a player:
        set {_victimPoints} to {punkty::%{_victim}%}
        set {_attackerPoints} to {punkty::%{_attacker}%}
        set {_difference} to {_attackerPoints} - {_victimPoints}
        set {_percentDifference} to abs({_difference} / {_attackerPoints}) * 100
        if {_percentDifference} <= 10:
            set {_pointsEarned} to 15
        else:
            set {_pointsEarned} to 150 * ({_victimPoints} / {_attackerPoints})
        remove {_pointsEarned} from {punkty::%{_victim}%}
        add {_pointsEarned} to {punkty::%{_attacker}%}

 

Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/#findComment-331935
Udostępnij na innych stronach

  • 0
58 minut temu, xMarmo321 napisał:
on death of player:
    set {_victim} to victim
    set {_attacker} to attacker
    if {_attacker} is a player:
        set {_victimPoints} to {punkty::%{_victim}%}
        set {_attackerPoints} to {punkty::%{_attacker}%}
        set {_difference} to {_attackerPoints} - {_victimPoints}
        set {_percentDifference} to abs({_difference} / {_attackerPoints}) * 100
        if {_percentDifference} <= 10:
            set {_pointsEarned} to 15
        else:
            set {_pointsEarned} to 150 * ({_victimPoints} / {_attackerPoints})
        remove {_pointsEarned} from {punkty::%{_victim}%}
        add {_pointsEarned} to {punkty::%{_attacker}%}

 

image.png
caly czas +15

Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/#findComment-331936
Udostępnij na innych stronach

  • 0
on death of player:
    set {_victim} to victim
    set {_attacker} to attacker
    if {_attacker} is a player:
        set {_victimPoints} to {punkty::%{_victim}%}
        set {_attackerPoints} to {punkty::%{_attacker}%}
        set {_difference} to {_attackerPoints} - {_victimPoints}
        set {_percentDifference} to abs({_difference} / {_attackerPoints}) * 100
        if {_percentDifference} <= 10:
            set {_pointsEarned} to 15
        else:
            set {_pointsEarned} to 150 * ({_victimPoints} / {_attackerPoints})
        message "Atakujący: {_attacker}, punkty: {_attackerPoints}"
        message "Ofiara: {_victim}, punkty: {_victimPoints}"
        message "Różnica: {_difference}, procent: {_percentDifference}"
        message "Punkty zdobyte: {_pointsEarned}"
        remove {_pointsEarned} from {punkty::%{_victim}%}
        add {_pointsEarned} to {punkty::%{_attacker}%}

Masz debuga wyslij screena debuga

 

Edytowane przez xMarmo321
Odnośnik do komentarza
https://skript.pl/temat/54827-ranking-pvp/#findComment-331947
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...