Jump to content
  • 0

How to make an npc speak automatically?


PoringSpr

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  12/08/16
  • Last Seen:  

Hello guys, I wonder how does it for an npc to speak automatically when we get close to it.

Any help I will be grateful for.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

On 2/24/2022 at 10:13 AM, PoringSpr said:

but that way you did, it is necessary to click on the npc, I want it to activate with the presence of the character

prontera,100,100,1	script	WalkNearMe	100,10,10,{
end;
OnTouch:
	npctalk "Hello world";
	end;
}

It is activated by the presence of the character. The "10,10" after "100," in the NPC header refers to the x and y distance from the NPC with which a character can "bump" into the NPC and trigger the OnTouch: event.

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   167
  • Joined:  04/05/13
  • Last Seen:  

prontera,1,1,1 script Hello,66,5,5,{
end;
OnTouch:
npctalk "Hello world";
end;
}

 

Edited by Mael
Use codebox
  • Upvote 1
Link to comment
Share on other sites

  • 1

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  862
  • Reputation:   115
  • Joined:  05/23/12
  • Last Seen:  

U could do it like the lhz dungeon warps.

https://github.com/rathena/rathena/blob/master/npc/warps/dungeons/lhz_dun.txt

lhz_cube,59,136,0 script cubew02-3 45,1,1,{

 callfunc "randomw";

 end;

}

 

 

Rynbef~

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  12/08/16
  • Last Seen:  

On 2/23/2022 at 1:37 AM, Start_ said:

prontera,1,1,1 script Hello,66,5,5,{

end;

OnTouch:

npctalk "Hello world";

end;

}

but that way you did, it is necessary to click on the npc, I want it to activate with the presence of the character

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