Thread: [PI]Basic Question

Results 1 to 6 of 6
  1. #1 [PI]Basic Question 
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Ok, this is an extremely easy question to answer but I just can't get this to work..

    I've added two custom items into my server; Heaven's Fury and Fallen Angel.
    I finally got the stance, run and walk animations to work but I just can't get the special bar to show up for them..

    I've followed a lot of tutorials (even though I know exactly how to add a special attack to a weapon) but the special bar just WONT show up.. I made special attacks for each of them in CombatAssistant.java, made them two handed, got them to wear in slot 3 (weapon slot), gave them correct block, walk run, attack animations, gave them a special amount, gave them stat requirements ect..

    It all works perfectly fine except for getting the special bars to show up, if i spawn the interface for the special attack bar (::interface 7574) and I click it then walk around and attack an npc it'll use the special attack just fine..

    Here's the code I'm using to add the special bar in;
    Code:
    			case 14001:
    			case 14002:
    				c.getPA().sendFrame171(0, 7574); 
    				specialAmount(weapon, c.specAmount, 7586);
    				break;
    That's the same one that the ags is in, anchor, ect. I'm probably missing something totally obvious but I just can't see what it is, if anyone can help me, I'd greatly appreciate it.

    Spoiler for No Spec Bar?:

    sweet
    Reply With Quote  
     

  2. #2  
    Programming Enthusiast

    o paws's Avatar
    Join Date
    Sep 2011
    Age
    28
    Posts
    301
    Thanks given
    52
    Thanks received
    40
    Rep Power
    108
    In your itemAssistant class search for
    Code:
    public void addSpecialBar(int weapon) {
    and in there add..

    Code:
    	case 14001:
    			case 14002:
    				c.getPA().sendFrame171(0, 7574); 
    				specialAmount(weapon, c.specAmount, 7586);
    				break;
    Then go into CombatAssistant.java class search for
    Code:
    public void activateSpecial(int weapon, int i){
    and add this under switch(weapon) {
    Code:
    case 14001: // Weapon ID
    c.gfx100(####); // get gfx id you want
    c.startAnimation(####); // get animation id you want
    c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase()); // this gets the item hit delay
    c.specAccuracy = 1.10; //edit for accuracy
    c.specDamage = 1.20; //edit for damage increase
    			break;
    case 14002: // Weapon ID
    c.gfx100(####); // get gfx id you want
    c.startAnimation(####); // get animation id you want
    c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase()); // this gets the item hit delay
    c.specAccuracy = 1.10; //edit for accuracy
    c.specDamage = 1.20; //edit for damage increase
    			break;
    Also in CombatAssistant search for
    Code:
    public boolean checkSpecAmount(int weapon) {
    add this...
    Code:
    case 14001:
    case 14002:
    			if(c.specAmount >= 5) {
    				c.specAmount -= 5;
    				c.getItems().addSpecialBar(weapon);
    				return true;
    			}
    			return false;
    This will make it 2 specs in 1 bar you can change if you want
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Spoiler for Quote From ForgivenX:
    Quote Originally Posted by ForgivenX View Post
    In your itemAssistant class search for
    Code:
    public void addSpecialBar(int weapon) {
    and in there add..

    Code:
    	case 14001:
    			case 14002:
    				c.getPA().sendFrame171(0, 7574); 
    				specialAmount(weapon, c.specAmount, 7586);
    				break;
    Then go into CombatAssistant.java class search for
    Code:
    public void activateSpecial(int weapon, int i){
    and add this under switch(weapon) {
    Code:
    case 14001: // Weapon ID
    c.gfx100(####); // get gfx id you want
    c.startAnimation(####); // get animation id you want
    c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase()); // this gets the item hit delay
    c.specAccuracy = 1.10; //edit for accuracy
    c.specDamage = 1.20; //edit for damage increase
    			break;
    case 14002: // Weapon ID
    c.gfx100(####); // get gfx id you want
    c.startAnimation(####); // get animation id you want
    c.hitDelay = getHitDelay(c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase()); // this gets the item hit delay
    c.specAccuracy = 1.10; //edit for accuracy
    c.specDamage = 1.20; //edit for damage increase
    			break;
    Also in CombatAssistant search for
    Code:
    public boolean checkSpecAmount(int weapon) {
    add this...
    Code:
    case 14001:
    case 14002:
    			if(c.specAmount >= 5) {
    				c.specAmount -= 5;
    				c.getItems().addSpecialBar(weapon);
    				return true;
    			}
    			return false;
    This will make it 2 specs in 1 bar you can change if you want


    Trust me man, I've done all that and it's set up exactly like that.
    sweet
    Reply With Quote  
     

  4. #4  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    You have made it so that the weapon you're using is assigned to slot three right?
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Quote Originally Posted by Gohan View Post
    You have made it so that the weapon you're using is assigned to slot three right?
    Yes, it wears in slot 3 with correct animations and everything, just no spec bar.
    sweet
    Reply With Quote  
     

  6. #6  
    Programming Enthusiast

    o paws's Avatar
    Join Date
    Sep 2011
    Age
    28
    Posts
    301
    Thanks given
    52
    Thanks received
    40
    Rep Power
    108
    Interesting, I have come across this problem before with certain items. I'm not quite sure what it is but if I find out I'll be sure to send you a message :/
    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. Basic staff question
    By kllez in forum Help
    Replies: 3
    Last Post: 04-26-2011, 06:44 AM
  2. [PI] Basic dumb ass question
    By Pyro Sauce in forum Help
    Replies: 2
    Last Post: 01-04-2011, 03:39 AM
  3. Basic PhP Question
    By Shamon King in forum Application Development
    Replies: 2
    Last Post: 07-08-2009, 10:02 PM
  4. Basic question.
    By Logical in forum Help
    Replies: 0
    Last Post: 02-19-2009, 07:03 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
  •