Thread: [Vencillio] Help with a few things.

Results 1 to 7 of 7
  1. #1 [Vencillio] Help with a few things. 
    Registered Member mauler320's Avatar
    Join Date
    Mar 2012
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    How do I spawn in a NPC?
    How can I make doors/ladders work?

    I know these are some of the simplest things, but for some reason I can't figure it out myself.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2012
    Posts
    4,716
    Thanks given
    1,682
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by mauler320 View Post
    How do I spawn in a NPC?
    How can I make doors/ladders work?

    I know these are some of the simplest things, but for some reason I can't figure it out myself.
    Code:
    /*
    			 * Command changes player into a NPC
    			 */
    		case "pnpc":
    			short npc = parser.nextShort();
    			NpcDefinition npcDef = GameDefinitionLoader.getNpcDefinition(npc);
    
    			if (npcDef == null && npc != -1) {
    				player.send(new SendMessage("The npc id (" + npc + ") does not exist."));
    				return true;
    			}
    
    			player.setNpcAppearanceId(npc);
    			player.setAppearanceUpdateRequired(true);
    			if (npc == -1) {
    				player.getAnimations().setWalkEmote(819);
    				player.getAnimations().setRunEmote(824);
    				player.getAnimations().setStandEmote(808);
    				player.getAnimations().setTurn180Emote(820);
    				player.getAnimations().setTurn90CCWEmote(822);
    				player.getAnimations().setTurn90CWEmote(821);
    				player.send(new SendMessage("You reset your appearance."));
    			} else {
    				player.getAnimations().setWalkEmote(npcDef.getWalkAnimation());
    				player.getAnimations().setRunEmote(npcDef.getWalkAnimation());
    				player.getAnimations().setStandEmote(npcDef.getStandAnimation());
    				player.getAnimations().setTurn180Emote(npcDef.getTurn180Animation());
    				player.getAnimations().setTurn90CCWEmote(npcDef.getTurn90CCWAnimation());
    				player.getAnimations().setTurn90CWEmote(npcDef.getTurn90CWAnimation());
    				player.send(new SendMessage("You have turned into: \'" + npcDef.getName() + "\' (Id: " + npc + ", Size: " + npcDef.getSize() + ")."));
    			}
    			return true;
    If you start leeching then atleast read the base before making these help topics.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2016
    Posts
    25
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by _Patrick_ View Post
    Code:
    /*
    			 * Command changes player into a NPC
    			 */
    		case "pnpc":
    			short npc = parser.nextShort();
    			NpcDefinition npcDef = GameDefinitionLoader.getNpcDefinition(npc);
    
    			if (npcDef == null && npc != -1) {
    				player.send(new SendMessage("The npc id (" + npc + ") does not exist."));
    				return true;
    			}
    
    			player.setNpcAppearanceId(npc);
    			player.setAppearanceUpdateRequired(true);
    			if (npc == -1) {
    				player.getAnimations().setWalkEmote(819);
    				player.getAnimations().setRunEmote(824);
    				player.getAnimations().setStandEmote(808);
    				player.getAnimations().setTurn180Emote(820);
    				player.getAnimations().setTurn90CCWEmote(822);
    				player.getAnimations().setTurn90CWEmote(821);
    				player.send(new SendMessage("You reset your appearance."));
    			} else {
    				player.getAnimations().setWalkEmote(npcDef.getWalkAnimation());
    				player.getAnimations().setRunEmote(npcDef.getWalkAnimation());
    				player.getAnimations().setStandEmote(npcDef.getStandAnimation());
    				player.getAnimations().setTurn180Emote(npcDef.getTurn180Animation());
    				player.getAnimations().setTurn90CCWEmote(npcDef.getTurn90CCWAnimation());
    				player.getAnimations().setTurn90CWEmote(npcDef.getTurn90CWAnimation());
    				player.send(new SendMessage("You have turned into: \'" + npcDef.getName() + "\' (Id: " + npc + ", Size: " + npcDef.getSize() + ")."));
    			}
    			return true;
    If you start leeching then atleast read the base before making these help topics.
    Thats not it he doesnt need to add that if he loggs in with the username "Daniel" he will be able to spawn npcs and so on he needs to go into the files and change the owners name to his ign !
    Reply With Quote  
     

  4. #4  
    Registered Member mauler320's Avatar
    Join Date
    Mar 2012
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by CupMake View Post
    Thats not it he doesnt need to add that if he loggs in with the username "Daniel" he will be able to spawn npcs and so on he needs to go into the files and change the owners name to his ign !
    I want to be able to put an npc in game and have it stay there. Not just spawn it, and have it disappear when i restart the server.

    Quote Originally Posted by _Patrick_ View Post
    Code:
    /*
    			 * Command changes player into a NPC
    			 */
    		case "pnpc":
    			short npc = parser.nextShort();
    			NpcDefinition npcDef = GameDefinitionLoader.getNpcDefinition(npc);
    
    			if (npcDef == null && npc != -1) {
    				player.send(new SendMessage("The npc id (" + npc + ") does not exist."));
    				return true;
    			}
    
    			player.setNpcAppearanceId(npc);
    			player.setAppearanceUpdateRequired(true);
    			if (npc == -1) {
    				player.getAnimations().setWalkEmote(819);
    				player.getAnimations().setRunEmote(824);
    				player.getAnimations().setStandEmote(808);
    				player.getAnimations().setTurn180Emote(820);
    				player.getAnimations().setTurn90CCWEmote(822);
    				player.getAnimations().setTurn90CWEmote(821);
    				player.send(new SendMessage("You reset your appearance."));
    			} else {
    				player.getAnimations().setWalkEmote(npcDef.getWalkAnimation());
    				player.getAnimations().setRunEmote(npcDef.getWalkAnimation());
    				player.getAnimations().setStandEmote(npcDef.getStandAnimation());
    				player.getAnimations().setTurn180Emote(npcDef.getTurn180Animation());
    				player.getAnimations().setTurn90CCWEmote(npcDef.getTurn90CCWAnimation());
    				player.getAnimations().setTurn90CWEmote(npcDef.getTurn90CWAnimation());
    				player.send(new SendMessage("You have turned into: \'" + npcDef.getName() + "\' (Id: " + npc + ", Size: " + npcDef.getSize() + ")."));
    			}
    			return true;
    If you start leeching then atleast read the base before making these help topics.
    I did read the code lol, and im not trying to make money/put this up for anyone except me and a few friends.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jun 2016
    Posts
    25
    Thanks given
    1
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by mauler320 View Post
    I want to be able to put an npc in game and have it stay there. Not just spawn it, and have it disappear when i restart the server.



    I did read the code lol, and im not trying to make money/put this up for anyone except me and a few friends.
    Ahh go into your defs then npcdef i think or spawndef or something like that on vencillio
    Reply With Quote  
     

  6. #6  
    Registered Member mauler320's Avatar
    Join Date
    Mar 2012
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by CupMake View Post
    Ahh go into your defs then npcdef i think or spawndef or something like that on vencillio
    Didn't seem to find anything in NpcDefinitions or NpcSpawnDefinitions.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Sep 2009
    Posts
    99
    Thanks given
    23
    Thanks received
    5
    Rep Power
    0
    Make yourself Owner. (if you cant do that then this isnt the base for you.)

    Then in NpcSpawnDefinitions.xml find the npc id you want to change. and change the x and y coords. save then in game type ::reload npcspawns he should appear there permanently.
    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. Help with a few things.
    By Eydrian in forum Help
    Replies: 1
    Last Post: 01-17-2010, 05:08 PM
  2. Need help with a few things.
    By Scottyy in forum Help
    Replies: 2
    Last Post: 08-16-2009, 06:50 AM
  3. Need help with a few thing.
    By Blazer3321 in forum Help
    Replies: 2
    Last Post: 05-31-2009, 09:55 PM
  4. Replies: 2
    Last Post: 10-29-2008, 09:11 AM
  5. Help with a few things please.
    By Jakey in forum Tutorials
    Replies: 1
    Last Post: 09-26-2007, 07:50 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
  •