DeathRow
Nombre de messages : 10 Localisation : Nord de la France Date d'inscription : 29/04/2009
| Sujet: Sublime Self Sacrifice 30/08/09, 04:43 pm | |
| Bonjour a tous, je viens faire appel a vous car je ne trouve pas la réponse a ma question et cela me pose un souci, Je vous explique, j'ai voulu code le skills Sublime Self sacrifice des Cardinaux Donc j'ai compiler la dernière MaJ de L2J puis j'ai regarder le skill, et a ma grande surprise, Aucun Codage, donc je me suis mis a chercher en m'inspirant de plusieurs type de Heal pour voir quel SkillType pourrais-je utilise pour que le skill fasse un Full Heal sur le MP/CP/HP en même temps, du cote des 15 secondes de l'invul sa je n'ai aucun souci, juste le souci du Full Heal sur les HP/CP/MP donc si quelqu'un pourrais m'eclaircir sur cela, sa m'aiderai beaucoup SVP En esparant avoir etait assez clair
Cordialement DeathRow | |
|
Vrugar
Nombre de messages : 119 Date d'inscription : 08/04/2008
| Sujet: Re: Sublime Self Sacrifice 30/08/09, 05:32 pm | |
| Il me semble que tu ne peux pas mettre les deux facettes du skill sans créer toi même un skillType dans le java. Mais bon je ne suis pas sûr de moi, des personnes s'y connaissant plus que moi te confirmeront ou pas. | |
|
DeathRow
Nombre de messages : 10 Localisation : Nord de la France Date d'inscription : 29/04/2009
| Sujet: Re: Sublime Self Sacrifice 30/08/09, 05:56 pm | |
| Merci Vrugar pour ta réponse assez rapide, sa me semble une bonne idée ce que tu me dis je vais voir si je peut trouver sa a faire sinon si quelqu'un a d'autre idée je suis preneur Merci D'avance Cordialement DeathRow | |
|
Spanky
Nombre de messages : 392 Age : 42 Localisation : Osaka, Japon Date d'inscription : 01/12/2007
| Sujet: Re: Sublime Self Sacrifice 30/08/09, 08:53 pm | |
| | |
|
DeathRow
Nombre de messages : 10 Localisation : Nord de la France Date d'inscription : 29/04/2009
| Sujet: Re: Sublime Self Sacrifice 30/08/09, 09:54 pm | |
| Merci de ton lien mais malheureusement et comme par hasard je ne trouve pu mon compte sur le forum de L2J et quand je veux m'inscrire, après i agree a therm..... quand je clique, cela fait rien, donc je suis encore bloquer, Merci Quand même pour la peine d'avoir chercher Spanky en espérant y avoir accès un jour Cordialement DeathRow | |
|
Spanky
Nombre de messages : 392 Age : 42 Localisation : Osaka, Japon Date d'inscription : 01/12/2007
| Sujet: Re: Sublime Self Sacrifice 31/08/09, 12:41 am | |
| A lala les jeune de nos jours.... - MELERIX a écrit:
- • The Sublime Self-Sacrifice skill has changed as follows:
- Fully recovers the HP/MP/CP of all party members (excluding yourself), and makes them invincible for 15 seconds. - In addition, the reuse time has been changed to 1 hour. http://www.lineage2.com/news/graciafinal_05.htmlCORE-SIDE for: "TARGET_PARTY_NOTME" by Blacko - Code:
-
### Eclipse Workspace Patch 1.0 #P L2_GameServer Index: java/net/sf/l2j/gameserver/model/L2Skill.java =================================================================== --- java/net/sf/l2j/gameserver/model/L2Skill.java (revision 2991) +++ java/net/sf/l2j/gameserver/model/L2Skill.java (working copy) @@ -106,7 +106,8 @@ TARGET_PARTY_OTHER, TARGET_ENEMY_SUMMON, TARGET_OWNER_PET, - TARGET_GROUND + TARGET_GROUND, + TARGET_PARTY_NOTME } //elements @@ -1304,7 +1305,8 @@ case COMBATPOINTHEAL: case MAGE_BANE: case WARRIOR_BANE: - case BETRAY: + case HPMPCP_HEAL_PERCENT: + case BETRAY: case BALANCE_LIFE: canTargetSelf = true; break; @@ -2765,6 +2767,48 @@ } return null; } + case TARGET_PARTY_NOTME: + { + //target all party members except yourself + if (onlyFirst) + return new L2Character[]{activeChar}; + + L2PcInstance player = null; + + if (activeChar instanceof L2Summon) + { + player = ((L2Summon)activeChar).getOwner(); + targetList.add(player); + } + else if (activeChar instanceof L2PcInstance) + { + player = (L2PcInstance)activeChar; + if (activeChar.getPet() != null) + targetList.add(activeChar.getPet()); + } + + if (activeChar.getParty() != null) + { + List<L2PcInstance> partyList = activeChar.getParty().getPartyMembers(); + + for(L2PcInstance partyMember : partyList) + { + if (partyMember == null) continue; + if (partyMember == player) continue; + if (!partyMember.isDead() + && Util.checkIfInRange(getSkillRadius(), activeChar, partyMember, true)) + { + targetList.add(partyMember); + + if (partyMember.getPet() != null && !partyMember.getPet().isDead()) + { + targetList.add(partyMember.getPet()); + } + } + } + } + return targetList.toArray(new L2Character[targetList.size()]); + } default: { activeChar.sendMessage("Target type of skill is not currently handled"); @@ -2971,7 +3015,6 @@ } } if (effects.isEmpty()) return _emptyEffectSet; - return effects.toArray(new L2Effect[effects.size()]); } CORE-SIDE for: "HPMPCP_HEAL_PERCENT" by Blacko - Code:
-
### Eclipse Workspace Patch 1.0 #P L2_GameServer Index: java/net/sf/l2j/gameserver/templates/skills/L2SkillType.java =================================================================== --- java/net/sf/l2j/gameserver/templates/skills/L2SkillType.java (revision 2991) +++ java/net/sf/l2j/gameserver/templates/skills/L2SkillType.java (working copy) @@ -167,6 +167,7 @@ DETECT_TRAP, REMOVE_TRAP, SHIFT_TARGET, + HPMPCP_HEAL_PERCENT, // Kamael WeaponChange CHANGEWEAPON(L2SkillChangeWeapon.class), DP-SIDE for: "HPMPCP_HEAL_PERCENT" by Blacko - Code:
-
### Eclipse Workspace Patch 1.0 #P datapack_development Index: data/scripts/handlers/skillhandlers/Heal.java =================================================================== --- data/scripts/handlers/skillhandlers/Heal.java (revision 6047) +++ data/scripts/handlers/skillhandlers/Heal.java (working copy) @@ -43,7 +43,8 @@ { L2SkillType.HEAL, L2SkillType.HEAL_PERCENT, - L2SkillType.HEAL_STATIC + L2SkillType.HEAL_STATIC, + L2SkillType.HPMPCP_HEAL_PERCENT }; /** @@ -85,105 +86,141 @@ else if (player != null && player.isCursedWeaponEquipped()) continue; } - - double hp = skill.getPower(); - - if (skill.getSkillType() == L2SkillType.HEAL_PERCENT) + + if (skill.getSkillType() == L2SkillType.HPMPCP_HEAL_PERCENT) { - hp = target.getMaxHp() * hp / 100.0; + //<set name="power" val="100"/> + if(skill.getPower() == 100) + { + target.setCurrentHp(target.getMaxHp()); + target.setCurrentCp(target.getMaxCp()); + target.setCurrentMp(target.getMaxMp()); + } + else + { + double targetHp,targetCp,targetMp,currentHp,currentMp,currentCp,newHp,newMp,newCp; + targetHp = target.getMaxHp()*skill.getPower(); + targetCp = target.getMaxCp()*skill.getPower(); + targetMp = target.getMaxMp()*skill.getPower(); + + currentHp = target.getCurrentHp(); + currentMp = target.getCurrentMp(); + currentCp = target.getCurrentCp(); + + newHp = targetHp+currentHp; + newCp = targetCp+currentCp; + newMp = targetMp+currentMp; + + if(newHp > targetHp) newHp = target.getMaxHp(); + if(newCp > targetCp) newCp = target.getMaxCp(); + if(newMp > targetMp) newMp = target.getMaxMp(); + + target.setCurrentHp(newHp); + target.setCurrentCp(newCp); + target.setCurrentMp(newMp); + } } else { - //Added effect of SpS and Bsps - if (weaponInst != null) + double hp = skill.getPower(); + + if (skill.getSkillType() == L2SkillType.HEAL_PERCENT) { - if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) + hp = target.getMaxHp() * hp / 100.0; + } + else + { + //Added effect of SpS and Bsps + if (weaponInst != null) { - hp *= 1.5; - clearSpiritShot = true; + if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) + { + hp *= 1.5; + clearSpiritShot = true; + } + else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) + { + hp *= 1.3; + clearSpiritShot = true; + } } - else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT) + // If there is no weapon equipped, check for an active summon. + else if (activeChar instanceof L2Summon) { - hp *= 1.3; - clearSpiritShot = true; + L2Summon activeSummon = (L2Summon) activeChar; + + if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) + { + hp *= 1.5; + clearSpiritShot = true; + } + else if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT) + { + hp *= 1.3; + clearSpiritShot = true; + } } - } - // If there is no weapon equipped, check for an active summon. - else if (activeChar instanceof L2Summon) - { - L2Summon activeSummon = (L2Summon) activeChar; - - if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT) + else if (activeChar instanceof L2Npc) { - hp *= 1.5; - clearSpiritShot = true; + if (((L2Npc) activeChar).isUsingShot(false)) + hp *= 1.5; } - else if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT) - { - hp *= 1.3; - clearSpiritShot = true; - } } - else if (activeChar instanceof L2Npc) + + //int cLev = activeChar.getLevel(); + //hp += skill.getPower()/*+(Math.sqrt(cLev)*cLev)+cLev*/; + if (skill.getSkillType() == L2SkillType.HEAL_STATIC) + hp = skill.getPower(); + else if (skill.getSkillType() != L2SkillType.HEAL_PERCENT) + hp *= target.calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null) / 100; + + // Healer proficiency (since CT1) + hp *= activeChar.calcStat(Stats.HEAL_PROFICIENCY, 100, null, null) / 100; + // Extra bonus (since CT1.5) + if (!skill.isPotion()) + hp += target.calcStat(Stats.HEAL_STATIC_BONUS, 0, null, null); + + if (target instanceof L2DoorInstance || target instanceof L2SiegeFlagInstance) + hp = 0; + + //from CT2 u will receive exact HP, u can't go over it, if u have full HP and u get HP buff, u will receive 0HP restored message + if ((target.getCurrentHp() + hp) >= target.getMaxHp()) { - if (((L2Npc) activeChar).isUsingShot(false)) - hp *= 1.5; + hp = target.getMaxHp() - target.getCurrentHp(); } - } - - //int cLev = activeChar.getLevel(); - //hp += skill.getPower()/*+(Math.sqrt(cLev)*cLev)+cLev*/; - if (skill.getSkillType() == L2SkillType.HEAL_STATIC) - hp = skill.getPower(); - else if (skill.getSkillType() != L2SkillType.HEAL_PERCENT) - hp *= target.calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null) / 100; - - // Healer proficiency (since CT1) - hp *= activeChar.calcStat(Stats.HEAL_PROFICIENCY, 100, null, null) / 100; - // Extra bonus (since CT1.5) - if (!skill.isPotion()) - hp += target.calcStat(Stats.HEAL_STATIC_BONUS, 0, null, null); - - if (target instanceof L2DoorInstance || target instanceof L2SiegeFlagInstance) - hp = 0; - - //from CT2 u will receive exact HP, u can't go over it, if u have full HP and u get HP buff, u will receive 0HP restored message - if ((target.getCurrentHp() + hp) >= target.getMaxHp()) - { - hp = target.getMaxHp() - target.getCurrentHp(); - } - - if (hp < 0) - { - hp = 0; - } - target.setCurrentHp(hp + target.getCurrentHp()); - target.setLastHealAmount((int) hp); - StatusUpdate su = new StatusUpdate(target.getObjectId()); - su.addAttribute(StatusUpdate.CUR_HP, (int) target.getCurrentHp()); - target.sendPacket(su); - - if (target instanceof L2PcInstance) - { - if (skill.getId() == 4051) + + if (hp < 0) { - SystemMessage sm = new SystemMessage(SystemMessageId.REJUVENATING_HP); - target.sendPacket(sm); + hp = 0; } - else + target.setCurrentHp(hp + target.getCurrentHp()); + target.setLastHealAmount((int) hp); + StatusUpdate su = new StatusUpdate(target.getObjectId()); + su.addAttribute(StatusUpdate.CUR_HP, (int) target.getCurrentHp()); + target.sendPacket(su); + + if (target instanceof L2PcInstance) { - if (activeChar instanceof L2PcInstance && activeChar != target) + if (skill.getId() == 4051) { - SystemMessage sm = new SystemMessage(SystemMessageId.S2_HP_RESTORED_BY_C1); - sm.addString(activeChar.getName()); - sm.addNumber((int) hp); + SystemMessage sm = new SystemMessage(SystemMessageId.REJUVENATING_HP); target.sendPacket(sm); } else { - SystemMessage sm = new SystemMessage(SystemMessageId.S1_HP_RESTORED); - sm.addNumber((int) hp); - target.sendPacket(sm); + if (activeChar instanceof L2PcInstance && activeChar != target) + { + SystemMessage sm = new SystemMessage(SystemMessageId.S2_HP_RESTORED_BY_C1); + sm.addString(activeChar.getName()); + sm.addNumber((int) hp); + target.sendPacket(sm); + } + else + { + SystemMessage sm = new SystemMessage(SystemMessageId.S1_HP_RESTORED); + sm.addNumber((int) hp); + target.sendPacket(sm); + } } } } - Code:
-
<skill id="1505" levels="1" name="Sublime Self-Sacrifice"> <!-- Done by DJ MELERIX --> <set name="hpConsume" val="4000"/> <set name="hitTime" val="4000"/> <set name="isMagic" val="true"/> <set name="mpConsume" val="218"/> <set name="operateType" val="OP_ACTIVE"/> <set name="power" val="100"/> <set name="reuseDelay" val="3600000"/> <set name="skillRadius" val="1000"/> <set name="skillType" val="HPMPCP_HEAL_PERCENT"/> <set name="target" val="TARGET_PARTY_NOTME"/> <for> <effect name="Invincible" time="15" val="0" stackOrder="2" stackType="Instant_Shield"/> </for> </skill> The only trouble is that "core-side support" is possibly outdated.[/quote] | |
|
DeathRow
Nombre de messages : 10 Localisation : Nord de la France Date d'inscription : 29/04/2009
| Sujet: Re: Sublime Self Sacrifice 04/09/09, 08:04 pm | |
| Désolé du retard mais je te remercie Spanky je vais essayer cela merci a toi | |
|
Contenu sponsorisé
| Sujet: Re: Sublime Self Sacrifice | |
| |
|