Thread: [RUSE] Lootshare

Results 1 to 7 of 7
  1. #1 [RUSE] Lootshare 
    Registered Member
    Join Date
    May 2011
    Posts
    129
    Thanks given
    8
    Thanks received
    5
    Rep Power
    0
    Does anybody know why the lootshare on ruse base does not work? Or atleast, seems to not work?

    Sometimes 1 player gets all drops sometimes they look split but i am not sure about that.

    Code:
    Player toGive = player;
    
    		boolean ccAnnounce = true;
    		if(Location.inMulti(player)) {
    			if(player.getCurrentClanChat() != null && player.getCurrentClanChat().getLootShare()) {
    				CopyOnWriteArrayList<Player> playerList = new CopyOnWriteArrayList<Player>();
    				for(Player member : player.getCurrentClanChat().getMembers()) {
    					if(member != null) {
    						if(member.getPosition().isWithinDistance(player.getPosition())) {
    							playerList.add(member);
    						}
    					}
    				}
    				if(playerList.size() > 0) {
    					toGive = playerList.get(Misc.getRandom(playerList.size() - 1));
    					if(toGive == null || toGive.getCurrentClanChat() == null || toGive.getCurrentClanChat() != player.getCurrentClanChat()) {
    						toGive = player;
    					}
    					ccAnnounce = true;
    				}
    			}
    		}
    Even when putting ccAnnounce boolean true it does not announce anything in clanchat. Can someone push me in the right direction?
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jun 2019
    Posts
    203
    Thanks given
    99
    Thanks received
    44
    Rep Power
    0
    Print the "playerList". I would also just use ArrayList instead.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2011
    Posts
    129
    Thanks given
    8
    Thanks received
    5
    Rep Power
    0
    Quote Originally Posted by Zerikoth View Post
    Print the "playerList". I would also just use ArrayList instead.
    You mean to check if it actually holds names? It's weird because i haven't found ANYTHING about this anywhere on the forums :/
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jun 2019
    Posts
    203
    Thanks given
    99
    Thanks received
    44
    Rep Power
    0
    Quote Originally Posted by ELKAY View Post
    You mean to check if it actually holds names? It's weird because i haven't found ANYTHING about this anywhere on the forums :/
    Yes print the list and see if it holds any data. This forum isn't going to post fixes for every issue there is.
    You have to find them yourself fix them yourself. You can ask for help but thats pretty much it.
    This forum isn't what it used to be. Only a handful of people actually help nowadays.

    Code:
    System.out.println(playerList.toArray());
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2011
    Posts
    129
    Thanks given
    8
    Thanks received
    5
    Rep Power
    0
    Quote Originally Posted by Zerikoth View Post
    Yes print the list and see if it holds any data. This forum isn't going to post fixes for every issue there is.
    You have to find them yourself fix them yourself. You can ask for help but thats pretty much it.
    This forum isn't what it used to be. Only a handful of people actually help nowadays.

    Code:
    System.out.println(playerList.toArray());
    I realise that, thank you. It sucks but it is what it is.

    It prints the following:
    [Ljava.lang.Object;@7480c09a
    [Ljava.lang.Object;@30f56ea0
    [Ljava.lang.Object;@47fb225b
    [Ljava.lang.Object;@58cb7d0c
    [Ljava.lang.Object;@2abdf29f
    [Ljava.lang.Object;@31261906

    Which to me does not make sense. It does however seem to share loot, i just can't confirm this as it does not announce it... which makes me think it does not work.
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Jun 2019
    Posts
    203
    Thanks given
    99
    Thanks received
    44
    Rep Power
    0
    Quote Originally Posted by ELKAY View Post
    I realise that, thank you. It sucks but it is what it is.

    It prints the following:
    [Ljava.lang.Object;@7480c09a
    [Ljava.lang.Object;@30f56ea0
    [Ljava.lang.Object;@47fb225b
    [Ljava.lang.Object;@58cb7d0c
    [Ljava.lang.Object;@2abdf29f
    [Ljava.lang.Object;@31261906

    Which to me does not make sense. It does however seem to share loot, i just can't confirm this as it does not announce it... which makes me think it does not work.
    print as

    Code:
    System.out.println(Arrays.toString(playerList));
    But doesn't look empty to me. But can only tell by printing ^
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    May 2011
    Posts
    129
    Thanks given
    8
    Thanks received
    5
    Rep Power
    0
    Quote Originally Posted by Zerikoth View Post
    print as

    Code:
    System.out.println(Arrays.toString(playerList));
    But doesn't look empty to me. But can only tell by printing ^
    Thank you for your help, i managed to fix it. It wasn't empty but it was also not sharing. The ccannounce was defined at the wrong spot too
    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. lootshare
    By austin_gct in forum Help
    Replies: 0
    Last Post: 04-24-2009, 03:28 AM
  2. 100% lootshare and coinshare!
    By SWAT in forum Show-off
    Replies: 28
    Last Post: 04-11-2009, 04:20 AM
  3. LootShare~~~~completely 100% my way
    By Nuevo in forum Tutorials
    Replies: 36
    Last Post: 03-29-2009, 01:25 AM
  4. Lootshare/coinshare!
    By SWAT in forum RS2 Server
    Replies: 83
    Last Post: 08-10-2008, 08:12 PM
  5. Lootshare, im getting there :D ( started tonight)
    By mr s' sock in forum RS2 Server
    Replies: 17
    Last Post: 03-06-2008, 01:42 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
  •