Thread: general chat icons

Results 1 to 3 of 3
  1. #1 general chat icons 
    Donator

    LionLF's Avatar
    Join Date
    Aug 2017
    Posts
    234
    Thanks given
    76
    Thanks received
    76
    Rep Power
    115
    about to get cancer, does anyone know where i can change general chat icons? Literally each rank i have ingame has diff general chat icon. Cant find where to change em either.
    Using ruse as base.

    Also can someone explain how server reads icon as "300" but on sprites image name is 1050? Searched both on client side and server side and i cant see find any connection between these? Sprite name 300 isnt even rank image but still img=300 is 1050 lol

    here is example how clanchat loads icons :

    Code:
    public static void sendMessage(Player player, String message) {
    		ClanChat clan = player.getCurrentClanChat();
    		if (clan == null) {
    			player.getPacketSender().sendMessage("You're not in a clanchat channel.");
    			return;
    		}
    		ClanChatRank rank = clan.getRank(player);
    		if (clan.getRankRequirement()[ClanChat.RANK_REQUIRED_TO_TALK] != null) {
    			if (rank == null || rank.ordinal() < clan.getRankRequirement()[ClanChat.RANK_REQUIRED_TO_TALK].ordinal()) {
    				player.getPacketSender().sendMessage("You do not have the required rank to speak in this channel.");
    				return;
    			}
    		}
    		String bracketColor = "<col=16777215>";
    		String clanNameColor = "<col=255>";
    		String nameColor = "<col=337629>";
    		String chatColor = "<col=993D00>";
    		for (Player memberPlayer : clan.getMembers()) {
    			if (memberPlayer != null) {
    				if (memberPlayer.getRelations().getIgnoreList().contains(player.getLongUsername()))
    					continue;
    				int dimg = 0;
    				int rd = 0;
    				int img = player.getRights().ordinal();
    				int d = 0;
    				if (player.getGameMode() == GameMode.IRONMAN) {
    					img = 33;
    				} else if (player.getGameMode() == GameMode.HARDCORE) {
    					img = 32;
    				}
    
    				if (player.getRights() == PlayerRights.OWNER) {
    					img = 352;
    				}
    				if (player.getRights() == PlayerRights.DEVELOPER) { // 679 main img 0
    					img = 353;
    				}
    				if (player.getRights() == PlayerRights.MODERATOR) {
    					img = 300;
    				}
    				if (player.getRights() == PlayerRights.ADMINISTRATOR) {
    					img = 356;
    				}
    				if (player.getRights() == PlayerRights.EX_STAFF) {
    					img = 366;
    				}
    
    				if (player.getRights() == PlayerRights.FORUM_ADMINISTRATOR) {
    					img = 357;
    				}
    				if (player.getRights() == PlayerRights.TRIAL_MODERATOR) {
    					img = 361;
    				}
    				if (player.getRights() == PlayerRights.WEB_DEVELOPER) {
    					img = 354;
    				}
    				if (player.getRights() == PlayerRights.GLOBAL_ADMINISTRATOR) {
    					img = 355;
    				}
    				if (player.getRights() == PlayerRights.COMMUNITY_MANAGER) {
    					img = 355;
    				}
    				if (player.getRights() == PlayerRights.GLOBAL_MODERATOR) {
    					img = 358;
    				}
    				if (player.getRights() == PlayerRights.FORUM_MODERATOR) {
    					img = 360;
    				}
    				if (player.getRights() == PlayerRights.TRIAL_FORUM_MODERATOR) {
    					img = 362;
    				}
    
    				if (player.isModeler()) {
    					dimg = 296;
    				}
    				if (player.isGfxDesigner()) {
    					dimg = 298;
    				}
    				if (player.isYoutuber()) {
    					dimg = 299;
    				}
    				if (player.isGambler()) {
    					dimg = 297;
    				}
    
    				String rankImg = img > 0 ? "<img=" + img + "> " : "";
    				String donorImg = dimg > 0 ? "<img=" + dimg + "> " : "";
    				memberPlayer.getPacketSender()
    						.sendMessage("@clan:A@" + bracketColor + "[" + clanNameColor + clan.getName() + bracketColor
    								+ "]" + nameColor + "" + rankImg + donorImg + " "
    								+ NameUtils.capitalizeWords(player.getUsername()) + ": " + chatColor
    								+ NameUtils.capitalize(message));
    			}
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    Your client.java should handle all of the chat icons dealing with your username in the chat area. If you search around for specific sprite id's of your icons then you'll find most likely something like what youre looking for. Base it off of that. I had a similar issue with the ClanChatManager as well when I was working on a service for someone using simplicity. For a fact, this is not on ruse v2, but all these ruse v1 bases that are simplicity or rune-unity definitely have that problem. It could be something simple, but i have no idea how to help you there. When I worked on that base I just spent some time choosing random numbers until i eventually came up with the sprite id's i needed. Like 612, 613, and 614 for sprites that were in the thousands. Really no idea

    Back to the chat icons though there are mutliple methods you have to add it to. If it's a gamemode or a rank, then essentially you have to assign it a specific value based on the enumerate you're using for the GameMode or PlayerRights class. They're all assigned linear so just go through the progression and assign that ordinal to the sprite id. Theres a few places, but shouldn't take you long.
    Reply With Quote  
     

  3. #3  
    Donator

    LionLF's Avatar
    Join Date
    Aug 2017
    Posts
    234
    Thanks given
    76
    Thanks received
    76
    Rep Power
    115
    Quote Originally Posted by Goody View Post
    Your client.java should handle all of the chat icons dealing with your username in the chat area. If you search around for specific sprite id's of your icons then you'll find most likely something like what youre looking for. Base it off of that. I had a similar issue with the ClanChatManager as well when I was working on a service for someone using simplicity. For a fact, this is not on ruse v2, but all these ruse v1 bases that are simplicity or rune-unity definitely have that problem. It could be something simple, but i have no idea how to help you there. When I worked on that base I just spent some time choosing random numbers until i eventually came up with the sprite id's i needed. Like 612, 613, and 614 for sprites that were in the thousands. Really no idea

    Back to the chat icons though there are mutliple methods you have to add it to. If it's a gamemode or a rank, then essentially you have to assign it a specific value based on the enumerate you're using for the GameMode or PlayerRights class. They're all assigned linear so just go through the progression and assign that ordinal to the sprite id. Theres a few places, but shouldn't take you long.
    yea i actually did find sprites i needed via typing ingame img=***
    but the issue is that everything looks good (clanchatmanager, stafflist, playersonline) - they are all working and are correct sprites. But general chat icons are still different, and tbh i can find anything related to any sprites on gameclient.java Like i got zero idea how tf i can change general chat icons. :x

    here is gameclient.java if someone wants to check ?

    https://ghostbin.com/paste/q3vxc
    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. Replies: 59
    Last Post: 07-15-2014, 06:05 PM
  2. Replies: 0
    Last Post: 12-07-2010, 05:09 AM
  3. My Custom Staff Chat Icons
    By Skiller Onmo in forum Graphics
    Replies: 10
    Last Post: 08-13-2010, 09:23 PM
  4. Clan chat icon
    By Love in forum Requests
    Replies: 2
    Last Post: 01-16-2010, 12:41 PM
  5. Replies: 27
    Last Post: 12-01-2009, 12:49 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
  •