NPC DialoguePurpose: For you to know the easiest way of NPC Dialogue
Difficulty: 3/10
Assumed Knowledge: Have some knowledge of Java, patience, and knowing how to read.
File(s) Modified: client.java
Source(s) Tested: Poseidon Tidal Wave
________________________________________
Table of ContentsIntroduction
Adding NPC Dialogue
Conclusion
Credits
_________________________________________
IntroductionHello MoparScape members, welcome to my new Tutorial: NPC Dialogue. Some people hate making NPC Dialogue, I don't know why. NPC Dialogue is really short if you know how to do it, and you will know how to make NPC Dialogue without my help after you are finished reading my Tutorial.
_________________________________________
Adding NPC DialogueInside of your client.java, search for
switch (NpcDialogue) {
Under one of the
break;
Add this, we will be using 1130:
case 1130:
sendFrame200(4883, 591);
sendFrame126(GetNpcName(NpcTalkTo), 4884);
sendFrame126("Message here.", 4885);
sendFrame126("Click here to continue.", 4886);
sendFrame75(NpcTalkTo, 4883);
sendFrame164(4882);
NpcDialogueSend = true;
break;
Still in client.java, search for
case 155: // first click npc
Under one of the ';', add this:
} else if (NPCID == ####) { // NPC NAME
skillX = server.npcHandler.npcs[NPCSlot].absX;
skillY = server.npcHandler.npcs[NPCSlot].absY;
NpcWanneTalk = 1130;
Replace '####' with the NPC ID you want, and replace 'NPC NAME' with the NPC's name.
This is optional, but still inside client.java, find packet 40(case 40 for newbies), and add this inside one of the
|| NpcDialogue == ####
|| NpcDialogue == 1130
_____________________________________________________
ConclusionThanks for reading my Tutorial on NPC Dialogue. I hope you find it a lot easier to add it, now. Good luck, and I hope you don't get any errors.
____________________________________________________
CreditsPoseidon Tidal Wave
Full Metalst
Java
the soul from MoparScape
Forums