npc. coding

can anyone tell me how to code the new npc?

Comments

  • It's mostly just choosing codes and filling in the blanks. It's really easy to learn.

    First, to start coding a script, click/press the script you want to edit and press the "Edit" button. Then, add a command (assuming your script is empty.)

    Echo: Selecting this and filling in the blank will show a message in the chat when you start talking to the NPC.

    Firework At: Choosing this and then selecting a block will create a firework on that block when you talk to the NPC. Useful for if the NPC is describing an area of a realm.

    Say: This makes the NPC say something. If the NPC has a lot to say, then you'll have to use multiple "Say" commands.

    Pitch: I honestly have no idea what this does

    Reply: Replies are the player's response to what the NPC just said. You can have up to 3 reply options when talking to an NPC. "goto" means what script will start with each reply. Example: you have script 1 and script 2. You are creating a reply command in script 1. For the conversation to continue, you set the goto to 2 (or whatever your script is named). Goto literally means go to.

    Start Chat: I'm not exactly sure what this means, but a Start Chat command must be in your script for any Say and Reply commands to work, from what I've gathered.

    Goto: Go to a different script. This is to change scripts without creating a reply.

    Give: Gives the player a temporary item (you get to choose what item and how many). Note that if you want the NPC to only give 1 item, then you'll have to use the "does the player has a" command to keep them from talking to the NPC multiple times and grinding temporary items.

    Take: Takes temporary items from the player's inventory.

    Does the player have a: Determines what script will start depending on if the player has temporary items or not. It can be used to give out a limited amount of temporary items. This is the most confusing and it's hard to explain, so it would be best to experiment with this yourself to figure it out. Any of the commands can be learned from just a little experimentation.


    Hope this helps!

  • cg28008cg28008 Member
    thanks!
Sign In or Register to comment.