Thread: how to make armour have a certain def lvl

Results 1 to 4 of 4
  1. #1 how to make armour have a certain def lvl 
    Registered Member
    Join Date
    Aug 2011
    Posts
    18
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    how would i make armour have a certain defense lvl or weapons a certain attack lvl. im using 317 pi. i need this for my dungeoneering armour and lvl 3's can use it.
    Reply With Quote  
     

  2. #2  
    Registered Member fast z3rk3r's Avatar
    Join Date
    Aug 2011
    Posts
    51
    Thanks given
    0
    Thanks received
    3
    Rep Power
    37
    You need to change it in item.cfg. There you can change the amout of strength bonus , def bonus mage bonus and ranged bonus. I hope it helps you.
    Reply With Quote  
     

  3. #3  
    Registered

    Izumi's Avatar
    Join Date
    Jun 2010
    Posts
    2,458
    Thanks given
    240
    Thanks received
    597
    Rep Power
    2463
    Quote Originally Posted by fast z3rk3r View Post
    You need to change it in item.cfg. There you can change the amout of strength bonus , def bonus mage bonus and ranged bonus. I hope it helps you.
    That is so wrong.


    Anyways,

    go to ItemAssistant.java (\src\server\model\items)

    and search for

    Code:
    	public void getRequirements(String itemName, int itemId) {
    scroll down to

    Code:
    		switch(itemId) {
    You will see something like this for example:

    Code:
    			case 11665:
    			c.attackLevelReq = 42;
    			c.rangeLevelReq = 42;
    			c.strengthLevelReq = 42;
    			c.magicLevelReq = 42;
    			c.defenceLevelReq = 42;
    			return;
    Under one of those cases,
    use this code:

    Code:
    case ####: //your dungeoneering armour
    c.defenceLevelReq = 75; //means you will need 75 defence to wear that armour
    return;



    Reply With Quote  
     

  4. #4  
    how to make armour have a certain def lvl



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    add an if-statement before the equipping method, something along the lines of

    if(itemId == #### && c.defenceLevel < ####) {
    return ;
    }

    Attached image
    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] How to make armour have requirements?
    By LorenzoMKW in forum Help
    Replies: 2
    Last Post: 05-06-2011, 02:56 AM
  2. armour bug
    By superbombet in forum Help
    Replies: 4
    Last Post: 10-03-2010, 01:02 AM
  3. PVP Armour
    By Alec_ in forum Requests
    Replies: 1
    Last Post: 10-26-2009, 04:19 PM
  4. Make barrow armour break when killed?
    By Wicksyere in forum Help
    Replies: 0
    Last Post: 10-17-2009, 05:52 PM
  5. armour help
    By Buckshot in forum Help
    Replies: 3
    Last Post: 09-26-2009, 04:55 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
  •