Thread: need a ::npcid, ::npc and ::itemid command for 317 rsps

Results 1 to 2 of 2
  1. #1 need a ::npcid, ::npc and ::itemid command for 317 rsps 
    Registered Member
    Join Date
    Aug 2016
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hey i realize you can just get any of these commands from any simple server, but mine is a bit different, it's in a format like this.


    case "item":
    if (parser.hasNext()) {
    int id = parser.nextInt();
    int amount = 1;

    if (parser.hasNext()) {
    long temp = Long.parseLong(parser.nextString().toLowerCase().r eplaceAll("k", "000").replaceAll("m", "000000").replaceAll("b","000000000"));

    if (temp > Integer.MAX_VALUE) {
    amount = Integer.MAX_VALUE;
    } else {
    amount = (int) temp;
    }
    }

    if (player.inWGGame()) {
    return true;
    }

    player.getInventory().add(id, amount);

    ItemDefinition def = GameDefinitionLoader.getItemDef(id);

    player.send(new SendMessage("You have spawed x@red@" + Utility.format(amount) + "</col> of the item @red@" + def.getName() + "</col>."));
    }
    return true;
    Reply With Quote  
     

  2. #2  
    Registered Member OP411's Avatar
    Join Date
    May 2014
    Posts
    293
    Thanks given
    28
    Thanks received
    31
    Rep Power
    0
    Code:
    case "npc":
            Mob mob = new Mob(Integer.parseInt(args[1]), true, new Location(player.getLocation()));
    	player.send(new SendMessage("Spawned NPC index: " + mob.getIndex()));
    	return true;
    I have no idea what you want npcid and itemid to do
    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] Need a ::giveall command for 317 [PI]
    By Freezia in forum Requests
    Replies: 13
    Last Post: 04-19-2012, 11:08 PM
  2. Replies: 8
    Last Post: 09-07-2010, 05:28 PM
  3. PNPC and UNPC commands for Shard Revolution
    By Twone in forum Requests
    Replies: 1
    Last Post: 04-27-2009, 07:59 AM
  4. making a noclip and pickup command for mods
    By Nima304 in forum Requests
    Replies: 1
    Last Post: 11-03-2008, 10:06 AM
  5. Replies: 18
    Last Post: 09-27-2007, 12:38 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
  •