[PI] Better NPC Quotes/Shouts
Hello, well this is just a code that I've built and want it to release to the community.
If you want to let the npc shout if you attack it:
Find in npchandler.java:
Code:
public void attackPlayer(Client c, int i) {
Under:
Code:
if(npcs[i] != null) {
Add:
Code:
if (npcs[i].npcType == ####) { //npc id here
int Ncf = Misc.random(5);
if (Misc.random2(30) <= 3) {
npcs[i].updateRequired = true;
if (Ncf == 1) {
npcs[i].forceChat("text hereeee");
} else if (Ncf == 2) {
npcs[i].forceChat("text hereeee");
} else if (Ncf == 3) {
npcs[i].forceChat("text hereeee");
} else if (Ncf == 4) {
npcs[i].forceChat("text hereeee");
} else if (Ncf == 5) {
npcs[i].forceChat("text hereeee");
}
}
}
How this will look like if you finished it:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
:D:D
~ Credits ~
50% - Scripts (basic NPC quote)
50% - Me (creating this code, random quotes, quotes when attacking player)