Thread: My anti-barrage rings -- NOT WORKING??

Results 1 to 2 of 2
  1. #1 My anti-barrage rings -- NOT WORKING?? 
    ⚓Manic-Owner⚓


    Join Date
    Nov 2007
    Posts
    2,711
    Thanks given
    47
    Thanks received
    9
    Rep Power
    650
    Okay here's in my attack method.

    Code:
    if(AttackingOn2.playerEquipment[playerRing] == 4202 && AttackingOn2.barragedPlr == true){
    int barrageonringplr = misc.random(10);
    int ShatterChances = misc.random(45);
    if(ShatterChances == 3) {
    AttackingOn2.sM("Your ring shatters into dust for an odd reason...");
    AttackingOn2.playerEquipment[AttackingOn2.playerRing] = -1;
    AttackingOn2.playerEquipmentN[AttackingOn2.playerRing] = 0;
    AttackingOn2.setEquipment(-1, 0, AttackingOn2.playerRing);
    }
    AttackingOn2.hitDiff = misc.random(7);
    AttackingOn2.currentHealth += misc.random(3);
    if(barrageonringplr > 7) { 
    AttackingOn2.entangleDelay =- misc.random(150);
    }
    if(barrageonringplr <= 7) { 
    AttackingOn2.entangleDelay =- misc.random(700);
    }
    if(barrageonringplr <= 5) { 
    AttackingOn2.entangleDelay =- misc.random(100);
    }
    if(barrageonringplr <= 3) { 
    AttackingOn2.entangleDelay =- misc.random(3000);
    }
    sM(""+playerName+" is wearing an Barrage Protection Ring and it recoils you...");
    AttackingOn2.sM("Your ring comes recoils a bit, heals you a bit, and puts down the freeze time down...");
    AttackingOn2.barragedPlr = false;
    }

    It's messy i know, but it should work!

    And here's my barrage method.

    Code:
    public void attackPlayersBarrage(int maxDamage, int range, int dx, int dy) {
    		// for (Player p : server.playerHandler.players) {
    		// Linux (java 1.4.2-compatible) change - Devolution
    		for (Player p : server.playerHandler.players) {
    			if (p != null) {
    				client person = (client) p;
    
    				if (person.playerName != null) {
    					if ((person.distanceToPoint(dx, dy) <= range)
    							&& (person.playerId != playerId)) {
    						int damage = misc.random(maxDamage);
    						
    
    						
    						
    						
    
    if(!person.uber) {
    						if(person.multitime) {
    						if(person.pvpmode) {
    						if (person.playerLevel[3] - damage < 0) {
    							damage = person.playerLevel[3];
    						}
    						if(dontatk != person.playerId) {
    						if(person.lastEntangle > person.entangleDelay) {
    						person.lateSpells(369, 2, false);
    						person.lastEntangle = System.currentTimeMillis();
    						person.entangleDelay = 8999;
    						}
    					person.hitDiff = damage;
    					person.offTimer = System.currentTimeMillis();
    					person.hitID = playerId;
    						//person.startAnimation(anim);
    						dontatk = -1;
    						person.updateRequired = true;
    						person.hitUpdateRequired = true;
    						person.currentHealth -= damage;
    person.barragedPlr = true;
    						
    } else {
    dontatk = -1;
    }
    }
    }
    					}
    				}
    			}
    			}
    		}
    	}
    The code is fine, now why isn't it working??????
    Reply With Quote  
     

  2. #2  
    Super Donator


    Join Date
    Mar 2009
    Age
    28
    Posts
    1,388
    Thanks given
    316
    Thanks received
    408
    Rep Power
    608
    Put the bit about the anti barrage rings into the barrage method not the attack
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •