[Tut] [317] Making special attack

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Account Upgraded | Title Enabled! LittleMaffia is offline
    MemberRank
    Jan 2007 Join Date
    259Posts

    [Tut] [317] Making special attack

    Purpose: Real Special Attacks With Handler

    Difficulty: 3/10

    Assumed Knowledge: copy and paste, extract

    Server Base: Any

    Classes Modified: client.java, server.java

    Procedure
    MEGAUPLOAD - The leading online storage and file delivery service
    Step 1:

    Download the attached file below. Extract the file into your server folder with all your other Java files. This step is crutial that you do because its the base to the special attacks.


    Step 2:

    Search for in your client: boolean process() - and right above that place these (make sure you are not placing them in any voids, booleans, etc.):

    Code:
    public void fsBar(int id1, int id2, int id3)
    {
    outStream.createFrame(70);
    outStream.writeWord(id1);
    outStream.writeWordBigEndian(id2);
    outStream.writeWordBigEndian(id3);
    }
    public void l33thax(int id)
    {
    outStream.createFrame(171);
    outStream.writeByte(0);
    outStream.writeWord(id);
    flushOutStream();
    }
    public boolean specspell(int castID, int casterY, int casterX, int offsetY, int offsetX, int angle, int speed, int startHeight, int endHeight, int enemyY,int enemyX, int Lockon) 
    {
    try {
    fcastid = castID;
    fcasterY = casterY;
    fcasterX = casterX;
    foffsetY = offsetY;
    foffsetX = offsetX;
    fangle = angle;
    fspeed = speed;
    fsh = startHeight;
    feh = endHeight;
    fenemyY = enemyY;
    fenemyX = enemyX;
    fLockon = Lockon;
    actionTimer = 0;
    //Casts Spell In Hands
    if(cast == false) {
    createProjectile(casterY, casterX, offsetY, offsetX, angle, speed, castID, startHeight, endHeight, Lockon);
    cast = true;
    firingspell = true;
    }
    //Fires Projectile
    if(cast == true && fired == false) {
    firingspell = false;
    cast = false;
    fired = false;
    }
    } catch(Exception E) {
    }
    return true;
    }
    public void ProjectileSpec(int startID, int casterY, int casterX, int offsetY, int offsetX, int index, int enemyY, int enemyX) {
    {
    try {
       server.specialHandler.createSpec(startID, casterY, casterX, offsetY, offsetX, 50, 95, 43, 31, enemyY, enemyX, index+1);
    } catch(Exception E) {
    }
     }
    }
    Step 3:

    Add this under boolean process() in your client:

    Code:
    if (server.specialHandler.specialAmount <= 99 && server.specialHandler.specialDelay <= 0) {
    server.specialHandler.specialAmount += 1;
    server.specialHandler.SpecialBarLength();
    }
    l33thax(12323);
    l33thax(7574);
    l33thax(7599);
    l33thax(7549);
    l33thax(8493);
    l33thax(7499);
    Step 4:

    Search for: boolean attack() - and with the other ints in that add these (make sure they are below int EnemyX and EnemyY):

    Code:
    int offsetX = (absX - EnemyX) * -1;
    int offsetY = (absY - EnemyY) * -1;
    Step 5:

    Go down just alittle until you see:

    Code:
    if ((EnemyHP - hitDiff) < 0) {
    hitDiff = EnemyHP;
    }

    And add this right bleolow the }:

    Code:
    if (server.specialHandler.returnWeapon(playerEquipment[playerWeapon])==true && server.specialHandler.usingSpecial == true) {
    if (server.specialHandler.GetSpecCost(playerEquipment[playerWeapon]) < server.specialHandler.specialAmount) {
    server.specialHandler.specialAmount -= server.specialHandler.GetSpecCost(playerEquipment[playerWeapon]);
    setAnimation(server.specialHandler.returnWeaponEmote(playerEquipment[playerWeapon]));
    ProjectileSpec(server.specialHandler.GetSpecProjectile(playerEquipment[playerWeapon]), absY, absX, offsetY, offsetX, AttackingOn, EnemyY, EnemyX);
    hitDiff = server.specialHandler.GetSpecDamage(playerEquipment[playerWeapon]);
    server.specialHandler.usingSpecial = false;
    server.specialHandler.SpecialBarLength();
    } else if (server.specialHandler.GetSpecCost(playerEquipment[playerWeapon]) > server.specialHandler.specialAmount) {
    sendMessage("You need atleast "+server.specialHandler.GetSpecCost(playerEquipment[playerWeapon])+ "special energy.");
    server.specialHandler.SpecialBarLength();
    } else if (server.specialHandler.returnWeapon(playerEquipment[playerWeapon])==false) {
    sendMessage("You need a special attack weapon.");
    server.specialHandler.SpecialBarLength();
    }
    }
    Step 6:

    search for: most buttons - in your client and add under the switch:

    Code:
    case 33033://halberds
    case 29113://bows
    case 29163://swords
    case 29138://dds
    case 48023://whip
    try {
    if (server.specialHandler.usingSpecial == true) {
    server.specialHandler.usingSpecial = false;
    } else if (server.specialHandler.usingSpecial == false) {
    server.specialHandler.usingSpecial = true;
    }
    server.specialHandler.SpecialBarLength();
    } catch (Exception popo) {
    }
    break;
    Step 7:

    Search for: boolean attacknpc() - and with the other ints in that add these (make sure they are below int EnemyX and EnemyY):

    Code:
    int offsetX = (absX - EnemyX) * -1;
    int offsetY = (absY - EnemyY) * -1;
    Step 8:

    Go down just alittle until you see:

    Code:
    if ((EnemyHP - hitDiff) < 0) {
    hitDiff = EnemyHP;
    }

    And add this right bleolow the }:

    Code:
    if (server.specialHandler.returnWeapon(playerEquipment[playerWeapon])==true && server.specialHandler.usingSpecial == true) {
    if (server.specialHandler.GetSpecCost(playerEquipment[playerWeapon]) < server.specialHandler.specialAmount) {
    server.specialHandler.specialAmount -= server.specialHandler.GetSpecCost(playerEquipment[playerWeapon]);
    setAnimation(server.specialHandler.returnWeaponEmote(playerEquipment[playerWeapon]));
    ProjectileSpec(server.specialHandler.GetSpecProjectile(playerEquipment[playerWeapon]), absY, absX, offsetY, offsetX, attacknpc, EnemyY, EnemyX);
    hitDiff = server.specialHandler.GetSpecDamage(playerEquipment[playerWeapon]);
    server.specialHandler.usingSpecial = false;
    server.specialHandler.SpecialBarLength();
    } else if (server.specialHandler.GetSpecCost(playerEquipment[playerWeapon]) > server.specialHandler.specialAmount) {
    sendMessage("You need atleast "+server.specialHandler.GetSpecCost(playerEquipment[playerWeapon])+ "special energy.");
    server.specialHandler.SpecialBarLength();
    } else if (server.specialHandler.returnWeapon(playerEquipment[playerWeapon])==false) {
    sendMessage("You need a special attack weapon.");
    server.specialHandler.SpecialBarLength();
    }
    }
    Step 9:

    Open server.java and find: public static void main(java.lang.String args[]) { - and under that add:

    Code:
    specialHandler = new SpecialHandler();

    Now find: playerHandler.process(); - and under that add:

    Code:
    specialHandler.process();

    Now find: public static PlayerHandler playerHandler = null; - and under that add:

    Code:
    public static SpecialHandler specialHandler = null;
    Last edited by LittleMaffia; 24-07-07 at 10:45 PM. Reason: Added Link


  2. #2
    Valued Member skaterdavy is offline
    MemberRank
    May 2007 Join Date
    124Posts

    Re: [TUT] Making special attack

    So where's the download link???

  3. #3
    Account Upgraded | Title Enabled! georgegeorge is offline
    MemberRank
    Oct 2005 Join Date
    Israel, Tel-AviLocation
    1,079Posts

    Re: [TUT] Making special attack

    download link of what?

  4. #4
    The light can't stop me. Steven is offline
    MemberRank
    May 2007 Join Date
    United KingdomLocation
    1,531Posts

    Re: [TUT] Making special attack

    Cheers.

  5. #5
    Valued Member skaterdavy is offline
    MemberRank
    May 2007 Join Date
    124Posts

    Re: [TUT] Making special attack

    Quote Originally Posted by georgegeorge View Post
    download link of what?

    he says:
    Step 1:

    Download the attached file below. Extract the file into your server folder with all your other Java files. This step is crutial that you do because its the base to the special attacks.


    so where is it then???



  6. #6
    The light can't stop me. Steven is offline
    MemberRank
    May 2007 Join Date
    United KingdomLocation
    1,531Posts

    Re: [TUT] Making special attack

    He's right.. i didnt relise until he mentioned it.. could he add them please? For other peoples sake

  7. #7
    Account Upgraded | Title Enabled! LittleMaffia is offline
    MemberRank
    Jan 2007 Join Date
    259Posts

    Re: [TUT] Making special attack

    1sec Im Searching

  8. #8
    Enthusiast Biffaboy is offline
    MemberRank
    Oct 2006 Join Date
    EnglandLocation
    45Posts

    Re: [TUT] Making special attack

    I get errors while compiling..

  9. #9
    Member helloeoj is offline
    MemberRank
    May 2007 Join Date
    61Posts

    Re: [TUT] Making special attack

    You never put the link in :\

  10. #10
    Member devo246 is offline
    MemberRank
    Jul 2007 Join Date
    In Your GarageLocation
    60Posts

    Re: [TUT] Making special attack

    Wheres the link????

  11. #11
    Novice dozna is offline
    MemberRank
    Jul 2007 Join Date
    1Posts

    Re: [TUT] Making special attack

    Where is the link ?!

  12. #12
    Enthusiast zammy1-4 is offline
    MemberRank
    Feb 2007 Join Date
    45Posts

    Re: [TUT] Making special attack

    Stop complaining!!! He put the link already ffs -.-' you guys just can't be patient can you!?!?

  13. #13
    Account Upgraded | Title Enabled! LittleMaffia is offline
    MemberRank
    Jan 2007 Join Date
    259Posts

    Re: [TUT] Making special attack

    Np guys ;)

  14. #14
    Member shingcing is offline
    MemberRank
    Jan 2007 Join Date
    84Posts

    Re: [TUT] Making special attack

    boolean process()

    I dont have that can u plz add the tut?to add them lol !

  15. #15
    Account Upgraded | Title Enabled! LittleMaffia is offline
    MemberRank
    Jan 2007 Join Date
    259Posts

    Re: [TUT] Making special attack

    Omg, what source you use?

    Btw search for this


    Code:
        public boolean process() {        // is being called regularily every 500ms



Page 1 of 2 12 LastLast

Advertisement