nemoigescape
Active Member
- Joined
- May 24, 2009
- Sythe Gold
- 0
- Messages
- 131
Making drops in czar is actually quite confusing when you have only just begun so i will attempt to guide you through the process
ok first open up NPCHandler.java
and search for
thats ice queen most people have that in there source lol if you dont have that npc in your source switch it with an npc you do have
you will then see a code similar to this
to create a new npc with a new drop scroll down to the bottom of them
and add this
change the
npc = the monsters id
npcname = the name of the moster
1 = the amount of the items it will drop
that is basically telling that when the npc is killed it will drop an item from item2, so we will have to create what items it will dro pin the items2.java
so open up items2.java
and scroll down and you will have to create a new monster that has drops
here is a base you could use to copy and paste but read to see what each part needs to be changed so you actually learn something
for that code you will need to change the monster name banshee to the npc name you used in npchandler.java (it is case sensetive so make sure you use caps\non caps in both the npchandler.java and items2.java name.
this code is where you choose the items it will drop
you would need to switch them ids for the new item ids of the items you would like the npc to drop to make an item rarer or less items to it make an item less rare, i like to use useless items like bones and ashes to make monsters drop some items more rare
if any one gets any problems with it or does not understand any part im happy to help
If you get any errors please post your error as it will make it much easier to find out what you did wrong
ok first open up NPCHandler.java
and search for
Code:
if(npcs[NPCID].npcType == 795)
thats ice queen most people have that in there source lol if you dont have that npc in your source switch it with an npc you do have
you will then see a code similar to this
Code:
if(npcs[NPCID].npcType == 795) {
ItemHandler.addItem(Item2.randomicequeen(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
to create a new npc with a new drop scroll down to the bottom of them
and add this
Code:
if(npcs[NPCID].npcType == npc) {
ItemHandler.addItem(Item2.npcname(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
}
change the
npc = the monsters id
npcname = the name of the moster
1 = the amount of the items it will drop
that is basically telling that when the npc is killed it will drop an item from item2, so we will have to create what items it will dro pin the items2.java
so open up items2.java
and scroll down and you will have to create a new monster that has drops
here is a base you could use to copy and paste but read to see what each part needs to be changed so you actually learn something
Code:
public static int banshee[] = {4089,4091,4093,4095,4097,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592};
public static int randombanshee()
{
return banshee[(int)(Math.random()*banshee.length)];
}
for that code you will need to change the monster name banshee to the npc name you used in npchandler.java (it is case sensetive so make sure you use caps\non caps in both the npchandler.java and items2.java name.
this code is where you choose the items it will drop
Code:
{4089,4091,4093,4095,4097,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592,592};
you would need to switch them ids for the new item ids of the items you would like the npc to drop to make an item rarer or less items to it make an item less rare, i like to use useless items like bones and ashes to make monsters drop some items more rare
if any one gets any problems with it or does not understand any part im happy to help
If you get any errors please post your error as it will make it much easier to find out what you did wrong

