Jump to content
  • 0

Auto Message Npc


Question

Posted

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 :)

2 answers to this question

Recommended Posts

Posted

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;
}

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