Thread: Spawning

Results 1 to 7 of 7
  1. #1 Spawning 
    Donator

    Join Date
    Jul 2013
    Posts
    488
    Thanks given
    21
    Thanks received
    42
    Rep Power
    0
    I have two issues i would like to address. (The source is PI).

    Players can spawn some items (such as borrowed items with the red circles) which are not in my item.cfg file.
    And when a player tries to spawn a stupid item like torva boots or lucky godsword which arn't in my rsps they dc and cant login, and then i have to manually go into char files and delete the item. It is getting rather annoying now, so are there are efficient fixes? The players use ::item.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Jun 2011
    Posts
    2,458
    Thanks given
    23
    Thanks received
    650
    Rep Power
    390
    if ((newItemID <= MAXIDYOUHAVE) && (newItemID >= 0)) {

    add that in your item command
    Reply With Quote  
     

  3. #3  
    Donator

    Join Date
    Jul 2013
    Posts
    488
    Thanks given
    21
    Thanks received
    42
    Rep Power
    0
    Quote Originally Posted by Envy- View Post
    if ((newItemID <= MAXIDYOUHAVE) && (newItemID >= 0)) {

    add that in your item command
    i have that already but there are some code like 13531 (partyhat) that can be spawned and my config.java blocks names from being spawned like "partyhat" but those dont seem to relate to any borrowed (or lent) items
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Jun 2011
    Posts
    2,458
    Thanks given
    23
    Thanks received
    650
    Rep Power
    390
    Quote Originally Posted by pabb View Post
    i have that already but there are some code like 13531 (partyhat) that can be spawned
    under that code i posted above add

    Code:
    for (int i = 0; i < Config.UNSPAWNABLE.length; i++) {
    							if (c.getItems().getItemName(newItemID).toLowerCase().contains(Config.UNSPAWNABLE[i]) && c.playerRights != 3) {
    								c.sendMessage("Can't spawn this item.");
    								return;							
    							}
    						}
    Then in config.java

    Code:
    public static final String[] UNSPAWNABLE = {
    		"arcane", "divine", "spectral", "elysian", "spirit",}
    etc.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Sep 2013
    Posts
    880
    Thanks given
    43
    Thanks received
    57
    Rep Power
    58
    Quote Originally Posted by pabb View Post
    i have that already but there are some code like 13531 (partyhat) that can be spawned and my config.java blocks names from being spawned like "partyhat" but those dont seem to relate to any borrowed (or lent) items
    add it to your item config..
    Reply With Quote  
     

  6. #6  
    Donator

    Join Date
    Jul 2013
    Posts
    488
    Thanks given
    21
    Thanks received
    42
    Rep Power
    0
    Quote Originally Posted by The Reason View Post
    add it to your item config..
    you add words, not ids so i already have "partyhat" in there but the lent ones still spawn
    Reply With Quote  
     

  7. #7  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,283
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by pabb View Post
    you add words, not ids so i already have "partyhat" in there but the lent ones still spawn
    The server still uses the item config to identify the items name.. So if the items not in item.cfg, the server might not recognize it as an item
    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. Securing Item Spawning
    By darkest_mage in forum Tutorials
    Replies: 0
    Last Post: 09-16-2007, 07:34 AM
  2. adding item spawns my way
    By luke1105 in forum Tutorials
    Replies: 1
    Last Post: 09-08-2007, 03:45 PM
  3. log in spawn
    By Ghetto Beef in forum Tutorials
    Replies: 1
    Last Post: 07-31-2007, 01:50 AM
  4. Replies: 2
    Last Post: 07-14-2007, 09:09 PM
  5. making items spawn on ground
    By messiaH in forum Tutorials
    Replies: 4
    Last Post: 05-18-2007, 04:12 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
  •