Techn0fev3r
June 17th, 2010, 23:36
So lets start off.
Open NPCHandler.java (.JAVA NOT .CLASS)
I have seen alot of stupidos that were too lazy to find out where to put it, yeah, under "moo", but only server that are remade of RuneScape have Moo in it, (it's cows that Moo in real RS for if you dont know).
So, I ain't like that? here it is, search for:
Code:
npcs[i].getnextnpcmovement()
and right under it add:
Code:
if (npcs[i].npcType == 13) { //npc id, the npc that says it.
if (misc.random2(10) <= 3) //Time between saying your text.
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Your text here that will be shouted :)"; //change that to what you want.
}
}
So it will look like this:
Code:
}
Code:
if (npcs[i].RandomWalk == true) {
npcs[i].getNextNPCMovement();
}
if (npcs[i].npcType == 13) { //Npc ID!
if (misc.random2(40) <= 3) //time delay, time between they say your shout text.
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "your text here that will be shouted :)"; //change to what you want.
}
}
So, it will work fine now, save, compile and run, spawn a npc... it works with ::npc.
But now you're gonna want to have it special, like it says different things when different thing happen.
For Example the uptime.
Or how many online.
Or if the owner is online.
After you added your first NPCshout, you can just put others under it.
(spellt players wrong but idc, its just a tut )
Code:
if (npcs[i].npcType == 14) { //Npc ID!
if (misc.random2(40) <= 3) //time delay, time between they say your shout text.
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "there are currently " + PlayerHandler.getPlayerCount()+ " players online";
}
}
-Techn0fev3r
Open NPCHandler.java (.JAVA NOT .CLASS)
I have seen alot of stupidos that were too lazy to find out where to put it, yeah, under "moo", but only server that are remade of RuneScape have Moo in it, (it's cows that Moo in real RS for if you dont know).
So, I ain't like that? here it is, search for:
Code:
npcs[i].getnextnpcmovement()
and right under it add:
Code:
if (npcs[i].npcType == 13) { //npc id, the npc that says it.
if (misc.random2(10) <= 3) //Time between saying your text.
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "Your text here that will be shouted :)"; //change that to what you want.
}
}
So it will look like this:
Code:
}
Code:
if (npcs[i].RandomWalk == true) {
npcs[i].getNextNPCMovement();
}
if (npcs[i].npcType == 13) { //Npc ID!
if (misc.random2(40) <= 3) //time delay, time between they say your shout text.
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "your text here that will be shouted :)"; //change to what you want.
}
}
So, it will work fine now, save, compile and run, spawn a npc... it works with ::npc.
But now you're gonna want to have it special, like it says different things when different thing happen.
For Example the uptime.
Or how many online.
Or if the owner is online.
After you added your first NPCshout, you can just put others under it.
(spellt players wrong but idc, its just a tut )
Code:
if (npcs[i].npcType == 14) { //Npc ID!
if (misc.random2(40) <= 3) //time delay, time between they say your shout text.
{
npcs[i].updateRequired = true;
npcs[i].textUpdateRequired = true;
npcs[i].textUpdate = "there are currently " + PlayerHandler.getPlayerCount()+ " players online";
}
}
-Techn0fev3r