Thread: [Elvarg Base] Adding special bar to toxic staff of the dead

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 [Elvarg Base] Adding special bar to toxic staff of the dead 
    Registered Member
    Join Date
    May 2015
    Posts
    15
    Thanks given
    1
    Thanks received
    0
    Rep Power
    10
    Hi, I was wondering how I would add a special bar to the toxic staff of the dead. I've added it the weapon interface, which is this:
    Spoiler for Code:
    TOXIC_STAFF(328, 355, 5, new FightType[] { FightType.TOXIC_STAFF_BASH, FightType.TOXIC_STAFF_POUND,
    FightType.TOXIC_STAFF_FOCUS,}, 18566, 18569);

    I then added case 340: for the special bar on weaponinterfaces.java and client.java, I've set my toxic staff to use the TOXIC_STAFF interface in my items.json file, I added in a CombatSpecial.java for the toxic staff,
    Within weaponinterfaces.java I also set it to check if it's a regular staff or a toxic staff as follows:
    Spoiler for Code:
    case 336: // staff
    if (player.getCombat().getWeapon() == WeaponInterface.TOXIC_STAFF)
    player.getCombat().setFightType(FightType.TOXIC_ST AFF_BASH);
    else
    player.getCombat().setFightType(FightType.STAFF_BA SH);
    return true;
    case 335:
    if (player.getCombat().getWeapon() == WeaponInterface.TOXIC_STAFF)
    player.getCombat().setFightType(FightType.TOXIC_ST AFF_POUND);
    else
    player.getCombat().setFightType(FightType.STAFF_PO UND);
    return true;
    case 334:
    if (player.getCombat().getWeapon() == WeaponInterface.TOXIC_STAFF)
    player.getCombat().setFightType(FightType.TOXIC_ST AFF_FOCUS);
    else
    player.getCombat().setFightType(FightType.STAFF_FO CUS);
    return true;

    I've added in a definiton for TOXIC_STAFF in weaponinterface.java which is as follows:
    Spoiler for Code:
    TOXIC_STAFF(328, 18566, 18569);

    I am fairly positive all IDs I am using are correct, I went in and checked interface 328 to confirm.
    I also added this in for the toxic staff so it used correct animations when attacking, but I do not believe it has any affect on the special bar appearing. (FightType.java)
    Spoiler for Code:
    TOXIC_STAFF_BASH(440, 43, 0, BonusManager.ATTACK_CRUSH, FightStyle.ACCURATE),
    TOXIC_STAFF_POUND(440, 43, 1, BonusManager.ATTACK_CRUSH, FightStyle.AGGRESSIVE),
    TOXIC_STAFF_FOCUS(440, 43, 2, BonusManager.ATTACK_CRUSH, FightStyle.DEFENSIVE),

    I have also created a ToxicStaffCombatMethod for the special attack.

    So, I do not know what I am missing, if anyone could help me out with telling me where I need to add something I would greatly appreciate it.
    Reply With Quote  
     

  2. #2  
    Registered Member 1m6n29s9gmxh's Avatar
    Join Date
    Jan 2017
    Posts
    430
    Thanks given
    32
    Thanks received
    100
    Rep Power
    40
    did you add it to itemassistant.java?
    Spoiler for Insanity V2 Coders be like ::
    Attached image
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2015
    Posts
    15
    Thanks given
    1
    Thanks received
    0
    Rep Power
    10
    Quote Originally Posted by Hitmanerator View Post
    did you add it to itemassistant.java?
    There isn't anything called itemassistant.java , could it be any other name?

    I've went and double checked and my IDs that I've inputted seem to be correct, I've also checked numerous other weapons as a reference, I do not know what I am missing.
    Reply With Quote  
     

  4. #4  
    Registered Member Mr. Snow's Avatar
    Join Date
    Feb 2015
    Age
    25
    Posts
    222
    Thanks given
    42
    Thanks received
    33
    Rep Power
    61
    I wish i could help more than this but its all i got; try looking for an item id with a special bar & see where that id is used. If you must, remove that id and compile/run your source to see if the bar goes away. Then you know where to add your item id. dont be scared to break your code to learn more about it. Aslong as you know how to fix it
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2015
    Posts
    15
    Thanks given
    1
    Thanks received
    0
    Rep Power
    10
    Quote Originally Posted by mushroom tip View Post
    I wish i could help more than this but its all i got; try looking for an item id with a special bar & see where that id is used. If you must, remove that id and compile/run your source to see if the bar goes away. Then you know where to add your item id. dont be scared to break your code to learn more about it. Aslong as you know how to fix it

    Alright I tried this, in CombatSpecial.java there is the Armadyl Godsword definition, as follows:
    Spoiler for Code:
    ARMADYL_GODSWORD(new int[] { 11802 }, 50, 1.50, 1.6, new ArmadylGodswordCombatMethod(), WeaponInterface.GODSWORD),


    If I remove the CombatSpecial.java entry, it removes the special bar ingame, the entry I have for the toxic staff is this:
    Spoiler for Code:
    TOXIC_STAFF_OF_THE_DEAD(new int[] { 12904 }, 100, 0, 0, new ToxicStaffCombatMethod(), WeaponInterface.TOXIC_STAFF);


    I've tried to change it around, editing some numbers for my TOXIC_STAFF_OF_THE_DEAD, and looking at how other items have their specials defined, but still nothing. I'll keep trying though, thanks for the input.

    EDIT: When I change my WeaponInterfaces.java entry to match the entry for the whip, I get a special bar, so I now need to figure out why my other entry didn't work.

    When I switched it to a different interface, 6103, the staff interface without autocast, the special bar appeared, but the interface with autocast doesn't. If anyone knows why this may be please tell me, I couldn't see a difference when I looked into the editor and inspected each of the models/spirits/texts for both interfaces.
    Reply With Quote  
     

  6. #6  
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    675
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Knowing it's a ruse base look at CombatSpecial.java under com.ruse.world.content.weapon.CombatSpecial.java should look something like this:

    Attached image
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    May 2015
    Posts
    15
    Thanks given
    1
    Thanks received
    0
    Rep Power
    10
    Quote Originally Posted by Yalu View Post
    Knowing it's a ruse base look at CombatSpecial.java under com.ruse.world.content.weapon.CombatSpecial.java should look something like this:
    It's defined like this
    Attached image
    But the problem isn't with combatspecial.java, it's within weaponinterfaces.java, at the moment I have TOXIC_STAFF defined like this:
    Spoiler for Code:
    TOXIC_STAFF(328, 355, 5, new FightType[] { FightType.TOXIC_STAFF_BASH, FightType.TOXIC_STAFF_POUND,
    FightType.TOXIC_STAFF_FOCUS}, 18566, 18569);

    Which is interface 328 w/ it's IDs, and it doesn't apply a special bar.
    But if I use interface 6103, defined like this:
    Spoiler for Code:
    TOXIC_STAFF(6103, 6132, 5, new FightType[] { FightType.TOXIC_STAFF_BASH, FightType.TOXIC_STAFF_POUND,
    FightType.TOXIC_STAFF_FOCUS}, 6117, 6129);

    It puts the special bar, I've also tried it with the whip interface and a special bar was there as well. The problem with using 6103 is it lacks the autocast option, which the toxic staff should have.
    I've checked the interfaces numerous times and I am fairly certain I am using the correct IDs for 328, so I do not know why it isn't showing a special attack bar while all the other interfaces are.
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Jun 2017
    Posts
    168
    Thanks given
    134
    Thanks received
    148
    Rep Power
    293
    Same issue for me, I can add the special attack bar but not have the spec bar and the autocast options. Does anyone have the correct id or whatever to fix this?


    Check out the Emulous advertisement thread!
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Dec 2017
    Posts
    89
    Thanks given
    12
    Thanks received
    27
    Rep Power
    0
    Quote Originally Posted by 1m6n29s9gmxh View Post
    did you add it to itemassistant.java?
    This isn't pi spastic
    Reply With Quote  
     

  10. Thankful user:


  11. #10  
    Donator

    Join Date
    Dec 2013
    Posts
    491
    Thanks given
    569
    Thanks received
    123
    Rep Power
    55
    Quote Originally Posted by Mitch Eggers View Post
    This isn't pi spastic
    So savage
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. [REQ] Toxic staff of the dead spec bar id
    By HazeRS in forum Configuration
    Replies: 2
    Last Post: 08-21-2017, 11:26 AM
  2. Toxic staff of the dead Hit Animation
    By Provider in forum Requests
    Replies: 0
    Last Post: 06-03-2016, 02:21 AM
  3. Replies: 1
    Last Post: 09-12-2015, 06:15 PM
  4. [PI] Toxic staff of the dead bug
    By jasperheeren in forum Help
    Replies: 5
    Last Post: 08-16-2015, 05:30 PM
  5. Replies: 4
    Last Post: 02-11-2015, 03:26 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
  •