Jump to content

Akken

Members
  • Posts

    1,139
  • Credits

  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    100%

Everything posted by Akken

  1. Update some grand boss items will be in shop also Bog can be farmable and bought from gm shop Ancient adenas will be the new currency so catacombs will be a playable place too we decided to keep S grade items price as it is from the gm shop but weapons will be 100kk armor will be 3kk - 5kk each part Non S/A Weapons are removed SA Weapons will cost 100kk each and adena rate lowered to x20
  2. Update: Decided not to put raid tokens so S grade will be farmable only for Adenas Also removed boosted zone monastery and the S grade items will be in lower price S/A Weapons 200milion Non s S Grades 50milion Armors will be 50milion each part Also Vote reward will be enabled when we approved on hopzone Discard items is setted not in use Offline trade/Craft enabled but after restart they wont be restored Songs like champion,renewall wont be in buffer same for ressists Dances like siren Aqua Guard etc wont be in buffer The realm that you will on see on login screen will be Carneiar we keep retail realm names Thats for now
  3. thanks i will update for progresses Update: TvT top player will get extra 5kk adena tvt times will be : 8am (lithuanian time) 9 and 10 Mammon Spawn will be announce Castle Lords will be announced Olympiad is retail like except Wait time will be instant A gm will check everytime olympiad is on cause we wont delete class based games Classes: 1st from cat and costs adena 1000 2nd from cat and costs adena 10000 3rd Quest SERVER IS BASED ON L2JFROZEN SO WE KEEP THE CREDITS ON LOGIN, WE RESPECT THE CREATORS THAT GAVE US A POSSIBILITY TO RUN A SERVER We got a good core stuff developers to privent bugs so i guess i dont care if someone got problem with the pack project
  4. Hello and welcome on L2J Insignia, will be a pvp-pve mixed server so we start Rates: x35 Exp,SP Item drop x 1 Adena drop x25 Safe +3 Max +16 All rates are retail, blessed,crystals Npc: Gatekeeper (You pay for teleports) Npc buffer (Got all buffs except Cov,Summoners) only prophets,Songers,Dancers Minutes that buffs are staying are: 30 mins Cov,summons (Retail Like) GM-Shop No custom items: S grades will be Obtained with 1 billion Adena and 1 raid token (Weapons S.A) S weapons without S/A 100kk adena Armors will be 500kk Adena and only... No Custom items, just Raid tokens (farmable from raids up to 60 lvl) The chance of raid tokens to drop will be 100% Events Team vs Team (reward 10kk Adenas) Gm events will reward with S grade equipment (All types) or scroll Subclass - Need quest Nobless - Need quest Boosted Adena zone will be all monastery and the drop will be around 1 million - 1,5 milion adena No Special pvp zones, i guess the high rate zones will be a massive war zone so retail is better as staff decided Donations will be opened after 1 week of uptime and the list will be S Grades till +5 Nothing Else Lifestones: You can augment your weapon but skill chances to get a skill are 0 so no skills on our server!!! No active no Passives.. Auto learn skills No auto pickup Site is under construction Server is about 60% done Planning opening date havent decided yet but it will be arround 2 weeks.. I am open minded for any suggestions also Vote reward only for hopzone and you will get a vote coins that you can only buy accesories nothing else Max subclasses are retail like For any suggestions just feel free to post... Will you play?
  5. in my home pc all run smoothly idk if my vds got a problem the same on acis,l2jfrozen clean etc... what it might be the failure?
  6. method doAttack? as i see it seems fine.. if you want the part inform me.. bump any possible solution? if you want doAttack method here it is i quess: // ========================================================= // Method - Private /** * Launch a physical attack against a target (Simple, Bow, Pole or Dual).<BR> * <BR> * <B><U> Actions</U> :</B><BR> * <BR> * <li>Get the active weapon (always equiped in the right hand)</li><BR> * <BR> * <li>If weapon is a bow, check for arrows, MP and bow re-use delay (if necessary, equip the L2PcInstance with * arrows in left hand)</li> <li>If weapon is a bow, consume MP and set the new period of bow non re-use</li><BR> * <BR> * <li>Get the Attack Speed of the L2Character (delay (in milliseconds) before next attack)</li> <li>Select the type * of attack to start (Simple, Bow, Pole or Dual) and verify if SoulShot are charged then start calculation</li> <li> * If the Server->Client packet Attack contains at least 1 hit, send the Server->Client packet Attack to the * L2Character AND to all L2PcInstance in the _KnownPlayers of the L2Character</li> <li>Notify AI with * EVT_READY_TO_ACT</li><BR> * <BR> * * @param target The L2Character targeted */ protected void doAttack(L2Character target) { if (Config.DEBUG) { _log.fine(getName() + " doAttack: target=" + target); } if (target == null) return; if (isAlikeDead()) { // If L2PcInstance is dead or the target is dead, the action is stoped getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } if (this instanceof L2NpcInstance && target.isAlikeDead()) { // If L2PcInstance is dead or the target is dead, the action is stoped getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } if (this instanceof L2PcInstance && target.isDead() && !target.isFakeDeath()) { // If L2PcInstance is dead or the target is dead, the action is stoped getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } if (!getKnownList().knowsObject(target)) { // If L2PcInstance is dead or the target is dead, the action is stoped getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } if (this instanceof L2PcInstance && isDead()) { // If L2PcInstance is dead or the target is dead, the action is stoped getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } if (target instanceof L2PcInstance && ((L2PcInstance) target).getDuelState() == Duel.DUELSTATE_DEAD) { // If L2PcInstance is dead or the target is dead, the action is stoped getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } if (target instanceof L2DoorInstance && !((L2DoorInstance) target).isAttackable(this)) return; if (isAttackingDisabled()) return; if (this instanceof L2PcInstance) { if (((L2PcInstance) this).inObserverMode()) { sendPacket(new SystemMessage(SystemMessageId.OBSERVERS_CANNOT_PARTICIPATE)); sendPacket(ActionFailed.STATIC_PACKET); return; } if (target instanceof L2PcInstance) { if (((L2PcInstance) target).isCursedWeaponEquiped() && ((L2PcInstance) this).getLevel() <= Config.MAX_LEVEL_NEWBIE) { ((L2PcInstance) this).sendMessage("Can't attack a cursed player when under level 21."); sendPacket(ActionFailed.STATIC_PACKET); return; } if (((L2PcInstance) this).isCursedWeaponEquiped() && ((L2PcInstance) target).getLevel() <= Config.MAX_LEVEL_NEWBIE) { ((L2PcInstance) this).sendMessage("Can't attack a newbie player using a cursed weapon."); sendPacket(ActionFailed.STATIC_PACKET); return; } } //thank l2dot if (getObjectId() == target.getObjectId()) { //((L2PcInstance) this).sendMessage("Can't attack yourself! Suicide? :)"); sendPacket(ActionFailed.STATIC_PACKET); return; } if (target instanceof L2NpcInstance && Config.DISABLE_ATTACK_NPC_TYPE) { String mobtype = ((L2NpcInstance) target).getTemplate().type; if (!Config.LIST_ALLOWED_NPC_TYPES.contains(mobtype)) { SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); sm.addString("Npc Protection - No Attack Allowed!"); ((L2PcInstance) this).sendPacket(sm); ((L2PcInstance) this).sendPacket(ActionFailed.STATIC_PACKET); return; } } } // Get the active weapon instance (always equiped in the right hand) L2ItemInstance weaponInst = getActiveWeaponInstance(); // Get the active weapon item corresponding to the active weapon instance (always equiped in the right hand) L2Weapon weaponItem = getActiveWeaponItem(); if (weaponItem != null && weaponItem.getItemType() == L2WeaponType.ROD) { // You can't make an attack with a fishing pole. ((L2PcInstance) this).sendPacket(new SystemMessage(SystemMessageId.CANNOT_ATTACK_WITH_FISHING_POLE)); getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); sendPacket(ActionFailed.STATIC_PACKET); return; } // GeoData Los Check here (or dz > 1000) if (!GeoData.getInstance().canSeeTarget(this, target)) { sendPacket(new SystemMessage(SystemMessageId.CANT_SEE_TARGET)); getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } // Check for a bow if (weaponItem != null && weaponItem.getItemType() == L2WeaponType.BOW) { // Equip arrows needed in left hand and send a Server->Client packet ItemList to the L2PcINstance then return True if (!checkAndEquipArrows()) { // Cancel the action because the L2PcInstance have no arrow getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); sendPacket(ActionFailed.STATIC_PACKET); sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ARROWS)); return; } //Check for arrows and MP if (this instanceof L2PcInstance) { // Checking if target has moved to peace zone - only for player-bow attacks at the moment // Other melee is checked in movement code and for offensive spells a check is done every time if (target.isInsidePeaceZone((L2PcInstance) this)) { getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); sendPacket(ActionFailed.STATIC_PACKET); return; } // Verify if the bow can be use if (_disableBowAttackEndTime <= GameTimeController.getGameTicks()) { // Verify if L2PcInstance owns enough MP int saMpConsume = (int) getStat().calcStat(Stats.MP_CONSUME, 0, null, null); int mpConsume = saMpConsume == 0 ? weaponItem.getMpConsume() : saMpConsume; if (getCurrentMp() < mpConsume) { // If L2PcInstance doesn't have enough MP, stop the attack ThreadPoolManager.getInstance().scheduleAi(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000); sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_MP)); sendPacket(ActionFailed.STATIC_PACKET); return; } // If L2PcInstance have enough MP, the bow consummes it getStatus().reduceMp(mpConsume); // Set the period of bow non re-use _disableBowAttackEndTime = 5 * GameTimeController.TICKS_PER_SECOND + GameTimeController.getGameTicks(); } else { // Cancel the action because the bow can't be re-use at this moment ThreadPoolManager.getInstance().scheduleAi(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), 1000); sendPacket(ActionFailed.STATIC_PACKET); return; } } else if (this instanceof L2NpcInstance) { if (_disableBowAttackEndTime > GameTimeController.getGameTicks()) return; } } // Add the L2PcInstance to _knownObjects and _knownPlayer of the target target.getKnownList().addKnownObject(this); // Reduce the current CP if TIREDNESS configuration is activated if (Config.ALT_GAME_TIREDNESS) { setCurrentCp(getCurrentCp() - 10); } // Recharge any active auto soulshot tasks for player (or player's summon if one exists). if (this instanceof L2PcInstance) { ((L2PcInstance) this).rechargeAutoSoulShot(true, false, false); } else if (this instanceof L2Summon) { ((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true); } // Verify if soulshots are charged. boolean wasSSCharged; if (this instanceof L2Summon && !(this instanceof L2PetInstance)) { wasSSCharged = ((L2Summon) this).getChargedSoulShot() != L2ItemInstance.CHARGED_NONE; } else { wasSSCharged = weaponInst != null && weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE; } // Get the Attack Speed of the L2Character (delay (in milliseconds) before next attack) int timeAtk = calculateTimeBetweenAttacks(target, weaponItem); // the hit is calculated to happen halfway to the animation - might need further tuning e.g. in bow case int timeToHit = timeAtk / 2; _attackEndTime = GameTimeController.getGameTicks(); _attackEndTime += timeAtk / GameTimeController.MILLIS_IN_TICK; _attackEndTime -= 1; int ssGrade = 0; if (weaponItem != null) { ssGrade = weaponItem.getCrystalType(); } // Create a Server->Client packet Attack Attack attack = new Attack(this, wasSSCharged, ssGrade); boolean hitted; // Set the Attacking Body part to CHEST setAttackingBodypart(); // Get the Attack Reuse Delay of the L2Weapon int reuse = calculateReuseTime(target, weaponItem); // Select the type of attack to start if (weaponItem == null) { hitted = doAttackHitSimple(attack, target, timeToHit); } else if (weaponItem.getItemType() == L2WeaponType.BOW) { hitted = doAttackHitByBow(attack, target, timeAtk, reuse); } else if (weaponItem.getItemType() == L2WeaponType.POLE) { hitted = doAttackHitByPole(attack, timeToHit); } else if (isUsingDualWeapon()) { hitted = doAttackHitByDual(attack, target, timeToHit); } else { hitted = doAttackHitSimple(attack, target, timeToHit); } // Flag the attacker if it's a L2PcInstance outside a PvP area L2PcInstance player = null; if (this instanceof L2PcInstance) { player = (L2PcInstance) this; } else if (this instanceof L2Summon) { player = ((L2Summon) this).getOwner(); } if (player != null) { player.updatePvPStatus(target); } // Check if hit isn't missed if (!hitted) { //MAJAX fix sendPacket(new SystemMessage(SystemMessageId.MISSED_TARGET)); // Abort the attack of the L2Character and send Server->Client ActionFailed packet abortAttack(); } else { /* ADDED BY nexus - 2006-08-17 * * As soon as we know that our hit landed, we must discharge any active soulshots. * This must be done so to avoid unwanted soulshot consumption. */ // If we didn't miss the hit, discharge the shoulshots, if any if (this instanceof L2Summon && !(this instanceof L2PetInstance)) { ((L2Summon) this).setChargedSoulShot(L2ItemInstance.CHARGED_NONE); } else if (weaponInst != null) { weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_NONE); } if (player != null) { if (player.isCursedWeaponEquiped()) { // If hitted by a cursed weapon, Cp is reduced to 0 if (!target.isInvul()) { target.setCurrentCp(0); } } else if (player.isHero()) { if (target instanceof L2PcInstance && ((L2PcInstance) target).isCursedWeaponEquiped()) { // If a cursed weapon is hitted by a Hero, Cp is reduced to 0 target.setCurrentCp(0); } } } weaponInst = null; weaponItem = null; } // If the Server->Client packet Attack contains at least 1 hit, send the Server->Client packet Attack // to the L2Character AND to all L2PcInstance in the _KnownPlayers of the L2Character if (attack.hasHits()) { broadcastPacket(attack); fireEvent(EventType.ATTACK.name, new Object[] { getTarget() }); } // Notify AI with EVT_READY_TO_ACT ThreadPoolManager.getInstance().scheduleAi(new NotifyAITask(CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse); attack = null; player = null; } /** * Launch a Bow attack.<BR> * <BR> * <B><U> Actions</U> :</B><BR> * <BR> * <li>Calculate if hit is missed or not</li> <li>Consumme arrows</li> <li>If hit isn't missed, calculate if shield * defense is efficient</li> <li>If hit isn't missed, calculate if hit is critical</li> <li>If hit isn't missed, * calculate physical damages</li> <li>If the L2Character is a L2PcInstance, Send a Server->Client packet SetupGauge * </li> <li>Create a new hit task with Medium priority</li> <li>Calculate and set the disable delay of the bow in * function of the Attack Speed</li> <li>Add this hit to the Server-Client packet Attack</li><BR> * <BR> * * @param attack Server->Client packet Attack in which the hit will be added * @param target The L2Character targeted * @param sAtk The Attack Speed of the attacker * @return True if the hit isn't missed */ private boolean doAttackHitByBow(Attack attack, L2Character target, int sAtk, int reuse) { int damage1 = 0; boolean shld1 = false; boolean crit1 = false; // Calculate if hit is missed or not boolean miss1 = Formulas.getInstance().calcHitMiss(this, target); // Consumme arrows reduceArrowCount(); _move = null; // Check if hit isn't missed if (!miss1) { // Calculate if shield defense is efficient shld1 = Formulas.getInstance().calcShldUse(this, target); // Calculate if hit is critical crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null)); // Calculate physical damages damage1 = (int) Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack.soulshot); } // Check if the L2Character is a L2PcInstance if (this instanceof L2PcInstance) { // Send a system message sendPacket(new SystemMessage(SystemMessageId.GETTING_READY_TO_SHOOT_AN_ARROW)); // Send a Server->Client packet SetupGauge SetupGauge sg = new SetupGauge(SetupGauge.RED, sAtk + reuse); sendPacket(sg); sg = null; } // Create a new hit task with Medium priority ThreadPoolManager.getInstance().scheduleAi(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk); // Calculate and set the disable delay of the bow in function of the Attack Speed _disableBowAttackEndTime = (sAtk + reuse) / GameTimeController.MILLIS_IN_TICK + GameTimeController.getGameTicks(); // Add this hit to the Server-Client packet Attack attack.addHit(target, damage1, miss1, crit1, shld1); // Return true if hit isn't missed return !miss1; } /** * Launch a Dual attack.<BR> * <BR> * <B><U> Actions</U> :</B><BR> * <BR> * <li>Calculate if hits are missed or not</li> <li>If hits aren't missed, calculate if shield defense is efficient</li> * <li>If hits aren't missed, calculate if hit is critical</li> <li>If hits aren't missed, calculate physical * damages</li> <li>Create 2 new hit tasks with Medium priority</li> <li>Add those hits to the Server-Client packet * Attack</li><BR> * <BR> * * @param attack Server->Client packet Attack in which the hit will be added * @param target The L2Character targeted * @return True if hit 1 or hit 2 isn't missed */ private boolean doAttackHitByDual(Attack attack, L2Character target, int sAtk) { int damage1 = 0; int damage2 = 0; boolean shld1 = false; boolean shld2 = false; boolean crit1 = false; boolean crit2 = false; // Calculate if hits are missed or not boolean miss1 = Formulas.getInstance().calcHitMiss(this, target); boolean miss2 = Formulas.getInstance().calcHitMiss(this, target); // Check if hit 1 isn't missed if (!miss1) { // Calculate if shield defense is efficient against hit 1 shld1 = Formulas.getInstance().calcShldUse(this, target); // Calculate if hit 1 is critical crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null)); // Calculate physical damages of hit 1 damage1 = (int) Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, true, attack.soulshot); damage1 /= 2; } // Check if hit 2 isn't missed if (!miss2) { // Calculate if shield defense is efficient against hit 2 shld2 = Formulas.getInstance().calcShldUse(this, target); // Calculate if hit 2 is critical crit2 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null)); // Calculate physical damages of hit 2 damage2 = (int) Formulas.getInstance().calcPhysDam(this, target, null, shld2, crit2, true, attack.soulshot); damage2 /= 2; } // Create a new hit task with Medium priority for hit 1 ThreadPoolManager.getInstance().scheduleAi(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk / 2); // Create a new hit task with Medium priority for hit 2 with a higher delay ThreadPoolManager.getInstance().scheduleAi(new HitTask(target, damage2, crit2, miss2, attack.soulshot, shld2), sAtk); // Add those hits to the Server-Client packet Attack attack.addHit(target, damage1, miss1, crit1, shld1); attack.addHit(target, damage2, miss2, crit2, shld2); // Return true if hit 1 or hit 2 isn't missed return !miss1 || !miss2; } /** * Launch a Pole attack.<BR> * <BR> * <B><U> Actions</U> :</B><BR> * <BR> * <li>Get all visible objects in a spheric area near the L2Character to obtain possible targets</li> <li>If * possible target is the L2Character targeted, launch a simple attack against it</li> <li>If possible target isn't * the L2Character targeted but is attakable, launch a simple attack against it</li><BR> * <BR> * * @param attack Server->Client packet Attack in which the hit will be added * @return True if one hit isn't missed */ private boolean doAttackHitByPole(Attack attack, int sAtk) { boolean hitted = false; double angleChar, angleTarget; int maxRadius = (int) getStat().calcStat(Stats.POWER_ATTACK_RANGE, 66, null, null); int maxAngleDiff = (int) getStat().calcStat(Stats.POWER_ATTACK_ANGLE, 120, null, null); if (getTarget() == null) return false; if (Config.DEBUG) { _log.info("doAttackHitByPole: Max radius = " + maxRadius); _log.info("doAttackHitByPole: Max angle = " + maxAngleDiff); } // o1 x: 83420 y: 148158 (Giran) // o2 x: 83379 y: 148081 (Giran) // dx = -41 // dy = -77 // distance between o1 and o2 = 87.24 // arctan2 = -120 (240) degree (excel arctan2(dx, dy); java arctan2(dy, dx)) // // o2 // // o1 ----- (heading) // In the diagram above: // o1 has a heading of 0/360 degree from horizontal (facing East) // Degree of o2 in respect to o1 = -120 (240) degree // // o2 / (heading) // / // o1 // In the diagram above // o1 has a heading of -80 (280) degree from horizontal (facing north east) // Degree of o2 in respect to 01 = -40 (320) degree // =========================================================== // Make sure that char is facing selected target angleTarget = Util.calculateAngleFrom(this, getTarget()); setHeading((int) (angleTarget / 9.0 * 1610.0)); // = this.setHeading((int)((angleTarget / 360.0) * 64400.0)); // Update char's heading degree angleChar = Util.convertHeadingToDegree(getHeading()); double attackpercent = 85; int attackcountmax = (int) getStat().calcStat(Stats.ATTACK_COUNT_MAX, 3, null, null); int attackcount = 0; if (angleChar <= 0) { angleChar += 360; // =========================================================== } L2Character target; for (L2Object obj : getKnownList().getKnownObjects().values()) { //Check if the L2Object is a L2Character if (obj instanceof L2Character) { if (obj instanceof L2PetInstance && this instanceof L2PcInstance && ((L2PetInstance) obj).getOwner() == (L2PcInstance) this) { continue; } if (!Util.checkIfInRange(maxRadius, this, obj, false)) { continue; } //otherwise hit too high/low. 650 because mob z coord sometimes wrong on hills if (Math.abs(obj.getZ() - getZ()) > Config.DIFFERENT_Z_CHANGE_OBJECT) { continue; } angleTarget = Util.calculateAngleFrom(this, obj); if (Math.abs(angleChar - angleTarget) > maxAngleDiff && Math.abs(angleChar + 360 - angleTarget) > maxAngleDiff && // Example: char is at 1 degree and target is at 359 degree Math.abs(angleChar - (angleTarget + 360)) > maxAngleDiff // Example: target is at 1 degree and char is at 359 degree ) { continue; } target = (L2Character) obj; // Launch a simple attack against the L2Character targeted if (!target.isAlikeDead()) { attackcount += 1; if (attackcount <= attackcountmax) { if (target == getAI().getAttackTarget() || target.isAutoAttackable(this)) { hitted |= doAttackHitSimple(attack, target, attackpercent, sAtk); attackpercent /= 1.15; } } } } } target = null; // Return true if one hit isn't missed return hitted; } /** * Launch a simple attack.<BR> * <BR> * <B><U> Actions</U> :</B><BR> * <BR> * <li>Calculate if hit is missed or not</li> <li>If hit isn't missed, calculate if shield defense is efficient</li> * <li>If hit isn't missed, calculate if hit is critical</li> <li>If hit isn't missed, calculate physical damages</li> * <li>Create a new hit task with Medium priority</li> <li>Add this hit to the Server-Client packet Attack</li><BR> * <BR> * * @param attack Server->Client packet Attack in which the hit will be added * @param target The L2Character targeted * @return True if the hit isn't missed */ private boolean doAttackHitSimple(Attack attack, L2Character target, int sAtk) { return doAttackHitSimple(attack, target, 100, sAtk); } private boolean doAttackHitSimple(Attack attack, L2Character target, double attackpercent, int sAtk) { int damage1 = 0; boolean shld1 = false; boolean crit1 = false; // Calculate if hit is missed or not boolean miss1 = Formulas.getInstance().calcHitMiss(this, target); // Check if hit isn't missed if (!miss1) { // Calculate if shield defense is efficient shld1 = Formulas.getInstance().calcShldUse(this, target); // Calculate if hit is critical crit1 = Formulas.getInstance().calcCrit(getStat().getCriticalHit(target, null)); // Calculate physical damages damage1 = (int) Formulas.getInstance().calcPhysDam(this, target, null, shld1, crit1, false, attack.soulshot); if (attackpercent != 100) { damage1 = (int) (damage1 * attackpercent / 100); } } // Create a new hit task with Medium priority ThreadPoolManager.getInstance().scheduleAi(new HitTask(target, damage1, crit1, miss1, attack.soulshot, shld1), sAtk); // Add this hit to the Server-Client packet Attack attack.addHit(target, damage1, miss1, crit1, shld1); // Return true if hit isn't missed return !miss1; }
  7. first post edited more simplier explanations
  8. i mean a private project based on it /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.network.serverpackets; import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.L2Object; /** * sample 06 8f19904b 2522d04b 00000000 80 950c0000 4af50000 08f2ffff 0000 - 0 damage (missed 0x80) 06 85071048 bc0e504b * 32000000 10 fc41ffff fd240200 a6f5ffff 0100 bc0e504b 33000000 10 3.... format dddc dddh (ddc) * * @version $Revision: 1.3.2.1.2.4 $ $Date: 2005/03/27 15:29:39 $ */ public class Attack extends L2GameServerPacket { private class Hit { protected int _targetId; protected int _damage; protected int _flags; Hit(L2Object target, int damage, boolean miss, boolean crit, boolean shld) { _targetId = target.getObjectId(); _damage = damage; if(soulshot) { _flags |= 0x10 | _grade; } if(crit) { _flags |= 0x20; } if(shld) { _flags |= 0x40; } if(miss) { _flags |= 0x80; } } } // dh private static final String _S__06_ATTACK = "[S] 06 Attack"; protected final int _attackerObjId; public final boolean soulshot; protected int _grade; private int _x; private int _y; private int _z; private Hit[] _hits; /** * @param attacker the attacker L2Character * @param ss true if useing SoulShots */ public Attack(L2Character attacker, boolean ss, int grade) { _attackerObjId = attacker.getObjectId(); soulshot = ss; _grade = grade; _x = attacker.getX(); _y = attacker.getY(); _z = attacker.getZ(); _hits = new Hit[0]; } /** * Add this hit (target, damage, miss, critical, shield) to the Server-Client packet Attack.<BR> * <BR> */ public void addHit(L2Object target, int damage, boolean miss, boolean crit, boolean shld) { // Get the last position in the hits table int pos = _hits.length; // Create a new Hit object Hit[] tmp = new Hit[pos + 1]; // Add the new Hit object to hits table for(int i = 0; i < _hits.length; i++) { tmp[i] = _hits[i]; } tmp[pos] = new Hit(target, damage, miss, crit, shld); _hits = tmp; } /** * Return True if the Server-Client packet Attack conatins at least 1 hit.<BR> * <BR> */ public boolean hasHits() { return _hits.length > 0; } @Override protected final void writeImpl() { writeC(0x05); writeD(_attackerObjId); writeD(_hits[0]._targetId); writeD(_hits[0]._damage); writeC(_hits[0]._flags); writeD(_x); writeD(_y); writeD(_z); writeH(_hits.length - 1); for(int i = 1; i < _hits.length; i++) { writeD(_hits[i]._targetId); writeD(_hits[i]._damage); writeC(_hits[i]._flags); } } /* (non-Javadoc) * @see com.l2jfrozen.gameserver.serverpackets.ServerBasePacket#getType() */ @Override public String getType() { return _S__06_ATTACK; } } my attack code...
  9. i got 1 small bug on l2j frozen my character goes to hit one mob he makes 1 hit and then stops if i click somewhere and holding the attack button makes another one and stops what it might be? if you need any file to check from source tell me
  10. your topic says: i think is somewhere shared this you made is not shared its unique and new the shared one that you are talking about is what i explained 1 soulshot and autoactivated if you dont understand i will try to explain more i didnt offend you or said something about your work.. rofl
  11. thanks for sharing the shared on ise get 1 soulshot from the shop and it will not get consumed
  12. http://www.youtube.com/watch?v=LpT-P6dU8Fg ntaks xathika
  13. this guy had a very populated server and closed it.. so wtf are you say guys... damn
  14. i was searching didnt say to change it.. and c5 is nowhere so its unique... :))
  15. definitely will try it reminds me some servers i used to play.. also think about this features on IL or C5
  16. cool server, low rates thought.... toooo low.. why not playing on official and play here if its only plus 2 easier?
  17. poso ram exei to pc sou kai poso xrisimopoiei to pc xwris tpt anoixto pes t m afta grapse kai to gameserver.bat ti exei mesa kai tha sto lusw
  18. to lineage 2 pote den eixe tattoo nomizw.. mono cloaks kai tetoia.. opote vres kati k kanto tattoo (dn ime sigouros gia tn apantisi mou)
  19. to error afto to ixa k egw dn epireazei t game pantws apla klise to topzone k des an kanei t idio (t mono spastiko ine oti floodari tn console sou) an t kanei k xwris t topzone reward pes mas na checkaroume tn kodika k isws xriazete na prosthethei field s kapoio sql me t onoma systime i opws legete mesa stn db s
  20. i will find out myself how i will wipe it thanks anyway..
  21. its not just npcs... all my db is fully custom.. i just wanna delete the chars
  22. server is fully custom i just dont need the characters if i delete chars only i got full of duplicates and npes... not that stupid to make a server all over again in the custom db .. so why to reinstall it just need the tables the next error comes from ais just ass all quests give me errors for no reason.. so i guess i fucked up something when i delete a non must table.. so which table am i suppose to empty so i dont have the crappy chars in my db
×
×
  • Create New...