Thread: wind rush, iban blast and magic dart autocasting

Results 1 to 10 of 10
  1. #1 wind rush, iban blast and magic dart autocasting 
    Registered Member
    Join Date
    Nov 2012
    Posts
    289
    Thanks given
    5
    Thanks received
    20
    Rep Power
    15
    im trying to get 3 spells to wrk with autocast but it just isnt happening can some1 pls help me,

    this is what i have done so far:

    Spoiler for Magic.java:
    case 98:
    if(!checkSpellRequirements(player, 1, delete, AIR_RUNE, 2))
    return false;
    break;

    case 56: // magic dart
    if (player.getEquipment().getWeaponId() != 4170) {
    player.getPackets()
    .sendGameMessage(
    "You need to be equipping a slayer's staff to cast this spell.",
    true);
    return false;
    }


    Spoiler for Combatdefinitions.java:
    case 98:
    return 143; //wind rush
    case 56:
    return 37; // magic dart


    Spoiler for playercombat.java:
    case 98: // wind rush
    player.setNextAnimation(new Animation(14221));
    mage_hit_gfx = 2700;
    base_mage_xp = 2.5;
    int baseDamage = 10;
    if (player.getEquipment().getGlovesId() == 205) {
    baseDamage = 80;
    }
    delayMagicHit(2, getMagicHit(player, getRandomMagicMaxHit(player, baseDamage)));
    World.sendProjectile(player, target, 2699, 18, 18, 50, 50, 0, 0);
    return 5;

    case 56: // slayer dart
    if (isStaff)
    player.setNextAnimation(new Animation(18317));
    else
    player.setNextAnimation(new Animation(18265));
    mage_hit_gfx = 329;
    base_mage_xp = 31.5;
    spellType = NPCWeaknesses.AIR;
    delayMagicHit(2, getMagicHit(player, getRandomMagicMaxHit(player, (int) (player.getSkills().getLevelForXp(Skills.MAGIC) * 2.5))));
    World.sendProjectile(player, target, 328, 40, 32, 20, 50, 0, 0);
    return 5;


    Spoiler for Worldpacketsdecoder.java:
    case 98: //wind rush
    case 56: //magic dart


    still finding config for ibans blast but i dont know why autocast wont work after adding all these what am i doing wrong?

    they only work as a single cast instead of auto
    Reply With Quote  
     

  2. #2  
    Owner of Zerion
    robstever's Avatar
    Join Date
    Jun 2013
    Posts
    99
    Thanks given
    22
    Thanks received
    11
    Discord
    pancakepal #4318
    Rep Power
    27
    give [Only registered and activated users can see links. ] thread a look, it explains pretty well just how to add a spell and "bind" it to a weapon. This might help you better understand what you've missed as far as if your spell is an autoCastSpell
    Reply With Quote  
     

  3. #3  
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    99
    Thanks given
    25
    Thanks received
    6
    Discord
    gagner15 #9470
    Rep Power
    36
    IDK if that will help you but if there anything add me up on discord : KingKenobi#9470

    Spoiler for code:
    PlayerCombat:
    Code:
    private static boolean hasIbanStaff(Player player) {
    		int weaponId = player.getEquipment().getWeaponId();
    		return weaponId == 1409 ;
    	}
    Make a spell id in Magic.java
    find:
    Code:
    public static final boolean checkCombatSpell(Player player, int spellId, int set, boolean delete) {
    and add :
    Code:
    if (spellId == 4000)
    			return true;
    PlayerCombat.java
    Find
    Code:
    public int processWithDelay(Player player) {
    Add:
    Code:
    if (spellId < 1 && hasIbanStaff(player))
    				spellId = 4000;
    Find:
    Code:
    if (spellId > 0) {
    Add up to this:
    Code:
    && spellId != 4000
    PlayerCombat.java
    find:
    Code:
    public int mageAttack(final Player player, int spellId, boolean autocast) {
    And add:
    Code:
    if (spellId == 4000) {
    MAGIC CAST CODE WHERE YOU PUT ANIMATION ECT
    }
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2012
    Posts
    289
    Thanks given
    5
    Thanks received
    20
    Rep Power
    15
    This is like adding a spell to the staff and making it act like a polypore staff :/ i want the autocast option to work
    Reply With Quote  
     

  5. #5  
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    99
    Thanks given
    25
    Thanks received
    6
    Discord
    gagner15 #9470
    Rep Power
    36
    Quote Originally Posted by khayam View Post
    This is like adding a spell to the staff and making it act like a polypore staff :/ i want the autocast option to work
    Not too sure what you mean... you want it to auto do the spell and don't take up rune and only use the iban cast?
    or you just want to auto-cast option to work with this staff?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2012
    Posts
    289
    Thanks given
    5
    Thanks received
    20
    Rep Power
    15
    ok so for example here is wind rush:
    [Only registered and activated users can see links. ]

    autocast option isnt working.

    so when i send the config which selects autocast on manually it still doesnt work?
    [Only registered and activated users can see links. ]

    i dont know why the auto cast option wont work
    Reply With Quote  
     

  7. #7  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,248
    Thanks given
    1,014
    Thanks received
    1,421
    Rep Power
    5000
    Just sending the config manually doesn't magically make you autocast a spell, try to figure out how other autocast spells are handled (buttonhandler -> magiccombat?)
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Nov 2012
    Posts
    289
    Thanks given
    5
    Thanks received
    20
    Rep Power
    15
    Quote Originally Posted by bracket View Post
    Just sending the config manually doesn't magically make you autocast a spell, try to figure out how other autocast spells are handled (buttonhandler -> magiccombat?)

    Spoiler for Magic.java:
    case 98:
    if(!checkSpellRequirements(player, 1, delete, AIR_RUNE, 2))
    return false;
    break;

    case 56: // magic dart
    if (player.getEquipment().getWeaponId() != 4170) {
    player.getPackets()
    .sendGameMessage(
    "You need to be equipping a slayer's staff to cast this spell.",
    true);
    return false;
    }


    Spoiler for Combatdefinitions.java:
    case 98:
    return 143; //wind rush
    case 56:
    return 37; // magic dart


    Spoiler for playercombat.java:
    case 98: // wind rush
    player.setNextAnimation(new Animation(14221));
    mage_hit_gfx = 2700;
    base_mage_xp = 2.5;
    int baseDamage = 10;
    if (player.getEquipment().getGlovesId() == 205) {
    baseDamage = 80;
    }
    delayMagicHit(2, getMagicHit(player, getRandomMagicMaxHit(player, baseDamage)));
    World.sendProjectile(player, target, 2699, 18, 18, 50, 50, 0, 0);
    return 5;

    case 56: // slayer dart
    if (isStaff)
    player.setNextAnimation(new Animation(18317));
    else
    player.setNextAnimation(new Animation(18265));
    mage_hit_gfx = 329;
    base_mage_xp = 31.5;
    spellType = NPCWeaknesses.AIR;
    delayMagicHit(2, getMagicHit(player, getRandomMagicMaxHit(player, (int) (player.getSkills().getLevelForXp(Skills.MAGIC) * 2.5))));
    World.sendProjectile(player, target, 328, 40, 32, 20, 50, 0, 0);
    return 5;


    Spoiler for Worldpacketsdecoder.java:
    case 98: //wind rush
    case 56: //magic dart


    this is what i have done so far and still no luck
    Reply With Quote  
     

  9. #9  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,248
    Thanks given
    1,014
    Thanks received
    1,421
    Rep Power
    5000
    I'm not familiar with matrix but there must be a parameter in the magic attack method for autocasting or something.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Nov 2012
    Posts
    289
    Thanks given
    5
    Thanks received
    20
    Rep Power
    15
    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. [718] Can't get Wind Rush autocast working
    By KingMagnetic in forum Help
    Replies: 0
    Last Post: 08-11-2014, 07:25 PM
  2. Prayer and Magic tab sprites
    By xxx9234 in forum Help
    Replies: 0
    Last Post: 12-17-2010, 07:50 AM
  3. Magic dart emote
    By Ayton in forum Requests
    Replies: 2
    Last Post: 04-15-2010, 12:50 AM
  4. Mithscape [508] Iban blast
    By mige5 in forum Configuration
    Replies: 9
    Last Post: 07-10-2009, 09:40 PM
  5. has anyone got jads range and magic emotes
    By br43k ur jaw in forum Requests
    Replies: 3
    Last Post: 10-24-2008, 01:49 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
  •