Thread: [REQ] ::item using money when spawning

Results 1 to 2 of 2
  1. #1 [REQ] ::item using money when spawning 
    Banned
    Join Date
    Apr 2016
    Posts
    357
    Thanks given
    65
    Thanks received
    16
    Rep Power
    0
    Hello i looking for command ::item that will request money for certain items for example ags: ::item 11694 1
    will cost you 25mill if you dont got enough money it will send you message how much money u need to spawn this item
    this command been used on pvp servers or in bounty hunter craters servers back in the day
    Reply With Quote  
     

  2. #2  
    Donator
    Gladius.'s Avatar
    Join Date
    May 2010
    Posts
    1,160
    Thanks given
    112
    Thanks received
    58
    Rep Power
    11
    use this and change the token id to 995
    https://www.rune-server.org/runescap...ng-tokens.html

    or use this

    Code:
    if(playerCommand.startsWith("item")) {
    			try {
    				final String[] args = playerCommand.split(" ");
    				if(args.length < 2) {
    					return;
    				}
    				int itemID = Integer.parseInt(args[1]);
    				int SpawnPrice = 0;
    				switch(itemID) {
    					case 4151:
    						SpawnPrice = 50000000;
    						break;
    					default: //can't spawn any other things
    						c.sendMessage("@red@" + c.getItems().getItemName(itemID) + " cannot be spawned.");
    						return;
    				}
    				if(!c.getItems().playerHasItem(995, SpawnPrice)) {
    					c.sendMessage("You need at least " + SpawnPrice + " gold to spawn " + c.getItems().getItemName(itemID) + ".");
    					return;
    				} else {
    					c.getItems().deleteItem(995, SpawnPrice);
    				}
    				if (args.length == 3) {
    					final int newItemID = Integer.parseInt(args[1]);
    					final int newItemAmount = Integer.parseInt(args[2]);
    					if (newItemID <= 20000 && newItemID >= 0) {
    						c.getItems().addItem(newItemID, newItemAmount);
    						//System.out.println(c.playerName + " spawned " + newItemID + " Count: " + newItemAmount);
    					} else {
    						c.sendMessage("No such item.");
    					}
    				} else if (args.length == 2) {
    					final int newItemID = Integer.parseInt(args[1]);
    					if (newItemID <= 20000 && newItemID >= 0) {
    						c.getItems().addItem(newItemID, 1);
    						System.out.println(c.playerName + " spawned " + newItemID + " Count: 1");
    					} else {
    						c.sendMessage("No such item.");
    					}
    				} else {
    					c.sendMessage("You need at least one ID to use this command.");
    				}
    
    			} catch (final Exception e) {
    				e.printStackTrace();
    			}
    		}


    Reply With Quote  
     

  3. Thankful user:



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. 718 Items Costing Money To Spawn
    By Formality in forum Help
    Replies: 5
    Last Post: 12-03-2013, 06:16 AM
  2. Dementhium ::item costs money to spawn.
    By strongbow94 in forum Help
    Replies: 7
    Last Post: 11-25-2011, 04:32 PM
  3. Replies: 3
    Last Post: 08-10-2011, 11:10 PM
  4. Replies: 2
    Last Post: 04-20-2010, 11:40 AM
  5. Replies: 3
    Last Post: 05-02-2009, 07:14 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
  •