Thread: [PI] Bank command

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 [PI] Bank command 
    WebDeveloper
    Charlie''s Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    577
    Thanks given
    37
    Thanks received
    27
    Rep Power
    10
    i need my bank command to not work in wildy, during a duel, and in fight caves. i can make it not let you bank during them spots but it doesn't work out of them spots either. Here is the command i use

    Code:
    			if (playerCommand.startsWith("bank") && c.playerRights >= 1) {
    				c.getPA().sendFrame126("Bank of BloodyRune", 5292);
    				if(c.duelStatus == 5){
    					c.sendMessage("You can't Bank during a duel!");
    				if(c.inFightCaves()){
    					c.sendMessage("You can't Bank during this minigame!");
    				if(c.inWild() && !c.safeZone()){
    				c.sendMessage("You can't bank in the wilderness!");
    				} else if(c.inWild() == false && c.inFightCaves() == false){
    								c.getPA().openUpBank();
    					}
    				}
    			}
    		}

    Reply With Quote  
     

  2. #2  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    why you're synchronizing this command?
    Reply With Quote  
     

  3. #3  
    WebDeveloper
    Charlie''s Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    577
    Thanks given
    37
    Thanks received
    27
    Rep Power
    10
    anyone see anything im doing wrong?

    Reply With Quote  
     

  4. #4  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    Code:
    if (playerCommand.startsWith("bank") && c.playerRights >= 1) {
    				
    				if(c.duelStatus == 5)
    return;
    					
    				if(c.inFightCaves())
    return;
    					
    				if(c.inWild() && !c.safeZone())
    return;
    				
    				c.getPA().sendFrame126("Bank of BloodyRune", 5292);
    								c.getPA().openUpBank();
    					}
    Reply With Quote  
     

  5. #5  
    WebDeveloper
    Charlie''s Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    577
    Thanks given
    37
    Thanks received
    27
    Rep Power
    10
    Quote Originally Posted by Jaba View Post
    Code:
    if (playerCommand.startsWith("bank") && c.playerRights >= 1) {
    				
    				if(c.duelStatus == 5)
    return;
    					
    				if(c.inFightCaves())
    return;
    					
    				if(c.inWild() && !c.safeZone())
    return;
    				
    				c.getPA().sendFrame126("Bank of BloodyRune", 5292);
    								c.getPA().openUpBank();
    					}


    Code:
    src\server\model\players\packets\Commands.java:400: unreachable statement
                                    if(c.inFightCaves())
                                    ^
    src\server\model\players\packets\Commands.java:403: unreachable statement
                                    if(c.inWild() && !c.safeZone())
                                    ^
    src\server\model\players\packets\Commands.java:406: unreachable statement
                                                                    c.getPA().sendFr
    ame126("Bank of BloodyRune", 5292);
                                                                    ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    3 errors
    Press any key to continue . . .

    Reply With Quote  
     

  6. #6  
    Kacey
    I Am Kacey's Avatar
    Join Date
    May 2011
    Posts
    738
    Thanks given
    243
    Thanks received
    56
    Rep Power
    19
    Thank Me please

    if (playerCommand.startsWith("bank") && c.playerRights >= 1) {
    c.getPA().sendFrame126("Bank of BloodyRune", 5292);
    if(c.duelStatus == 5){
    c.sendMessage("You can't Bank during a duel!");
    }
    if(c.inFightCaves()){
    c.sendMessage("You can't Bank during this minigame!");
    }
    if (!c.inWild()) {
    c.getPA().openUpBank();
    } else {
    c.sendMessage("You can't use that in the PvP zone!");
    }
    }
    Nothing But Love
    Attached image
    Reply With Quote  
     

  7. Thankful user:


  8. #7  
    WebDeveloper
    Charlie''s Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    577
    Thanks given
    37
    Thanks received
    27
    Rep Power
    10
    thanks man

    Reply With Quote  
     

  9. #8  
    WebDeveloper
    Charlie''s Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    577
    Thanks given
    37
    Thanks received
    27
    Rep Power
    10
    ok well i have a ::home and i took what kacey did above and added that to my ::home command, it says "You cant Teleport during a duel" then about 2-3 seconds later teleports me home here is my command..

    Code:
    						 if	(playerCommand.equals("home"))	{
    if(c.duelStatus == 5) {
    c.sendMessage("You can't teleport during a duel!");
    }
    if(c.inFightCaves()) {
    c.sendMessage("You can't teleport during this minigame!");
    }
    if (!c.inWild()) {
    c.getPA().movePlayer(3354, 3342, 0);
    } else {
    c.sendMessage("You can't use that in the PvP zone!");
    						}
    					}

    Reply With Quote  
     

  10. #9  
    Extreme Donator


    Join Date
    Feb 2009
    Posts
    361
    Thanks given
    53
    Thanks received
    85
    Rep Power
    177
    Code:
    						 if	(playerCommand.equals("home"))	{
    if(c.duelStatus == 5) {
    c.sendMessage("You can't teleport during a duel!");
    return;
    }
    if(c.inFightCaves()) {
    c.sendMessage("You can't teleport during this minigame!");
    return;
    }
    if (!c.inWild()) {
    c.getPA().movePlayer(3354, 3342, 0);
    } else {
    c.sendMessage("You can't use that in the PvP zone!");
    }
    }
    Reply With Quote  
     

  11. Thankful user:


  12. #10  
    Registered Member
    Join Date
    Jun 2011
    Posts
    476
    Thanks given
    57
    Thanks received
    43
    Rep Power
    17
    Code:
    if (playerCommand.startsWith("home")) {
    	if(c.duelStatus == 5) {
    		c.sendMessage("You can't teleport during a duel!");
    	} else {
    		if(c.inFightCaves()) {
    			c.sendMessage("You can't teleport during this minigame!");
    		} else {
    			if(!c.inWild()) {
    				c.getPA().movePlayer(3354, 3342, 0);
    			} else {
    				c.sendMessage("You can't teleport in the wilderness!");
    			}
    		}
    	}
    }
    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. [PI] Bank Command
    By Matt in forum Help
    Replies: 8
    Last Post: 06-28-2015, 08:02 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
  •