Hey,
I'm trying to script a quest menu/GUI/inventory.
For this Inventory I would like to use custom items with information for each quest, like this:
https://cdn.inweb.systems/captures/irwxLH6G.png
My problem is, some information like "Status" or "Tasks" have to be variable and individual for every player.
What would be the best solution to do this, if I'm tracking the quest progress with player flags?
Currently I've done it like that:
inventoryQuestsItemTreasureHunt001:
type: item
debug: false
material: gold_ingot
display name: <&6>Treasure hunt
lore:
- <&b><&m>--------------------------
- <&8>Status: <player.has_flag[questTreasureHunt001].if_true[<player.flag[questTreasureHunt001].equals[9999].if_true[<&2>Finished].if_false[<player.flag[questTreasureHunt001].equals[0].if_true[<&c>Can be started].if_false[<&e>In progress]>]>].if_false[<&4>Locked]>
- <&8>Location: <&2>Fort Zuka
- <&r>
- <&8>Task: <&7>Speak to <&b>Kiyoshi
- <&b><&m>--------------------------
- <&8><>> <&e>CLICK TO TELEPORT <&8><<>
But all these conditions in the item lore doesn't feel right and are giving me some errors on server startup.
[23:24:51 INFO]: ERROR in script 'INVENTORYQUESTS' While reading 'slots' input in script 'INVENTORYQUESTSITEMTREASUREHUNT001'!
Error Message: Missing player for player tag.
[23:24:51 INFO]: Additional Error Info: Tag-base 'player' returned null.
[23:24:51 INFO]: Additional Error Info: Tag <player.has_flag[questTreasureHunt001].if_true[<player.flag[questTreasureHunt001].equals[9999].if_true[<&2>Finished].if_false[<player.flag[questTreasureHunt001].equals[0].if_true[<&c>Can be started].if_false[<&e>In progress]>]>].if_false[<&4>Locked]> is invalid!
[23:24:51 INFO]: Additional Error Info: Unfilled or unrecognized sub-tag(s) 'player.has_flag[questTreasureHunt001].if_true[<player.flag[questTreasureHunt001].equals[9999].if_true[<&2>Finished].if_false[<player.flag[questTreasureHunt001].equals[0].if_true[<&c>Can be started].if_false[<&e>In
progress]>]>].if_false[<&4>Locked]' for tag <player.has_flag[questTreasureHunt001].if_true[<player.flag[questTreasureHunt001].equals[9999].if_true[<&2>Finished].if_false[<player.flag[questTreasureHunt001].equals[0].if_true[<&c>Can be started].if_false[<&e>In progress]>]>].if_false[<&4>Locked]>!
[23:24:51 INFO]: Additional Error Info: Almost matched but failed (missing [context] parameter?): player