Description: To make drops
Difficulty: 1/10
Assumed Knowledge: How to read
Tested Server: Czar
Files/Classes Modified: NPCHandler.java item2.java
Okay, this is my first tut. hope u like it
Ok, first open item2.java and search for this( in Czar)
Code:
public static int Dharok[] = {4716, 4718, 4720, 4722};
public static int randomDharok()
{
return Dharok[(int)(Math.random()*Dharok.length)];
}
}
Under that add a new line.
And add the new things u want. example:
Code:
public static int *Name*[] = {ItemID,ItemID,ItemID};
public static int random*Name*()
{
return *Name*[(int)(Math.random()*Name*.length)];
}
If u did that, save item2.java.
Then go into NPCHandler.java and search for:
Code:
if(npcs[NPCID].npcType == 2026) {
ItemHandler.addItem(Item2.randomDharok(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
Under that add:
Code:
if(npcs[NPCID].npcType == NPCID) {
ItemHandler.addItem(Item2.random*name what u entered in item2.java*(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
And done! save & compile,
hope u liked it
credits: 75% bluurr 25% me
~Sam