Jump to content
  • 0

NPC dialogue wont open on custom NPC


Question

Posted

okay so im trying to get into scripting again and i started by making a simple npc just for fun, BUT when i click it, the dialogue box doesnt open, nothing happens at all lol, ill post my script here, tell me if you see anything wrong :P

ALSO what is the code for making an npc say stuff out loud like a regular player (words above the head, not a chat room) when a player gets within a certain proximity to the npc :P

Thank you!

new_1-1,57,114,2 script Greeter NPC 108,{

     mes "[Greeter King]";
     mes "Hello Player";
     next;
     getitem 5170,1;
     mes "[Greeter King]";
     mes "Here is your free item";
     mes ".........";
     mes "GET LOST!!!";
     close;

}

4 answers to this question

Recommended Posts

Posted

Always check your map-server for errors.

new_1-1,57,114,2 <tab> script <tab> Greeter NPC <tab> 108,{

Second question, include an OnTouch label with an x,y radius after sprite (in the header):

new_1-1,57,114,2    script    Greeter NPC    108,2,2,{
//    ...
   close;

OnTouch:
   npctalk "You stepped within 2 cells of me!";
   end;
}

  • Upvote 1
Posted (edited)

Thank you :D

now with another npc, im getting "status_set_viewdata:No View Data for Class 0" in my mapserv

new_1-1,59,138,4 script Mischievous Kid npc 107,4,4,{
//...
close;

OnTouch:
getitem 7049,1;
Npctalk "GO AWAY!";
end;

}

EDIT: those are in fact tabs where they are supposed to be :P

Edited by fight_the_fallen

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...