Skocz do zawartości
  • 0

% ZA SELL


Sirius Black

Pytanie

  1. on rightclick on a sign:
  2.     cancel event
  3.     set {_l1} to line 1 of block
  4.     set {_l2} to line 2 of block
  5.     set {_l3} to line 3 of block parsed as item
  6.     set {_l4} to line 4 of block parsed as integer
  7.     if {_l1} is "&4» &r&lSellAll":
  8.         if {_l2} is "&4» &r&lKliknij":
  9.             if {_l3} is set:
  10.                 if {_l4} is set:
  11.                     if the player's inventory contains 1 of {_l3}:
  12.                         set {_ilosc} to number of {_l3} in the player's inventory
  13.                         set {_money} to "%{_l4} / 64 * {_ilosc}%"
  14.                         set {_money} to {_money} parsed as number
  15.                         add {_money} to the player's account
  16.                         send " &8» &7Otrzymales &e%{_money}%$ &fza &e%{_ilosc}% %{_l3}%!"
  17.                         remove all {_l3} from player
  18.                         stop
  19.                         if player has permission "bonus.vip":
  20.                     else:
  21.                         send " &8» &7Nie posiadasz %{_l3}%"
  22.                         stop   
  23. on sign change:
  24.     line 1 of event-block is "Sell":
  25.         line 2 of event-block is "All":
  26.             line 3 of event-block is set:
  27.                 line 4 of event-block is set:
  28.                     set line 1 to "&4» &r&lSellAll"
  29.                     set line 2 to "&4» &r&lKliknij"

Chcialbym zeby jesli gracz ma permisje vip.bonus

dostaje 5% wiecej zarobionego hasju np

pisze 

send "dostales 100$ za 50 blokow"

daje kase za normal

send "bonusvip: otrzymujesz 5% bonusu czyli (20$)"

daje kase za bonus

i kase daje oddzielnie

Edytowane przez Sirius Black
Odnośnik do komentarza
https://skript.pl/temat/15449-za-sell/
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

  • 0

dodaj sobie po linijce 16:

if player has permission "bonus.vip":
	set {_bonusvip} to {_money} * 5% parsed as number
	add {_bonusvip} to player's balance
	send "bonusvip: otrzymujesz 5% bonusu czyli (%{_bonusvip}%$)" 

 

 

Odnośnik do komentarza
https://skript.pl/temat/15449-za-sell/#findComment-106850
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ę...