Thread: How to add drops ( for neebs who dont know :p)

Results 1 to 2 of 2
  1. #1 How to add drops ( for neebs who dont know :p) 
    Profiler
    Guest
    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
     

  2. #2  
    Registered Member

    Join Date
    Feb 2007
    Posts
    994
    Thanks given
    25
    Thanks received
    47
    Rep Power
    604
    looks nice will help a lot of people out
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •