Thread: how to make items unspawnable

Results 1 to 7 of 7
  1. #1 how to make items unspawnable 
    Registered Member
    Join Date
    Dec 2012
    Posts
    103
    Thanks given
    9
    Thanks received
    4
    Rep Power
    11
    how to i make items unspawnable?
    317

    ITankUrbl00d
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jul 2010
    Posts
    1,827
    Thanks given
    18
    Thanks received
    76
    Rep Power
    97
    you own your own rsps, and not sure how to do this?
    Since 2010
    Reply With Quote  
     

  3. #3  
    Server Developer
    Argyros's Avatar
    Join Date
    Apr 2011
    Posts
    498
    Thanks given
    25
    Thanks received
    31
    Rep Power
    23
    What are you using? PI, Detla, Czar ect.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Jun 2008
    Age
    28
    Posts
    811
    Thanks given
    302
    Thanks received
    36
    Rep Power
    0
    make the item command a specific player rights.... ?

    Code:
    if (playerCommand.startsWith("item") && c.playerRights == 3) {
    Reply With Quote  
     

  5. #5  
    Owner Of SeenScape

    Join Date
    Nov 2012
    Posts
    132
    Thanks given
    4
    Thanks received
    3
    Rep Power
    10
    Quote Originally Posted by S a n t a Pk View Post
    make the item command a specific player rights.... ?

    Code:
    if (playerCommand.startsWith("item") && c.playerRights == 3) {
    Can you read?

    Add into Item command:

    Code:
    						} else if (newItemID == Config.UNSPAWNABLE_ITEMS){
    							c.sendMessage("You are not allowed to spawn that item");
    Add into Config.java

    Code:
    	public static final int[] UNSPAWNABLE_ITEMS = {1050};
    Being really good at C++ is like being really good at using rocks to sharpen sticks.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2013
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    heey i added the shit into the config.java but im not too sure where to add the } else if (newItemID == Config.UNSPAWNABLE_ITEMS){
    c.sendMessage("You are not allowed to spawn that item"); into the commands ::item anyone can help me?
    Reply With Quote  
     

  7. #7  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,779
    Thanks given
    537
    Thanks received
    269
    Rep Power
    337
    Just add this to Commands.java
    Code:
    			if (playerCommand.startsWith("item") && c.playerRights >= 3) {
    				try {
    					String[] args = playerCommand.split(" ");
    					if (args.length == 3) {
    						int newItemID = Integer.parseInt(args[1]);
    						int newItemAmount = Integer.parseInt(args[2]);
    						if ((newItemID <= 20000) && (newItemID >= 0)) {
    							c.getItems().addItem(newItemID, newItemAmount);		
    						} else {
    							c.sendMessage("No such item.");
    						}
    					} else {
    						c.sendMessage("Use as ::item 995 200 for example 200 gp");
    					}
    				} catch(Exception e) {
    					
    				}
    			}
    Attached image
    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. Unspawnable items
    By Kaiser Btw in forum Configuration
    Replies: 5
    Last Post: 07-23-2011, 11:42 PM
  2. Unspawnable items. [HOW TO?]
    By Chris SS in forum Help
    Replies: 2
    Last Post: 12-31-2009, 07:02 AM
  3. items unspawnable NON-delta
    By jabbah in forum Requests
    Replies: 1
    Last Post: 06-14-2009, 02:53 AM
  4. Unspawnable items
    By 'Ramon in forum Help
    Replies: 3
    Last Post: 02-17-2009, 01:36 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
  •