Thread: ELVARG woodcutting

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 ELVARG woodcutting 
    Registered Member
    Join Date
    Apr 2016
    Posts
    138
    Thanks given
    59
    Thanks received
    14
    Discord
    View profile
    Rep Power
    27
    So I'm adding woodcutting on my server, I'm using a clean Elvarg source, managed to make most trees cutable but for example, all oak logs only give me 1 log instead of having the chance of giving multiple.
    I guess it has something to do with the cycles but I can't figure out where or what I have to adjust

    code:

    public static enum Tree {
    NORMAL(1, 25, 1511, new int[] { 1276, 1277, 1278, 1279, 1280, 1282, 1283, 1284, 1285, 1286, 1289, 1290, 1291, 1315, 1316, 1318, 1319, 1330, 1331, 1332, 1365, 1383, 1384, 3033, 3034, 3035, 3036, 3881, 3882, 3883, 5902, 5903, 5904 }, 10, 8, false),
    ACHEY(1, 25, 2862, new int[] { 2023 }, 13, 9, false),
    OAK(15, 38, 1521, new int[] { 1281, 3037, 1751 }, 14, 11, true),
    WILLOW(30, 68, 1519, new int[] { 1308, 5551, 5552, 5553 }, 15, 14, true),
    TEAK(35, 85, 6333, new int[] { 9036 }, 16, 16, true),
    DRAMEN(36, 88, 771, new int[] { 1292 }, 16, 17, true),
    MAPLE(45, 100, 1517, new int[] { 1307, 4677 }, 17, 18, true),
    MAHOGANY(50, 125, 6332, new int[] { 9034 }, 17, 20, true),
    YEW(60, 175, 1515, new int[] { 1309, 1753 }, 18, 28, true),
    MAGIC(75, 250, 1513, new int[] { 1306 }, 20, 40, true),
    REDWOOD(90, 380, 19669, new int[]{}, 22, 43, true);

    private final int[] objects;
    private final int requiredLevel;
    private final int xpReward;
    private final int logId;
    private final int cycles;
    private final int respawnTimer;
    private final boolean multi;
    Reply With Quote  
     

  2. #2  
    Community Veteran


    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,833
    Thanks given
    187
    Thanks received
    306
    Discord
    View profile
    Rep Power
    770
    Why not take a look at the gathering method for woodcutting? Cause this will only tell the intended functions.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Apr 2016
    Posts
    138
    Thanks given
    59
    Thanks received
    14
    Discord
    View profile
    Rep Power
    27
    Quote Originally Posted by arch337 View Post
    Why not take a look at the gathering method for woodcutting? Cause this will only tell the intended functions.
    doesn't this tell what u gather aswell? like u receive a log(1511) if u chop down a tree (1276)?
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Feb 2013
    Posts
    1,680
    Thanks given
    245
    Thanks received
    397
    Rep Power
    329
    Quote Originally Posted by Mille View Post
    doesn't this tell what u gather aswell? like u receive a log(1511) if u chop down a tree (1276)?
    Take a look at isMulti.

    Code:
    //Regular trees should always despawn. 
    //Multi trees are random.
    if (!tree.isMulti() || Misc.getRandom(15) >= 2) {
    //Stop skilling..
    cancel(player);
    
    //Despawn object and respawn it after a short period of time..
    TaskManager.submit(new TimedObjectReplacementTask(treeObject, new GameObject(1343, treeObject.getLocation(), 10, 0, player.getPrivateArea()), tree.getRespawnTimer()));
    }
    Reply With Quote  
     

  6. #5  
    Registered Member
    Grant_'s Avatar
    Join Date
    Aug 2014
    Posts
    493
    Thanks given
    93
    Thanks received
    109
    Rep Power
    136
    Quote Originally Posted by Mille View Post
    doesn't this tell what u gather aswell? like u receive a log(1511) if u chop down a tree (1276)?
    Most likely yes. But there is also probably a conditional check for if the tree is multi. If so it executes a statement to see if it should reward with more than one log or not.
    Reply With Quote  
     

  7. #6  
    Community Veteran


    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,833
    Thanks given
    187
    Thanks received
    306
    Discord
    View profile
    Rep Power
    770
    Quote Originally Posted by Mille View Post
    doesn't this tell what u gather aswell? like u receive a log(1511) if u chop down a tree (1276)?
    That is the intention of the data. However there is no intention for any amount of logs in a tree, or whenever it should become a stump.
    That is why I refer to check the gathering function for woodcutting.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #7  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,789
    Discord
    View profile
    Rep Power
    5000
    gonna need to see some different code..

    Reply With Quote  
     

  9. #8  
    Banned
    Join Date
    Dec 2018
    Posts
    119
    Thanks given
    1
    Thanks received
    42
    Rep Power
    0
    Quote Originally Posted by Luke132 View Post
    gonna need to see some different code..
    Why not show us some of your code instead
    Reply With Quote  
     

  10. #9  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,789
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by 404 Not Found View Post
    Why not show us some of your code instead
    go download it then?

    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Apr 2016
    Posts
    138
    Thanks given
    59
    Thanks received
    14
    Discord
    View profile
    Rep Power
    27
    Quote Originally Posted by Delinquent View Post
    Take a look at isMulti.

    Code:
    //Regular trees should always despawn. 
    //Multi trees are random.
    if (!tree.isMulti() || Misc.getRandom(15) >= 2) {
    //Stop skilling..
    cancel(player);
    
    //Despawn object and respawn it after a short period of time..
    TaskManager.submit(new TimedObjectReplacementTask(treeObject, new GameObject(1343, treeObject.getLocation(), 10, 0, player.getPrivateArea()), tree.getRespawnTimer()));
    }
    I have this in the code, but I don't understand how i would make a certain tree "isMulti" if this akes sense.
    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 / OSRSPK] Woodcutting Skill
    By Farage in forum Snippets
    Replies: 25
    Last Post: 01-11-2019, 03:55 AM
  2. ---- Realistic Mining + Woodcutting ----
    By MrWlcked in forum Tutorials
    Replies: 153
    Last Post: 06-08-2008, 04:02 AM
  3. [TuT]90% Full rs-realistic woodcutting
    By Wolf in forum Tutorials
    Replies: 11
    Last Post: 08-21-2007, 08:25 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •