#why doesnt this work

1 messages · Page 1 of 1 (latest)

craggy galleon
#

hey guys, i was making a quest npc but the skript would not work here's the skript

on right click on entity: if name of entity is "&6Veteran": if player has 4 redstone dust named {redstone} if {quest1} is 0: send message "&c[&6War Veteran&c]&7: Great! Now turn your {firstaxe} &7into your first axe!" to player add 1 to {quest1}

proven cliff
#

any errors when you reload the skript

#

and also did you set {redstone} to anything

#

and did you set {quest1} to 0

#

and did you set {firstaxe} to anything and you need to put %% around it for it so send it

#

@craggy galleon

#

and you should do {quest1::%player's uuid%} instead of {quest1}

pastel granite
#

You should also debug your code to see where it fails.
Might also be worth setting the variable to the item, not the name: player has 4 of {redstone}

craggy galleon
craggy galleon
pastel granite
#

Then

  • elaborate past “not working”
  • debug it
proven cliff
craggy galleon
craggy galleon
craggy galleon
#

is it because I used an external npc source?

#

the plugin is called Fancy Npcs

sullen orbit
#

what do you mean "does not work?" is it that, nothing happens when you click the npc?

#

if that's the case, there could be like 5 problems here. you can debug them by sending messages to the player!

#

so you want to make sure the npc is actually an entity first. if it's not detecting you cliking the npc, then that would be the problem. so we need to find that out first

#

which you can do by........ (You fill in the blank)

craggy galleon
#

How would I check if it's an entity or not

visual birch
#

if ... is ...

pastel granite
#

if you dont know, debugit

craggy galleon
#

I tested the rest with a command skript

pastel granite
#

so then most likely your 2nd line (if statement) is failing

craggy galleon
#

Probably

#

That or the box is not an entity

pastel granite
#

so why didnt you lead with that? or say that any of the 3 times you were asked?

craggy galleon
#

I just tested it

pastel granite
sullen orbit
sullen orbit
craggy galleon
#

ok it is not an entity, how do I make it one or find a solution

pastel granite
#

try using clicked entity not entity, as that (probably) defaults to event-entity which is likely the player

sullen orbit
#

probably something to do with the plugin not actually spawning in an entity, i guess... you could try citizens, but i am not entirely sure if that will work.

(and yeah you can get citizens for free, you just have to look in a weird place)

#

because idk if citizens makes entities either

craggy galleon
#

Ok

craggy galleon
craggy galleon
sullen orbit