Thread: [PI] Arrow above head

Results 1 to 7 of 7
  1. #1 [PI] Arrow above head 
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    Hello,

    So i was fixing my target system.
    But after trying to find a fix for the arrow above head and on minimap, i didn't find anything...
    ( only thing i found: )

    Code:
    public void createArrow(int type, int id) {
    		c.outStream.createFrame(254); //The packet ID
    		c.outStream.writeByte(type); //1=NPC, 10=Player
    		c.outStream.writeWord(id); //NPC/Player ID
    		c.outStream.write3Byte(0); //Junk
    	}
    So i was wondering how could i display ,
    Code:
    if targetId = 1;
    It will display for the opponent the arrow.

    My find target method:
    Code:
    public int bestTarget(int playerCb, Client aquired) {
    		for (Player p : PlayerHandler.players) {
    			if (p != null && p.inWild() && p != c && p.targetId == 0) {
    				Client c2 = (Client) p;
    				if (goodCombatLevel(c, c2) && goodWildLevel(c, c2)
    						&& c2.inWild()) {
    					System.out.println("Target Found PID: " + c2.playerId
    							+ " for oPID: " + c.playerId);
    					return c2.playerId;
    				}
    			}
    		}
    		System.out.println("No target found for oPID: " + c.playerId);
    		return 0;
    	}
    My int and boolean:
    Code:
    public int targetId = 0;
    	public boolean targetSearching = false;
    I hope someone could help me out

    Thanks
    Reply With Quote  
     

  2. #2  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    send type 10 with the target id.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    Quote Originally Posted by Mobster View Post
    send type 10 with the target id.
    Thank you for your reply

    I tried to do something like this:
    Code:
    public int bestTarget(int playerCb, Client aquired) {
    		for (Player p : PlayerHandler.players) {
    			if (p != null && p.inWild() && p != c && p.targetId == 0) {
    				Client c2 = (Client) p;
    				/*if (!p.playerName.equalsIgnoreCase(c.playerName)) {
    					p.targetId = c.playerId;
    					c.targetId = p.playerId;
    					c.getPA().createPlayerHints(10, p.playerId);
    					c.getPA().requestUpdates();
    				}*/
    				if (goodCombatLevel(c, c2) && goodWildLevel(c, c2) && c2.inWild()) {
    					p.targetId = c.playerId;
    					c.targetId = p.playerId;
    					c.getPA().createPlayerHints(10, p.playerId);
    					c.getPA().requestUpdates();
    					c.getPA().createPlayerHints(10, c.playerIndex);
    					
    					System.out.println("Target Found PID: " + c2.playerId
    							+ " for oPID: " + c.playerId);	
    					return c2.playerId;
    				}
    			}
    		}
    		System.out.println("No target found for oPID: " + c.playerId);
    		return 0;
    	}
    And add at the targetkilling method:
    Code:
    c.headIcon = -1;
    		c.getPA().requestUpdates();
    But that didn't work..
    If you could give any more assistance through tv,skype,rune-server i would love that

    Thank you alot for the answer
    Reply With Quote  
     

  4. #4  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Instead of doing targetId, simply fetch the other players index and use it to send the type. You shouldn't need to tamper with headicons.

    int index = bestTarget(#, #);
    createArrow(10, index);
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    Quote Originally Posted by Mobster View Post
    Instead of doing targetId, simply fetch the other players index and use it to send the type. You shouldn't need to tamper with headicons.

    int index = bestTarget(#, #);
    createArrow(10, index);
    Thank you for your help, couldn't get it work...
    Could you give me any more assistance through tv/skype?

    Already sent you a pm

    Edit: Sorry for me not understanding this, Never used arrow above head method
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    I still can't figure out how to do this ..
    Bump
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jul 2013
    Posts
    150
    Thanks given
    3
    Thanks received
    4
    Rep Power
    13
    I still can't figure out how to do this ..
    Bump
    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: 13
    Last Post: 01-17-2014, 04:48 AM
  2. Pi- HP above head is gone.
    By Robes201112 in forum Help
    Replies: 0
    Last Post: 01-13-2013, 06:08 PM
  3. Arrow above head
    By 123kdd100 in forum Help
    Replies: 1
    Last Post: 09-10-2011, 05:45 PM
  4. [PI] Hp Above head
    By Ronny in forum Help
    Replies: 3
    Last Post: 06-03-2011, 05:09 AM
  5. Hint Icons(Arrows above heads)
    By Palidino in forum Tutorials
    Replies: 39
    Last Post: 11-07-2010, 07:22 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
  •