Thread: 718 yell problem

Results 1 to 10 of 10
  1. #1 718 yell problem 
    Public Enemy #1

    Gynx's Avatar
    Join Date
    Oct 2013
    Age
    26
    Posts
    426
    Thanks given
    60
    Thanks received
    41
    Rep Power
    0
    I am having problems with the yell.....

    Forum Moderator and Extreme Donator yell doesn't work, but the regular chat shows the right crown/sign for the ranks..

    Here's the full yell code:

    Code:
    	public static void sendYell(Player player, String message,
    			boolean isStaffYell) {
    		if (player.getMuted() > Utils.currentTimeMillis()) {
    			player.getPackets().sendGameMessage(
    					"You temporary muted. Recheck in 48 hours.");
    			return;
    		}
    		if (player.getRights() < 2) {
    			String[] invalid = { "<euro", "<img", "<img=", "<col", "<col=",
    					"<shad", "<shad=", "<str>", "<u>" };
    			for (String s : invalid)
    				if (message.contains(s)) {
    					player.getPackets().sendGameMessage(
    							"You cannot add additional code to the message.");
    					return;
    				}
    		}
    		for (Player players : World.getPlayers()) {
    			if (players == null || !players.isRunning())
    				continue;
    			if (isStaffYell) {
    				if (players.getRights() > 10
    						|| players.getUsername().equalsIgnoreCase("zehro"))
    					players.getPackets().sendGameMessage(
    							"<col=ff0000>[UberScape Developer]</col><img=10> "
    									+ Utils.formatPlayerNameForDisplay(player
    											.getUsername()) + ": " + message
    									+ ".", true);
    				return;
    			}
    			if (player.getRights() == 10
    					&& player.getUsername().equalsIgnoreCase("")) {
    				players.getPackets().sendGameMessage(
    						"<col=ff0000>[Main Owner] <img=1>"
    								+ player.getDisplayName() + ": <col=ff0000>"
    								+ message + "</col>");
    			} else if (player.getRights() == 10
    					&& player.getUsername().equalsIgnoreCase("")) {
    				players.getPackets().sendGameMessage(
    						"[<col=736AFF>Cardgames on Motorcycles</col>] <img=1>"
    								+ player.getDisplayName() + ": <col=736AFF>"
    								+ message + "</col>");
    			} else if (player.getRights() == 10
    					&& player.getUsername().equalsIgnoreCase("")) {
    				players.getPackets().sendGameMessage(
    						"[<col=000000>Owner</col>] <img=10>"
    								+ player.getDisplayName() + ": <col=ff0000>"
    								+ message + "</col>");
    			
    			} else if (player.getRights() == 10
    					&& player.getUsername().equalsIgnoreCase("")) {
    				players.getPackets().sendGameMessage(
    						"[<col=000000>Leader</col>] <img=10>"
    								+ player.getDisplayName() + ": <col=000000>"
    								+ message + "</col>");
    			} else if (player.getRights() == 7
    					&& player.getUsername().equalsIgnoreCase("monica")) {
    				players.getPackets().sendGameMessage(
    						"[<col=00FF00>Sexy Owner</col>] <img=10>"
    								+ player.getDisplayName() + ": <col=00FF00>"
    								+ message + "");
    			} else if (player.getRights() == 2
    					&& player.getUsername().equalsIgnoreCase("")) {
    				players.getPackets().sendGameMessage(
    						"[<col=ff0000><img=1>Administrator</col>] <img=1>"
    								+ player.getDisplayName() + ": <col=ff0000>"
    								+ message + "</col>");
    			} else if (player.getRights() == 2
    					&& player.getUsername().equalsIgnoreCase("Monica")) {
    				players.getPackets().sendGameMessage(
    						"[<col=FF00FF>Owner</col>] <img=1>"
    								+ player.getDisplayName() + ": <col=FF00FF>"
    								+ message + "</col>");
    			} else if (player.getUsername().equalsIgnoreCase("")) {
    				World.sendWorldMessage("[<col="+(player.getYellColor() == "ff0000" || player.getYellColor() == null ? "ff0000" : player.getYellColor())+"><shad=000000>Game Developer</shad></col>]<img=1>"
    						+ player.getDisplayName()
    						+ ": <col="+(player.getYellColor() == "ff0000" || player.getYellColor() == null ? "ff0000" : player.getYellColor())+"><shad=000000>"
    						+ message + "", false);
    				return;
    			} else if (player.getRights() == 1) {
    
    				players.getPackets().sendGameMessage(
    						"[<col=347235>Mod</col>] <img=0>"
    								+ player.getDisplayName() + ": <col=347235>"
    								+ message + "</col>");
    			} else if (player.getUsername().equalsIgnoreCase("")) {
    				players.getPackets().sendGameMessage(
    						"[<col=347235>Supporter</col>]<img=6>"
    								+ player.getDisplayName() + ": <col=347235>"
    								+ message + "</col>");
    			} else if (player.isGraphicDesigner()) {
    				players.getPackets().sendGameMessage(
    						"[<col=3636708>Graphics Designer</col>]<img=9>"
    								+ player.getDisplayName() + ": <col=3636708>"
    								+ message + "</col>");
    
    			} else if (player.isSupporter()) {
    				players.getPackets().sendGameMessage(
    						"[<col=12516>Supporter</col>]<img=12>"
    								+ player.getDisplayName() + ": <col=12516>"
    								+ message + "</col>");
    			
    			} else if (player.isDonator()) {
    				players.getPackets().sendGameMessage(
    						"[<col=FF0000>Donator</col>]<img=11>"
    								+ player.getDisplayName() + ": <col=FF0000>"
    								+ message + "</col>");
    				
    			} else if (player.isForumModerator()) {
    				players.getPackets().sendGameMessage(
    						"[<col=32000>Forum Mod</col>]<img=10>"
    								+ player.getDisplayName() + ": <col=32000>"
    								+ message + "</col>");
    				
    			} else if (player.isExtremeDonator()) {
    				players.getPackets().sendGameMessage(
    						"[<col=20f2eb>Extreme Donator</col>]<img=4>"
    								+ player.getDisplayName() + ": <col=20f2eb>"
    								+ message + "</col>");
    			}
    		}
    	}


    Reply With Quote  
     

  2. #2  
    Hella Hard Homie


    Join Date
    Jan 2011
    Posts
    587
    Thanks given
    179
    Thanks received
    43
    Discord
    View profile
    Rep Power
    111
    In the yell command you should try using the player rights as a way to indicate which right players have, so instead of using
    Code:
    player.isForumModerator()
    Try using
    Code:
    player.getRights() == #
    (# being the rights number for forum mods)

    You could use isForumModerator, but I dont think that that value is used, for the regular chat the player.getRights() is used anyway, so why make another variable for it?
    [Only registered and activated users can see links. ]

    Quote Originally Posted by Winston Churchill
    "Success is the ability to go from one failure to another with no loss of enthusiasm"
    Austin still owes me $43
    Reply With Quote  
     

  3. #3  
    Public Enemy #1

    Gynx's Avatar
    Join Date
    Oct 2013
    Age
    26
    Posts
    426
    Thanks given
    60
    Thanks received
    41
    Rep Power
    0
    Quote Originally Posted by Aekramer View Post
    In the yell command you should try using the player rights as a way to indicate which right players have, so instead of using
    Code:
    player.isForumModerator()
    Try using
    Code:
    player.getRights() == #
    (# being the rights number for forum mods)

    You could use isForumModerator, but I dont think that that value is used, for the regular chat the player.getRights() is used anyway, so why make another variable for it?
    OK, this is how player.java is used:

    Code:
    	public int getRights() {
    		return rights;
    	}
    
    	public int getMessageIcon() {
    		return getRights() == 2 || getRights() == 1 ? getRights()
    				: isForumModerator() ? 10 : isGraphicDesigner() ? 9 : isSupporter() ? 12
    						: isExtremeDonator() ? 13 : isDonator() ? 11	
    								: getRights();
    	}
    So, I will do: player.getRights() == 10 for ForumModerator?


    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Jul 2012
    Age
    24
    Posts
    1,000
    Thanks given
    646
    Thanks received
    265
    Rep Power
    0
    Quote Originally Posted by Venom View Post
    OK, this is how player.java is used:

    Code:
    	public int getRights() {
    		return rights;
    	}
    
    	public int getMessageIcon() {
    		return getRights() == 2 || getRights() == 1 ? getRights()
    				: isForumModerator() ? 10 : isGraphicDesigner() ? 9 : isSupporter() ? 12
    						: isExtremeDonator() ? 13 : isDonator() ? 11	
    								: getRights();
    	}
    So, I will do: player.getRights() == 10 for ForumModerator?
    No, no you wont. Can you read what you posted a 2nd time?
    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    Aug 2013
    Posts
    187
    Thanks given
    65
    Thanks received
    10
    Rep Power
    36
    Quote Originally Posted by Venom View Post
    OK, this is how player.java is used:

    Code:
    	public int getRights() {
    		return rights;
    	}
    
    	public int getMessageIcon() {
    		return getRights() == 2 || getRights() == 1 ? getRights()
    				: isForumModerator() ? 10 : isGraphicDesigner() ? 9 : isSupporter() ? 12
    						: isExtremeDonator() ? 13 : isDonator() ? 11	
    								: getRights();
    	}
    So, I will do: player.getRights() == 10 for ForumModerator?
    No they're message Icons.

    Meaning that <img=10> will be infront of the ForumModerator In-game.

    So the string isForumModerator should work Lol. You tried using rightsmanager.java?
    Reply With Quote  
     

  6. #6  
    Public Enemy #1

    Gynx's Avatar
    Join Date
    Oct 2013
    Age
    26
    Posts
    426
    Thanks given
    60
    Thanks received
    41
    Rep Power
    0
    Stil lcannot figure out how to fix it.


    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Dec 2013
    Age
    23
    Posts
    316
    Thanks given
    26
    Thanks received
    47
    Rep Power
    31
    Try this.

    Code:
    public static void sendYell(Player player, String message, boolean staffYell) {
    		if (!player.isDonator() && !player.isExtremeDonator() && player.getRights() == 0 && !player.isSupporter() && !player.isGraphicDesigner())
    			return;
    		if (player.getMuted() > Utils.currentTimeMillis()) {
    			player.getPackets().sendGameMessage("You're temporarily muted, try again later.");
    			return;
    		}
    		if (staffYell) {
    			World.sendWorldMessage("[<col=58ACFA><shad=2E2EFE>Staff Yell</shad></col>] " + (player.getRights() > 1 ? "<img=1>" : (player.isSupporter() ? "": "<img=0>")) + player.getDisplayName() + ": <col=58ACFA><shad=2E2EFE>" + message + "</shad></col>", true);
    			return;
    		}
    		if(message.length() > 100) {
    			message = message.substring(0, 100);
    		}
    
    		if (player.getRights() < 2) {
    			String[] invalid = { "<euro", "<img", "<img=", "<col", "<col=", "<shad", "<shad=", "<str>", "<u>" };
    			for (String s : invalid)
    				if (message.contains(s)) {
    					player.getPackets().sendGameMessage("You cannot add additional code to the message.");
    					return;
    				}
    				
    			if ((!player.isDonator()) && (!player.isSupporter()) && (!player.isForumModerator()) && (!player.isGraphicDesigner()) && (player.getRights() == 0)) {
    				player.getPackets().sendGameMessage("You lack necessary privileges to use this command");
    				return;
    
    			} else if (player.getRights() == 1) {
    				World.sendWorldMessage("[<col=FFFFFF><shad=000000>Moderator</shad></col>] <img=0>" + player.getDisplayName() + ": <col=FFFFFF><shad=000000>" + message + "</shad></col>", false);
    				
    			} else if (player.isGraphicDesigner()) {
    				World.sendWorldMessage("[<img=9><col=00ACE6>Graphic Designer</shad></col>] <img=11>" + player.getDisplayName() + ": <col=00ACE6><shad=000000>" + message + "</shad></col>", false);
    
    			} else if (player.isSupporter() && player.getRights() == 0) {
    				World.sendWorldMessage("[<col=58ACFA><shad=2E2EFE>Support Team</shad></col>] <img=10>"+ player.getDisplayName() +": <col=58ACFA><shad=2E2EFE>"+ message + "</shad></col>", false);
    
    			} else if (player.isExtremeDonator() && player.getRights() == 0) {
    				World.sendWorldMessage("[<col=DB0000><shad=000000>Extreme Donator</shad></col>] <img=9>" + player.getDisplayName() + ": <col=DB0000><shad=000000>" + message + "</shad></col>", false);
    				
    			} else if(player.isDonator() && player.getRights() == 0) {
    				World.sendWorldMessage("[<col=02AB2F><shad=000000>Donator</shad></col>] <img=8>" + player.getDisplayName() + ": <col=02ab2f><shad=000000>" + message + "</shad></col>", false);
    				}
    			
    		} else if (player.getUsername().equalsIgnoreCase("archangel")) {
    			World.sendWorldMessage("[<col=782BED><shad=000000>Owner</shad></col>] <img=1>" + player.getDisplayName() + ": <col=782BED><shad=000000>" + message + "</shad></col>", false);
    			return;
    			
    		} else if (player.getUsername().equalsIgnoreCase("exiled")) {
    			World.sendWorldMessage("[<col=782BED><shad=000000>Co-Owner</shad></col>] <img=1>" + player.getDisplayName() + ": <col=782BED><shad=000000>" + message + "</shad></col>", false);
    			return;
    			
    		} else if (player.getRights() == 2) {
    			World.sendWorldMessage("[<col=FFFF00><shad=000000>Administrator</shad></col>] <img=1>" + player.getDisplayName() + ": <col=FFFF00><shad=000000>" + message + "</shad></col>", false);
    			return;
    		}
    	}
    You can just change the values for the colors and stuff if you'd like. Also the <img=> codes if they're not matching.
    Are you using Matrix or a different 718?
    Reply With Quote  
     

  8. #8  
    Public Enemy #1

    Gynx's Avatar
    Join Date
    Oct 2013
    Age
    26
    Posts
    426
    Thanks given
    60
    Thanks received
    41
    Rep Power
    0

    Still does it.
    IT changes the ingame chat, but not yell.


    Reply With Quote  
     

  9. #9  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    24
    Posts
    3,337
    Thanks given
    801
    Thanks received
    1,185
    Rep Power
    189
    Code:
    	public static void sendYell(Player player, String message) {
    		for (Player p2: World.getPlayers()) {
    			if (player.getUsername().equalsIgnoreCase("Jake")) {
    				p2.getPackets().sendGameMessage("[Owner/Coder]: "
    						+ "<img=1>"+player.getDisplayName()+": <col=00FF73>"
    						+message+"</col>");
    			} else if(player.getRights() == 2) {
    				p2.getPackets().sendGameMessage("[Administrator]: "
    						+ "<img=1>"+player.getDisplayName()+": <col=00FF73>"
    						+message+"</col>");
    			} else if(player.getRights() == 1) {
    				p2.getPackets().sendGameMessage("[Moderator]: "
    						+ "<img=0>"+player.getDisplayName()+": <col=C000FF>"
    						+message+"</col>");
    			} else if(player.isSupporter() && player.getRights() == 0) {
    				p2.getPackets().sendGameMessage("[Support]: "
    						+ "<img=6>"+player.getDisplayName()+": <col=8D38C9>"
    						+message+"</col>");
    			} else if(player.isForumModerator() && player.getRights() == 0) {
    						p2.getPackets().sendGameMessage("[Forum Moderator]: "
    								+ "<img=6>"+player.getDisplayName()+": <col=8D38C9>"
    								+message+"</col>");
    			} else if(player.isExtremeDonator() && player.getRights() == 0) {
    				p2.getPackets().sendGameMessage("[Extreme Donator]: "
    						+ "<img=11>"+player.getDisplayName()+": <col=C000FF>"
    						+message+"</col>");
    			} else if(player.isDonator() && player.getRights() == 0) {
    				p2.getPackets().sendGameMessage("[Donator]: "
    						+ "<img=8>"+player.getDisplayName()+": <col=C000FF>"
    						+message+"</col>");
    			} else {
    				p2.getPackets().sendGameMessage("[Player]: "
    						+ player.getDisplayName()+": <col=00ABFF>"
    						+message+"</col>");
    			}
    		}
    	}

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Dec 2013
    Age
    23
    Posts
    316
    Thanks given
    26
    Thanks received
    47
    Rep Power
    31
    I'm assuming you're using matrix then. Go to Player.java and look for this:

    Code:
    public int getMessageIcon() {
    In the yell command I gave you, change whatever the <img=#> is to the number corresponding here.

    For instance, mine is <img=8> for donator, and <img=9> for extreme donator, because my icons are as follows.

    Code:
    return getRights() == 2 || getRights() == 1 ? getRights() : isSupporter() ? 10 : isGraphicDesigner() ? 9 : isForumModerator() ? 11 : isExtremeDonator() ? 9 : isDonator() ? 8 : getRights();
    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. Yell Problem
    By Xynasty in forum Help
    Replies: 5
    Last Post: 03-06-2011, 12:17 AM
  2. Yell Problem [508] [Rep++]
    By iobpkbarrage in forum Help
    Replies: 10
    Last Post: 02-26-2011, 03:00 PM
  3. [562] Yell problem Pls help
    By Tony12 in forum Help
    Replies: 3
    Last Post: 12-30-2010, 12:33 AM
  4. ::yell problem z525
    By lt gangster in forum Help
    Replies: 4
    Last Post: 08-25-2010, 01:50 AM
  5. yell problem z525
    By lt gangster in forum Help
    Replies: 2
    Last Post: 08-09-2010, 07:53 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
  •