Thread: [PI] Making an item unbankable

Results 1 to 3 of 3
  1. #1 [PI] Making an item unbankable 
    Castle Revolution Developer

    Join Date
    Apr 2012
    Posts
    155
    Thanks given
    4
    Thanks received
    10
    Rep Power
    11
    Hi guys!
    Sorry to be posting here so much but I googled it and wondered if there was a PROPER way to do this before I go and look at the banking methods.

    How do I make a specific item id UNBANKABLE meaning when you try and bank it it does not let you?

    Help would be greatly appreciated, thank you.

    Join the Revolution
    Reply With Quote  
     

  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Something like this should work: Add it in the bankItem method.

    Code:
    		int[] unbankables = {1042, 1048};
    		for (int id : unbankables) {
    			if (itemID == id) {
    				c.sendMessage("This item cannot be banked");
    				return false;
    			}
    		}
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Castle Revolution Developer

    Join Date
    Apr 2012
    Posts
    155
    Thanks given
    4
    Thanks received
    10
    Rep Power
    11
    Quote Originally Posted by Zivik View Post
    Something like this should work: Add it in the bankItem method.

    Code:
    		int[] unbankables = {1042, 1048};
    		for (int id : unbankables) {
    			if (itemID == id) {
    				c.sendMessage("This item cannot be banked");
    				return false;
    			}
    		}
    You are a legend.
    I added the int unbankables to my Config so I could add to it easily.
    Works perfectly.
    Thank you.

    Join the Revolution
    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. [PI] Making an item give double exp
    By Oogle in forum Snippets
    Replies: 3
    Last Post: 09-23-2012, 12:49 PM
  2. Replies: 3
    Last Post: 05-06-2012, 03:19 AM
  3. [PI] Making an Item dissapear on death
    By HiImRusty in forum Help
    Replies: 3
    Last Post: 11-14-2010, 07:08 PM
  4. [PI] Making an item teleport [PI]
    By farmerscape in forum Help
    Replies: 4
    Last Post: 08-18-2010, 10:35 PM
  5. Replies: 4
    Last Post: 07-14-2010, 02:36 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
  •