Thread: New custom yell system for dementhium 637/639

Results 1 to 9 of 9
  1. #1 New custom yell system for dementhium 637/639 
    Banned

    Join Date
    Mar 2012
    Posts
    503
    Thanks given
    142
    Thanks received
    93
    Rep Power
    0
    In commands.java replace your current "yell" command with:

    }

    public static void donorCommands(final Player player, String[] command) {
    if (command[0].equalsIgnoreCase("yell")) {
    String yell = getCompleteString(command, 1);
    for (Player pl : World.getWorld().getPlayers()) {
    if (player.getRights() == 1) {
    pl.sendMessage("<col=0000A0>[<img=0>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][Moderator]: <col=0000A0>" + yell);
    } else if (player.getUsername().equalsIgnoreCase("")) {
    pl.sendMessage("<col=D462FF>[Community Manager]"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][Forum Administrator]: <col=FE0013>" + yell);
    } else if (player.getUsername().equalsIgnoreCase("telopya")) {
    pl.sendMessage("<col=023E81>[<img=1>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][Developer]: <col=023E81>" + yell);
    } else if (player.getUsername().equalsIgnoreCase("jawsy")) {
    pl.sendMessage("<col=F778A1>[<>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][Community Manager]: <col=F778A1>" + yell);
    } else if (player.getUsername().equalsIgnoreCase("anonymous" )) {
    pl.sendMessage("<col=F778A1>[<>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][<img=2>Administrator]: <col=F778A1>" + yell);
    } else if (player.getRights() == 2) {
    pl.sendMessage("<col=C11B17>[<img=2>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][<img=2>Head Owner]: <col=790000>" + yell);
    } else if (player.getUsername().equalsIgnoreCase("hello world")) {
    pl.sendMessage("<col=41A317>[<img=2>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][Donator]: <col=41A317>" + yell);
    } else if (World.getWorld().getPunishHandler().isMuted(playe r)) {
    player.sendMessage("You are muted and cant use yell!");
    return;
    } else if (player.getDonor() == 1) {
    pl.sendMessage("<col=41A317>[<img=2>"
    + Misc.formatPlayerNameForDisplay(player.getUsername ())
    + "][Donator]: <col=41A317>" + yell);
    }
    }
    }
    You can edit the usernames and titles to your preference.


    Credits:
    Yup im orel: 99% - for giving this to me.
    Me: 1% - for releasing.
    Reply With Quote  
     

  2. #2  
    The Illest

    iitzTyson's Avatar
    Join Date
    May 2010
    Posts
    1,164
    Thanks given
    345
    Thanks received
    73
    Rep Power
    103
    wtf is that shit
    Reply With Quote  
     

  3. Thankful users:


  4. #3  
    The One & Only

    Norcotic's Avatar
    Join Date
    Jul 2011
    Age
    28
    Posts
    2,314
    Thanks given
    413
    Thanks received
    284
    Rep Power
    1270
    its the same yell in dementhium with some titles....
    Reply With Quote  
     

  5. #4  
    Extreme Donator


    Join Date
    Nov 2011
    Posts
    796
    Thanks given
    217
    Thanks received
    137
    Rep Power
    181
    Lol clusterfuck of code
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Mar 2012
    Posts
    503
    Thanks given
    142
    Thanks received
    93
    Rep Power
    0
    Quote Originally Posted by Sil3nce View Post
    wtf is that shit
    Fuck you
    Reply With Quote  
     

  7. #6  
    Renown Programmer

    Nikki's Avatar
    Join Date
    Aug 2008
    Posts
    3,993
    Thanks given
    553
    Thanks received
    1,077
    Rep Power
    5000
    1. Format the message before you send it, it'll save time spent constructing it
    2. Use correct indentation...
    3. That looks horrible
    4. You're formatting the name every time, format it once at least and leave it in.

    A better version (Don't yell at me because it's not done, if it doesn't work due to some random error fix it)
    Code:
    	private static final String MODERATOR_FORMAT = "<col=0000A0>[<img=0>%s][Moderator]: <col=0000A0>%s";
    	private static final String ADMINISTRATOR_FORMAT = "<col=C11B17>[<img=2>%s][<img=2>Head Owner]: <col=790000>%s";
    	public static void donorCommands(final Player player, String[] command) {
    		if (command[0].equalsIgnoreCase("yell")) {
    			String yell = getCompleteString(command, 1);
    			String playerName = Misc.formatPlayerNameForDisplay(player.getUsername());
    			String message = "["+Misc.formatPlayerNameForDisplay(player.getUsername())+"]: " + yell;
    			//TODO add all your message formats here..
    			if(player.getRights() == 1) {
    				message = String.format(MODERATOR_FORMAT, playerName, yell);
    			} else if(player.getRights() == 2) {
    				message = String.format(ADMINISTRATOR_FORMAT, playerName, yell);
    			}
    			for (Player pl : World.getWorld().getPlayers()) {
    				pl.sendMessage(message);
    			}
    		}
    	}
    Please don't add/pm me asking for RSPS help!

    Links:
    - [Only registered and activated users can see links. ]
    - [Only registered and activated users can see links. ]

    Reply With Quote  
     

  8. #7  
    Registered Member Own4g3's Avatar
    Join Date
    Mar 2011
    Age
    26
    Posts
    359
    Thanks given
    97
    Thanks received
    132
    Rep Power
    38
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #8  
    Banned

    Join Date
    Mar 2012
    Posts
    503
    Thanks given
    142
    Thanks received
    93
    Rep Power
    0
    Quote Originally Posted by Nikki View Post
    1. Format the message before you send it, it'll save time spent constructing it
    2. Use correct indentation...
    3. That looks horrible
    4. You're formatting the name every time, format it once at least and leave it in.

    A better version (Don't yell at me because it's not done, if it doesn't work due to some random error fix it)
    Code:
    	private static final String MODERATOR_FORMAT = "<col=0000A0>[<img=0>%s][Moderator]: <col=0000A0>%s";
    	private static final String ADMINISTRATOR_FORMAT = "<col=C11B17>[<img=2>%s][<img=2>Head Owner]: <col=790000>%s";
    	public static void donorCommands(final Player player, String[] command) {
    		if (command[0].equalsIgnoreCase("yell")) {
    			String yell = getCompleteString(command, 1);
    			String playerName = Misc.formatPlayerNameForDisplay(player.getUsername());
    			String message = "["+Misc.formatPlayerNameForDisplay(player.getUsername())+"]: " + yell;
    			//TODO add all your message formats here..
    			if(player.getRights() == 1) {
    				message = String.format(MODERATOR_FORMAT, playerName, yell);
    			} else if(player.getRights() == 2) {
    				message = String.format(ADMINISTRATOR_FORMAT, playerName, yell);
    			}
    			for (Player pl : World.getWorld().getPlayers()) {
    				pl.sendMessage(message);
    			}
    		}
    	}
    Like I said, a friend gave this to me, but thanks, I'll try this out.
    Reply With Quote  
     

  10. #9  
    « TurmoilFTW »
    Defiled''s Avatar
    Join Date
    Mar 2012
    Age
    27
    Posts
    751
    Thanks given
    181
    Thanks received
    156
    Rep Power
    8
    lol pile of shit over another pile of shit = shit shit
    DestructionPK Project
    Skype: defiledx1

    BYE BYE RSPS!


    SELLING SERVICES ATM ADD MY SKYPE IF INTERESTED!
    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: 10
    Last Post: 07-04-2012, 11:11 PM
  2. [637/639] yell system help
    By Invalid User in forum Help
    Replies: 1
    Last Post: 04-12-2012, 09:32 PM
  3. [637/639]Dementhium Custom Titles[637/639]
    By nbness2 in forum Snippets
    Replies: 6
    Last Post: 03-10-2012, 03:42 AM
  4. Replies: 13
    Last Post: 02-28-2012, 11:15 PM
  5. Replies: 1
    Last Post: 01-25-2012, 05:15 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
  •