Description:
Changing what an NPC says
Difficulty:
1/10
Assumed Knowledge:
Follow very simple directions
Server Base Tested:
Hiya/Czar works with a lot of sources though
Files/Classes Modified:
NPCHandler.java
Procedure
Step 1:
Find the ID of the NPC your going to make talk.
Now open up NPCHandler.java and search "moo"
You should see something like this:
Code:
if (npcs[i].npcType == 81 || npcs[i].npcType == 397
|| npcs[i].npcType == 1766
|| npcs[i].npcType == 1767
|| npcs[i].npcType == 1768) {
if (misc.random2(50) == 1) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Moo";
}
}
That makes all npcs with the id 81,397,1766,1767, or 1768 say "Moo"
Under that last } of that code add this:
Code:
if (npcs[i].npcType == 555) {
if (misc.random2(30) <= 2) {
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Trade me for the shop!";
}
}
Change the "555" part to whatever the id is of the NPC your going to make talk.
Change the "Trade me for the shop!" part to whatever you want him to say above his head.
Step 2:
Credits: 100% Made By
Marty of RSPServer.com