Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • Decimate Returns: Join Project Decimate !! NEW SERVER 15+ players daily - Double XP and Pest Control weekends! new content added weekly - PRESS TO PLAY [link]
      June 05, 2020, 08:13:23 PM
    • ragnoroker: Join RuneGuild Today - New Server - Double exp + lots of events this weekend! - JOIN NOW - [link]
      June 05, 2020, 03:54:49 PM
    • ragnoroker: Join RuneGuild Today - New Server - Double exp + lots of events this weekend! - JOIN NOW - [link]
      June 05, 2020, 03:54:46 PM
    • hardcore22: are there any kind of silabsoft servers like back in the days i miss that
      May 25, 2020, 05:44:08 AM
    • Amcora: @ dr house contact me; greetings celien :)
      May 24, 2020, 03:16:21 PM
    • Amcora: Stop shouting around please
      May 24, 2020, 03:13:26 PM
    • iddsyou: PkOwnage OSRSPS [link]  Join us on Discord! [link]  Download: [link]
      May 17, 2020, 11:44:17 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:19 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:12 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:56 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:49 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:42 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:29 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:18:03 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:53 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:50 AM
    • Decimate Returns: Project Decimate 474 OSRS ; [link]
      May 13, 2020, 07:27:00 PM
    • hardcore22: are there any silabsoft servers left? of the good old days like hackscape
      May 12, 2020, 07:53:18 AM
    • iddsyou: yo guys check out this instagram post #pkownage  [link]
      May 06, 2020, 02:35:58 PM
    • fishingsheep: any servers like project catasrophe or frugoo scape been remade ?
      May 04, 2020, 05:01:00 PM

    Author Topic: so im haveing a problem here  (Read 837 times)

    0 Members and 1 Guest are viewing this topic.

    Offlineaerial1

    • First Time Poster
    • *
    • Posts: 3
    • Thanks: +0/-0
      • View Profile
    so im haveing a problem here
    « on: August 15, 2015, 09:12:59 PM »
    so this is suppose to be the ring rarety lol what is wrong with this pic?


    int rarity = 0;
    int ringOfWealth = 0;
    int npcDropRate = ((Integer)NPCDrops.dropRarity.get(Integer.valueOf( npcs.npcType))).intValue();
    if(c.playerEquipment[c.playerRing] == 2572) { //As this gets higher the less chance of a rare drop. but more diverse drops.
    npcDropRate = 1+Misc.random(20);
    c.sendMessage("<shad=155653>Your ring of wealth helped your drop rate by "+npcDropRate+" ");
    }
    if(c.playerEquipment[c.playerRing] == 2572) { //Just make the rarity more or less intense as preffered.
    rarity = 1+Misc.random(20);
    c.sendMessage("<shad=155653>Your ring of wealth helped your rarity by "+rarity+" ");

    }
    if(c.playerEquipment[c.playerRing] == 15009) { //Drops rares always but increase rarity to get the best drops of all.
    rarity = 1+Misc.random(15); //Will increase how rare
    Server.itemHandler.createGroundItem(c, NPCDrops.rareDrops.get(npcs.npcType)[random][0], npcs.absX, npcs.absY, NPCDrops.rareDrops.get(npcs.npcType)[random][1], c.playerId);
    c.sendMessage("<shad=155653>Your Ring of Rarity helped your rarity by "+rarity+" ");

    }
    Runescape Gambling

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: so im haveing a problem here
    « Reply #1 on: August 16, 2015, 04:17:44 PM »
    Would help if you posted more of the drop rarity code.

    This doesn't really tell us very much.

    Based on what you supplied, here's what I can say:

    If statement 1:
    If the player is wearing a ring of wealth (2572) the npcDropRate variable increases by a minimal of 1, but an apparent max of 21. Then it tell the player the drop rate (Incorrectly saying it "helped increase it by X" since X is the value as a whole, not what was added)

    If statement 2:
    The exact same as 1. Probably shouldn't even exist.

    If statement 3:
    If the player is wearing the ring 15009 (ring of rarity i guess), it increases the rarity by 1 to 16. It also creates a item on the ground that is "rare".


    Offlinemalimt

    • Member
    • ****
    • Posts: 472
    • Thanks: +0/-0
      • View Profile
    Re: so im haveing a problem here
    « Reply #2 on: August 22, 2015, 12:13:28 AM »
    so this is suppose to be the ring rarety lol what is wrong with this pic?


    int rarity = 0;
    int ringOfWealth = 0;
    int npcDropRate = ((Integer)NPCDrops.dropRarity.get(Integer.valueOf( npcs.npcType))).intValue();
    if(c.playerEquipment[c.playerRing] == 2572) { //As this gets higher the less chance of a rare drop. but more diverse drops.
    npcDropRate = 1+Misc.random(20);
    c.sendMessage("<shad=155653>Your ring of wealth helped your drop rate by "+npcDropRate+" ");
    }
    if(c.playerEquipment[c.playerRing] == 2572) { //Just make the rarity more or less intense as preffered.
    rarity = 1+Misc.random(20);
    c.sendMessage("<shad=155653>Your ring of wealth helped your rarity by "+rarity+" ");

    }
    if(c.playerEquipment[c.playerRing] == 15009) { //Drops rares always but increase rarity to get the best drops of all.
    rarity = 1+Misc.random(15); //Will increase how rare
    Server.itemHandler.createGroundItem(c, NPCDrops.rareDrops.get(npcs.npcType)[random][0], npcs.absX, npcs.absY, NPCDrops.rareDrops.get(npcs.npcType)[random][1], c.playerId);
    c.sendMessage("<shad=155653>Your Ring of Rarity helped your rarity by "+rarity+" ");

    }
    Most definitely need to explain more, sk8rdude is right here. I barely even understand, use  [ CODE ] btw.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal