Photobucket
Moparscape
November 21, 2009, 11:24:51 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Moparscape!
Join today for the ride of you life!
Please read this!!!
 
  Home Help Search Arcade Gallery Why should you join? Staff List Login Register  

NPC Dialogue


Pages: [1]
  Print  
Author Topic: NPC Dialogue  (Read 53 times)
Full Metalst
Global Moderator
Newbie
*****

Rep: 1
Offline Offline

Posts: 22


View Profile
« on: December 28, 2008, 02:56:40 am »

NPC Dialogue

Purpose: 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 Contents

Introduction
Adding NPC Dialogue
Conclusion
Credits
_________________________________________
Introduction

Hello 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 Dialogue

Inside of your client.java, search for

Code:
switch (NpcDialogue) {

Under one of the

Code:
break;

Add this, we will be using 1130:
Code:
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

Code:
case 155: // first click npc

Under one of the ';', add this:

Code:
} 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

Code:
|| NpcDialogue == ####

Code:
|| NpcDialogue == 1130
_____________________________________________________
Conclusion

Thanks 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.
____________________________________________________
Credits

Poseidon Tidal Wave
Full Metalst
Java
the soul from MoparScape
Forums
Report Spam   Logged
moparman
Administrator
Hero Member
*****

Rep: 15
Offline Offline

Posts: 10013



View Profile
« Reply #1 on: January 01, 2009, 01:40:52 pm »

Really, I have no clue what that is, but it looks good!
Report Spam   Logged
Full Metalst
Global Moderator
Newbie
*****

Rep: 1
Offline Offline

Posts: 22


View Profile
« Reply #2 on: January 09, 2009, 05:19:47 pm »

Thanks. NPC dialogue is when the NPC's face talks to you lol.
Report Spam   Logged
moparman
Administrator
Hero Member
*****

Rep: 15
Offline Offline

Posts: 10013



View Profile
« Reply #3 on: January 15, 2009, 05:03:43 pm »

Oo yeah!! That stuff!!
Report Spam   Logged
Full Metalst
Global Moderator
Newbie
*****

Rep: 1
Offline Offline

Posts: 22


View Profile
« Reply #4 on: May 24, 2009, 01:18:18 pm »

Lol.
Report Spam   Logged
Pages: [1]
  Print  
 
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006, Simple Machines LLC
ServerBeach Coupon