I wanna make a dialogue, but don't know how to make npcs reply player's answer.
I'm trying to do it with clickable text but i don't know how to add arguments to a command that runs when text clicked.
Or a command that only runs when text clicked. (Can't execute from chat)
Is there a way to execute a console command when text clicked?
#Npc dialogue
1 messages · Page 1 of 1 (latest)
You can make the command permission for ops or console only, then for clickable text: https://skripthub.net/docs/?id=9368
Skript Hub - Documentation
Create a click event, that when clicked will run the code in this section.
NOTE: Internally this just makes the player run a special command
so you will see console messages where a player runs the command "/paper callback" in your console.
NOTE: Paper didn't make this command available by default
so you'll have to give your players the permis...
When you use create callback for [insert text component here]: the code under that will run when the text component is clicked
Make sure to set the text component first, of course
Then you send the text component to player
One thing i still don't know that how can i set the make text components
or is it just a normal text varible
#insert your callback for {_var} here
send component {_var} to player```
it needs skbee no?
because i can't download it
it shows as red
see
Unsupported
No
(:
@analog star how can i call an argument in a callback?
If the normal arg-1 arg-2 etc isn't working you could try setting a var to that arg then using the var in the callback
Send code
set {npc1-p} to arg-2 # arg-2 is the player
set {npc1-msg} to text component of "&fa, <tooltip:&aYes i did.><command:/npc1-1>&aYes i did. &7[Click here]<r>"
create callback with 1 use for {npc1-msg}:
send "working!" to {npc-p}
send component {npc1-msg} to arg-2 # that doew not send the msg```
yeah and i installed skbee so that cant be the problem
Instead of create callback with 1 use for {npc1-msg} use create callback for {npc1-msg} with 1 use
And idk why u r using global vars
Also you set {npc1-p} to arg 2 but then send the message to {npc-p} and those are different variables
Ohh that was it I missed
Cause this command gonna executed from console soo players can use it only when an npc got clicked and because I can't call arg-2 (player) in callback to get the var
yes
its a player
command /test:
permission: op
trigger:
set {test} to text component of "test"
create callback for {test} with 1 use:
send "asd" to player
send component {test} to player```
i made a more understandable version and its still not working
when i use that command it says:
To 1.18.2
skript version: 2.6.3
Not really sure what to say then
i could search for text components and now i know what i them but i couldn't searc for callbacks they are in skript plugin or what
maybe my skript plugin is too old
I tested and text components are working but if i try with callback it will show that error
check /pl for red plugins
there is no red plugins
make sure all your plugins are up to date and you dont have plugins like 'tuske'
or sk dragon sk query etc
reason: out of date
i have only skript and skbee of the plugins that are linked with skript
so... idk whats the problem
idk why all these people are showing you this complicated crap
if citizen is <id>:
send "message" to player```
if you have citizens that is
i've done with this
on an other way
Then add the normal Minecraft link format code
Or do you not mean a link?
no
Ahh ok
minecraft format code is not good for me caouse i do not know how to add arguments to a command in it
is there a way to do it? @polar snow
You'll have to do what they're telling you to to have a command I believe
for the format code you can only do links
no like
send "<command:/kill>Click Here To Kill Yourself<reset>" to player <-- its working
but its not -- > send "<command:/kill @e> Click Here To Kill Everyone<reset>" to player
i cant add args to it
Ohh hm
If you dont wanna bother wasting time anymore you could make a command in Skript that literally just makes the player execute /kill @e lol
idiot
thats just an example
i just want a text when it gets clicked u execute a command with arguments
Yeah you could do that with another command
Unless the argument needs to be specific to the player
it needs to be
now u dont know
You could do something like this
command /name:
Trigger:
Make player execute command "/command %executor%"
that's good but players can use it without clicking on npcs
Hm yeah ig
If it's a command console can execute somehow you could do that
Idk if there are any conditions that have to do with if they click on text only it'll allow them to use it
yeah
@everyone i did it
!!!!
permission: op
trigger:
set {test} to a text component of "&fClick Here!"
set hover event of {test} to hover event showing "Click Here!"
set click event of {test} to click event to run command "/execute run kill @p"
send component {test} to player```
idc
average minehut user wanting help
Bro really tried pinging everyone
no
i thinked when i ping everyone it will only ping the ppl in this channel
Why did I get pinged
I just randomly opened this and saw the conversation
yup
Nah but why would you ping everybody
some people hate being pinged (me included)
cuz i did it
Yes but we don't want to be pinged