Jump to content
  • 0

NPC dialogue wont open on custom NPC


fight_the_fallen

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   0
  • Joined:  04/22/12
  • Last Seen:  

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;

}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   0
  • Joined:  04/22/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

You have an NPC with ID 0. Like in this topic (google search ^-^)

http://www.eathena.ws/board/index.php?showtopic=267813

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   0
  • Joined:  04/22/12
  • Last Seen:  

XDDD okay i found the problem, it was reading that i had NPC as the ID bahahaa, sorry guys, i got rid of NPC after the name and it started working :P

thank you everyone :D

Link to comment
Share on other sites

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.

×
×
  • Create New...