Hey,
I want to make homes list in gui, but it doesnt work as i expected. Unlike gui, text menu works
perfectly and returns values well.
format slot
- doesnt show any icon of items / blocks at all. Unless you didnt put second arg in /xsethome while making new home.
- is supposed to execute command and dont fill commands with argument /home <name> from variables
is someone here more experienced and smarter than me and may explain what i have done wrong in skript code? I lost mind after few tries to find a solution. is this a bug caused by addons?
I want to make homes list in gui, but it doesnt work as i expected. Unlike gui, text menu works
perfectly and returns values well.
format slot
- doesnt show any icon of items / blocks at all. Unless you didnt put second arg in /xsethome while making new home.
- is supposed to execute command and dont fill commands with argument /home <name> from variables
Code:
command /xsethome [<text>] [<text>]:
trigger:
if arg 1 is set:
set {creative::database.%player%.homes::%arg 1%} to "%arg 1%"
set {creative::database.%player%.homes.command::%arg 1%} to arg-1
if arg 2 is set:
set {creative::database.%player%.homes.icon::%arg 1%} to arg-2
if arg 2 is not set:
set {creative::database.%player%.homes.icon::%arg 1%} to Big Dripleaf
command /xunsethome [<text>]:
trigger:
if arg 1 is set:
delete {creative::database.%player%.homes::home.%arg 1%}
delete {creative::database.%player%.homes.command::perform.%arg 1%}
delete {creative::database.%player%.homes.icon::icon.%arg 1%}
command /xtesthome [<text>] [<text>]:
trigger:
if arg 1 is set:
send "/xtesthome %arg 1% - %arg 2%" to player
command /xhome [<text>] [<text>]:
trigger:
if arg 1 is not set:
execute player command "/xhome xcd-erun:[folder=home]"
if arg 1 is set:
open chest with 6 rows named "&8Menadzer domow" to player
wait 1 ticks
format slot 1 of player with 1 of diamond named "x" with lore "" to run [send "./home bug get %player%" to player]
if arg 1 is "list" or "xcd-erun:[folder=home]":
set {_page} to arg 2 parsed as number
if {_page} is not set:
set {_page} to 1
set {_numberofrecords} to size of {creative::database.%player%.homes::*} and {creative::database.%player%.homes.command::*}
set {_numberofpages} to ceil({_numberofrecords}/14)
if {_numberofpages} is smaller than 1:
set {_numberofpages} to 1
if {_page} is smaller than 1:
send "none"
stop
if {_page} is greater than {_numberofpages}:
send "none"
stop
if size of {creative::database.%player%.homes::*} is smaller than 1:
send "none"
stop
loop {creative::database.%player%.homes::*}:
add loop-value to {_creative::database.%player%.homes::*}
loop {creative::database.%player%.homes.command::*}:
add loop-value to {_creative::database.%player%.homes.command::*}
loop {creative::database.%player%.homes.icon::*}:
add loop-value to {_creative::database.%player%.homes.icon::*}
loop {_numberofrecords} times:
set {_list} to ({_page}-1)*14
add loop-number to {_list}
if {_creative::database.%player%.homes::%{_list}%} is not set:
stop
if loop-number is 14:
stop
format slot (18+{_list}) of player with 1 of {_creative::database.%player%.homes.icon::%{_list}%} named "&e&l%{_creative::database.%player%.homes::%{_list}%}%" with lore "" to run [send "./home %{_creative::database.%player%.homes.command::%{_list}%}% get %player%" to player]
send "&7ID --- Name --- Persorm --- Icon"
send "&a%{_list}% &f--- &b&l%{_creative::database.%player%.homes::%{_list}%}% &f--- &e&l%{_creative::database.%player%.homes.command::%{_list}%}% &f--- &c%{_creative::database.%player%.homes.icon::%{_list}%}% " to player
Server Engine: Purpur 1.18.2
Skript and All Addons are Latest possible updated Builds compatible with 1.18.2. Addons i have
SkQuery, Skore, SKBee, Scacket, SkyRayFall.
Skript and All Addons are Latest possible updated Builds compatible with 1.18.2. Addons i have
SkQuery, Skore, SKBee, Scacket, SkyRayFall.
is someone here more experienced and smarter than me and may explain what i have done wrong in skript code? I lost mind after few tries to find a solution. is this a bug caused by addons?
Last edited: