Skocz do zawartości
  • 0

Przeróbka


TheRiv3rek

Pytanie

Cześć i czołem!

 

Piszę autorski skrypt na tokeny i wszystko dobrze oprócz kilku rzeczy:

variables:
 {tokeny.stan.%player%} = 0
command /sklepik [<text>]:
 trigger:
  if arg 1 is not set:
   send "&9&l==========&e&lSklepik&9&l=========="
   send "&2/sklepik fly &akupujesz fly'a za &b1500 tokenow"
   send "&2/sklepik wk &akupujesz epicki kilof za &b800 tokenow"
   send "&2/sklepik sk &akupujesz smoczy kilof za &b400 tokenow"
   send "&2/sklepik kolorki &akupujesz kolorowe pisanie na chacie za &b1200 tokenow"
   send "&9&l==========&e&lSklepik&9&l=========="
  if arg 1 is "fly":
   if {tokeny.stan.%player%} is 1500:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&a&lZakupiles Fly'a! Gratulacje!"
    send "&9&l==========&e&lSklepik&9&l=========="
    execute console command "pex user %player% add essentials.fly"
    remove 1500 from {tokeny.stan.%player%}
    stop
  if arg 1 is "fly":
   if {tokeny.stan.%player%} isn't 1500:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&c&lTwoje konto nie posiada &b&l1500 tokenow&c&l!"
    send "&9&l==========&e&lSklepik&9&l=========="
  if arg 1 is "kolorki":
   if {tokeny.stan.%player%} is 1200:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&a&lZakupiles Fly'a! Gratulacje!"
    send "&9&l==========&e&lSklepik&9&l=========="
    execute console command "pex user %player% add essentials.chat.color"
    remove 1500 from {tokeny.stan.%player%}
    stop
  if arg 1 is "kolorki":
   if {tokeny.stan.%player%} isn't 1200:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&c&lTwoje konto nie posiada &b&l1200 tokenow&c&l!"
    send "&9&l==========&e&lSklepik&9&l=========="
  if arg 1 is "ek":
   if {tokeny.stan.%player%} is 800:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&a&lZakupiles Epicki Kilof! Gratulacje!"
    send "&9&l==========&e&lSklepik&9&l=========="
    execute console command "/give %player% diamond_pickaxe 1 0 [enchants: efficiency:15 , unbreaking:1000 , silk_touch:2 , fortune:4 name:&4&l&oEpicki_&a&l&oKilof"
    remove 1500 from {tokeny.stan.%player%}
    stop
  if arg 1 is "ek":
   if {tokeny.stan.%player%} isn't 800:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&c&lTwoje konto nie posiada &b&l800 tokenow&c&l!"
    send "&9&l==========&e&lSklepik&9&l=========="
  if arg 1 is "sk":
   if {tokeny.stan.%player%} is 400:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&a&lZakupiles Smoczy Kilof! Gratulacje!"
    send "&9&l==========&e&lSklepik&9&l=========="
    execute console command "/give %player% diamond_pickaxe 1 0 [enchants: efficiency:7 , unbreaking:1000 , silk_touch:2 , fortune:4 name:&6&l&oSmoczy_&a&l&oKilof"
    remove 1500 from {tokeny.stan.%player%}
    stop
  if arg 1 is "sk":
   if {tokeny.stan.%player%} isn't 400:
    send "&9&l==========&e&lSklepik&9&l=========="
    send "&c&lTwoje konto nie posiada &b&l400 tokenow&c&l!"
    send "&9&l==========&e&lSklepik&9&l=========="
command /atokeny [<text>] [<player>] [<text>]:
 permission: tokeny.admin
 trigger:
  if arg 1 is not set:
   send "&9&l==========&1&lTOKENY&4&lAdmin&9&l=========="
   send "&2/tokeny dodaj nick ilosc &adodaje tokeny graczu"
   send "&2/tokeny zabierz nick ilosc &azabiera tokeny graczu"
   send "&9&l==========&1&lTOKENY&4&lAdmin&9&l=========="
   stop
  if arg 1 is "re":
   command "skript reload tokeny"
   wait 1 second
   send "&7&l[&1&lTokeny&7&l] &2&lPomyslnie przeladowales plugin!"
   stop
  if arg 1 is "dodaj":
   if player is set:
    if arg 3 is set:
     if arg 3 is amount:
      add %arg 3% to {tokeny.stan.%player%}
      wait 1 second
      send to %player% "&7&l[&1&lTokeny&7&l] &a&lAdministrator dodal ci do konta &b&l%arg 3% tokenow&a&l!"
      send "&7&l[&1&lTokeny&7&l] &2&lCzynnosc wykonana"
  if arg 2 is not set:
   send "&9&l==========&1&lTOKENY&4&lAdmin&9&l=========="
   send "&c&lPodaj nick gracza!"
   send "&9&l==========&1&lTOKENY&4&lAdmin&9&l=========="
   stop
  if arg 3 is not set:
   send "&9&l==========&1&lTOKENY&4&lAdmin&9&l=========="
   send "&c&lPodaj ilosc tokenow!"
   send "&9&l==========&1&lTOKENY&4&lAdmin&9&l=========="
   stop
  if arg 1 is "ustaw":
   if arg 2 is set:
    if arg 3 is set:
     set {tokeny.stan.%player%} to 400
command /tokeny [<text>] [<text>] [<text>]:
 trigger:
  if arg 1 is not set:
   send "&9&l==========&1&lTOKENY&9&l=========="
   send "&2/tokeny stan &apokazuje ilosc tokenow"
   send "&2/tokeny oddaj nick ilosc &aoddaje tokeny graczu"
   send "&2/tokeny stan gracz &apokazuje ile tokenow ma gracz"
   send "&2/sklepik &atutaj mozesz wydac tokeny"
   send "&9&l==========&1&lTOKENY&9&l=========="
  if arg 1 is "stan":
   send "&9&l==========&1&lTOKENY&9&l=========="
   send "&a&lTwoja aktualna liczba tokenow wynosi &6&l%{tokeny.stan.%player%}%"
   send "&9&l==========&1&lTOKENY&9&l=========="
  if arg 1 is "oddaj":
   if arg 2 is set:
    if arg 3 is set:
     if {tokeny.stan.%player%} is %arg 3%:
      remove %arg 3% from {tokeny.stan.%player%}
      send "&9&l==========&1&lTOKENY&9&l=========="
      send "&a&lOddales &6&l%arg 3% tokenow &a&lgraczowi &6&l%arg 2%"
      send "&a&lTeraz twoj stan tokenow wynosi &6&l%{tokeny.stan.%player%}"
      send "&9&l==========&1&lTOKENY&9&l=========="
     else:
      send "&9&l==========&1&lTOKENY&9&l=========="
      send "&c&lNie masz tyle tokenow: &6&l%arg 3%"
      send "&9&l==========&1&lTOKENY&9&l=========="
  if arg 1 is "oddaj":
   if arg 2 is not set:
    send "&9&l==========&1&lTOKENY&9&l=========="
    send "&c&lPodaj nick gracza!"
    send "&9&l==========&1&lTOKENY&9&l=========="
    stop
  if arg 1 is "oddaj": 
   if arg 2 is set:
    if arg 3 is not set:
     send "&9&l==========&1&lTOKENY&9&l=========="
     send "&c&lPodaj liczbe tokenow ktore chcesz oddac graczowi &6&l%arg 2%"
     send "&9&l==========&1&lTOKENY&9&l=========="
oto kod a problemem jest to że:
- nie działą komenda /atokeny ustaw w której ma być tak że np. /atokeny ustaw luki1123 400 i ustawia ilość tokenow na 400
-
if {tokeny.stan.%player%} is 1500:
chodzi mi o to że gdy gracz ma na koncie np. 2000 tokenow to żeby pobralo mu te 1500 a nie że musi mieć idealnie 1500 tokenów, tak samo jest z
{is {tokeny.stan.%player%} isn't 1500
chodzi o to że gdy gracz ma mniej niż 1500
 
 
Wiem że nie po ludzku ale nie wiedziałem jak lepiej wytłumaczyć.
Z góry dziękuję za pomoc!

Odnośnik do komentarza
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Zacznijmy od tego

[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 44: execute console command "pex user %player% add essentials.fly"')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 45: remove 2000 from {tokeny.stan.%player%}')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '___->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 46: stop')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 85: stop')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 95: send "&9&l==========&e&lSklepik&9&l=========="')
[08:18:59 ERROR]: indentation error: expected 6 tabs, but found '_->->->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 128: send "&7&l[&1&lTokeny&7&l] &2&lCzynnosc wykonana"')

że masz źle wytabowane. Najpierw masz kilka spacji, potem taby.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
5 godzin temu, Bielecki napisał:

Zacznijmy od tego

 


[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 44: execute console command "pex user %player% add essentials.fly"')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 45: remove 2000 from {tokeny.stan.%player%}')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '___->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 46: stop')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 85: stop')
[08:18:59 ERROR]: indentation error: expected 4 tabs, but found '____->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 95: send "&9&l==========&e&lSklepik&9&l=========="')
[08:18:59 ERROR]: indentation error: expected 6 tabs, but found '_->->->->->->' [-> = tab, _ = space, ? = other whitespace] (tokeny.sk, line 128: send "&7&l[&1&lTokeny&7&l] &2&lCzynnosc wykonana"')

 

że masz źle wytabowane. Najpierw masz kilka spacji, potem taby.

Ni niby tak ale wszystko poprwilem i nadal to samo. Czyli musze odnowa przepisywać skrypt? xD

Odnośnik do komentarza
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ę...