Thread: [Pi] Spawning Group Command Around You?

Results 1 to 5 of 5
  1. #1 [Pi] Spawning Group Command Around You? 
    Registered Member xoodreyoox's Avatar
    Join Date
    May 2013
    Posts
    141
    Thanks given
    5
    Thanks received
    0
    Rep Power
    11
    [Pi] Spawning Group Command Around You?
    How would i do this?
    through a command
    where npcs spawn around u
    like 15 of them?
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jun 2011
    Posts
    2,549
    Thanks given
    539
    Thanks received
    402
    Rep Power
    683
    I have a massnpc command I can give you when I get on my computer. Quite simple actually.

    EDIT: lol nevermind, here you go

    Code:
    			if (playerCommand.startsWith("massnpc")) {
    				try {
    					String[] arg = playerCommand.split(" ");
    					if (arg.length == 3) {
    						for (int i = 0; i < Integer.parseInt(arg[2]); i++) {
    							Server.npcHandler.spawnNpc(c, Integer.parseInt(arg[1]), c.absX+i, c.absY+i, c.heightLevel, 0, 120, 7, 70, 70, false, false);
    						}
    						c.sendMessage("Amount of NPCs spawned: "+Integer.parseInt(arg[2]));
    					} else {
    						c.sendMessage("Syntax: ::massnpc id amount");
    					}
    				} catch (Exception e) {
    					c.sendMessage("Invalid NPC ID.");
    				}
    			}
    Usage - ID, amount
    All the best,
    Nirvana

    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member xoodreyoox's Avatar
    Join Date
    May 2013
    Posts
    141
    Thanks given
    5
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Valedictorian View Post
    I have a massnpc command I can give you when I get on my computer. Quite simple actually.

    EDIT: lol nevermind, here you go

    Code:
    			if (playerCommand.startsWith("massnpc")) {
    				try {
    					String[] arg = playerCommand.split(" ");
    					if (arg.length == 3) {
    						for (int i = 0; i < Integer.parseInt(arg[2]); i++) {
    							Server.npcHandler.spawnNpc(c, Integer.parseInt(arg[1]), c.absX+i, c.absY+i, c.heightLevel, 0, 120, 7, 70, 70, false, false);
    						}
    						c.sendMessage("Amount of NPCs spawned: "+Integer.parseInt(arg[2]));
    					} else {
    						c.sendMessage("Syntax: ::massnpc id amount");
    					}
    				} catch (Exception e) {
    					c.sendMessage("Invalid NPC ID.");
    				}
    			}
    Respect Thaks!
    Reply With Quote  
     

  5. #4  
    Donator


    Join Date
    Jun 2011
    Posts
    2,549
    Thanks given
    539
    Thanks received
    402
    Rep Power
    683
    No problem.
    All the best,
    Nirvana

    Reply With Quote  
     

  6. #5  
    Registered Member xoodreyoox's Avatar
    Join Date
    May 2013
    Posts
    141
    Thanks given
    5
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Valedictorian View Post
    No problem.
    Question How would i Make it Form Around me like a square or be hind me. its spawn in a line.
    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. [PI] Spawn object command
    By xTJx in forum Help
    Replies: 7
    Last Post: 11-07-2017, 01:29 PM
  2. Command that kills all npc around you? (PI)
    By Gaun-Di Designs in forum Requests
    Replies: 2
    Last Post: 08-29-2012, 05:45 PM
  3. [PI]Simple command for you hard to me
    By Rune-Exclusion in forum Help
    Replies: 3
    Last Post: 06-15-2011, 01:42 PM
  4. Replies: 9
    Last Post: 02-26-2011, 03:04 PM
  5. [PI] Spawn command...
    By Swifty in forum Snippets
    Replies: 9
    Last Post: 06-30-2010, 04:12 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
  •