Thread: [PI] Skillcape Trimming Help.

Results 1 to 2 of 2
  1. #1 [PI] Skillcape Trimming Help. 
    Registered Member
    Join Date
    Nov 2011
    Posts
    43
    Thanks given
    0
    Thanks received
    3
    Rep Power
    14
    How would I add skill cape trimming?
    or adding to this Dialogue where if you have 1 99 it gives you untrimmed, and if you have 2 99's it gives a trimmed cape?

    Code:
    case 847: //Cook
            	for (int i = 0; i < 1; i++) {
            	if(c.playerXP[7] <= c.getPA().getXPForLevel(99)) {
            	c.getDH().sendDialogues(1408,npcType); //A dialogue saying they need more levels
            	return;
            	}
            	}
            	for (int i = 0; i < 1; i++) {
            	if(c.playerXP[7] >= c.getPA().getXPForLevel(99)) {
            	c.getDH().sendDialogues(1409,npcType);
            	c.getItems().addItem(9801, 1); <<< HERE
                    c.getItems().addItem(9803, 1); <<< HERE
            	}
            	}
            	break;
    Reply With Quote  
     

  2. #2  
    Registered Member Recursion's Avatar
    Join Date
    Feb 2010
    Posts
    638
    Thanks given
    0
    Thanks received
    29
    Rep Power
    41
    This is how I would do it if I wanted to do what you're tying...
    Code:
    public int getNumberOfCapes()
    {
         int numberOfCapes = 0;
         for (int i = 0; < NUMBEROFSKILLSINSERVER; i++)
         {
              if(c.playerXP[i] >= c.getPA().getXPForLevel(99))
              {
                   numberOfCapes += 1;
              }
         }
    return numberOfCapes;
    }

    After that just add the check in your current code like so:
    Code:
    case 847: //Cook
                for (int i = 0; i < 1; i++) {
                if(c.playerXP[7] <= c.getPA().getXPForLevel(99)) {
                c.getDH().sendDialogues(1408,npcType); //A dialogue saying they need more levels
                return;
                }
                }
                for (int i = 0; i < 1; i++) {
                if(c.playerXP[7] >= c.getPA().getXPForLevel(99)) {
                     c.getDH().sendDialogues(1409,npcType);
                     if(c.getNumberOfCapes() <= 1)
                     {
                          c.getItems().addItem(9801, 1); //cape untrimmed?
                          c.getItems().addItem(9803, 1); //hood?
                     } else {
                          //CREATE A METHOD & PLACE IT HERE
                          //THAT WILL DELETE ANY POSSIBLE
                          //OLD NON-TRIMMED CAPES FROM
                          //INVENTORY, BANK, OR EQUIPMENT SLOTS...
                          c.getItems().addItem(trimmedcape, 1);
                          c.getItems().addItem(hood, 1);
                     }        
                }
                }
                break;
    That's all the tips I can give you and it should work. Good luck.
    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. Buying [PI] Skillcape Trimming[5$]
    By Oldskewl in forum Buying
    Replies: 0
    Last Post: 10-20-2012, 12:16 AM
  2. trimming question
    By Warlock 999 in forum Help
    Replies: 2
    Last Post: 01-31-2011, 08:13 PM
  3. Trimming
    By Ryan™ in forum Help
    Replies: 1
    Last Post: 05-13-2009, 11:03 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
  •