Thread: Changepass Command All lowercase

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Changepass Command All lowercase 
    Scrub Lord
    _Will's Avatar
    Join Date
    Aug 2012
    Posts
    537
    Thanks given
    60
    Thanks received
    61
    Rep Power
    34
    Figured out the problem. Gonna try to fix myself. Since you guys are not gonna help me.
    Reply With Quote  
     

  2. #2  
    *breaks walking*

    Cody_'s Avatar
    Join Date
    Dec 2010
    Posts
    732
    Thanks given
    219
    Thanks received
    203
    Rep Power
    286
    Okay cool, my reply got deleted....

    Check either Encrypt.encryptSHA1, or processCommand.
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    String[] cmd = command.toLowerCase().split(" ");
    Reply With Quote  
     

  4. #4  
    Scrub Lord
    _Will's Avatar
    Join Date
    Aug 2012
    Posts
    537
    Thanks given
    60
    Thanks received
    61
    Rep Power
    34
    Quote Originally Posted by Codykins View Post
    Okay cool, my reply got deleted....

    Check either Encrypt.encryptSHA1, or processCommand.
    the Encrypt class doesn't change it to lowercase. Seeing that it send the "cmd[1]" witch is lowercase in a game message.

    Quote Originally Posted by Mayne View Post
    String[] cmd = command.toLowerCase().split(" ");
    What do you want me to do with that?
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    "the changepass command changes the players password to all lowercase letters"

    "cmd[1])"

    "String[] cmd = command.toLowerCase().split(" ");"
    Reply With Quote  
     

  6. #6  
    Scrub Lord
    _Will's Avatar
    Join Date
    Aug 2012
    Posts
    537
    Thanks given
    60
    Thanks received
    61
    Rep Power
    34
    Quote Originally Posted by Mayne View Post
    "the changepass command changes the players password to all lowercase letters"

    "cmd[1])"

    "String[] cmd = command.toLowerCase().split(" ");"
    Your absolutely giving me no help. Can you even talk? Like wtf does qoutes do to help a person. I ask you a question and you just told me the same exact thing. Just leave if your not gonna help.
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Oct 2012
    Posts
    1,461
    Thanks given
    560
    Thanks received
    323
    Rep Power
    122
    Code:
    	public static String getCompleteString(String[] commands, int start) {
    		StringBuilder sb = new StringBuilder();
    		for (int i = start; i < commands.length; i++) {
    			if (i == start) {
    				sb.append(commands[i]);
    				continue;
    			}
    			sb.append(" " + commands[i]);
    		}
    		return sb.toString();
    	}
    Usage :

    Code:
    String passwordToSet = getCompleteString(command, 1).substring(0, getCompleteString(command, 1).length());
    Use your Encrypt class to encrypt it.

    Hope this helped. I used this in the "itemid" command where players would simple do ;;itemid Abyssal whip, if they however wrote "abyssal whip" it wouldn't be able to retrieve it from the item definition because the item definition has the dumped names exact from the cache so using the exact string for the item name would result in retrieving the correct item.

    “I have not failed. I've just found 10,000 ways that won't work.”
    ― Thomas A. Edison


    Attached image


    Reply With Quote  
     

  8. #8  
    Scrub Lord
    _Will's Avatar
    Join Date
    Aug 2012
    Posts
    537
    Thanks given
    60
    Thanks received
    61
    Rep Power
    34
    Quote Originally Posted by Magnito View Post
    Code:
    	public static String getCompleteString(String[] commands, int start) {
    		StringBuilder sb = new StringBuilder();
    		for (int i = start; i < commands.length; i++) {
    			if (i == start) {
    				sb.append(commands[i]);
    				continue;
    			}
    			sb.append(" " + commands[i]);
    		}
    		return sb.toString();
    	}
    Usage :

    Code:
    String passwordToSet = getCompleteString(command, 1).substring(0, getCompleteString(command, 1).length());
    Use your Encrypt class to encrypt it.

    Hope this helped. I used this in the "itemid" command where players would simple do ;;itemid Abyssal whip, if they however wrote "abyssal whip" it wouldn't be able to retrieve it from the item definition because the item definition has the dumped names exact from the cache so using the exact string for the item name would result in retrieving the correct item.
    I appreciate your help but, I tried using the method in the command but processCommand method still turns it lowercase.
    Reply With Quote  
     

  9. #9  
    Scrub Lord
    _Will's Avatar
    Join Date
    Aug 2012
    Posts
    537
    Thanks given
    60
    Thanks received
    61
    Rep Power
    34
    bump
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jan 2013
    Posts
    610
    Thanks given
    292
    Thanks received
    120
    Rep Power
    39
    Quote Originally Posted by _Will View Post
    Your absolutely giving me no help. Can you even talk? Like wtf does qoutes do to help a person. I ask you a question and you just told me the same exact thing. Just leave if your not gonna help.
    He was actually helping you, but since you're an obvious novice in java, you didn't understand what he was trying to tell you.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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: 2
    Last Post: 04-20-2014, 11:34 PM
  2. [508 Bulby]changepass command[508
    By kingprince50 in forum Tutorials
    Replies: 4
    Last Post: 08-23-2009, 06:46 PM
  3. ::players command that you see all player names
    By pkownage135 in forum Requests
    Replies: 3
    Last Post: 02-14-2009, 07:47 PM
  4. One Command, Cache All Models.
    By TrollCount++ in forum Requests
    Replies: 9
    Last Post: 06-30-2008, 06:14 AM
  5. Making All Commands [Explained]
    By JakobWolthers in forum Tutorials
    Replies: 8
    Last Post: 02-03-2008, 12:18 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
  •