clue1: "I have lots of books."
clue2: "You can cook food here."
clue3: "I am full of animals."
answer1: "library"
answer2: "kitchen"
answer3: "zoo"
# Initialize player guess tracking
on join:
set {_guessed::%player%::1} to false
set {_guessed::%player%::2} to false
set {_guessed::%player%::3} to false
command /guessinggame:
permission: op
trigger:
open chest inventory with 3 rows named "Guessing Game Clues" to player
set slot 0 of player's current inventory to stone named "Clue 1"
set slot 1 of player's current inventory to stone named "Clue 2"
set slot 2 of player's current inventory to stone named "Clue 3"
on inventory click:
if name of event-inventory is "Guessing Game Clues":
cancel event
if event-slot is 0:
give player paper named "Clue 1" with lore "%{_clue1}%" to player
send "You received Clue 1!" to player
else if event-slot is 1:
give player paper named "Clue 2" with lore "%{_clue2}%" to player
send "You received Clue 2!" to player
else if event-slot is 2:
give player paper named "Clue 3" with lore "%{_clue3}%" to player
send "You received Clue 3!" to player
command /guess <string> <text>:
permission: op
trigger:
if arg-1 is "1":
if {_guessed::%player%::1} is false:
if arg-2 is {@answer1}:
give player diamond
send "Correct! You guessed it!" to player
set {_guessed::%player%::1} to true
else:
send "Incorrect. You can only guess once!" to player
else:
send "You've already guessed this clue!" to player
else if arg-1 is "2":
if {_guessed::%player%::2} is false:
if arg-2 is {@answer2}:
give player diamond
send "Correct! You guessed it!" to player
set {_guessed::%player%::2} to true
else:
send "Incorrect. You can only guess once!" to player
else:
send "You've already guessed this clue!" to player
else if arg-1 is "3":
if {_guessed::%player%::3} is false:
if arg-2 is {@answer3}:
give player diamond
send "Correct! You guessed it!" to player
set {_guessed::%player%::3} to true
else:
send "Incorrect. You can only guess once!" to player
else:
send "You've already guessed this clue!" to player
else:
send "Invalid clue number. Use /guess <clueNumber> <guess>." to player
command /guessreset <player> <string>:
permission: op
trigger:
if arg-2 is "1":
set {_guessed::%arg-1%::1} to false
send "Reset guess for Clue 1 of %{arg-1}%" to player
else if arg-2 is "2":
set {_guessed::%arg-1%::2} to false
send "Reset guess for Clue 2 of %{arg-1}%" to player
else if arg-2 is "3":
set {_guessed::%arg-1%::3} to false
send "Reset guess for Clue 3 of %{arg-1}%" to player
else:
send "Invalid clue number. Use /guessreset <username> <clueNumber>." to player```
#help with gui
1 messages · Page 1 of 1 (latest)
ok so the gui and everthing in the gui shows up and the guessing command works
but when i click on the things it doesnt give the item to get the paper with the clues
and the guess reset is not reseting the guesses
- You cannot bring local variables across events
- It is recommended to set a local var/metadata tag to a GUI, set the slots, then open it instead of opening an empty inventory and modifying the
player's current inventory event-slotis the item, if you want its position in the gui, useindex of event-slot.- arguments are not variables, to use them in strings it should be
"%arg%"not"%{arg}%"
that comment is also kinda sus
what you mean the comment is kinda sus
Makes it seem this is AI code
that doesnt look like metadata tags..
There’s different ways to do it not just metadata tags
metadata tags on top
I don’t really know how to use them
I’ll look it up
ok, it rlly simple a metadata tag is personally one of the best ways to make a gui in skript simple easy to use plus i can make clicking stuff open diff guis
Nah I only use that shit in school for my marketing classes
lmfao
They say we can so