Thread: [718]Dragonfire Shield

Results 1 to 5 of 5
  1. #1 [718]Dragonfire Shield 
    Owner of Virtus
    k0ed ur mom's Avatar
    Join Date
    Jun 2012
    Age
    31
    Posts
    541
    Thanks given
    20
    Thanks received
    46
    Rep Power
    11
    I've been working on adding full DFS to my server.
    My only problem I've run into is how to actually make the special attack work.
    I've got charging and inspecting/releasing and whatnot.

    I added this into buttonhandler to keep the shield from un-equipping when activated
    Code:
    			else if (componentId == 21 && packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET && player.getEquipment().getShieldId() == 11283)
    				// Not sure what to do here
    			else if (componentId == 21 && !(packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET))
    				ButtonHandler.sendRemove(player, Equipment.SLOT_SHIELD);
    If anyone could help with attacking npcs/players with the special, I would be very grateful.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,417
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Try a different packet id
    Reply With Quote  
     

  3. #3  
    Donator
    The Stoned's Avatar
    Join Date
    Jan 2013
    Posts
    619
    Thanks given
    56
    Thanks received
    76
    Rep Power
    58
    He has that correct and that isn't even the problem. The problem is not knowing how to send the special attack when you do click activate.
    Reply With Quote  
     

  4. #4  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    24
    Posts
    3,337
    Thanks given
    801
    Thanks received
    1,185
    Rep Power
    189
    PlayerCombat.java

    Code:
    		if (player.getEquipment().getShieldId() == 11283 && player.DFS >= 1 && player.canSpec == true) {
    			player.setNextGraphics(new Graphics(1165));
    			player.setNextAnimation(new Animation(6696));
    			player.DFS--;
    			delayMagicHit(2, getMagicHit(player, Utils.random(0, 300)));
    			World.sendProjectile(player, target, 1166, 41, 16, 31, 35, 16, 0);
    			player.canSpec = false;
    			return combatDelay;
    		}
    Combat.java

    Code:
    	public static boolean hasDragonFire(Entity target) {
    		if (target instanceof NPC)
    			return false;
    		Player p2 = (Player) target;
    		int shieldId = p2.getEquipment().getShieldId();
    		if (shieldId == 11283 && p2.DFS >= 1) {
    			p2.canSpec = true;
    		return true;
    		}
    		return shieldId == 11283;
    	}
    buttonhandler.java

    Code:
    			else if (componentId == 21 && packetId == 67 && player.getEquipment().getShieldId() == 11283)
    				Combat.hasDragonFire(player);
    done it a while ago, adjust it to your needs, obviously using a boolean for it is a bad idea, but it works none of the less

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

  5. Thankful user:


  6. #5  
    Owner of Virtus
    k0ed ur mom's Avatar
    Join Date
    Jun 2012
    Age
    31
    Posts
    541
    Thanks given
    20
    Thanks received
    46
    Rep Power
    11
    Quote Originally Posted by Santa Hat View Post
    PlayerCombat.java

    Code:
    		if (player.getEquipment().getShieldId() == 11283 && player.DFS >= 1 && player.canSpec == true) {
    			player.setNextGraphics(new Graphics(1165));
    			player.setNextAnimation(new Animation(6696));
    			player.DFS--;
    			delayMagicHit(2, getMagicHit(player, Utils.random(0, 300)));
    			World.sendProjectile(player, target, 1166, 41, 16, 31, 35, 16, 0);
    			player.canSpec = false;
    			return combatDelay;
    		}
    Combat.java

    Code:
    	public static boolean hasDragonFire(Entity target) {
    		if (target instanceof NPC)
    			return false;
    		Player p2 = (Player) target;
    		int shieldId = p2.getEquipment().getShieldId();
    		if (shieldId == 11283 && p2.DFS >= 1) {
    			p2.canSpec = true;
    		return true;
    		}
    		return shieldId == 11283;
    	}
    buttonhandler.java

    Code:
    			else if (componentId == 21 && packetId == 67 && player.getEquipment().getShieldId() == 11283)
    				Combat.hasDragonFire(player);
    done it a while ago, adjust it to your needs, obviously using a boolean for it is a bad idea, but it works none of the less
    Thanks for this.
    Made a lot of adjustments to get it working pretty much 100%
    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. Dragonfire shield special attack 718
    By Ace Hood in forum Help
    Replies: 1
    Last Post: 10-17-2013, 04:40 AM
  2. Dragonfire Shield Special attack request 718
    By Ace Hood in forum Requests
    Replies: 10
    Last Post: 09-17-2013, 12:05 PM
  3. [718+] Dragonfire shield special attack? [REQ]
    By Chaos105 in forum Requests
    Replies: 0
    Last Post: 08-31-2013, 03:24 AM
  4. [718] Dragonfire Shield Special [REQ]
    By Lost Redemption in forum Requests
    Replies: 2
    Last Post: 06-03-2013, 10:37 PM
  5. Matrix 718 - 90% Dragonfire Shield
    By SuperNyanNyan in forum Show-off
    Replies: 20
    Last Post: 03-31-2013, 07:14 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
  •