Thread: [PI] Where is: Doing damage to another online player?

Results 1 to 6 of 6
  1. #1 [PI] Where is: Doing damage to another online player? 
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Hello there!

    My idea is to have it so you can attack players normally but if a boolean variable of "testing" is true then add 10 more damage to the hit.

    Can someone give me this example code please?

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  2. #2  
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,422
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    Quote Originally Posted by BryceTheCoder View Post
    Hello there!

    My idea is to have it so you can attack players normally but if a boolean variable of "testing" is true then add 10 more damage to the hit.

    Can someone give me this example code please?
    You know what this sounds like to me? It sounds like you want to have an account that has bonus damage for pking.
    Either way, the way I did this back in my cheating days was to use an if-statement to check the name of the player, and then add the # to the final amm in MeleeMaxHit()
    Reply With Quote  
     

  3. #3  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Quote Originally Posted by LP-Gaming View Post
    You know what this sounds like to me? It sounds like you want to have an account that has bonus damage for pking.
    Either way, the way I did this back in my cheating days was to use an if-statement to check the name of the player, and then add the # to the final amm in MeleeMaxHit()
    LMFAO That is hilarious you used to do that but nooo noo I am not using it for that reason
    So how would I modify it inside the MeleeMaxHit void ?

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  4. #4  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Can someone please give me the code and where?

    I would appreciate it very much

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Nov 2009
    Posts
    46
    Thanks given
    6
    Thanks received
    7
    Rep Power
    1
    CombatAssistant.java ? public int calculateMeleeMaxHit() if you want to search for it in other classes
    Code:
    	public int calculateMeleeMaxHit() {
    		double maxHit = 0;
    		int strBonus = c.playerBonus[10];
    		int strength = c.playerLevel[2];
    		int defence = c.playerLevel[1];
    		int attack = c.playerLevel[0];
    		int range = c.playerLevel[4];
    		int magic = c.playerLevel[6];
    		int lvlForXP = c.getLevelForXP(c.playerXP[2]);
    		if(c.prayerActive[1]) {
    			strength += (int)(lvlForXP * .05);
    		} else
    		if(c.prayerActive[6]) {
    			strength += (int)(lvlForXP * .10);
    		} else
    		if(c.prayerActive[14]) {
    			strength += (int)(lvlForXP * .15);
    		} else
    		if(c.prayerActive[24]) {
    			strength += (int)(lvlForXP * .18);
    		} else
    		if(c.prayerActive[25]) {
    			strength += (int)(lvlForXP * .23);
    		}
    		if (c.slayerHelmetEffect && c.slayerTask != 0) {
    			maxHit = (int)(maxHit * 1.15);
    		}	
    		if(c.curseActive[19]) { // turmoil
    			strength += (int)(lvlForXP * .15 + c.getstr);
    		}
    		if(c.playerEquipment[c.playerHat] == 2526 && c.playerEquipment[c.playerChest] == 2520 && c.playerEquipment[c.playerLegs] == 2522) {	
    			maxHit += (maxHit * 10 / 100);
    		}
    		maxHit += 1.05D + (double)(strBonus * strength) * 0.00175D;
    		maxHit += (double)strength * 0.11D;
    		
    		if (c.playerEquipment[c.playerWeapon] == 4718 && c.playerEquipment[c.playerHat] == 4716 && c.playerEquipment[c.playerChest] == 4720 && c.playerEquipment[c.playerLegs] == 4722) {	
    				maxHit += (c.getPA().getLevelForXP(c.playerXP[3]) - c.playerLevel[3]) / 2;			
    		}
    		
    		if (c.specDamage > 1)
    			maxHit = (int)(maxHit * c.specDamage);
    		
    		if (maxHit < 0)
    			maxHit = 1;
    		
    		if (c.playerEquipment[c.playerAmulet] == 11128 
    		&& c.playerEquipment[c.playerWeapon] == 6528) 
    		{
    			
    			maxHit *= 1.20;
    		
    		}
    		return (int)Math.floor(maxHit);
    	
    	}
    Reply With Quote  
     

  6. #6  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Beautiful, thank you I will reply if I need any more help.
    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. Replies: 3
    Last Post: 03-25-2013, 10:57 PM
  2. Replies: 3
    Last Post: 05-21-2012, 12:40 AM
  3. [508] Where is the ondemand request sent to the server
    By Clienthax in forum RS 503+ Client & Server
    Replies: 1
    Last Post: 10-20-2008, 10:42 AM
  4. Replies: 2
    Last Post: 10-07-2007, 06:35 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
  •