Skocz do zawartości
  • 0

Drużyna do Expienia RPG


Pytanie

Witam, Czy Mógłby Ktoś Mi Zrobić Skrypt Dzięki Któremu Można Robić Team?

Rozchodzi Się O To Że Jak Jesteśmy w Teamie to Żeby Dawało Exp'a player'owi A i player'owi B

zmienne do lvl

{lvl.%player%} {exp.%player%}

Odnośnik do komentarza
https://skript.pl/temat/17731-dru%C5%BCyna-do-expienia-rpg/
Udostępnij na innych stronach

7 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Tutaj masz tworzenie teamu:
 

command /team <text=%player%> [<offline player>]:
  trigger:
    set {_p} to arg 2
    arg 1 is not "wyrzuc" or "dodaj" or "usun" or "odejdz":
      loop {team::*}:
        loop-value is not text-arg:
          {teamName::%player%} is not set:
            set {teamName::%player%} to "%text-arg%"
            set {teamLeader::%{teamName::%player%}%} to "%player%"
            add "%{teamName::%player%}%" to {team::*}
            arg 2 is set:
              {teamName::%{_p}%} is not set:
                add "%{_p}%" to {team::%{teamName::%player%}%::*}
                set {teamName::%{_p}%} to {teamName::%player%}
              else:
                send "&aStworzyles druzyne, ale zaproszony gracz juz ma swoja!"
          else:
            send "&cNalezysz juz do teamu!"
    else if arg 1 is "wyrzuc":
      arg 2 is set:
        {teamLeader::%{team::%{teamName::%player%}%}%} is player:
          {team::%{teamName::%player%}%::*} contains "%{_p}%":
            remove "%{_p}%" from {team::%{teamName::%player%}%::*}
            clear {teamName::%{_p}%}
            size of {team::%{teamName::%player%}%::*} is 0:
              clear {teamLeader::%{teamName::%player%}%}
              clear {teamName::%player%}
              clear {teamPlayers::%player%::*}
      else:
        send "&cPodaj nick gracza!"
    else if arg 1 is "dodaj":
      arg 2 is set:
        {teamName::%{_p}%} is not set:
          add "%{_p}%" to {team::%{teamName::%player%}%::*}
          set {teamName::%{_p}%} to {teamName::%player%}
        else:
          send "&cGracz jest w innej druzynie!"
      else:
        send "&cPodaj nick gracza!"
    else if arg 1 is "usun":
      loop {team::%{teamName::%player%}%::*}:
        clear {teamName::%loop-value%}
      clear {teamPlayers::%{teamName::%player%}%::*}
      clear {teamLeader::%{teamName::%player%}%}
      clear {teamName::%player%}
    else if arg 1 is "odejdz":
      {teamLeader::%{teamName::%player%}%} is "%player%":
        execute player command "/team usun"
      else:
        delete "%player%" from {teamPlayers::%{teamName::%player%}%::*}
        clear {teamName::%player%}
        
command /debugTeams:
  permission: teams.debug
  trigger:
    clear {teamName::*}
    clear {team::*}
    clear {teamLeader::*}
    clear {teamPlayers::*}

A doawanie expa grupowo:

w evencie

on death:

#---TU DODAWAJ POTWORY I ODPOWIEDNIE ILOSCI EXPA WEDLUG SCHEMATU---#
  victim is zombie:
    set {_xp} to 10
  victim is skeleton:
    set {_xp} to 20


#---TU NIC NIE ZMIENIAJ---#
  attacker is player:
    {teamName::%player%} is set:
      loop {teamPlayers::%{teamName::%player%}%::*}:
        add {_xp} to {exp::%loop-value%}
        {exp::%loop-value%} is 200:
          set {exp::%loop-value%} to 0
          add 1 to {lvl::%loop-value%}
          send "&aAwansowales!" to loop-value
      {teamLeader::%{teamName::%player%}%} is "%player%":
        add {_xp} to {exp::%player%}
        {exp::%player%} is 200:
          set {exp::%player%} to 0
          add 1 to {lvl::%player%}
          send "&aAwansowales!" to player

Oczywiście doedytujesz sobie odpowiednie wartości zależne od zabitego przeciwnika, itd.
I jakoś automatycznie zamiast {exp.%player%} i {lvl.%player%} ustawiłem zamiast kropek dwukropki. Najlepiej zmień wszystkie te zmienne {exp.gracz} na {exp::gracz} i to samo z levelem, bo tak jest lepiej :D

Odnośnik do komentarza
https://skript.pl/temat/17731-dru%C5%BCyna-do-expienia-rpg/#findComment-121283
Udostępnij na innych stronach

  • 0

Tak wiem. Jeśli korzystasz z notepad++, to wejdź w skrypt na level, wciśnij CTRL+F
Wybierz funkcje replace

w pierwszym oknie

lvl.%player%

w drugim oknie

lvl::%player%

i zamień wszystkie

To samo z

exp.%player%

na

exp::%player%

ew. na odwrót, ale opcja z dwukropkami jest lepsza, łatwiejsza i przyjemniejsza do działania na niej :) (+ zgodna z SSCC)

Odnośnik do komentarza
https://skript.pl/temat/17731-dru%C5%BCyna-do-expienia-rpg/#findComment-121523
Udostępnij na innych stronach

  • 0

ale nadal nie rozumiem, bo ty zrobiłeś mi w drugim evencie skrypt na lvl'e

a to miało się robić razem z moim skryptem

on death:
    if attacker is a player:
        if attacker is a player:
            if {exp.%attacker%} is greater than 50:
                if {lvl.%attacker%} is 1:
                    set {lvl.%attacker%} to 2
                    set {pexp.%attacker%} to 250
                    send "&8[&6Epi&cCraft&8] &aAwansowales na &62 &aLVL" to attacker

on death:
    if victim is zombie pigman:
        if name of victim is "&cZarazony Czlowiek &630Lv":
            add 100 to {exp.%attacker%}
            send "&8[&6Epi&cCraft&8] &2Dodano &a100 &bExpa" to attacker
            if attacker has permission "xp.vip":
                add 25 to {exp.%attacker%}
                send "&8[&6Epi&cCraft&8] &2Posiadasz range &4&lPogromca. &2Dodano &a25 &bExpa" to attacker
            if attacker has permission "xp.svip":
                add 50 to {exp.%attacker%}
                send "&8[&6Epi&cCraft&8] &2Posiadasz range &5&lNiszczyciel. &2Dodano &a50 &bExpa" to attacker
            set {Zmienna.%attacker%} to {exp.%attacker%} / {pexp.%attacker%}
            set level progress of the attacker to {Zmienna.%attacker%}
            set attacker's level to {lvl.%attacker%}

Odnośnik do komentarza
https://skript.pl/temat/17731-dru%C5%BCyna-do-expienia-rpg/#findComment-122548
Udostępnij na innych stronach

  • 0
Już bardziej się opłaca stworzyć nowy system (co zrobiłem niżej)
on death:

#---TU DODAWAJ POTWORY I ODPOWIEDNIE ILOSCI EXPA WEDLUG SCHEMATU---#
  victim is zombie:
    set {_xp} to 10
    set {_vipexp} to 25
    set {_svipexp} to 67.5
  victim is skeleton:
    set {_xp} to 20
    set {_vipexp} to 50
    set {_svipexp} to 100


#---TU NIC NIE ZMIENIAJ---#
  attacker is player:
    {teamName::%player%} is set:
      set {_l} to {teamLeader::%{teamName::%player%}%} parsed as player
      loop {teamPlayers::%{teamName::%player%}%::*}:
        set {_p} to loop-value parsed as player
        add {_xp} to {exp::%{_p}%}
        {_p} has permission "xp.svip":
          add {_svipexp} to {exp::%{_p}%}
        {_p} has permission "xp.vip":
          add {_vipexp} to {exp::%{_p}%}
      add {_xp} to {exp::%{_l}%}
      {_l} has permission "xp.svip":
        add {_svipexp} to {exp::%{_l}%}
      else if {_l} has permission "xp.vip":
        add {_vipexp} to {exp::%{_l}%}

every second:
  loop all players:
    set {_p} to loop-player
    {lvl::%{_p}%} is 1:
      {exp::%{_p}%} > 50:
        remove 50 from {exp::%{_p}%}
        set {lvl::%{_p}%} to 2
        set {pexp::%{_p}%} to 100
        send "&aAwansowales!"
    {lvl::%{_p}%} is 2:
      {exp::%{_p}%} > 100:
        remove 100 from {exp::%{_p}%}
        set {lvl::%{_p}%} to 3
        set {pexp::%{_p}%} to 200
        send "&aAwansowales!"
    {lvl::%{_p}%} is 3:
      {exp::%{_p}%} > 200:
        remove 200 from {exp::%{_p}%}
        set {lvl::%{_p}%} to 4
        set {pexp::%{_p}%} to 400
        send "&aAwansowales!"
    set {_lp} to {exp::%{_p}%}/{pexp::%{_p}%}
    set {_p}'s level progress to {_lp}
    set {_p}'s level to {lvl::%{_p}%}
     
Odnośnik do komentarza
https://skript.pl/temat/17731-dru%C5%BCyna-do-expienia-rpg/#findComment-122563
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

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