PDA

View Full Version : 317 making npc's say stuff above their heads! works for all 317s



colesp3
July 9th, 2010, 18:18
hey guys. I know alot of you have been like : omg why cant i make them say stuff above their heads??? ive tried like 20 different tuts but they never work because i dont have any npc saying stuff to begin with!!!

well heres your answer, but first commenly asked questons:

is it hard to do?
answer: No

Does it work the same way with 508's?
Answer: no

will it give me 100 compiling errors?
not if you do it right.


ok lets begin:

go into your source files and open up npchandler.java
and search for:
npcs[i].getNextNPCMovement()
you should find something like this:


if (npcs[i].RandomWalk == true) {
npcs[i].getNextNPCMovement();
}
}

under the last } past this:


if (npcs[i].npcType == 410) {
if (misc.random2(10) <= 3)
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Welcome to the training area";
}
}

brief explanation of things: npctype == 410, 410 being the npc id, misc.random2(10) , 10 being the random number of seconds message repeats.
textupdate = "welcme to training area, being the message it says. so when your done it should look like this:


if (npcs[i].RandomWalk == true) {
npcs[i].getNextNPCMovement();
}
}
if (npcs[i].npcType == 410) {
if (misc.random2(10) <= 3)
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Welcome to the training area";
}

}




credits:
20% to me for putting it down when there are only like 2 posts about this in the world.
80% to the original guy who discovered this.

Mish
July 9th, 2010, 18:27
Cool :p
but try use
code tabs :p

colesp3
July 9th, 2010, 19:52
I was in a rush

Fenway`
July 12th, 2010, 04:27
like czar :D

and it adds lag

shockys
July 12th, 2010, 04:29
This is extremely easy..