Thread: When i buy a item with 5 digit

Results 1 to 6 of 6
  1. #1 When i buy a item with 5 digit 
    Registered Member

    Join Date
    Feb 2007
    Age
    28
    Posts
    6,414
    Thanks given
    354
    Thanks received
    323
    Rep Power
    5000
    Well when i buy a item like a rune defender (13601) it gives me a error and dc's me

    Here the error, it comes in the run server ****



    any help?


    Menacescape - Runescape Private server
    Come to Menacescape. We've been online for over two years with an active community!
     

  2. #2  
    Member #35, most veteran member left? :D


    Join Date
    Jul 2006
    Age
    30
    Posts
    2,660
    Thanks given
    53
    Thanks received
    331
    Rep Power
    925
    Post your addItem method. ^_^


    `Ex-global moderator x3 (resigned)
     

  3. #3  
    Registered Member

    Join Date
    Feb 2007
    Age
    28
    Posts
    6,414
    Thanks given
    354
    Thanks received
    323
    Rep Power
    5000
    Quote Originally Posted by Runite View Post
    Post your addItem method. ^_^
    Code:
    	public boolean addItem(int item, int amount){
    
    		if (!Item.itemStackable[item] || amount < 1)
    		{
    			amount = 1;
    		}
    
    		if ((freeSlots() >= amount && !Item.itemStackable[item]) || freeSlots() > 0)
    		//if (Item.itemStackable[item] && playerHasItem(item))
    		{
    			for (int i=0; i<playerItems.length; i++)
    			{
    				if (playerItems[i] == (item+1) && Item.itemStackable[item] && playerItems[i] > 0)
    				{
    					playerItems[i] = item+1;
    					if ((playerItemsN[i] + amount) < maxItemAmount && (playerItemsN[i] + amount) > -1)
    					{
    						playerItemsN[i] += amount;
    					}
    					else
    					{
    						playerItemsN[i] = maxItemAmount;
    					}
    					outStream.createFrameVarSizeWord(34);
    					outStream.writeWord(3214);
    					outStream.writeByte(i);
    					outStream.writeWord(playerItems[i]);
    					if (playerItemsN[i] > 254)
    					{
    						outStream.writeByte(255);
    						outStream.writeDWord(playerItemsN[i]);
    					}
    					else
    					{
    						outStream.writeByte(playerItemsN[i]); //amount	
    					}
    					outStream.endFrameVarSizeWord();
    					i=30;
    					return true;
    				}
    			}
    	                for (int i=0; i<playerItems.length; i++)
    			{
    				if (playerItems[i] <= 0)
    				{
    					playerItems[i] = item+1;
    					if (amount < maxItemAmount && amount > -1)
    					{
    						playerItemsN[i] = amount;
    					}
    					else
    					{
    						playerItemsN[i] = maxItemAmount;
    					}
    					outStream.createFrameVarSizeWord(34);
    					outStream.writeWord(3214);
    					outStream.writeByte(i);
    					outStream.writeWord(playerItems[i]);
    					if (playerItemsN[i] > 254)
    					{
    						outStream.writeByte(255);
    						outStream.writeDWord(playerItemsN[i]);
    					}
    					else
    					{
    						outStream.writeByte(playerItemsN[i]); //amount	
    					}
    					outStream.endFrameVarSizeWord();
    					i=30;
    					return true;
    				}
    			}
    			return false;
    		}
    		else{
    			sendMessage("You do not have enough inventory space.");
    			return false;
    		}
    	}


    Menacescape - Runescape Private server
    Come to Menacescape. We've been online for over two years with an active community!
     

  4. #4  
    Member #35, most veteran member left? :D


    Join Date
    Jul 2006
    Age
    30
    Posts
    2,660
    Thanks given
    53
    Thanks received
    331
    Rep Power
    925
    Well sh!t... Post your buyItem method.

    (I'm just doing this to see if you have something that's restricting the item IDs which can be spawned/bought/sold/etc.)


    `Ex-global moderator x3 (resigned)
     

  5. #5  
    Ben
    Guest
    Item.java you must extend your

    Code:
    	public static boolean[] itemStackable = new boolean[9999];
    	public static boolean[] itemIsNote = new boolean[9999];
    	public static boolean[] itemTradeable = new boolean[9999];
    	public static boolean[] itemSellable = new boolean[9999];
    	public static boolean[] itemTwoHanded = new boolean[9999];
    Booleans. Mine are changed to 9999, change yours to 20000
     

  6. #6  
    Registered Member

    Join Date
    Feb 2007
    Age
    28
    Posts
    6,414
    Thanks given
    354
    Thanks received
    323
    Rep Power
    5000
    Quote Originally Posted by Ben View Post
    Item.java you must extend your

    Code:
    	public static boolean[] itemStackable = new boolean[9999];
    	public static boolean[] itemIsNote = new boolean[9999];
    	public static boolean[] itemTradeable = new boolean[9999];
    	public static boolean[] itemSellable = new boolean[9999];
    	public static boolean[] itemTwoHanded = new boolean[9999];
    Booleans. Mine are changed to 9999, change yours to 20000
    Wow, thank you alot

    Closed


    Menacescape - Runescape Private server
    Come to Menacescape. We've been online for over two years with an active community!
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •