Thread: Woodcutting Data

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 Woodcutting Data 
    Super Donator


    Join Date
    Sep 2008
    Age
    27
    Posts
    1,897
    Thanks given
    677
    Thanks received
    776
    Rep Power
    456
    Might save someone some time.

    Code:
    	/**
    	 * @param Tree object id
    	 * @return The name of logs it provides
    	 */
    	public static String getLogName(int objectId) {
    		switch (objectId) {
    		case 2023:
    			return "achey tree logs";
    		case 1281:
    			return "oak logs";
    		case 1308:
    			return "willow logs";
    		case 1307:
    			return "maple logs";
    		case 9034:
    			return "mahogany logs";
    		case 1309:
    			return "yew logs";
    		case 1306: 
    			return "magic logs";
    		}
    		return "logs";
    	}
    Code:
    	/**
    	 * @param The tree object id
    	 * @return The xp that tree provides
    	 */
    	public static int getTreeXp(int objectId) {
    		switch (objectId) {
    		case 1281:// oak
    			return 35;
    		case 1308:// willow
    			return 45;
    		case 9034:// mahogany
    			return 55;
    		case 1307:// maple
    			return 65;
    		case 1309:// yew
    			return 75;
    		case 1306:// magic
    			return 95;
    		}
    		return 25;
    
    	}
    Code:
    	/**
    	 * @param The tree object id
    	 * @return The log item id
    	 */
    	public static int getTreeLogs(int objectId) {
    		switch (objectId) {
    		case 2023://achey
    			return 2862;
    		case 1281:// oak
    			return 1521;
    		case 1308:// willow
    			return 1519;
    		case 1307:// maple
    			return 1517;
    		case 9034:// mahogany
    			return 6332;
    		case 1309:// yew
    			return 1515;
    		case 1306:// magic
    			return 1513;
    		}
    		return 1511;
    
    	}
    Code:
    	/**
    	 * @param The tree object id
    	 * @return The woodcutting level required
    	 */
    	public static int getTreeRequirement(int objectId) {
    		switch (objectId) {
    		case 1281:// oak
    			return 15;
    		case 1308:// willow
    			return 30;
    		case 1307:// maple
    			return 45;
    		case 9034:// mahogany
    			return 50;
    		case 1309:// yew
    			return 60;
    		case 1306:// magic
    			return 75;
    		}
    		return 1;
    
    	}
    Code:
    	/**
    	 * @param The axe the player is wielding
    	 * @return The level required to use the axe
    	 */
    	public static int axeLevelRequirement(int axe) {
    		switch (axe) {
    		case 1353:
    		case 1361:
    			return 6;
    		case 1355:
    			return 21;
    		case 1357:
    			return 31;
    		case 1359:
    			return 41;
    		case 6739:
    			return 61;
    		}
    		return 1;
    	}
    Code:
    	/**
    	 * @param The axe the player is wearing
    	 * @return The animation for that axe
    	 */
    	public static int getAxeAnimation(int weapon) {
    		switch (weapon) {
    		case 1351:
    			return 879;
    		case 1349:
    			return 877;
    		case 1353:
    			return 875;
    		case 1361:
    			return 873;
    		case 1355:
    			return 871;
    		case 1357:
    			return 869;
    		case 1359:
    			return 867;
    		case 6739:
    			return 865;
    		}
    		return -1;
    	}
    Code:
    	/**
    	 * @param The players weapon
    	 * @return Is it an axe?
    	 */
    	public static boolean hasAxe(int weapon) {
    		switch (weapon) {
    		case 1351:
    		case 1349:
    		case 1353:
    		case 1361:
    		case 1355:
    		case 1357:
    		case 1359:
    		case 6739:
    			return true;
    		}
    		return false;
    	}

    Code:
    	/**
    	 * @param players axe
    	 * @param players woodcutting level
    	 * @return Can use the axe?
    	 */
    
    	public static boolean canUseAxe(int weapon, int woodcutting) {
    		if (axeLevelRequirement(weapon) <= woodcutting)
    			return true;
    		return false;
    	}
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member
    Polaroid's Avatar
    Join Date
    Jul 2009
    Posts
    936
    Thanks given
    1,088
    Thanks received
    63
    Rep Power
    94
    Swear there are like 30 id's for the trees

    EDIT: yea there are

    [Only registered and activated users can see links. ]

    Type in tree
    Reply With Quote  
     

  4. #3  
    Super Donator


    Join Date
    Sep 2008
    Age
    27
    Posts
    1,897
    Thanks given
    677
    Thanks received
    776
    Rep Power
    456
    Quote Originally Posted by Polaroid View Post
    Swear there are like 30 id's for the trees
    Yeah good point, I only did the ones I found in game.
    I'll do the rest later

    Edit: Yeah cheers
    Reply With Quote  
     

  5. Thankful user:


  6. #4  
    Banned
    Join Date
    Aug 2011
    Age
    26
    Posts
    7
    Thanks given
    0
    Thanks received
    7
    Rep Power
    0
    Why not post the whole Woodcutting class
    Reply With Quote  
     

  7. #5  
    Super Donator


    Join Date
    Sep 2008
    Age
    27
    Posts
    1,897
    Thanks given
    677
    Thanks received
    776
    Rep Power
    456
    Quote Originally Posted by boterkoek View Post
    Why not post the whole Woodcutting class
    This can be used for anything, its generic, it isn't specific to a base/revision.
    All you have to do is make the event / task, I'll post mine later.
    Reply With Quote  
     

  8. Thankful user:


  9. #6  
    Registered Member Aintaro.'s Avatar
    Join Date
    Sep 2010
    Posts
    998
    Thanks given
    188
    Thanks received
    213
    Rep Power
    37
    I can supply you with more woodcutting data :

    Code:
    /**
    * normal tree's
    */
    case 1276:
    case 1282:
    case 1283:
    case 1284:
    case 1285:
    case 1286:
    case 1287:
    case 1288:
    case 1289:
    case 1290:
    case 1291:
    case 1383:
    case 1384:
    case 5902:
    case 5903:
    case 5904:
    case 1319:
    case 1318:
    case 1315:
    case 1278: 
    break;
    case 2023: //achey tree
    
    break;
    
    case 9036: //teak tree
    
    break;
    case 2289: //small hollow tree
    
    break;
    
    case 4060: //big hollow tree
    
    break;
    
    case 9034: //mahogany tree
    
    break;
    
    /**
    * woodcutting random event npc
    */
    
    private static final int 	SPIRIT_LEVEL_14 = 438, 
    					SPIRIT_LEVEL_29 = 439, 
    					SPIRIT_LEVEL_49 = 440, 
    					SPIRIT_LEVEL_79 = 441, 
    					SPIRIT_LEVEL_120 = 442, 
    					SPIRIT_LEVEL_159 = 443;
    
    public static final int BIRD_NEST = 5073;
    btw, looks good and enjoy.
    Reply With Quote  
     

  10. Thankful user:


  11. #7  
    Super Donator


    Join Date
    Sep 2008
    Age
    27
    Posts
    1,897
    Thanks given
    677
    Thanks received
    776
    Rep Power
    456
    All trees that aren't specified will return the normal logs and xp with no level requirement. No need adding cases for all the normal trees as there is like 50 of them.
    Reply With Quote  
     

  12. #8  
    Registered Member Aintaro.'s Avatar
    Join Date
    Sep 2010
    Posts
    998
    Thanks given
    188
    Thanks received
    213
    Rep Power
    37
    Quote Originally Posted by Liberty View Post
    All trees that aren't specified will return the normal logs and xp with no level requirement. No need adding cases for all the normal trees as there is like 50 of them.
    yeah thats better.
    Reply With Quote  
     

  13. #9  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,682
    Thanks given
    1,093
    Thanks received
    3,494
    Discord
    View profile
    Rep Power
    5000
    this is why i much prefer using enums or arrays so much cleaner and less code
    Reply With Quote  
     

  14. #10  
    Super Donator


    Join Date
    Sep 2008
    Age
    27
    Posts
    1,897
    Thanks given
    677
    Thanks received
    776
    Rep Power
    456
    Quote Originally Posted by thispixel View Post
    this is why i much prefer using enums or arrays so much cleaner and less code
    Array and loop looks ugly
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Replies: 9
    Last Post: 01-06-2011, 09:09 PM
  2. Replies: 13
    Last Post: 07-14-2010, 09:32 PM
  3. [Help] Woodcutting
    By Arta in forum Help
    Replies: 4
    Last Post: 04-07-2010, 03:55 PM
  4. big - woodcutting
    By WH:II:DOW in forum Tutorials
    Replies: 3
    Last Post: 07-19-2008, 11:06 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
  •