R1D3XITY
PLEASE REGISTER!
VOTE FOR DARK ERA PVP!
IP:DARKERAPVP.NO-IP.BIZ
VISIT OUR WEBCLIENT SERVICES SITE
http://317wcs.webs.com/
R1D3XITY
PLEASE REGISTER!
VOTE FOR DARK ERA PVP!
IP:DARKERAPVP.NO-IP.BIZ
VISIT OUR WEBCLIENT SERVICES SITE
http://317wcs.webs.com/
R1D3XITY
Would you like to react to this message? Create an account in a few clicks or log in to continue.


THE BEST RSPS FORUMS
 
HomePortalADDING AND MAKING NPC DIALOGUES 2vtuxyhLatest imagesGallerySearchRegisterLog in
Server Ip:DarkEraPvP.No-Ip.Biz Join Dark Era PvP Now!
Latest Client Notice: Dark Era PvP Client Version 3 is now AVAILABLE! Get It Now!

 

 ADDING AND MAKING NPC DIALOGUES

Go down 
AuthorMessage
R1dl3r
Administrator
Administrator
R1dl3r


Posts : 108
Join date : 2009-12-03
Age : 33
Location : sd.ca.usa

ADDING AND MAKING NPC DIALOGUES Empty
PostSubject: ADDING AND MAKING NPC DIALOGUES   ADDING AND MAKING NPC DIALOGUES EmptySun Dec 13, 2009 7:16 am

IN THIS TUTORIAL ILL BE SHOWING YOU HOW TO ADD AND MAKE NPC DIALOGUES!

Title:Making & Adding NPC Dialogues
Purpose:To show players/learners/ people who want to know how to make and add NPC dialogues the real and easy way to make and add NPC Dialogues.
Files Modified:Client.java
Difficulty:Very easy
Client/Server Sided: Server Sided
Creator:R1dl3r
Credits:R1dl3r

Step 1.(client.java)
First thing you will want to do is SEARCH for

code:
Code:
public void UpdateNPCChat() {

or

code:
Code:
public void UpdateNPCChat(){

(Depending on how your files are written)

After you have searched that you will see something like this

code:
Code:
public void UpdateNPCChat() {
      /*sendFrame126("", 4902);
      sendFrame126("", 4903);
      sendFrame126("", 4904);
      sendFrame126("", 4905);
      sendFrame126("", 4906);*/
      sendFrame126("", 976);
      switch (NpcDialogue) {
What you going to do first is scroll down and check for the last dialogue id made.
if you dont get what i mean ill show you.

this is what i mean

code:
Code:
case 1:
sendFrame164(4883);
sendFrame126("TextHere!", 6248);
sendFrame126("TextHere!", 6249);
NpcDialogueSend = true;
break;
case 2:
so on and so on!

ok after you have scrolled to the last case number in npc talking method
add this

code:
Code:
case ##:
sendFrame164(4883);
sendFrame126("TextHere", 6248);
sendFrame126("Text here", 6249);
NpcDialogueSend = true;
break;
case ##:
sendFrame164(4883);
sendFrame126("Text Here", 6248);
sendFrame126("Text Here", 6249);
NpcDialogueSend = true;
break;

As you see i added ## so u can add your own case id there
how you add is like this.For example lets say your case number is 164.
All you got to do is +1. so now your case number should be 165!
so you adde it like this now

code:
Code:
case 165:
sendFrame164(4883);
sendFrame126("Text Here", 6248);
sendFrame126("Text Here", 6249);
NpcDialogueSend = true;
break;
case 165:
sendFrame164(4883);
sendFrame126("Text Here", 6248);
sendFrame126("Text Here", 6249);
NpcDialogueSend = true;
break;

and your done right there.

Still being in client.java search for
code
Code:
case 40:

you should see something like this

code
Code:
if (NpcDialogue == 1 || NpcDialogue == 3 || NpcDialogue == 5 || NpcDialogue == 40 || NpcDialogue == 42 || NpcDialogue == 1001 || NpcDialogue == 1002 || NpcDialogue == 2259 || NpcDialogue == 2260 || NpcDialogue == 301 || NpcDialogue == 305 || NpcDialogue == 308 || NpcDialogue == 309 || NpcDialogue == 313 || NpcDialogue == 314 || NpcDialogue == 317 || NpcDialogue == 318 || NpcDialogue == 319 || NpcDialogue == 322 || NpcDialogue == 323 || NpcDialogue == 14600 || NpcDialogue == 14602) {
NpcDialogue += 1;
NpcDialogueSend = false;


add this at the end inside the )

code:
Code:
 || NpcDialogue == ## || NpcDialogue == ##

add your case numbers in the ## spots

moving along

STILL IN client.java SEARCH FOR:

CODE:
Code:
case 155: //first Click npc
int NPCSlot = (misc.HexToInt(inStream.buffer, 0, packetSize) / 1000);
int NPCID = server.npcHandler.npcs[NPCSlot].npcType;
faceNPC(NPCSlot);
boolean PutNPCCoords = false;
switch(NPCID) {

AND UNDER THE

CODE:
Code:
{

ADD THIS

CODE:
Code:
if(NPCID == [color=red]%%%%[/color]){
      NpcDialogue = [color=red]##[/color];
      NpcDialogueSend = false;
}

[color=red]%%%%[/color] = NPCID and [color=red]##[/color] = your first case number which in the example was 165

After this just save,close,compile and run!
once you have your server running do ::npc (npcid you added)
then click one of there options which most of the time is talk
and waahh lahh you just added and made your first NPC Dialogue!

TY SO MUCH PLEASE IF YOUR GOING TO FLAME ME ATLEAST DO IT NICELY
IM JUST HELPING OUT PLAYERS WHO NEED TO LEARN ON ADDING AND MAKING NPC DIALOGUES!
Back to top Go down
https://r1d3xity.darkbb.com
 
ADDING AND MAKING NPC DIALOGUES
Back to top 
Page 1 of 1
 Similar topics
-
» Read This First Before Making Clans!!!
» MAKING REQUIREMENTS FOR SHOP
» Making Your Client To A WebClient!

Permissions in this forum:You cannot reply to topics in this forum
R1D3XITY  :: RS2 Development :: RS2 317 Related Boards :: RS2 317 Protocol Tutorials-
Jump to: