Thread: Need help with barricades

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 Need help with barricades 
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    K so, i added barricades to my zombie server, but theres a problem with them
    1) you can walk through them
    2) When you attattack them, they attack you back
    3) They follow you around if you attacked them
    4) after you kill one, it respawns at the place i put them down

    How would i be able to fix this?

    ---
    Well i have a new player.java
    could somebody put the correct code in and explain? I dont have some of those cw methods.

    [Only registered and activated users can see links. ] - player.java

    Castle wars - [Only registered and activated users can see links. ]
    castle war objects - [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    Bump
    Reply With Quote  
     

  3. #3  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    Help please!
    Reply With Quote  
     

  4. #4  
    Donator


    Join Date
    Jan 2010
    Age
    25
    Posts
    3,985
    Thanks given
    257
    Thanks received
    470
    Rep Power
    536
    Code:
    		if (inCwSafe() || inCwGame() || inCwUnderground() || inZammyBase() || inSaraBase()) {
    			int tempabsX = absX+Misc.directionDeltaX[dir];
    			int tempabsY = absY+Misc.directionDeltaY[dir];
    			if(checkBarricade(tempabsX,tempabsY,heightLevel)){
    				resetWalkingQueue();
    				return -1;
    			}
    		}
    
    	public boolean checkBarricade(int X, int Y, int Z){
    		for (int i = 0; i < CastleWars.BARRICADE_INDEX.length; i++){
    			if (CastleWars.BARRICADE_INDEX[i] != 0){
    				if (NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].npcType == 1532 || NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].npcType == 1534){
    					if (NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].absX == X && NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].absY == Y && NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].heightLevel == Z){
    						return true;
    					}
    				}
    			}
    		}
    		return false;
    	}
    Also might need to change some of the codes

    Attacking/following back is in NPCHandler
    Reply With Quote  
     

  5. #5  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    Quote Originally Posted by Nighel View Post
    Code:
    		if (inCwSafe() || inCwGame() || inCwUnderground() || inZammyBase() || inSaraBase()) {
    			int tempabsX = absX+Misc.directionDeltaX[dir];
    			int tempabsY = absY+Misc.directionDeltaY[dir];
    			if(checkBarricade(tempabsX,tempabsY,heightLevel)){
    				resetWalkingQueue();
    				return -1;
    			}
    		}
    
    	public boolean checkBarricade(int X, int Y, int Z){
    		for (int i = 0; i < CastleWars.BARRICADE_INDEX.length; i++){
    			if (CastleWars.BARRICADE_INDEX[i] != 0){
    				if (NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].npcType == 1532 || NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].npcType == 1534){
    					if (NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].absX == X && NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].absY == Y && NPCHandler.getInstance().npcs[CastleWars.BARRICADE_INDEX[i]].heightLevel == Z){
    						return true;
    					}
    				}
    			}
    		}
    		return false;
    	}
    Also might need to change some of the codes

    Attacking/following back is in NPCHandler
    Sorry for being a noob, but where do i put this exactly?
    Reply With Quote  
     

  6. #6  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    Still need help
    Reply With Quote  
     

  7. #7  
    Donator


    Join Date
    Jan 2010
    Age
    25
    Posts
    3,985
    Thanks given
    257
    Thanks received
    470
    Rep Power
    536
    Code:
    getNextWalkingDirection()
    Player.java
    Reply With Quote  
     

  8. #8  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    Quote Originally Posted by Nighel View Post
    Code:
    getNextWalkingDirection()
    Player.java
    Errors : [Only registered and activated users can see links. ]


    Heres the player.java (without the code) [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    Donator


    Join Date
    Jan 2010
    Age
    25
    Posts
    3,985
    Thanks given
    257
    Thanks received
    470
    Rep Power
    536
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,783
    Thanks given
    537
    Thanks received
    268
    Rep Power
    337
    Quote Originally Posted by Nighel View Post
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    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. I need help with pen tool
    By Joe in forum General
    Replies: 6
    Last Post: 01-19-2008, 07:05 PM
  2. Need help with turning something back
    By ftmaster in forum RS2 Server
    Replies: 0
    Last Post: 12-20-2007, 03:11 PM
  3. Need help with DomScape
    By thegreatblob in forum Requests
    Replies: 4
    Last Post: 11-30-2007, 04:25 AM
  4. need help with making a client with new stuff
    By yahoo112 in forum RS2 Client
    Replies: 1
    Last Post: 09-19-2007, 08:06 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
  •