Thread: Elvarg Dead Npc error

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Elvarg Dead Npc error 
    Registered Member
    Join Date
    Jan 2015
    Posts
    55
    Thanks given
    7
    Thanks received
    1
    Rep Power
    23
    I get a weird error when i kill an NPC and then it's trying to generate the drop

    I'm adding barrows from old Rsps back in the days, just added drops and i get this, any ideas?

    Drop code:

    { //Ahrims
    "npcIds": [
    1672
    ], "uncommonDrops": [
    {
    "itemId": 4708,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4710,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4712,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4714,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Dharoks
    "npcIds": [
    1673
    ],
    "uncommonDrops": [
    {
    "itemId": 4716,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4718,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4720,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4722,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Guthans
    "npcIds": [
    1674
    ], "uncommonDrops": [
    {
    "itemId": 4724,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4726,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4728,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4730,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Karils
    "npcIds": [
    1675
    ], "uncommonDrops": [
    {
    "itemId": 4732,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4734,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4736,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4738,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Torag
    "npcIds": [
    1676
    ], "uncommonDrops": [
    {
    "itemId": 4745,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4747,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4749,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4751,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Verac
    "npcIds": [
    1677
    ], "uncommonDrops": [
    {
    "itemId": 4753,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4755,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4757,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4759,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    Error:
    https://gyazo.com/6debf5b328814d23b77af023446431c9
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    657
    Thanks given
    105
    Thanks received
    75
    Rep Power
    0
    You should check if the NPC even has a drop first before trying to call the method that says he does.

    I believe thats why you're getting that error.
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2015
    Posts
    830
    Thanks given
    12
    Thanks received
    200
    Rep Power
    118
    Try this mate, hope this helps.


    Code:
    { //Ahrims
    "npcIds": [
    1672
    ], "alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ],
    "uncommonDrops": [
    {
    "itemId": 4708,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4710,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4712,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4714,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Dharoks
    "npcIds": [
    1673
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ],
    "uncommonDrops": [
    {
    "itemId": 4716,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4718,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4720,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4722,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Guthans
    "npcIds": [
    1674
    ], "alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ],
    "uncommonDrops": [
    {
    "itemId": 4724,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4726,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4728,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4730,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Karils
    "npcIds": [
    1675
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ], 
    "uncommonDrops": [
    {
    "itemId": 4732,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4734,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4736,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4738,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Torag
    "npcIds": [
    1676
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ], 
    "uncommonDrops": [
    {
    "itemId": 4745,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4747,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4749,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4751,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Verac
    "npcIds": [
    1677
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ], 
    "uncommonDrops": [
    {
    "itemId": 4753,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4755,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4757,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4759,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    Attached image
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2015
    Posts
    55
    Thanks given
    7
    Thanks received
    1
    Rep Power
    23
    Quote Originally Posted by Dinh View Post
    Try this mate, hope this helps.


    Code:
    { //Ahrims
    "npcIds": [
    1672
    ], "alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ],
    "uncommonDrops": [
    {
    "itemId": 4708,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4710,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4712,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4714,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Dharoks
    "npcIds": [
    1673
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ],
    "uncommonDrops": [
    {
    "itemId": 4716,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4718,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4720,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4722,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Guthans
    "npcIds": [
    1674
    ], "alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ],
    "uncommonDrops": [
    {
    "itemId": 4724,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4726,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4728,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4730,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Karils
    "npcIds": [
    1675
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ], 
    "uncommonDrops": [
    {
    "itemId": 4732,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4734,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4736,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4738,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Torag
    "npcIds": [
    1676
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ], 
    "uncommonDrops": [
    {
    "itemId": 4745,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4747,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4749,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4751,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Verac
    "npcIds": [
    1677
    ],"alwaysDrops": [
          
        ],
        "commonDrops": [
          
        ], 
    "uncommonDrops": [
    {
    "itemId": 4753,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4755,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4757,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4759,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    didn't work Thank you for the help tho really apprecied

    Quote Originally Posted by Eggspurt View Post
    You should check if the NPC even has a drop first before trying to call the method that says he does.

    I believe thats why you're getting that error.
    They don't :/
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Feb 2011
    Posts
    143
    Thanks given
    14
    Thanks received
    12
    Rep Power
    0
    Code:
      "rdtChance": 64,
        "commonDrops": [
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jan 2015
    Posts
    55
    Thanks given
    7
    Thanks received
    1
    Rep Power
    23
    Quote Originally Posted by Harvey Spectre View Post
    Code:
      "rdtChance": 64,
        "commonDrops": [
    Doesn't change anything, I just get rare drop tables and not my barrow armors + my error

    Thanks for the reply tho
    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Feb 2011
    Posts
    143
    Thanks given
    14
    Thanks received
    12
    Rep Power
    0
    You're missing special drops

    Post line 130
    Reply With Quote  
     

  8. #8  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    NPCDropGenerator.java on line 103 and 30 is where your issue starts. Have a look at what they are about.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jan 2015
    Posts
    55
    Thanks given
    7
    Thanks received
    1
    Rep Power
    23
    Changed my code, getting a new error.. Checked in npcdropgenerator and the error was about special drops now I get this?

    https://gyazo.com/71f70b89495974838e8c83be8e55d827

    { //Ahrims
    "npcIds": [
    1672
    ], "alwaysDrops": [

    ],
    "rdtChance": 64,
    "specialDrops": [],
    "commonDrops": [

    ],
    "uncommonDrops": [
    {
    "itemId": 4708,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4710,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4712,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4714,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Dharoks
    "npcIds": [
    1673
    ],"alwaysDrops": [

    ],
    "rdtChance": 64,
    "specialDrops": [],
    "commonDrops": [

    ],
    "uncommonDrops": [
    {
    "itemId": 4716,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4718,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4720,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4722,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Guthans
    "npcIds": [
    1674
    ], "alwaysDrops": [

    ],
    "rdtChance": 64,
    "specialDrops": [],
    "commonDrops": [

    ],
    "uncommonDrops": [
    {
    "itemId": 4724,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4726,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4728,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4730,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Karils
    "npcIds": [
    1675
    ],"alwaysDrops": [

    ],
    "rdtChance": 64,
    "specialDrops": [],
    "commonDrops": [

    ],
    "uncommonDrops": [
    {
    "itemId": 4732,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4734,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4736,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4738,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Torag
    "npcIds": [
    1676
    ],"alwaysDrops": [

    ],
    "specialDrops": [],
    "rdtChance": 64,
    "commonDrops": [

    ],
    "uncommonDrops": [
    {
    "itemId": 4745,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4747,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4749,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4751,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    { //Verac
    "npcIds": [
    1677
    ],"alwaysDrops": [

    ],
    "rdtChance": 64,
    "specialDrops": [],

    "commonDrops": [],
    "uncommonDrops": [
    {
    "itemId": 4753,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4755,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4757,
    "minAmount": 1,
    "maxAmount": 1
    },
    {
    "itemId": 4759,
    "minAmount": 1,
    "maxAmount": 1
    }
    ]
    },
    Reply With Quote  
     

  10. #10  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,853
    Thanks given
    1,213
    Thanks received
    1,622
    Rep Power
    5000
    The problem is that some drops have special/rare drops and some don't. There are no proper checks for it in the NPCDropGenerator class. Replace it with this one https://pastebin.com/raw/NteXdt8f and it should fix the errors.

    edit: browsed through the class and the code is pretty bad, i'd suggest redoing that
    Reply With Quote  
     

  11. Thankful user:


Page 1 of 2 12 LastLast

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. [Shard] Summon npc error
    By R0cky 0wnz in forum Help
    Replies: 26
    Last Post: 07-01-2009, 10:09 PM
  2. attack npc error
    By Vox' in forum Help
    Replies: 3
    Last Post: 06-20-2009, 12:48 AM
  3. NPC error
    By Sate in forum Help
    Replies: 4
    Last Post: 06-16-2009, 04:40 PM
  4. NPC error thingy =P
    By Kelvin in forum Help
    Replies: 2
    Last Post: 02-09-2009, 10:25 PM
  5. second click npc error fix ~MUST READ~
    By fabjan in forum Tutorials
    Replies: 7
    Last Post: 03-30-2008, 08:26 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •