Witajcie! Robię skrypt na losowanie itemu względem poziomu gracza i zamiast dawać mi item max 2 poziomy wyżej to daje normalnie loop-value.
loop 1000 times:
loop {itemy.lvl%arg%::*}:
chance of 100/size of {itemy.lvl%arg%::*}%:
set {_item} to loop-value-2
set {_lor::*} to lore of {_item}
loop {_lor::*}:
set {_c} to loop-value-3
if {_c} contains "{@reqlvl}":
replace "{@reqlvl}" with "" in {_c}
set {_c} to {_c} parsed as integer
set {_lvl} to {lv::%player%}
add 2 to {_lvl}
if {_lvl} is more than or equal to {_c}:
exit loop
if {_item} is set:
if arg is 1:
send formatted "{@pdlvl-1}" to player
if arg is 2:
send formatted "{@pdlvl-2}" to player
if arg is 3:
send formatted "{@pdlvl-3}" to player
if arg is 4:
send formatted "{@pdlvl-4}" to player
exit loop
give {_item} to player
send "&8[Debug] &7%{_c}%"
send "&8[Debug] &7%{_lvl}%"
Co ja tu źle robię?
{@reqlvl} -> Nazwa do odpowiedniej linijki lore
w miejce %arg% jest liczba od 1 do 4
Pytanie
Brax 0
Witajcie! Robię skrypt na losowanie itemu względem poziomu gracza i zamiast dawać mi item max 2 poziomy wyżej to daje normalnie loop-value.
loop 1000 times: loop {itemy.lvl%arg%::*}: chance of 100/size of {itemy.lvl%arg%::*}%: set {_item} to loop-value-2 set {_lor::*} to lore of {_item} loop {_lor::*}: set {_c} to loop-value-3 if {_c} contains "{@reqlvl}": replace "{@reqlvl}" with "" in {_c} set {_c} to {_c} parsed as integer set {_lvl} to {lv::%player%} add 2 to {_lvl} if {_lvl} is more than or equal to {_c}: exit loop if {_item} is set: if arg is 1: send formatted "{@pdlvl-1}" to player if arg is 2: send formatted "{@pdlvl-2}" to player if arg is 3: send formatted "{@pdlvl-3}" to player if arg is 4: send formatted "{@pdlvl-4}" to player exit loop give {_item} to player send "&8[Debug] &7%{_c}%" send "&8[Debug] &7%{_lvl}%"Co ja tu źle robię?
{@reqlvl} -> Nazwa do odpowiedniej linijki lore
w miejce %arg% jest liczba od 1 do 4
Odnośnik do komentarza
https://skript.pl/temat/46330-pilna-pomoc-losowanie-itemu-do-levela/Udostępnij na innych stronach
18 odpowiedzi na to pytanie
Rekomendowane odpowiedzi