Thread: Making So There Are No Commands In A Minigame!

Results 1 to 5 of 5
  1. #1 Making So There Are No Commands In A Minigame! 
    Registered Member
    Pride's Avatar
    Join Date
    Mar 2008
    Posts
    727
    Thanks given
    0
    Thanks received
    1
    Rep Power
    121
    For Czar Owners Only!

    Purpose: Making It So You Can't Use Commands In A Minigame:

    Difficulty: Depends....

    Assumed knowledge: None Really

    Tested Server: Czar

    Class Modified: Client.java

    Okay, First Do The Step 2 Of This Tut:
    [Only registered and activated users can see links. ]
    Right up to adding the void and making you're Boolean
    Once you have made the boolean here's how we'll use it:

    We Have To Make It So When You Are In The Area, You Cannot use Commands:
    Find:
    Code:
    command.trim
    You Should See this:
    Code:
    	public void  customCommand(String command) {
    		actionAmount++;
    
    command.replaceAll("no-ip", "im***");
    command.replaceAll("servegame", "im***");
    command.trim();
    
    if (command.startsWith...
    Okay, Above
    Code:
    if (command.startsWith
    Add:
    Code:
    	if(isinHell() == false) {
    Now Find The End Of You're Command Void And Before The Last }
    Add this:
    Code:
    } else {
    	sendMessage("You Are In Hell And Cannot Use Commands Or Teleports");
    	}
    And There You Have it, No more Commands In You're Minigame!

    PS:You Can Make It For The Wilderness Aswell:
    Replace the Line:
    Code:
    if(isinHell() == false) {
    With:
    Code:
    if ((IsInWilderness = false) || ((IsInWilderness = true) && (nonWild())) || playerRights >= 3) {
    PSS: You Can Always Add Commands That You Want to be used in the minigame ABOVE The
    Code:
    if(IsInHell...
    Line
     

  2. #2  
    Registered Member
    Join Date
    Jan 2008
    Posts
    314
    Thanks given
    0
    Thanks received
    3
    Rep Power
    18
    That could be useful for castle wars thanks for this.
     

  3. #3  
    Registered Member
    Pride's Avatar
    Join Date
    Mar 2008
    Posts
    727
    Thanks given
    0
    Thanks received
    1
    Rep Power
    121
    No Problem!
     

  4. #4  
    Registered Member
    Pride's Avatar
    Join Date
    Mar 2008
    Posts
    727
    Thanks given
    0
    Thanks received
    1
    Rep Power
    121
    Anyone Need?
     

  5. #5  
    Registered Member
    Join Date
    Nov 2007
    Age
    27
    Posts
    517
    Thanks given
    1
    Thanks received
    3
    Rep Power
    73
    You could edit the command packet to do this as well.


    Your way isn't bad though.
    Spoiler for Show GIFs:

     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •