R1dl3r Administrator
Posts : 108 Join date : 2009-12-03 Age : 33 Location : sd.ca.usa
| Subject: ADDING AND MAKING NPC DIALOGUES Sun 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!
| |
|