Jump to content
  • 0

Auto Message Npc


Mentalist

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   1
  • Joined:  09/23/12
  • Last Seen:  

Can anyone explain me ( or made it ) the script , in order to make a npc talk but not on click?

EG : i get to a map and this npc talk to me without click

sry for bad english and thx in advance for replies :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

If you want the NPC to talk when a player walks near it, you can use the OnTouch label.

prontera,155,188,0	script	Test_NPC	910,4,4,{
mes "You clicked me";
close;

OnTouch:
npctalk "Someone walked near me!";
end;
}

If you want the NPC to talk on a time interval (like every hour, or every 30 seconds) you can use OnClock labels or sleep inside of a loop.

prontera,155,188,0	script	Test_NPC	910,4,4,{
mes "You clicked me";
close;

OnClock0700:
npctalk "It's 7:00 AM";
end;
OnClock1414:
npctalk "It's 2:14 PM";
end;
}

prontera,155,188,0	script	Test_NPC	910,4,4,{
mes "You clicked me";
close;

OnInit:
while (1) {
	sleep 30000;
	npctalk "Another 30 seconds have passed.";
}
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   1
  • Joined:  09/23/12
  • Last Seen:  

Thanks very much! SOLVED!

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...