Thread: Making tree's turn into stumps after you cut so many logs!

Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1 Making tree's turn into stumps after you cut so many logs! 
    iPhone Expert


    Join Date
    Jul 2007
    Posts
    614
    Thanks given
    4
    Thanks received
    3
    Rep Power
    332
    Purpose: To help you make you cut a certain amount of logs, and then the tree falls.
    Requirements: A server with ReplaceObject2 void (fedexer's)
    Edited files: Client.java

    Alright well i'll do magic tree, because that's what i use in my server. So you need to start off with what happens when you click an item.

    Code:
    case 8409:
    That is the case you need for the magic tree. Now you must tell the game what to do when you click on the object 8409. We want it to cut logs, then make a tree fall. In the case add something like this


    Code:
    Example();
    Name that to whatever you would like the void to be called.
    You need to make these two int's, i will explain why later.


    Code:
    public int magicTreeTimer = 0;
    public int magicTree = 0;
    Now we have to make the void

    Code:
    public void Example()
    That is the start of your void.
    Now you have to tell the game that it will only run through this code if magicTree doesn't equal 5.


    Code:
    if(magicTree != 5)
    Something like that would do. You have to make a for loop now.


    Code:
    for(int i = 0; i < X; i++)
    Change x to how many logs you want before the tree turns into a stump. You now have to tell the game to chop the logs, do the animation, and to add the xp.


    Code:
    sendMessage("YOUR MESSAGE HERE);
    startAnimation(E)
    addSkillXP(S*playerLevel[8], 8);
    addItem(A, i);
    updateRequired = true;
    appearanceUpdateRequired = true;
    magicTree += 1;
    E = the animation.
    S = the amount of xp times the player's woodcutting level you want.
    A = the item that you add.
    Now you need to say what happens if magicTree does equal 5.


    Code:
    if(magicTree == 5)
    {
    ReplaceObject2(X, Y, O, F, 10);
    magicTreeTimer = 25;
    magicTree = 0;
    }
    X = object's x coord
    Y = object's y coord
    O = new object id (you might want 8410(magic tree stump))
    F = the way the new object faces
    Now search for


    Code:
    public boolean process
    Under it add this

    Code:
    if(magicTreeTimer > 0)
    {
    magicTreeTimer -= 1;
    }
    if(magicTreeTimer <= 0)
    {
    ReplaceObject2(X, Y, 8409, F, 10);
    }
    X = object's x coord
    Y = object's y coord
    F = the way the new object faces
    The 8409 places the tree back.
    Compile and enjoy
    I didn't put in most { and } I assumed you guys knew enough about java to know where to put them. If you seriously don't know where to put the {'s and }'s I will help you.
    95% Creds to [Only registered and activated users can see links. ]
    5% Creds to me..for bring this to rune-server


     

  2. #2  
    Banned

    Join Date
    Aug 2007
    Age
    29
    Posts
    705
    Thanks given
    21
    Thanks received
    30
    Rep Power
    0
    First post!
    Awesome im gunna add this straight away!
    P.s noobs who want to add this may find it a bit hard where to add everything maybe u shud make it easier for them?
     

  3. #3  
    iPhone Expert


    Join Date
    Jul 2007
    Posts
    614
    Thanks given
    4
    Thanks received
    3
    Rep Power
    332
    ill try..=-)

    ~JavaBoy -Quest for VeT


     

  4. #4  
    Registered Member

    Join Date
    Jun 2007
    Posts
    2,237
    Thanks given
    267
    Thanks received
    411
    Rep Power
    1283
    Just wondering did you post this on Mopar? or did someone leech


    And very nice work

    I can finish full Threaded woodcutting finally I love you
     

  5. #5  
    ~Legend Rene
    Guest
    95% Creds to cwg452003
    5% Creds to me..for bring this to rune-server
    does that clear things up for you surfer?
    And nice Javaboy.
     

  6. #6  
    Registered Member
    fabjan's Avatar
    Join Date
    Jul 2007
    Age
    27
    Posts
    552
    Thanks given
    0
    Thanks received
    0
    Rep Power
    101
    lol funny u give urself 5% credits for copieng it but its ok
    very funny i made my first choppable trees the very same way as this is done
    thank god i know better now
    but its nice for beginners
    try making the amount of logs to chop random instead of 5 (looks more real)
    to give you a hint change the 5 (amount of logs to chop) into misc.random2(10); to make it random

    nice tut anyway
    Please vote:
    [Only registered and activated users can see links. ]
    btb.servegame.com:
     

  7. #7  
    ~Legend Rene
    Guest
    Quote Originally Posted by fabjan View Post
    lol funny u give urself 5% credits for copieng it but its ok
    very funny i made my first choppable trees the very same way as this is done
    thank god i know better now
    but its nice for beginners
    try making the amount of logs to chop random instead of 5 (looks more real)
    to give you a hint change the 5 (amount of logs to chop) into misc.random2(10); to make it random

    nice tut anyway
    For normal trees just make it 1 log
     

  8. #8  
    Registered Member
    fabjan's Avatar
    Join Date
    Jul 2007
    Age
    27
    Posts
    552
    Thanks given
    0
    Thanks received
    0
    Rep Power
    101
    that for sure yer
    but he took mages for example so i made something that matches his example got it ?
    Please vote:
    [Only registered and activated users can see links. ]
    btb.servegame.com:
     

  9. #9  
    Registered Member

    Join Date
    Jul 2006
    Age
    27
    Posts
    1,247
    Thanks given
    0
    Thanks received
    5
    Rep Power
    190
    looks nice gonna use as a base
    just yoricka...
     

  10. #10  
    iPhone Expert


    Join Date
    Jul 2007
    Posts
    614
    Thanks given
    4
    Thanks received
    3
    Rep Power
    332
    Fabjan...its not necessarily coping, its like the owner does not have a rune-server account and there fore would like me to post it on here for my wonderful brothers and rune-server.

    ~JavaBoy -Quest for VeT


     

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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •