Thread: Baltic Help

Results 1 to 6 of 6
  1. #1 Baltic Help 
    Registered Member
    Join Date
    Nov 2011
    Posts
    167
    Thanks given
    2
    Thanks received
    1
    Rep Power
    11
    On the server Baltic you cannot trade npcs or anything and like 10 secs after logging in you get an error, you get this when u click an npc :
    Spoiler for here:
    java.lang.NullPointerException
    at rs2.model.players.packets.ClickNPC.processPacket(C lickNPC.java:174)
    at rs2.model.players.PacketHandler.processPacket(Pack etHandler.java:100)
    at rs2.model.players.Client.processQueuedPackets(Clie nt.java:1581)
    at rs2.model.players.PlayerHandler.process(PlayerHand ler.java:196)
    at rs2.Server$3.execute(Server.java:140)
    at Almagesrnubs.GameEngine$1.run(GameEngine.java:109)
    at Almagesrnubs.GameEngine$5.run(GameEngine.java:192)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)


    and In the client i get this :
    Spoiler for here:


    if u can help that would be great.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Sep 2012
    Posts
    1,027
    Thanks given
    193
    Thanks received
    123
    Rep Power
    0
    the obvious anti leeches Im looking at.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2011
    Posts
    167
    Thanks given
    2
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Nick_xD View Post
    the obvious anti leeches Im looking at.
    ehh, it is really obvious?
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Oct 2010
    Age
    29
    Posts
    1,886
    Thanks given
    446
    Thanks received
    523
    Rep Power
    0
    Fix your npc bytes.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    May 2012
    Posts
    253
    Thanks given
    5
    Thanks received
    146
    Rep Power
    122
    Because I'm such a nice guy, Player.java:

    Code:
    	public void addNewNPC(NPC npc, Stream str, Stream updateBlock) {
    		synchronized(this) {
    			int id = npc.npcId;
    			npcInListBitmap[id >> 3] |= 1 << (id&7);	
    			npcList[npcListSize++] = npc;
    	
    			str.writeBits(14, id);	
    			
    			int z = npc.absY-absY;
    			if(z < 0) z += 32;
    			str.writeBits(5, z);	
    			z = npc.absX-absX;
    			if(z < 0) z += 32;
    			str.writeBits(5, z);	
    	
    			str.writeBits(1, 0); 
    			str.writeBits(12, npc.npcType);
    			
    			boolean savedUpdateRequired = npc.updateRequired;
    			npc.updateRequired = true;
    			npc.appendNPCUpdateBlock(updateBlock);
    			npc.updateRequired = savedUpdateRequired;	
    			str.writeBits(1, 1); 
    		}
    	}
    And now, comment out synchronization.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2011
    Posts
    167
    Thanks given
    2
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Rhubarb View Post
    Because I'm such a nice guy, Player.java:

    Code:
    	public void addNewNPC(NPC npc, Stream str, Stream updateBlock) {
    		synchronized(this) {
    			int id = npc.npcId;
    			npcInListBitmap[id >> 3] |= 1 << (id&7);	
    			npcList[npcListSize++] = npc;
    	
    			str.writeBits(14, id);	
    			
    			int z = npc.absY-absY;
    			if(z < 0) z += 32;
    			str.writeBits(5, z);	
    			z = npc.absX-absX;
    			if(z < 0) z += 32;
    			str.writeBits(5, z);	
    	
    			str.writeBits(1, 0); 
    			str.writeBits(12, npc.npcType);
    			
    			boolean savedUpdateRequired = npc.updateRequired;
    			npc.updateRequired = true;
    			npc.appendNPCUpdateBlock(updateBlock);
    			npc.updateRequired = savedUpdateRequired;	
    			str.writeBits(1, 1); 
    		}
    	}
    And now, comment out synchronization.
    Worked! Thanks
    Reply With Quote  
     


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. Selling Project-Baltic
    By Almagesrnubs in forum Selling
    Replies: 43
    Last Post: 01-13-2013, 12:15 AM
  2. [NPC FIX ]Baltic
    By JAM3SS in forum Snippets
    Replies: 0
    Last Post: 12-02-2012, 06:40 PM
  3. Project-Baltic - 317 loading 603 animations
    By Almagesrnubs in forum Advertise
    Replies: 25
    Last Post: 11-01-2012, 02:17 AM
  4. Project Baltic - Re-Living them Days
    By My2007Project in forum Projects
    Replies: 12
    Last Post: 02-25-2012, 02:58 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
  •