Thread: Hunter formula for luring -and- trapping.

Results 1 to 1 of 1
  1. #1 Hunter formula for luring -and- trapping. 
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,491
    Thanks given
    184
    Thanks received
    653
    Rep Power
    1338
    Hello, so I was writing hunter a couple years back for my server and i've lost every piece of code that had to do with it, so I was thinking what would a proper formula be for -luring- the npc to the trap and the formula for -trapping- the npc.

    There are 2 stages the trap has to go through before it can successfully trap a npc.

    Stage of luring ->

    Formula runs and checks if npc is within distance of trap (the closest one) -> npc walks directly to the trap -> we move on to the stage of trapping.

    Stage of trapping ->

    Formula runs -> on success the npc is caught, on failure the trap is set off OR on a random chance the npc just flies away.

    So what we need to account with the formula for the stage of luring and trapping would probably be

    • The hunter level of the player.
    • The type of trap the player is using.
    • If the trap has any effects (baited, smoked)
    • If the player has a familiar which boosts the player's hunter level (this is invisible, as in doesn't effect the real or current level of the player)


    Since i'm pretty bad with formula's, i'd suggest others to improve it and share it among everyone else who needs it.

    Now i'm not sure if the 2 formulas are the same or completely different.

    Formula for luring and trapping.

    [SPOIL]
    Code:
    To be made
    [/SPOIL]

    Formula to determine the maximum amount of traps a player can lay.

    [SPOIL]
    Code:
    	/**
    	 * Determines the maximum amount of traps a player can lay.
    	 * @param player        the player to determine this for.
    	 * @return a numerical value which determines the amount of traps a player can lay.
    	 */
    	public final int getMaximumTraps(Player player) {
    		return player.getSkills()[Skills.HUNTER].getRealLevel() / 20 + 1;
    	}
    [/SPOIL]

    To be continued....
    Keep your head up.



    Reply With Quote  
     

  2. Thankful users:



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: 0
    Last Post: 07-14-2013, 02:48 PM
  2. Replies: 8
    Last Post: 05-23-2008, 02:28 AM
  3. Easy Farming for Dodian/And Other Bases
    By Elrydith in forum Tutorials
    Replies: 13
    Last Post: 01-17-2008, 12:07 AM
  4. Mopar-World Recruiting for server and forums!
    By dark scape in forum RS2 Server
    Replies: 0
    Last Post: 11-11-2007, 06:35 PM
  5. Replies: 23
    Last Post: 10-20-2007, 05:00 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
  •