Jump to content

HARDECORE

Members
  • Posts

    100
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by HARDECORE

  1. Sorted out. can please close
  2. Can anyone help me by adapting this mod to l2jserver? https://gist.github.com/rodrigonull/5d4b2862c56e39f3faa6 This is the only part with error. +++ java/com/l2jserver/gameserver/model/actor/tasks/player/RecoverCancelledBuffsTask.java (working copy) @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2004-2014 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server 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 3 of the License, or + * (at your option) any later version. + * + * L2J Server 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, see <http://www.gnu.org/licenses/>. + */ +package com.l2jserver.gameserver.model.actor.tasks.player; + +import java.util.List; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.skills.BuffInfo; +import com.l2jserver.gameserver.model.skills.EffectScope; +import com.l2jserver.gameserver.model.stats.Env; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * @author nuLL + */ +public class RecoverCancelledBuffsTask implements Runnable +{ + private final List<BuffInfo> _buffs; + private final L2PcInstance _player; + + public RecoverCancelledBuffsTask(List<BuffInfo> buffs, L2PcInstance player) + { + _player = player; + _buffs = buffs; + } + + @Override + public void run() + { + for (BuffInfo buff : _buffs) + { + final Env env = new Env(); + env.setCharacter(_player); + env.setTarget(_player); + env.setSkill(buff.getSkill()); + final BuffInfo stolenOrCanceled = new BuffInfo(env); + stolenOrCanceled.setAbnormalTime(buff.getTime()); + buff.getSkill().applyEffectScope(EffectScope.GENERAL, stolenOrCanceled, true, true); + + if (stolenOrCanceled.getAbnormalTime() > 0) + { + _player.getEffectList().add(stolenOrCanceled); + } + } + + _player.sendPacket(new ExShowScreenMessage("Your cancelled buffs has been given back.", 2000)); + } +} why the "Env.java" file no longer exists in the project
  3. Sorry. corrected, now everyone can see it.
  4. you need to have record in pastebin
  5. that is the solution. but I do not know how to do it. I'm not sure where I can look at the ID's? I found this in the l2jserver forum. maybe it's those IDs L2Item.SLOT_R_HAND or L2Item.SLOT_LR_HAND in L2Item.java I have this.
  6. Yes. There is and I can also create the Type: BIGBLUNT AND BIGSWORD and by the weapons that the same works. the problem is that the type I create is not in the critical / damage / attack formulas public enum WeaponType implements ItemType { SWORD(TraitType.SWORD), BLUNT(TraitType.BLUNT), DAGGER(TraitType.DAGGER), BOW(TraitType.BOW), POLE(TraitType.POLE), NONE(TraitType.NONE), DUAL(TraitType.DUAL), ETC(TraitType.ETC), FIST(TraitType.FIST), DUALFIST(TraitType.DUALFIST), FISHINGROD(TraitType.NONE), RAPIER(TraitType.RAPIER), ANCIENTSWORD(TraitType.ANCIENTSWORD), CROSSBOW(TraitType.CROSSBOW), FLAG(TraitType.NONE), OWNTHING(TraitType.NONE), DUALDAGGER(TraitType.DUALDAGGER); private final int _mask; private final TraitType _traitType; I already tried doing this and it did not go well. the classes that use the proper weapons becomes disproportionate
  7. Read my first topic post
  8. everything was adapted correctly, no error. the code works fine. the only problem is that as there is no more type: BIGSWORD and BIGBLUNT in the source code does not separate weapons from a two-handed hand. + public static void callRules() + { + // Example: a Virtual sword can mount an Equipped blunt. + weaponMapping[WeaponType.SWORD.ordinal()][WeaponType.BLUNT.ordinal()] = true; + + // Example: a Virtual blunt can mount an Equipped sword. + weaponMapping[WeaponType.BLUNT.ordinal()][WeaponType.SWORD.ordinal()] = true; + + // weaponMapping[WeaponType.BIGSWORD.ordinal()][WeaponType.BIGBLUNT.ordinal()] = true; + // weaponMapping[WeaponType.BIGBLUNT.ordinal()][WeaponType.BIGSWORD.ordinal()] = true; + + armorMapping[ArmorType.SIGIL.ordinal()][ArmorType.SHIELD.ordinal()] = true; + armorMapping[ArmorType.SHIELD.ordinal()][ArmorType.SIGIL.ordinal()] = true; + + // armorMapping[L2ArmorType.HEAVY.ordinal()][L2ArmorType.LIGHT.ordinal()] = true; + // armorMapping[L2ArmorType.HEAVY.ordinal()][L2ArmorType.MAGIC.ordinal()] = true; + + // armorMapping[L2ArmorType.LIGHT.ordinal()][L2ArmorType.HEAVY.ordinal()] = true; + // armorMapping[L2ArmorType.LIGHT.ordinal()][L2ArmorType.MAGIC.ordinal()] = true; + + // armorMapping[L2ArmorType.MAGIC.ordinal()][L2ArmorType.LIGHT.ordinal()] = true; + // armorMapping[L2ArmorType.MAGIC.ordinal()][L2ArmorType.HEAVY.ordinal()] = true; + } as you can see I highlighted the restriction that separated SWORD from BIGSWORD and BLUNT from BIGBLUNT. why now in the new codes one-handed weapons and two-handed weapons uses the same type: SWORD. SWORD One handed weapon XML: Eternal Core Sword <item id="15871" type="Weapon" name="Eternal Core Sword - Focus"> <set name="icon" val="icon.weapon_incessantcore_sword_i01" /> <set name="default_action" val="EQUIP" /> <set name="weapon_type" val="SWORD" /> <set name="bodypart" val="rhand" /> <set name="random_damage" val="10" /> <set name="attack_range" val="40" /> <set name="damage_range" val="0;0;40;120" /> <set name="immediate_effect" val="true" /> <set name="crystal_count" val="9872" /> <set name="crystal_type" val="S84" /> <set name="material" val="STEEL" /> <set name="weight" val="1520" /> <set name="price" val="205668000" /> <set name="change_weaponId" val="15904" /> <set name="soulshots" val="1" /> <set name="spiritshots" val="1" /> <set name="element_enabled" val="true" /> <set name="enchant_enabled" val="1" /> <set name="item_skill" val="3566-5" /> <for> <set stat="pAtk" val="437" /> <set stat="mAtk" val="192" /> <set stat="critRate" val="8" /> <set stat="pAtkSpd" val="379" /> <enchant val="0" stat="pAtk" /> <enchant val="0" stat="mAtk" /> </for> </item> BLUNT Two Handed XML: Lava Saw <item id="15883" type="Weapon" name="Lava Saw - Focus"> <set name="icon" val="icon.weapon_lavamond_saw_i01" /> <set name="default_action" val="EQUIP" /> <set name="weapon_type" val="SWORD" /> <set name="bodypart" val="lrhand" /> <set name="random_damage" val="10" /> <set name="attack_range" val="40" /> <set name="damage_range" val="0;0;40;120" /> <set name="immediate_effect" val="true" /> <set name="crystal_count" val="9872" /> <set name="crystal_type" val="S84" /> <set name="material" val="STEEL" /> <set name="weight" val="1740" /> <set name="price" val="205668000" /> <set name="change_weaponId" val="15907" /> <set name="soulshots" val="1" /> <set name="spiritshots" val="1" /> <set name="element_enabled" val="true" /> <set name="enchant_enabled" val="1" /> <set name="item_skill" val="3566-5" /> <for> <set stat="pAtk" val="532" /> <set stat="mAtk" val="192" /> <set stat="critRate" val="8" /> <set stat="pAtkSpd" val="325" /> <enchant val="0" stat="pAtk" /> <enchant val="0" stat="mAtk" /> </for> </item> BLUNT Two Handed XML: Contristo Hammer <item id="15882" type="Weapon" name="Contristo Hammer - Health"> <set name="icon" val="icon.weapon_pereztear_hammer_i01" /> <set name="default_action" val="EQUIP" /> <set name="weapon_type" val="BLUNT" /> <set name="bodypart" val="lrhand" /> <set name="random_damage" val="20" /> <set name="attack_range" val="40" /> <set name="damage_range" val="0;0;40;120" /> <set name="immediate_effect" val="true" /> <set name="crystal_count" val="9872" /> <set name="crystal_type" val="S84" /> <set name="material" val="FINE_STEEL" /> <set name="weight" val="1740" /> <set name="price" val="205668000" /> <set name="soulshots" val="1" /> <set name="spiritshots" val="1" /> <set name="element_enabled" val="true" /> <set name="enchant_enabled" val="1" /> <set name="item_skill" val="3013-3" /> <for> <set stat="pAtk" val="532" /> <set stat="mAtk" val="192" /> <set stat="critRate" val="4" /> <add stat="accCombat" val="4.75" /> <set stat="pAtkSpd" val="325" /> <enchant val="0" stat="pAtk" /> <enchant val="0" stat="mAtk" /> </for> </item> BLUNT One handed weapon XML: Sacredium <item id="15893" type="Weapon" name="Sacredium - Acumen"> <set name="icon" val="icon.weapon_sacredumors_i01" /> <set name="default_action" val="EQUIP" /> <set name="weapon_type" val="BLUNT" /> <set name="bodypart" val="rhand" /> <set name="random_damage" val="20" /> <set name="attack_range" val="40" /> <set name="damage_range" val="0;0;40;120" /> <set name="immediate_effect" val="true" /> <set name="crystal_count" val="9872" /> <set name="crystal_type" val="S84" /> <set name="material" val="WOOD" /> <set name="weight" val="1080" /> <set name="price" val="205668000" /> <set name="soulshots" val="1" /> <set name="spiritshots" val="1" /> <set name="element_enabled" val="true" /> <set name="enchant_enabled" val="1" /> <set name="is_magic_weapon" val="true" /> <set name="item_skill" val="3047-3" /> <for> <set stat="pAtk" val="350" /> <set stat="mAtk" val="256" /> <set stat="critRate" val="4" /> <add stat="accCombat" val="4.75" /> <set stat="pAtkSpd" val="379" /> <enchant val="0" stat="pAtk" /> <enchant val="0" stat="mAtk" /> </for> </item>
  9. thank you friend, plus I can not pay for the service now. I'm asking for help!
  10. this one works 100% with Armors and cloaks. only two-handed weapons that does not work correctly
  11. Does anyone have the mod .dressme that works on the latest version of L2JServer H5 and can share with me? please. I have one here, it works fine, more like type: BIGSWORD and BIGBLUNT have been removed from the project. the weapons does not work correctly. https://pastebin.com/J2maC8i8 Without the type: BIGSWORD and BIGBLUNT the mod does not differ the weapons of one hand nor two hands
  12. How does npc work? How to use it? I have not found it yet !
  13. If I create an npc with type = "L2VoteManager"> I can not summon the npc Does anyone know why?
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock