Thread: Cannot pickup if you have the item.

Results 1 to 2 of 2
  1. #1 Cannot pickup if you have the item. 
    Banned

    Join Date
    Dec 2008
    Posts
    3,004
    Thanks given
    10
    Thanks received
    198
    Rep Power
    0
    How do I make it so you cannot pickup another clue scroll if you already have one? Repping anyone who helps..
    Reply With Quote  
     

  2. #2  
    Member Market Banned Market Banned

    Zee Best's Avatar
    Join Date
    Feb 2007
    Age
    29
    Posts
    3,036
    Thanks given
    24
    Thanks received
    210
    Rep Power
    1171
    Code:
    	public boolean canPickup(int clueId)
    	{
    		for (int item : playerItems)
    			if(item == clueId)
    				return false;
    		for (int item : playerBankItems)
    			if(item == clueId)
    				return false;
    		return true;
    	}
    In your pickup method if the item is a clue scroll then check if you can pickup.


    [Only registered and activated users can see links. ]
    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

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