Thread: [tut]Combat hit totals (Kinda fun to have)..

Results 1 to 6 of 6
  1. #1 [tut]Combat hit totals (Kinda fun to have).. 
    Registered Member
    Join Date
    Jul 2006
    Age
    35
    Posts
    487
    Thanks given
    0
    Thanks received
    0
    Rep Power
    56
    This just tells you what you hit and what you got hit yourself after you attack an npc.

    Add these in player.java:
    Code:
    public int[] Totals = new int[2];
    	public boolean ShowTotals;
    	/*
    	 *	Totals[0] = Damage given to npc
    	 *	Totals[1] = Damage taken from npc
    	 */
    Add these under case 185:
    Code:
    /*
    							 *	Totals buttons
    							 */								
    							case 48176: //Yes
    								ShowTotals = true;
    								sendMessage("Totals are on.");
    								break;
    							case 48177: //No
    								ShowTotals = false;
    								sendMessage("Totals are off.");
    								break;
    Add this under your "ResetAttackNPC":
    Code:
    if (ShowTotals)
    		{
    			sendMessage("[TOTALS]: You dealt a total of "+Totals[0]+" damage and got dealt "+Totals[1]+" damage yourself.");
    		}
    		Totals[0] = 0;
    		Totals[1] = 0;
    Add this in your "AttackNPC" Method:
    Code:
    Totals[0] += hitDiff;
    Then open npcHadnler.java and add this under the "AttackPlayer" method:
    Code:
    p.Totals[1] += hitDiff;
    Finally add this under your welcome message:
    Code:
    sendFrame126("Show Totals", 12463);
    This uses the accept aid buttons on the high detail interface. If you don't have it then replace:
    Code:
    setSidebarInterface(11, 4445);
    With this:
    Code:
    setSidebarInterface(11, 904);
    - Mr. Brightside
     

  2. #2  
    Sleep
    Guest
    Why don't you make a config file? xD! Nah just kidding, this is good .
     

  3. #3  
    Registered Member
    Join Date
    Jul 2006
    Age
    35
    Posts
    487
    Thanks given
    0
    Thanks received
    0
    Rep Power
    56
    Rofl, yea why don't I do that for 2 ints o.o
     

  4. #4  
    Mr.Lothar
    Guest
    nice pretty nifty(Just joke) pretty good job _D
     

  5. #5  
    DaKoTaZ162
    Guest
    Very nice, There is a reason you have 45Rep Power ^_^
     

  6. #6  
    Zekkalkan
    Guest
    Lmao!
    Nice job Clause. Won't add, but nice!
     


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. Hello (kinda)
    By rmb7 in forum The Red Carpet
    Replies: 3
    Last Post: 04-23-2009, 02:12 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •