Thread: Woodcutting

Results 1 to 9 of 9
  1. #1 Woodcutting 
    Registered Member
    Join Date
    Apr 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I don't know if this is a cache issue, ObjectDefinitions, or just some incorrect code in the Woodcutting class.
    When I chop down these newer trees, they all come back messed up. It turns into a corrupt tree spawn that never despawns, and can't be chopped down)

    Any tips regarding this are appreciated.

    [PIC] [Only registered and activated users can see links. ]

    Code:
    @Override
    	public int processWithDelay(Player player) {
    		addLog(definitions, usingBeaver, player);
    		if (!usedDeplateAurora && (1 + Math.random()) < player.getAuraManager().getChanceNotDepleteMN_WC()) {
    			usedDeplateAurora = true;
    		} else if (Utils.getRandom(definitions.getRandomLifeProbability()) == 0) {
    			long time = definitions.respawnDelay * 600;
    		if (time < 0) {
    			World.removeObject(tree);
    		} else
    			World.spawnObjectTemporary(new WorldObject(getStumpId(), tree.getType(), tree.getRotation(), tree.getX(), tree.getY(), tree.getPlane()), time, false, true);
    							
    		if (tree.getPlane() < 3 && definitions != TreeDefinitions.IVY) {
    			WorldObject object = World.getStandardObject(new WorldTile(tree.getX() - 1, tree.getY() - 1, tree.getPlane() + 1));
    			
    			if (object == null) {
    				object = World.getStandardObject(new WorldTile(tree.getX(), tree.getY() - 1, tree.getPlane() + 1));
    				if (object == null) {
    					object = World.getStandardObject(new WorldTile(tree.getX() - 1, tree.getY(), tree.getPlane() + 1));
    					if (object == null) {
    						object = World.getStandardObject(new WorldTile(tree.getX(), tree.getY(), tree.getPlane() + 1));
    					}
    				}
    			}
    			if (object != null)
    				World.removeObjectTemporary(object, time);
    			}
    			player.setNextAnimation(new Animation(-1));
    			return -1;
    		}
    		if (!player.getInventory().hasFreeSlots()) {
    			player.setNextAnimation(new Animation(-1));
    			player.getPackets().sendGameMessage("Your inventory is too full to hold any more logs.");
    			return -1;
    		}
    		return getWoodcuttingDelay(player);
    	}
    Reply With Quote  
     

  2. #2  
    Aldor Manager


    Join Date
    Mar 2014
    Age
    23
    Posts
    1,020
    Thanks given
    137
    Thanks received
    155
    Rep Power
    111
    Quote Originally Posted by X Divine Pk X View Post
    I don't know if this is a cache issue, ObjectDefinitions, or just some incorrect code in the Woodcutting class.
    When I chop down these newer trees, they all come back messed up. It turns into a corrupt tree spawn that never despawns, and can't be chopped down)

    Any tips regarding this are appreciated.

    [PIC] [Only registered and activated users can see links. ]

    Code:
    @Override
    	public int processWithDelay(Player player) {
    		addLog(definitions, usingBeaver, player);
    		if (!usedDeplateAurora && (1 + Math.random()) < player.getAuraManager().getChanceNotDepleteMN_WC()) {
    			usedDeplateAurora = true;
    		} else if (Utils.getRandom(definitions.getRandomLifeProbability()) == 0) {
    			long time = definitions.respawnDelay * 600;
    		if (time < 0) {
    			World.removeObject(tree);
    		} else
    			World.spawnObjectTemporary(new WorldObject(getStumpId(), tree.getType(), tree.getRotation(), tree.getX(), tree.getY(), tree.getPlane()), time, false, true);
    							
    		if (tree.getPlane() < 3 && definitions != TreeDefinitions.IVY) {
    			WorldObject object = World.getStandardObject(new WorldTile(tree.getX() - 1, tree.getY() - 1, tree.getPlane() + 1));
    			
    			if (object == null) {
    				object = World.getStandardObject(new WorldTile(tree.getX(), tree.getY() - 1, tree.getPlane() + 1));
    				if (object == null) {
    					object = World.getStandardObject(new WorldTile(tree.getX() - 1, tree.getY(), tree.getPlane() + 1));
    					if (object == null) {
    						object = World.getStandardObject(new WorldTile(tree.getX(), tree.getY(), tree.getPlane() + 1));
    					}
    				}
    			}
    			if (object != null)
    				World.removeObjectTemporary(object, time);
    			}
    			player.setNextAnimation(new Animation(-1));
    			return -1;
    		}
    		if (!player.getInventory().hasFreeSlots()) {
    			player.setNextAnimation(new Animation(-1));
    			player.getPackets().sendGameMessage("Your inventory is too full to hold any more logs.");
    			return -1;
    		}
    		return getWoodcuttingDelay(player);
    	}
    Whos server is that?
    667 Aldor ~ Online!
    Respect goes to everyone as he deserves.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by _Jamal View Post
    Whos server is that?
    If you're wondering where the code is from, it's just a mix of my own trial and error, and other posts around the 503+ section.
    Reply With Quote  
     

  4. #4  
    Extreme Donator
    EEAZY's Avatar
    Join Date
    Jul 2018
    Posts
    133
    Thanks given
    35
    Thanks received
    13
    Rep Power
    73
    Quote Originally Posted by X Divine Pk X View Post
    If you're wondering where the code is from, it's just a mix of my own trial and error, and other posts around the 503+ section.
    I ran into this problem when I had a 700+, very stable now. Anyway I have the working code for this issue.

    } else
    World.spawnObjectTemporary(new WorldObject(getStumpId(), tree.getType(), tree.getRotation(), tree.getX(), tree.getY(), tree.getPlane()), time, false, true);
    Nvm, my code is far different than yours. But, I do have a 700+ 100% working DirectX very stable source and client. Can't download it anywhere.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Apr 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by EEAZY View Post
    I ran into this problem when I had a 700+, very stable now. Anyway I have the working code for this issue.



    Nvm, my code is far different than yours. But, I do have a 700+ 100% working DirectX very stable source and client. Can't download it anywhere.
    Lol, this turned into an advertisement for your server.

    I've tried that exact code you posted, unfortunately, that didn't work either. Thanks anyway

    Also, my code is probably similar to yours just without the extra checks I have added.
    Reply With Quote  
     

  6. #6  
    Extreme Donator
    EEAZY's Avatar
    Join Date
    Jul 2018
    Posts
    133
    Thanks given
    35
    Thanks received
    13
    Rep Power
    73
    Quote Originally Posted by X Divine Pk X View Post
    Lol, this turned into an advertisement for your server.

    I've tried that exact code you posted, unfortunately, that didn't work either. Thanks anyway

    Also, my code is probably similar to yours just without the extra checks I have added.
    How is it advertising when I am going to give you something for free to use?

    The code I shared was not the actual code to use either.

    Good luck.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Apr 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by EEAZY View Post
    How is it advertising when I am going to give you something for free to use?

    The code I shared was not the actual code to use either.

    Good luck.
    Good luck with your 100% working DirectX server.

    Does anyone actually have any helpful advice on this problem? Thanks
    Reply With Quote  
     

  8. #8  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,217
    Thanks given
    992
    Thanks received
    1,236
    Rep Power
    4415
    Quote Originally Posted by EEAZY View Post
    I ran into this problem when I had a 700+, very stable now. Anyway I have the working code for this issue.



    Nvm, my code is far different than yours. But, I do have a 700+ 100% working DirectX very stable source and client. Can't download it anywhere.
    Weird flex but okay.

    @OP Did you edit your cache?
    Reply With Quote  
     

  9. Thankful user:


  10. #9  
    Registered Member
    Join Date
    Apr 2011
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by bracket View Post
    Weird flex but okay.

    @OP Did you edit your cache?
    I̶ ̶h̶a̶v̶e̶ ̶n̶o̶t̶ ̶t̶o̶u̶c̶h̶e̶d̶ ̶m̶y̶ ̶c̶a̶c̶h̶e̶ ̶o̶n̶ ̶t̶h̶i̶s̶ ̶n̶e̶w̶ ̶s̶e̶r̶v̶e̶r̶.̶ ̶
    ̶I̶t̶'̶s̶ ̶p̶o̶s̶s̶i̶b̶l̶e̶ ̶t̶h̶e̶ ̶p̶r̶e̶v̶i̶o̶u̶s̶ ̶o̶w̶n̶e̶r̶ ̶m̶a̶d̶e̶ ̶s̶o̶m̶e̶ ̶c̶h̶a̶n̶g̶e̶s̶ ̶b̶u̶t̶ ̶n̶o̶n̶e̶ ̶t̶h̶a̶t̶ ̶I̶ ̶s̶e̶e̶.

    EDIT: Sorry, actually I have a made a few custom map edits.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ---- Realistic Mining + Woodcutting ----
    By MrWlcked in forum Tutorials
    Replies: 153
    Last Post: 06-08-2008, 04:02 AM
  2. [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
  •