Thread: Invisible Character Command

Results 1 to 5 of 5
  1. #1 Invisible Character Command 
    Banned
    Join Date
    Jan 2015
    Posts
    198
    Thanks given
    8
    Thanks received
    5
    Rep Power
    0
    How would I make a command to set myself invisible so no other players would be able to see me? Like when a character is in a tutorial you hover around the locations where the tutorial goes but no other player can see you there. I think it would be a neat feature to monitor the server.
    Reply With Quote  
     

  2. #2  
    Celestial - Founder
    Classic's Avatar
    Join Date
    Nov 2014
    Posts
    233
    Thanks given
    119
    Thanks received
    47
    Rep Power
    39
    It really isn't that difficult.

    Code:
    case "hide":
    				if (player.getControlerManager().getControler() != null) {
    					player.getPackets().sendGameMessage("You cannot hide in a public event!");
    					return true;
    				}
    				player.getAppearence().switchHidden();
    				player.getPackets().sendGameMessage("Hidden? " + player.getAppearence().isHidden());
    				return true;
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Jan 2015
    Posts
    198
    Thanks given
    8
    Thanks received
    5
    Rep Power
    0
    Quote Originally Posted by Limbo_ View Post
    It really isn't that difficult.

    Code:
    case "hide":
    				if (player.getControlerManager().getControler() != null) {
    					player.getPackets().sendGameMessage("You cannot hide in a public event!");
    					return true;
    				}
    				player.getAppearence().switchHidden();
    				player.getPackets().sendGameMessage("Hidden? " + player.getAppearence().isHidden());
    				return true;
    How would I make that into PI based? Sorry im new but im trying to learn better conventions.
    Reply With Quote  
     

  4. #4  
    Celestial - Founder
    Classic's Avatar
    Join Date
    Nov 2014
    Posts
    233
    Thanks given
    119
    Thanks received
    47
    Rep Power
    39
    Quote Originally Posted by OneCrazyPanda View Post
    How would I make that into PI based? Sorry im new but im trying to learn better conventions.
    Here is something simple for pi based:

    Code:
    if (playerCommand.equalsIgnoreCase("i")) {
    			c.npcId2 = 8254;
    			c.isNpc = true;
    			c.updateRequired = true;
    			c.setAppearanceUpdateRequired(true);
    			c.sendMessage("Rogue mode activated!");
    		}
    		if (playerCommand.equalsIgnoreCase("u")) {
    			c.isNpc = false;
    			c.updateRequired = true;
    			c.appearanceUpdateRequired = true;
    			c.sendMessage("Rogue mode disabled!");
    		}
    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    Oct 2014
    Posts
    587
    Thanks given
    29
    Thanks received
    76
    Rep Power
    26
    Modify the player updating to not update players that have the boolean isVisible set to false.

    Thats the best way to achieve a true invisible character, using invalid npcs would still show you on the minimap.
    Programming service - Fast, Cheap & Quality
    http://www.rune-server.org/black-mar...-services.html

    Project that I am currently working on:
    http://www.rune-server.org/runescape...emon-rsps.html

    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. Moonlight Invisible character?
    By IngeniousPentaSquid in forum Help
    Replies: 1
    Last Post: 10-08-2011, 11:02 PM
  2. invisible characters
    By Shmoopy in forum Help
    Replies: 0
    Last Post: 08-25-2011, 12:06 AM
  3. Azure - Invisible Character
    By Username Here in forum Help
    Replies: 15
    Last Post: 07-28-2011, 11:44 PM
  4. [PI] Invisible Characters [PI]
    By Redeeemer in forum Help
    Replies: 1
    Last Post: 07-22-2010, 02:16 AM
  5. Ghost or 99% Invisible FUN COMMAND!
    By LunarKnight in forum Tutorials
    Replies: 33
    Last Post: 01-19-2009, 05:24 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
  •