on sign change:
if line 1 of event-block is "[PaySign]":
set line 2 of event-block to "%player%"
set line 1 of event-block to "&a[PaySign]"
send "&aStworzyłeś PaySign!"
on right click:
if clicked block is sign:
if line 1 of clicked block is "&a[PaySign]":
set {_block} to type of block at event-block
set {_face} to facing of clicked block
set {_p} to line 2 of clicked block parsed as offline player
set {_amount} to line 3 of clicked block parsed as number
if player's balance is more than {_amount} -1:
remove {_amount} from player's balance
if {_p} is online:
add {_amount} to {_p}'s balance
send "&aOtrzymałeś &6%{_amount}%&6$&a z PaySign!" to {_p}
send "&aZapłaciłeś &6%{_amount}%&6$&a"
else:
if {moneyfrompaysign::%{_p}%::100} is set:
send "&cGracz osiągnął maksymalną ilość zarobionych pieniędzy podczas bycia offline!"
stop
else:
loop 100 times:
if {moneyfrompaysign::%{_p}%::%loop-number%} is not set:
set {moneyfrompaysign::%{_p}%::%loop-number%} to {_amount}
stop loop
send "&aZapłaciłes &6%{_amount}%&6$"
set {_x} to the event-block's x-coordinate
set {_y} to the event-block's y-coordinate
set {_z} to the event-block's z-coordinate
set x-coordinate of {_x} to rounded down x-coordinate of {_x}
replace all ".5" with "" in {_x}
replace all ".5" with "" in {_y}
replace all ".5" with "" in {_z}
execute console command "/setblock %{_x}% %{_y}% %{_z}% minecraft:oak_button[powered=true,facing=%{_face}%]"
loop blocks in radius 2 of event-block:
if loop-block is redstone wire:
add location of loop-block to {_rw::*}
set loop-block to redstone block
wait 15 tick
set block at clicked block to {_block}
loop {_rw::*}:
set block at loop-value to redstone wire
set line 1 of block at event-block to "&a[PaySign]"
set line 2 of block at event-block to "%{_p}%"
set line 3 of block at event-block to "%{_amount}%"
stop
send "&cNie stać cię na to!"
on join:
if {moneyfrompaysign::%player%::*} is set:
loop 100 times:
add {moneyfrompaysign::%player%::%loop-number%} to {_money}
add {_money} to player's balance
send "&aGdy byłeś offline zarobiłeś &6%{_money}%&6$&a z paysign!"
clear {moneyfrompaysign::%player%::*}
Pytanie
elcuadrado 0
Cześć! Mam skrypt PaySign, który nie działa dlatego, że nie może podać dobrych kordynatów w konsoli pisze:
Skrypt:
on sign change: if line 1 of event-block is "[PaySign]": set line 2 of event-block to "%player%" set line 1 of event-block to "&a[PaySign]" send "&aStworzyłeś PaySign!" on right click: if clicked block is sign: if line 1 of clicked block is "&a[PaySign]": set {_block} to type of block at event-block set {_face} to facing of clicked block set {_p} to line 2 of clicked block parsed as offline player set {_amount} to line 3 of clicked block parsed as number if player's balance is more than {_amount} -1: remove {_amount} from player's balance if {_p} is online: add {_amount} to {_p}'s balance send "&aOtrzymałeś &6%{_amount}%&6$&a z PaySign!" to {_p} send "&aZapłaciłeś &6%{_amount}%&6$&a" else: if {moneyfrompaysign::%{_p}%::100} is set: send "&cGracz osiągnął maksymalną ilość zarobionych pieniędzy podczas bycia offline!" stop else: loop 100 times: if {moneyfrompaysign::%{_p}%::%loop-number%} is not set: set {moneyfrompaysign::%{_p}%::%loop-number%} to {_amount} stop loop send "&aZapłaciłes &6%{_amount}%&6$" set {_x} to the event-block's x-coordinate set {_y} to the event-block's y-coordinate set {_z} to the event-block's z-coordinate set x-coordinate of {_x} to rounded down x-coordinate of {_x} replace all ".5" with "" in {_x} replace all ".5" with "" in {_y} replace all ".5" with "" in {_z} execute console command "/setblock %{_x}% %{_y}% %{_z}% minecraft:oak_button[powered=true,facing=%{_face}%]" loop blocks in radius 2 of event-block: if loop-block is redstone wire: add location of loop-block to {_rw::*} set loop-block to redstone block wait 15 tick set block at clicked block to {_block} loop {_rw::*}: set block at loop-value to redstone wire set line 1 of block at event-block to "&a[PaySign]" set line 2 of block at event-block to "%{_p}%" set line 3 of block at event-block to "%{_amount}%" stop send "&cNie stać cię na to!" on join: if {moneyfrompaysign::%player%::*} is set: loop 100 times: add {moneyfrompaysign::%player%::%loop-number%} to {_money} add {_money} to player's balance send "&aGdy byłeś offline zarobiłeś &6%{_money}%&6$&a z paysign!" clear {moneyfrompaysign::%player%::*}
Edytowane przez LjayPL789Wstawiam w code.
Notatka dodana przez bludis
Odnośnik do komentarza
https://skript.pl/temat/38300-invalid-integer/Udostępnij na innych stronach
1 odpowiedź na to pytanie
Rekomendowane odpowiedzi
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ą.