Thread: Drop rate yell

Results 1 to 10 of 10
  1. #1 Drop rate yell 
    Banned

    Join Date
    Jun 2015
    Posts
    1,517
    Thanks given
    31
    Thanks received
    143
    Rep Power
    0
    Hello i need to do when you get a good rare, from loot with pvm it yell , Example:

    [Server] c.playerName Has just Got a Item Name...!

    Thanks!
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2015
    Posts
    44
    Thanks given
    3
    Thanks received
    5
    Rep Power
    11
    Unsure what source/revision you are using, but under where your npc drops are processed on death:
    ->check the dropped item's name or rarity
    ->send a global message with the player name and item name included
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2015
    Posts
    62
    Thanks given
    1
    Thanks received
    3
    Rep Power
    11
    I would be interested in that aswell
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jun 2015
    Posts
    1,517
    Thanks given
    31
    Thanks received
    143
    Rep Power
    0
    Quote Originally Posted by Sil9 View Post
    Unsure what source/revision you are using, but under where your npc drops are processed on death:
    ->check the dropped item's name or rarity
    ->send a global message with the player name and item name included
    317!
    Reply With Quote  
     

  5. #5  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    dropItems method in NPCHandler, compare it against the item price.

    If you have updated droptables you can check the rates/rarity.
    Reply With Quote  
     

  6. #6  
    Registered Member Tylwr's Avatar
    Join Date
    Jul 2012
    Age
    26
    Posts
    478
    Thanks given
    105
    Thanks received
    42
    Rep Power
    15
    Quote Originally Posted by James1231 View Post
    Hello i need to do when you get a good rare, from loot with pvm it yell , Example:

    [Server] c.playerName Has just Got a Item Name...!

    Thanks!
    Quote Originally Posted by iLiftPlenty View Post
    Just add an array of items you consider 'rare' and then in your dropItem method (when an npc is killed, not when a player drops it)

    Code:
    	private static final int[] RARE_ITEMS = {
    		4151,
    		11694
    	};
    Code:
    	for (int rares : RARE_ITEMS) {
    		if (droppedItemId == rares) {
    			for (Player player : PlayerHandler.players) {
    				if (player != null) {
    					((Client)player).sendMessage(c.playerName + " has just received " + droppedItemName + "!");
    				}
    			}
    		}
    	}
    Something along those lines.
    http://www.rune-server.org/runescape...rare-drop.html

    Google my friend!
    Attached image
    Quote my post for me to see your reply.
    Discord: tiller#2854

    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Jun 2015
    Posts
    1,517
    Thanks given
    31
    Thanks received
    143
    Rep Power
    0
    Quote Originally Posted by Tylwr View Post
    where i need to put that?
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Jul 2007
    Age
    32
    Posts
    466
    Thanks given
    90
    Thanks received
    52
    Rep Power
    87
    Quote Originally Posted by James1231 View Post
    where i need to put that?
    NPCHandler - dropItem method
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Jun 2015
    Posts
    1,517
    Thanks given
    31
    Thanks received
    143
    Rep Power
    0
    Quote Originally Posted by Tylwr View Post
    errors.
    Reply With Quote  
     

  10. #10  
    Donator
    Darkness's Avatar
    Join Date
    Nov 2012
    Age
    26
    Posts
    876
    Thanks given
    121
    Thanks received
    75
    Rep Power
    47
    I used this in clanchathandler

    Sorry, worse spacing ever
    [spoil]
    Code:
    	public void sendLootShareMessage(int clanId, String message) {
    		if (clanId >= 0) {
    			for (int j = 0; j < clans[clanId].members.length; j++) {
    				if (clans[clanId].members[j] <= 0)
    					continue;
    				if (PlayerHandler.players[clans[clanId].members[j]] != null) {
    					Client c = (Client) PlayerHandler.players[clans[clanId].members[j]];
    					c.sendClan("VENTURE DROPS ", message, clans[clanId].name, 2);
    				}
    			}
    		}
    	}
    
    public void handleLootShare(Client c, int itemId, int amount) {
      boolean rare = false;
      for (int i : Config.ITEM_RARE) {
       if (i == itemId) {
        rare = true;
        break;
       }
      }
      if(rare) {
       for (int j = 0; j < PlayerHandler.players.length; j++) {
        if (PlayerHandler.players[j] != null) {
         Client c2 = (Client)PlayerHandler.players[j];
       c2.sendMessage("[@red@SERVER:@bla@]@gre@"+ c.playerName + " has received  "+ amount + "x" + server.model.items.Item.getItemName(itemId) + ".@bla@");
       }
      }
     } else
      sendLootShareMessage(c.clanId, c.playerName + " has received " + amount + "x " + server.model.items.Item.getItemName(itemId) + "."); 
     }
    [/spoil]
    Works fine, use the clan chats, you do not need to be in a clan to see it. It uses a table in config :

    public static final int[] ITEM_RARE = {11694, (addmore), (addmore) };
    Attached image
    Reply With Quote  
     


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. VERY accurate corp beast drops+rates delta
    By shoopdawhoop in forum Snippets
    Replies: 8
    Last Post: 12-05-2009, 12:30 PM
  2. [PVP] Fair drop rates?
    By xX Chris Xx in forum Help
    Replies: 0
    Last Post: 12-05-2009, 12:29 AM
  3. [Delta]Need help with changing npc drop rate
    By WebsterScape in forum Help
    Replies: 7
    Last Post: 06-14-2009, 09:56 AM
  4. Help Me On Drop Rates
    By 2richdeens in forum Help
    Replies: 0
    Last Post: 11-02-2008, 01:51 AM
  5. npc and drop rate
    By junkiedk in forum Help
    Replies: 11
    Last Post: 08-08-2008, 12:09 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
  •