Thread: [PI] Have two clients loaded, testing pking, not doing damage to one another (No Erro

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 [PI] Have two clients loaded, testing pking, not doing damage to one another (No Erro 
    Registered Member
    Join Date
    Oct 2016
    Posts
    87
    Thanks given
    51
    Thanks received
    34
    Rep Power
    45
    Trying to test pking, but i cannot damage one another. I get no errors while compiling nor running, I just cant damage...

    Any help would be appreciated



    EDIT: Still no luck, I get only the constant blue shield hit splat. The attack mode interface shows combat level, but kinda twitches, when right clicked to attack a player or hover the combat level is 1. I'm almost feeling after trying all these that its a double sided problem, but im so lost. I dont want to do too much more until I get it fixed.
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    273
    Rep Power
    522
    Try change a player's rank and see if you still can't attack. If so then it is something in your attack method for pvp that is either problem with or never send.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    Registered Member
    Join Date
    Oct 2016
    Posts
    87
    Thanks given
    51
    Thanks received
    34
    Rep Power
    45
    Quote Originally Posted by arch337 View Post
    Try change a player's rank and see if you still can't attack. If so then it is something in your attack method for pvp that is either problem with or never send.
    Tried with every p.rights combos I could figure out. So its probably in attack meothod for pvp where is that generally found?
    Reply With Quote  
     

  6. Thankful user:


  7. #4  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    273
    Rep Power
    522
    Quote Originally Posted by Jrage View Post
    Tried with every p.rights combos I could figure out. So its probably in attack meothod for pvp where is that generally found?
    The [Only registered and activated users can see links. ] 73 is used for player attack.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. Thankful user:


  9. #5  
    Registered Member
    Join Date
    Oct 2016
    Posts
    87
    Thanks given
    51
    Thanks received
    34
    Rep Power
    45
    If i read that right, its in the client files?

    Client -> Server Packets
    Reply With Quote  
     

  10. Thankful user:


  11. #6  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    273
    Rep Power
    522
    Quote Originally Posted by Jrage View Post
    If i read that right, its in the client files?
    Server files hence why we are in the server section. If it was the client, I would of stated it.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  12. Thankful user:


  13. #7  
    Registered Member
    Join Date
    Oct 2016
    Posts
    87
    Thanks given
    51
    Thanks received
    34
    Rep Power
    45
    The heading on that box is what got me. I think I found it under combat assistant.
    Does that look right?

    Code:
    	/**
    	* Attack Players, same as npc tbh xD
    	**/
    	
    		public void attackPlayer(int i) {
    		Client o = (Client)Server.playerHandler.players[i];
    		
    		
              if (c.playerEquipment[c.playerWeapon] == 15241) {
              c.gfx0(2138);
              }
    			if (!c.autocasting) {
    						c.autocasting = false;
    						c.getPA().resetAutocast();
    					}
                    if(c.vestaDelay > 0) {
                       resetPlayerAttack();
                       return;
                    }
    				if (c.playerEquipment[c.playerRing] == 2570) {
    				
    			if (c.playerLevel[3] > 0 && c.playerLevel[3] <= c.getLevelForXP(c.playerXP[3]) / 10 && 
    
    c.underAttackBy > 0) {
    				int wildlvl = (((c.absY - 3520) / 8) + 1);
    				if (wildlvl < 20) {
    					c.sendMessage("Your ring of life is destroyed as it saves you.");
    					o.sendMessage("Your opponent has been saved by a ring of life.");
    					c.getItems().deleteEquipment(2570, c.playerRing);
    					c.getPA().startTeleport(2831, 2973, 0, "modern");
    					c.getItems().wearItem(-1, 1, 3); // deletes the ring
    					resetPlayerAttack();
    			
    		}
    	}
    	}
    							if(c.curseActive[19]) { // Turmoil
    			c.getstr = PlayerHandler.players[i].playerLevel[2] * 10 / 100;
    			c.getdef = PlayerHandler.players[i].playerLevel[1] * 15 / 100;
    			c.getatt = PlayerHandler.players[i].playerLevel[0] * 15 / 100;
    
    			}
    just a small portion of it
    Reply With Quote  
     

  14. Thankful user:


  15. #8  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    273
    Rep Power
    522
    Quote Originally Posted by Jrage View Post
    The heading on that box is what got me. I think I found it under combat assistant.
    Does that look right?

    Code:
    	/**
    	* Attack Players, same as npc tbh xD
    	**/
    	
    		public void attackPlayer(int i) {
    		Client o = (Client)Server.playerHandler.players[i];
    		
    		
              if (c.playerEquipment[c.playerWeapon] == 15241) {
              c.gfx0(2138);
              }
    			if (!c.autocasting) {
    						c.autocasting = false;
    						c.getPA().resetAutocast();
    					}
                    if(c.vestaDelay > 0) {
                       resetPlayerAttack();
                       return;
                    }
    				if (c.playerEquipment[c.playerRing] == 2570) {
    				
    			if (c.playerLevel[3] > 0 && c.playerLevel[3] <= c.getLevelForXP(c.playerXP[3]) / 10 && 
    
    c.underAttackBy > 0) {
    				int wildlvl = (((c.absY - 3520) / 8) + 1);
    				if (wildlvl < 20) {
    					c.sendMessage("Your ring of life is destroyed as it saves you.");
    					o.sendMessage("Your opponent has been saved by a ring of life.");
    					c.getItems().deleteEquipment(2570, c.playerRing);
    					c.getPA().startTeleport(2831, 2973, 0, "modern");
    					c.getItems().wearItem(-1, 1, 3); // deletes the ring
    					resetPlayerAttack();
    			
    		}
    	}
    	}
    							if(c.curseActive[19]) { // Turmoil
    			c.getstr = PlayerHandler.players[i].playerLevel[2] * 10 / 100;
    			c.getdef = PlayerHandler.players[i].playerLevel[1] * 15 / 100;
    			c.getatt = PlayerHandler.players[i].playerLevel[0] * 15 / 100;
    
    			}
    just a small portion of it
    Look through your project and see if "attackPlayer" method is even being send anywhere. If you use a ide you can scan all files after a keyword.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  16. Thankful user:


  17. #9  
    Registered Thanker
    MrClassic's Avatar
    Join Date
    Oct 2008
    Age
    24
    Posts
    1,837
    Thanks given
    10,338
    Thanks received
    200
    Rep Power
    3365
    Is it showing hit splashes or is it just showing 0’s all the time?
    Thanks, MrClassic.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  18. #10  
    Registered Member
    Join Date
    Oct 2016
    Posts
    87
    Thanks given
    51
    Thanks received
    34
    Rep Power
    45
    Quote Originally Posted by MrClassic View Post
    Is it showing hit splashes or is it just showing 0’s all the time?
    0's the whole time

    Ill look for an IDE cus i cannot for the life of me get eclipse to work

    Quote Originally Posted by arch337 View Post
    Look through your project and see if "attackPlayer" method is even being send anywhere. If you use a ide you can scan all files after a keyword.
    Ill look for an IDE cus i cannot for the life of me get eclipse to work

    This is the only place it refernces when I search the workspace for it

    Code:
    		if(attackTimer > 0) {
    			attackTimer--;
    		}
    		
    		if(attackTimer == 1){
    			if(npcIndex > 0 && clickNpcType == 0) {
    				getCombat().attackNpc(npcIndex);
    			}
    			if(playerIndex > 0) {
    				getCombat().attackPlayer(playerIndex);
    			}
    		} else if (attackTimer <= 0 && (npcIndex > 0 || playerIndex > 0)) {
    			if (npcIndex > 0) {
    				attackTimer = 0;
    				getCombat().attackNpc(npcIndex);
    			} else if (playerIndex > 0) {
    				attackTimer = 0;
    				getCombat().attackPlayer(playerIndex);
    			}
    		}
    Quote Originally Posted by arch337 View Post
    Look through your project and see if "attackPlayer" method is even being send anywhere. If you use a ide you can scan all files after a keyword.
    So I have a class called AttackPlayer, attackPlayer is only referenced in client, but AttackPlayer is refrenced in packethandler

    Quote Originally Posted by MrClassic View Post
    Is it showing hit splashes or is it just showing 0’s all the time?
    I miss spoke. Its the blue hit splash constantly. I noticed something else screwey too.
    [IMG]https://ibb.co/ZNWgTRg
    Reply With Quote  
     

  19. Thankful user:


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)

Similar Threads

  1. Replies: 1
    Last Post: 09-12-2016, 10:13 PM
  2. Replies: 5
    Last Post: 07-29-2013, 09:08 PM
  3. Replies: 3
    Last Post: 07-30-2011, 05:31 PM
  4. Replies: 3
    Last Post: 03-20-2011, 01:46 PM
  5. Replies: 2
    Last Post: 02-15-2011, 12:19 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
  •