Thread: Woodcutting

Results 1 to 10 of 10
  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,021
    Thanks given
    137
    Thanks received
    157
    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  
    Banned
    Join Date
    Jul 2018
    Posts
    152
    Thanks given
    37
    Thanks received
    15
    Rep Power
    0
    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  
    Banned
    Join Date
    Jul 2018
    Posts
    152
    Thanks given
    37
    Thanks received
    15
    Rep Power
    0
    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,232
    Thanks given
    1,003
    Thanks received
    1,344
    Rep Power
    5000
    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  
     

  11. #10  
    Certified Stoner

    demon dylan001's Avatar
    Join Date
    Feb 2009
    Age
    23
    Posts
    1,118
    Thanks given
    72
    Thanks received
    90
    Rep Power
    460
    Are you getting any errors in your run server cmd box? Iím thinking if it could be an issue on cache or client side loading your tree models the best way to determine if itís your world spawn are the same object ids being deleted and spawned being used I guess would be the question
    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
  •