I want to let the user type something into the text field of an anvil GUI and then use this value later in the script but how do I get the text in this text field?
Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
Done.I want to let the user type something into the text field of an anvil GUI and then use this value later in the script but how do I get the text in this text field?
on inventory click:
type of event-inventory is anvil inventory
add anvil text input of event-inventory to {text::%player's uuid%::*}
command /textinput:
trigger:
loop {text::%player's uuid%::*}:
set {_text} to {text::%player's uuid%::%loop-index%}
send "input ## %loop-index%: %player% - %{_text}%"
Tank you for the reply!Done.
Code:on inventory click: type of event-inventory is anvil inventory add anvil text input of event-inventory to {text::%player's uuid%::*} command /textinput: trigger: loop {text::%player's uuid%::*}: set {_text} to {text::%player's uuid%::%loop-index%} send "input ## %loop-index%: %player% - %{_text}%"
the /textinput command is only used as an example of how to use this.
(Keep in mind, the player has to actually click an inventory slot for this to work.)
It's for a complex home script where you can put in the maximum homes in that way. I don't think somebody would need more then the anvil limit. I unterstand why you think chat is better but I think with an anvil it's much cooler...Hello,
i know what you are trying to achive but i really recommend you do this with a command or any chat based input because first,
it is hard to do, second you have a limit on how long the inputted text can be in the anvil gui, and third, i would say that using a chat based input is more stable.
Like I said, you needed to rename an item for it to work.It's for a complex home script where you can put in the maximum homes in that way. I don't think somebody would need more then the anvil limit. I unterstand why you think chat is better but I think with an anvil it's much cooler...