Skocz do zawartości
  • 0

piotrus131102

Pytanie

command /team <text=%player%> [<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%}
                set {t.%player%} to true
              else:
                send "&8[&6Epi&cCraft&8] &aStworzyles team, &cale zaproszony gracz juz ma swoja!"
          else:
            send "&8[&6Epi&cCraft&8] &cJuz Nalezysz 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%::*}
              set {t.%arg-2%} to false
      else:
        send "&8[&6Epi&cCraft&8] &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%}
          set {t.%arg-2%} to true
        else:
          send "&8[&6Epi&cCraft&8] &cGracz jest w innej druzynie!"
      else:
        send "&cPodaj nick gracza!"
    else if arg 1 is "odejdz":
      {teamLeader::%{teamName::%player%}%} is "%player%":
        execute player command "/team usun"
        set {t.%player%} to false
      else:
        delete "%player%" from {teamPlayers::%{teamName::%player%}%::*}
        clear {teamName::%player%}
        set {t.%player%} to false
        
command /debugTeams:
  permission: teams.debug
  trigger:
    clear {teamName::*}
    clear {team::*}
    clear {teamLeader::*}
    clear {teamPlayers::*}

Chciałbym Aby Ten Skript Działał, Jaki Do Tego Potrzeba Dodatek itp.
i żeby zmienna {t.%player%} dodawała się Kiedy Gracz Dołącza do drużyny i żeby usuwała się kiedy odchodzi z drużyny.
jeszcze, żeby ta sama drużyna nie mogła siebie atakować
o to tylko proszę :) z góry dzięki! ;D

Edytowane przez piotrus131102
Odnośnik do komentarza
https://skript.pl/temat/17939-dru%C5%BCyny/
Udostępnij na innych stronach

11 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /team <text=%player%> [<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::*}
            set {t.%player%} to true
            arg 2 is set:
              {teamName::%{_p}%} is not set:
                add "%{_p}%" to {team::%{teamName::%player%}%::*}
                set {teamName::%{_p}%} to {teamName::%player%}
                set {t.%{_p}%} to true
              else:
                send "&8[&6Epi&cCraft&8] &aStworzyles team, &cale zaproszony gracz juz ma swoja!"
          else:
            send "&8[&6Epi&cCraft&8] &cJuz Nalezysz 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%::*}
              set {t.%arg-2%} to false
              send "&cZostales wyrzucony z druzyny" to arg-2
      else:
        send "&8[&6Epi&cCraft&8] &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%}
          set {t.%arg-2%} to true
        else:
          send "&8[&6Epi&cCraft&8] &cGracz jest w innej druzynie!"
      else:
        send "&cPodaj nick gracza!"
    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%}
        set {t.%player%} to false
    arg 1 is "usun":
      {teamLeader::%{teamName::%player%}%} is "%player%":
        loop {team::%{teamName::%player%}%::*}:
          clear {teamName::%loop-value%}
          set {t.%loop-value%} to false
        clear {teamLeader::%{teamName::%player%}%}
        set {t.%player%} to false
        
        
command /debugTeams:
  permission: teams.debug
  trigger:
    clear {teamName::*}
    clear {team::*}
    clear {teamLeader::*}
    clear {teamPlayers::*}

Jak coś nie działa to podaj błędy (z konsoli i w grze)

Odnośnik do komentarza
https://skript.pl/temat/17939-dru%C5%BCyny/#findComment-122639
Udostępnij na innych stronach

  • 0
[13:47:50 INFO]: [Skript] Reloading Team.sk...
[13:47:50 ERROR]: '"%player%" from {teamPlayers::%{teamName::%player%}%::*}' is not an entity type (Team.sk, line 49: delete "%player%" from {teamPlayers::%{teamName::%player%}%::*}')
[13:47:50 INFO]: [Skript] Encountered 1 error while reloading Team.sk!
Odnośnik do komentarza
https://skript.pl/temat/17939-dru%C5%BCyny/#findComment-122655
Udostępnij na innych stronach

  • 0

jak wpisuje jakas komende np /team to nic nie wyskakuje

 

on death:
    if victim is pig:
        if name of victim is "&cDzik &61Lv":
            if {te.%player%} is false:
                add 2 to {exp.%attacker%}
                send "&8[&6Epi&cCraft&8] &2Dodano &a2 &bExpa" to attacker
                if attacker has permission "xp.vip":
                    add 1 to {exp.%attacker%}
                    send "&8[&6Epi&cCraft&8] &2Posiadasz range &4&lPogromca. &2Dodano &a1 &bExpa" to attacker
                if attacker has permission "xp.svip":
                    add 1 to {exp.%attacker%}
                    send "&8[&6Epi&cCraft&8] &2Posiadasz range &5&lNiszczyciel. &2Dodano &a1 &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%}

Dlaczego To Nie Daje Mi Expa Jak mam zmienna na false?
(tak Dodałem tą Zmienną na:

on join:
    clear {t.%player%}
    set {td.%player%} to false
    set {te.%player%} to false

 

on death:
    if victim is pig:
        if name of victim is "&cDzik &61Lv":
            if attacker has permission "xp.gracz":
                add 2 to {exp.%attacker%}
                send "&8[&6Epi&cCraft&8] &2Dodano &a2 &bExpa" to attacker
            if attacker has permission "xp.vip":
                add 1 to {exp.%attacker%}
                send "&8[&6Epi&cCraft&8] &2Posiadasz range &4&lPogromca. &2Dodano &a1 &bExpa" to attacker
            if attacker has permission "xp.svip":
                add 1 to {exp.%attacker%}
                send "&8[&6Epi&cCraft&8] &2Posiadasz range &5&lNiszczyciel. &2Dodano &a1 &bExpa" to attacker
            if attacker has permission "xp.team":
                loop all players:
                    {t.%loop-player%} is {t.%player%}:
                        add loop-player to {_exp::*}
                    loop {_exp::*}:
                        add 1 to {exp.%player%}
                        send "&8[&6Epi&cCraft&8] &3Grupowy Exp Dodano &a1 &bExpa" to loop-value
            set {Zmienna.%attacker%} to {exp.%attacker%} / {pexp.%attacker%}
            set level progress of the attacker to {Zmienna.%attacker%}
            set attacker's level to {lvl.%attacker%}

Umiesz To Poprawić By To Zadziałało? :D (dla teamu)

Odnośnik do komentarza
https://skript.pl/temat/17939-dru%C5%BCyny/#findComment-122664
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ę...