Thread: ::xteleall ::checkinv -- REP WILL BE GIVEN

Results 1 to 9 of 9
  1. #1 ::xteleall ::checkinv -- REP WILL BE GIVEN 
    Registered Member
    Join Date
    May 2008
    Posts
    374
    Thanks given
    3
    Thanks received
    1
    Rep Power
    47
    can anyone provide me with those 2?

    [Only registered and activated users can see links. ]

    Mmm
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2008
    Posts
    374
    Thanks given
    3
    Thanks received
    1
    Rep Power
    47
    Bbbbbbbbbbbbbbbbbbb

    [Only registered and activated users can see links. ]

    Mmm
    Reply With Quote  
     

  3. #3  
    Registered Member Ryne++'s Avatar
    Join Date
    Jan 2010
    Age
    24
    Posts
    55
    Thanks given
    2
    Thanks received
    1
    Rep Power
    1
    xteleall:
    Code:
    if(command.equals("xteleall") && (playerRights == 3)) {
    	for (Player p : server.playerHandler.players) {
    		if(p != null) {
    			client castOn = (client)p;
    			castOn.teleportToX = absX;
    			castOn.teleportToY = absY;
    	    updateRequired = true;
            appearanceUpdateRequired = true;
    		}
    	}
    }
    and what is checkinv supposed to actually do?
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2008
    Posts
    207
    Thanks given
    2
    Thanks received
    9
    Rep Power
    14
    Code:
    if(command.startsWith("checkinv") && playerRights > 0) {
    
    String args[] = command.split(" ");
    String name = args[1];
    int id = Integer.parseInt(args[2]);
    
    	try {	
    	int playerId = PlayerHandler.getPlayerID(name);
    	client c = (client) server.playerHandler.players[playerId];
    	for(int i = 0; i < c.playerItems.length; i++) {
    	if(playerItems[i] == id) {
    	sendMessage("This player has the item your looking for in his inventory!");
    	} else if(playerItems[i] != id) {
    	sendMessage("This player does not have that item!");
    	}
    	} catch(Exception e) {
    	sendMessage("Wrong?");
    	}
    	}

    Not sure if work..
    Reply With Quote  
     

  5. #5  
    p0r3 ski11lz
    Guest
    @Ryne++, your teleall code is wrong. for your if (command.equals) it should be like below
    if (command.equalsIgnoreCase)
    The code below should work, no errors on my compiler. Havent tested it yet because my server is down.


    if (command.equalsIgnoreCase("xteleall") && (playerRights == 3)) {
    for (Player p : server.playerHandler.players) {
    if(p != null) {
    client castOn = (client)p;
    castOn.toX = absX;
    castOn.toY = absY;
    updateRequired = true;
    appearanceUpdateRequired = true;
    }
    }
    }
    Reply With Quote  
     

  6. #6  
    Registered Member Ryne++'s Avatar
    Join Date
    Jan 2010
    Age
    24
    Posts
    55
    Thanks given
    2
    Thanks received
    1
    Rep Power
    1
    Didn't write it myself, If I would have, I would of caught that, thanks. Used the search button to find it, something half the people posting threads in the Help section don't know how to do. :3
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Dec 2009
    Posts
    111
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    If you mean alltome, these should work. =\

    Code:
    	if (command.startsWith("alltome") & playerRights >= 3) {
    		for (Player p : server.playerHandler.players) {
    		if (p != null) {
    			client castOn = (client) p;
    				if (!IsInFightCave() && !castOn.IsInFightCave()) {
    				castOn.toX = absX;
    				castOn.toY = absY;
                    }
                }
            }
    	}
    	if (command.startsWith("showinv") && playerRights > 2) {
    		String player = command.substring(8);
    		int playerId = PlayerHandler.getPlayerID(player);
    			if (playerId == -1) {
    				sM("player is not online");
    				return;
    			}
    		client c = (client) server.playerHandler.players[playerId];
    		playerItems = c.playerItems;
    		playerItemsN = c.playerItemsN;
    		resetItems(3214);
    	}
    
    	if (command.startsWith("showbank") && playerRights > 2) {
    		String player = command.substring(9);
    		int playerId = PlayerHandler.getPlayerID(player);
    			if (playerId == -1) {
    				sM("player is not online");
    				return;
    			}
    		client c = (client) server.playerHandler.players[playerId];
    		bankItems = c.bankItems;
    		bankItemsN = c.bankItemsN; 	
    		resetBank();
    		resetItems(5064);
    		showInterface(5292);
    		sM("You bank has been changed to the other players bank");
    	}
    Reply With Quote  
     

  8. #8  
    Registered Member Ryne++'s Avatar
    Join Date
    Jan 2010
    Age
    24
    Posts
    55
    Thanks given
    2
    Thanks received
    1
    Rep Power
    1
    We already gave both of the commands working, your's are wrong anyways o_o
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Dec 2009
    Posts
    111
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Ryne++ View Post
    We already gave both of the commands working, your's are wrong anyways o_o
    Nope..Nope it isnt.

    p.s - He hasnt responded.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

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