[Tut] How to make items drop in bundles

Results 1 to 3 of 3
  1. #1
    change my name already! I Rule MU is offline
    MemberRank
    Apr 2007 Join Date
    JerseyLocation
    4,220Posts

    [Tut] How to make items drop in bundles

    Quote Originally Posted by Escapez View Post
    Ok, ive had this problem before but once you get the hang of this, it become easier.

    This code is not tested, please backup these file(s) before trying this. Better to be safe than sorry:
    NPCHandler.java

    First, find the npc id of the monster you have the drops on in npc.cfg and search for the monster name/id. Like this one:

    Code:
    npc = [NUMBER]    White_Knight            36    100
    REMEMBER THAT [NUMBER]! We will use it later.

    ok so open up NPCHandler.java, search for:

    Code:
    if(npcs[NPCID].npcType == [NUMBER])
    Remember that [NUMBER] is the number you are going to remember from npc.cfg.

    you should find somthing like this

    Code:
    if(npcs[NPCID].npcType == [NUMBER]) 
    {
    [SOME CODE HERE]
    }
    now there are many of these. But just choose 1, and under the "}"

    where it says [SOME CODE HERE], replace everything in there with this:

    Code:
    int hold[] = {563, 884, 884, 884, 995, 995, 995, 995, 995};
    int randomHold = hold[(int)(Math.random()*hold.length)];
    if (randomHold == 563)
    ItemHandler.addItem(randomHold, npcs[NPCID].absX, npcs[NPCID].absY, 7, GetNpcKiller(NPCID), false);
    if (randomHold == 884)
    ItemHandler.addItem(randomHold, npcs[NPCID].absX, npcs[NPCID].absY, 11, GetNpcKiller(NPCID), false);
    if (randomHold == 995)
    ItemHandler.addItem(randomHold, npcs[NPCID].absX, npcs[NPCID].absY, 50, GetNpcKiller(NPCID), false);
    If you have any errors with compile.bat, let me know. I will help fix.
    The credits go to him. I didnt know wether he was going to make a guide or not so i did, just so that people who face the same problem in the future can search and find this.


  2. #2
    Enthusiast AwesomeNess is offline
    MemberRank
    May 2008 Join Date
    ----------CanadaLocation
    28Posts

    Re: [Guide]How to make items drop in bundles

    It doesn't say that, I can't find it

  3. #3
    Novice 0bbyme is offline
    MemberRank
    May 2008 Join Date
    4Posts

    Re: [Guide]How to make items drop in bundles

    how do i change he items? from the drop?



Advertisement