Thread: (Elvarg) HerbIdentification

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 (Elvarg) HerbIdentification 
    Registered Member

    Join Date
    Dec 2016
    Posts
    132
    Thanks given
    39
    Thanks received
    54
    Rep Power
    100
    Removed, old.
    Nando Studios
    Reply With Quote  
     

  2. #2  


    RS Wiki's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    9,688
    Thanks given
    1,752
    Thanks received
    3,103
    Rep Power
    5000
    Code:
    	public static final HerbIdentification getHerb(Item item) {
    		for (final HerbIdentification herb : HerbIdentification.values()) {
    			if (herb.getGrimyHerb().getId() == item.getId()) {
    				return herb;
    			}
    		}
    		return null;
    	}
    Why return a null?

    Use j8 functions to improve this.

    Thanks for this.

    edit:
    You should just make Gaumt identifying level 1 to avoid default setting Herblore level to 3 just to access the Gaum function.
    *remove this*
    Code:
    skills.level[Skill.HERBLORE.ordinal()] = skills.maxLevel[Skill.HERBLORE.ordinal()] = 3;
    		skills.experience[Skill.HERBLORE.ordinal()] = 174;
    All the best,
    Wiki




    coming soon
    Reply With Quote  
     

  3. #3  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Thanks for the share.
    Reply With Quote  
     

  4. #4  
    Extreme Donator

    Kiana's Avatar
    Join Date
    May 2015
    Posts
    1,050
    Thanks given
    147
    Thanks received
    187
    Rep Power
    223
    Thanks might come in handy.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Dec 2016
    Posts
    132
    Thanks given
    39
    Thanks received
    54
    Rep Power
    100
    Quote Originally Posted by RS Wiki View Post
    Code:
    	public static final HerbIdentification getHerb(Item item) {
    		for (final HerbIdentification herb : HerbIdentification.values()) {
    			if (herb.getGrimyHerb().getId() == item.getId()) {
    				return herb;
    			}
    		}
    		return null;
    	}
    Why return a null?

    Use j8 functions to improve this.

    Thanks for this.

    edit:
    You should just make Gaumt identifying level 1 to avoid default setting Herblore level to 3 just to access the Gaum function.
    *remove this*
    Code:
    skills.level[Skill.HERBLORE.ordinal()] = skills.maxLevel[Skill.HERBLORE.ordinal()] = 3;
    		skills.experience[Skill.HERBLORE.ordinal()] = 174;
    I prefer to have the default level at 3 as that's what is needed on rs to begin the skill. Although, you can set the requirement to 1 if you want.

    - Updated main class.
    Nando Studios
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Feb 2010
    Posts
    19
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I've been looking into this. Have you found a way of stopping it when walking, or some other action?
    Reply With Quote  
     

  7. #7  
    Theory Wins?
    Greyfield's Avatar
    Join Date
    Nov 2008
    Age
    32
    Posts
    1,585
    Thanks given
    61
    Thanks received
    265
    Rep Power
    310
    Directly invoking a null reference is bad practice, especially now that other resources are at your disposal; I.e Optional#orElse(T...)



    Reply With Quote  
     

  8. #8  
    Registered Member
    Andys1814's Avatar
    Join Date
    Feb 2013
    Posts
    974
    Thanks given
    688
    Thanks received
    455
    Rep Power
    727
    Quote Originally Posted by Greyfield View Post
    Directly invoking a null reference is bad practice, especially now that other resources are at your disposal; I.e Optional#orElse(T...)
    where is he even doing that lo
    Reply With Quote  
     

  9. #9  
    Theory Wins?
    Greyfield's Avatar
    Join Date
    Nov 2008
    Age
    32
    Posts
    1,585
    Thanks given
    61
    Thanks received
    265
    Rep Power
    310
    Quote Originally Posted by Andys1814 View Post
    where is he even doing that lo
    Code:
    	public static final HerbIdentification getHerb(Item item) {
    		for (final HerbIdentification herb : HerbIdentification.values()) {
    			if (herb.getGrimyHerb().getId() == item.getId()) {
    				return herb;
    			}
    		}
    		return null;
    	}
    If anything should just have it return an empty value.



    Reply With Quote  
     

  10. #10  
    Registered Member
    Andys1814's Avatar
    Join Date
    Feb 2013
    Posts
    974
    Thanks given
    688
    Thanks received
    455
    Rep Power
    727
    Quote Originally Posted by Greyfield View Post
    Code:
    	public static final HerbIdentification getHerb(Item item) {
    		for (final HerbIdentification herb : HerbIdentification.values()) {
    			if (herb.getGrimyHerb().getId() == item.getId()) {
    				return herb;
    			}
    		}
    		return null;
    	}
    If anything should just have it return an empty value.
    that was his old one, he changed it??
    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. Elvarg coords
    By woof woof bish in forum Requests
    Replies: 0
    Last Post: 05-29-2013, 09:38 PM
  2. elvarg.com domain for sale
    By Elvarg in forum Selling
    Replies: 19
    Last Post: 05-21-2013, 11:09 PM
  3. Elvarg - This is your story.
    By Streamy in forum Projects
    Replies: 8
    Last Post: 03-09-2013, 06:58 AM
  4. Elvarg RSPS
    By Slixr in forum Advertise
    Replies: 6
    Last Post: 01-20-2013, 07:08 AM
  5. Elvarg Gate
    By lemby pk in forum Help
    Replies: 1
    Last Post: 05-29-2009, 10: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
  •