Thread: To help you fully understand drops.

Results 1 to 3 of 3
  1. #1 To help you fully understand drops. 
    Registered Member
    Join Date
    May 2007
    Posts
    277
    Thanks given
    9
    Thanks received
    6
    Rep Power
    42
    Purpose: To help people understand drops fully.

    Difficulty: 1/10

    Assumed Knowledge: Not hard, just.. Sense?

    Server Base: My new server ( In progress ).

    Classes Modified: Hmm.. Item.java, Item2.java, Item3.java, Autospawn ( Depends ) Npchandler.java.

    Procedure
    Step 1: Firstly, I'll take you through making a npc drop a item 100% of the time.

    Code:
    if(npcs[NPCID].npcType == 2745) 
    {
    ItemHandler.addItem(Item2.randomJad(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
    Ok.. Lets start.. You see
    Code:
    (Item2.randomJad(),
    That means that the item what Jad is going to drop is in Item2.randomJad. So if you wish to change, go into Item2.java and search Item2.Randomjad and change the object.

    Ok you can see
    Code:
    if(npcs[NPCID].npcType == 2745)
    2745 = TzTok-jad Npcid. So that means that you want that npc id to drop out of Item2.randomjad.

    Ok in my Item2.java in randomjad it says
    Code:
    
    {1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,1052,6585,1409,4131,4151,1377,6082,6570,1149};
    There is around 50? Idk item ids there, so that means 6570 (Fire cape) Would have 1/50 chance to drop.

    Say you changed half of them to 6570, that means Fire cape would have 50% chance to drop or 25/50

    If you wanted it to drop 6570 100/100 or 100% ( Whichever way you prefer ) you would add only 1 item id and it would be 6570.


    Step 2: Ok, now we will get to grips with Random drops.

    Lets take this for example.

    Code:
    if(npcs[NPCID].npcType == 2029) 
    {
    ItemHandler.addItem(Item2.randomTorag(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
    }
    This means, once again.. In Item2.randomTorag you will see what torag drops.

    This is mine
    Code:
    public static int Torag[] = {4745,4747,4749,4751};
    
        public static int randomTorag()
        {
    Ok.. It has 1/4 chance to drop a piece of Torags. Or 25%. Now say you wanted it to drop 4745 ( Hammer I tink. ) 4/10. You would add 3 more 4745's to the list then 1 more of each of the other Ids. Now you have 2/10 for the other pieces and 4/10 for the hammers.

    Say you wanted abby demons to drop a whip 1/300 you would add 1 4151 ( Whip id ) and 299 other things ( anything ). Now you would get 1 whip per 300 kills ( early if your lucky xD )


    Step 3: Working with Npchandler. Ok, you still dont understand? I'll break it down for you.

    Code:
    if(npcs[NPCID].npcType == 50) {
    ItemHandler.addItem(Item2.randomKBD(), npcs[NPCID].absX, npcs[NPCID].absY, 1, GetNpcKiller(NPCID), false);
    }
    Ok, 50 = King black dragon, that is it's npc id. Item2.randomKbd is were the drops come from, so if you open up item2.java and search kbd, you would see all the objects. Were is says "Random" it means a random item of that.



    Credits: 100% me.
     

  2. #2  
    anarchy
    Guest
    i prefer to use npcdrop.cfg
     

  3. #3  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    npcdrop.cfg doesnt work in testscape so this is very good.

    Didn't want to get released but good i guess.
    Ex-super moderator of Rune-Server.org and RSBot.org
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Just need to understand this...
    By Ventrix in forum Help
    Replies: 1
    Last Post: 06-11-2009, 04:57 AM
  2. Fully Fully Deleting members from Czar.
    By Simon in forum Tutorials
    Replies: 5
    Last Post: 05-09-2008, 09:54 PM
  3. FULLY understand Npc drops
    By Kurt in forum Tutorials
    Replies: 11
    Last Post: 03-26-2008, 06:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •