• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script✓] Adding Custom NPC Dialogue

  • 8
    Posts
    350
    Days
    • Seen Sep 5, 2023
    Is there a tutorial on adding custom NPC Dialogue in here? I checked in pret tutorials and scripting section and couldn't seem to find anything like that.
     
  • 7
    Posts
    1
    Years
    • Seen yesterday
    It's pretty simple. You need to use the command msgbox.

    If you have a small text u can put it in the braces like:

    msgbox("Hey there", MSGBOX_AUTOCLOSE)
    waitmessage

    If the text should be longer you need to make a text script like:

    msgbox(scriptname, MSGBOX_AUTOCLOSE)
    waitmessage

    text scriptname{
    "Hey there how are you?/n"
    "The weather is nice!"
    }

    There are different types of msgboxes depending on the type u used. For example MSGBOX_AUTOCLOSE or MSGBOX_NPC and so on. It's pretty simple you can always look at existing codes in the game.
     
  • 461
    Posts
    6
    Years
    • Seen yesterday
    Is there a tutorial on adding custom NPC Dialogue in here? I checked in pret tutorials and scripting section and couldn't seem to find anything like that.
    There's a scripting tutorial on the wiki, which will teach you everything you need to know.


    It's pretty simple. You need to use the command msgbox.

    If you have a small text u can put it in the braces like:

    msgbox("Hey there", MSGBOX_AUTOCLOSE)
    waitmessage

    If the text should be longer you need to make a text script like:

    msgbox(scriptname, MSGBOX_AUTOCLOSE)
    waitmessage

    text scriptname{
    "Hey there how are you?/n"
    "The weather is nice!"
    }

    There are different types of msgboxes depending on the type u used. For example MSGBOX_AUTOCLOSE or MSGBOX_NPC and so on. It's pretty simple you can always look at existing codes in the game.

    It's worth noting that these code snippets use the poryscript syntax and will only work if you have poryscript installed in your repo.
     
    Back
    Top