• Log in or sign up for an account here: https://www.sythe.org/login

Adding NPC drops

woah.no-ip.info

Active Member
Joined
Nov 28, 2007
Sythe Gold
0
Messages
150
Location
Blinds shut with the keyboard at a safe but reachable distance
If you need any help just post
There are two types of drops you can add to you server random and definite
First i am going to explain definite drops
To add a definite drop open your "npchandler.java" use CTRL F and search for
if(npcs[NPCID].npcType ==
you should see something like
if(npcs[NPCID].npcType == 1615)
{
ItemHandler.addItem(6570, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
if you want to drop then add this

if(npcs[NPCID].npcType == 50)
{
ItemHandler.addItem(6570, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}

Explaining

if(npcs[NPCID].npcType == 50)

the 1615 is the npc id in this case it would be the KBD

To change the drop
{
ItemHandler.addItem(6570, npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}

6570 is the id of the item droped

To Add random drops you would add something like this

if(npcs[NPCID].npcType == 1153)
{
ItemHandler.addItem(Item2.randommith(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
The
if(npcs[NPCID].npcType == 50)
50 is the npc id in this case it would be the kbd

the drop

{
ItemHandler.addItem(Item2.randommith(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
the thing that would be change in this case would be the randommith
in order to change the drop you would have to open your item2.java
you would add this
public static int mith[] = {1071,1085,1109,1121,1143,1159,1181,1197,1209,1225,1243,1257,1285,1299,1315,1329,1343,1355,1369,1428,};
public static int randommith()
{
return mith[(int)(Math.random()*mith.length)];
}

this makes it drop full mith one armor or wep at a time if you would like to change this you would change anything that says mith to whatever you would like it to be identified as and the numbers are the things it drops it drops one thing at a time
 
I could barely understand what you just said, it was too messy. And i think there's not many people who cant add NPC drops. :eek:
 
Great, i love random drops, thnx.
 
wait, does this only work on private servers?
 
Runescape Gamblingrunescape gambling
Back
Top