Thread: [DeltaScape] NPC follow ya - help

Results 1 to 4 of 4
  1. #1 [DeltaScape] NPC follow ya - help 
    Registered Member
    Join Date
    Oct 2008
    Posts
    100
    Thanks given
    0
    Thanks received
    1
    Rep Power
    5
    Which command is to spawn npcs in delta and they will follow ya?

    I want it like you type ::man and a man will spawned and he will follow ya...

    any ideas pls? thanks.

    ---------- Post added at 11:13 AM ---------- Previous post was at 10:45 AM ----------

    pls someone
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2009
    Posts
    294
    Thanks given
    3
    Thanks received
    2
    Rep Power
    40
    go into your class client and search this
    Code:
    	private void customCommand(String command)
    That is mine, yours might be a little different.

    Now, look through your commands for an npc command. If it isn't there, you likely don't have it. Here is what mine looks like:
    Code:
    if (command.startsWith("npc") && playerRights >= 3) {
                    try 
    					{
                        int newNPC = Integer.parseInt(command.substring(4));
                        if (newNPC >= 0)
    						{
    		server.npcHandler.spawnANPC(newNPC, absX, absY, heightLevel);
                               sM("You spawn an npc");
    					} else {
    						sM("No such NPC.");
    					}
    				} catch(Exception e) {
    					sM("Wrong Syntax! Use as ::npc 1");
    				}}
            if (command.equalsIgnoreCase("players")) {
                sM("There are currently " + PlayerHandler.getPlayerCount() + " players!");
            }
                if (command.equalsIgnoreCase("bootall") && playerRights > 2) {
                    PlayerHandler.kickAllPlayers = true;
                }
                if (command.startsWith("kick") && playerRights > 0) {
    		    client noob = null;
                    for(int i = 0; i < server.playerHandler.players.length; i++){
    			if(server.playerHandler.players[i] != null){
    				if(command.substring(5).equalsIgnoreCase(server.playerHandler.players[i].playerName)){
    					noob = (client)server.playerHandler.players[i];
    					noob.disconnected = true;
    					noob.logoutButton = true;
    				}
    			}
    		}
                }
    Hope that helps you.

    NOTE: with this command you type ::npc <creature id>
    Reply With Quote  
     

  3. #3  
    Previously Hyperion


    Join Date
    Jan 2009
    Posts
    1,254
    Thanks given
    3
    Thanks received
    18
    Rep Power
    138
    waffl3z thats not what he wants...you have to make this command yourself as its not in your source....at least attempt it and after pm me and i will help you IF and only if you attempt to do it yourself
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2009
    Posts
    294
    Thanks given
    3
    Thanks received
    2
    Rep Power
    40
    Oohhh i see what he wants now. Yeah i got no clue for that, but theres the npc spawn command
    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

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