Jump to content

`Rοmeο

Legendary Member
  • Posts

    8,223
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by `Rοmeο

  1. what about to put a status in the webpage ? Only Login ... Game ... ? If you put top 50 top 10 etc... will be great !
  2. Tested and working Index: /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/ForceBuff.java =================================================================== --- /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/ForceBuff.java (revision 281) +++ /Server/SkyLanceR's_IL_GS/java/net/sf/l2j/gameserver/model/ForceBuff.java (revision 304) @@ -21,104 +21,86 @@ import java.util.concurrent.Future; +import java.util.logging.Logger; +import net.sf.l2j.gameserver.GeoData; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.skills.effects.EffectForce; +import net.sf.l2j.gameserver.util.Util; +import net.sf.l2j.gameserver.model.L2Effect; +import net.sf.l2j.gameserver.model.L2Skill; +import net.sf.l2j.gameserver.model.ForceBuff; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +public final class ForceBuff -/** - * @author kombat - * - */ -public class ForceBuff { - static final Log _log = LogFactory.getLog(ForceBuff.class.getName()); - - protected L2PcInstance _caster; - private L2PcInstance _target; - private L2Skill _skill; - private L2Skill _force; - @SuppressWarnings("unchecked") - private Future _task; - private boolean _applied; - - public L2PcInstance getCaster() { return _caster; } - public L2PcInstance getTarget() { return _target; } - public L2Skill getSkill() { return _skill; } - public L2Skill getForce() { return _force; } - @SuppressWarnings("unchecked") - protected void setTask(Future task) { _task = task; } - protected void setApplied(boolean applied) { _applied = applied; } - - public ForceBuff(L2PcInstance caster, L2PcInstance target, L2Skill skill) - { - _caster = caster; - _target = target; - _skill = skill; - _force = SkillTable.getInstance().getInfo(skill.getForceId(), 1); - _applied = false; - - Runnable r = new Runnable() + protected static final Logger _log = Logger.getLogger(ForceBuff.class.getName()); + + final int _skillCastRange; + final int _forceId; + protected int _forceLevel; + L2PcInstance _caster; + L2PcInstance _target; + Future<?> _geoCheckTask; + + public L2PcInstance getCaster() + { + return _caster; + } + + public L2PcInstance getTarget() + { + return _target; + } + + public ForceBuff(L2PcInstance caster, L2PcInstance target, L2Skill skill) + { + _skillCastRange = skill.getCastRange(); + _caster = caster; + _target = target; + _forceId = skill.getTriggeredId(); + _forceLevel = skill.getTriggeredLevel(); + + L2Effect effect = _target.getFirstEffect(_forceId); + if (effect != null) { - public void run() - { - setApplied(true); - setTask(null); - - int forceId = getForce().getId(); - boolean create = true; - L2Effect[] effects = getTarget().getAllEffects(); - if (effects != null) - { - for(L2Effect e : effects) - { - if (e.getSkill().getId() == forceId) - { - EffectForce ef = (EffectForce)e; - if(ef.forces < 3) - ef.increaseForce(); - create = false; - break; - } - } - } - if(create) - { - getForce().getEffects(_caster, getTarget()); - } - } - }; - setTask(ThreadPoolManager.getInstance().scheduleGeneral(r, 2000)); + ((EffectForce)effect).increaseForce(); + } + else + { + L2Skill force = SkillTable.getInstance().getInfo(_forceId, _forceLevel); + if (force != null) + force.getEffects(_caster, _target); + else + _log.warning("Triggered skill ["+_forceId+";"+_forceLevel+"] not found!"); + } + _geoCheckTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new GeoCheckTask(), 1000, 1000); } - - public void delete() - { - if (_task != null) - { - _task.cancel(false); - _task = null; - } - - _caster.setForceBuff(null); - - if(!_applied) return; - - int toDeleteId = getForce().getId(); - - L2Effect[] effects = _target.getAllEffects(); - if (effects != null) - { - for(L2Effect e : effects) - { - if (e.getSkill().getId() == toDeleteId && (e instanceof EffectForce)) - { - ((EffectForce)e).decreaseForce(); - break; - } - } - } - } + + public void delete() + { + _caster.setForceBuff(null); + L2Effect effect = _target.getFirstEffect(_forceId); + if (effect != null) + ((EffectForce)effect).decreaseForce(); + + _geoCheckTask.cancel(true); + } + + class GeoCheckTask implements Runnable + { + public void run() + { + try + { + if (!Util.checkIfInRange(_skillCastRange, _caster, _target, true)) + delete(); + + if (!GeoData.getInstance().canSeeTarget(_caster, _target)) + delete(); + } + catch (Exception e){} + } + } }
  3. Sorry but I dont like it its realy not cool :(
  4. guys please answer me in retail interlude the clans are 10 lvl or 8 ?
  5. In interlude have this thing ? Couse I thing that is for kamael ++ :D Just asking couse never before I dont see something like that
  6. only armors and weapons :) witch will cost: 200 mil for weapon and 75 mil for armor part :)
  7. no core support for that: <add val='361' order='0x40' stat='cAtkAdd'/>
  8. I like your website. Good luck
  9. btw if i add customs they will be selling in the shops for adena :)
  10. and about the items ? witch you prefer ? Custom with retail stats or no custom ?
  11. Hello guys. Month ago i get an inspire to create mine own server. Then i started to work on it. For now that are the features but be sure that more are comming ! Rates: RateXp: 2000x RateSp: 3000x RatePartyXp: 2x RatePartySp: 2x RateDropAdena: 5000x RateDropItems: 1x RateDropSpoil: 10x RateDropManor: 10x RatePetXp: 500x Enchant: Save: +5 Max: +25 Rate: 80% Crystal: 85% Blessed: 90% (Only Olympiad) Retail Features: Auto Pick Up Items Auto Skill Learn Working ClassMasters Retail Like Clan Skills System Retail Like Skill Enchant System Weight Penalty Boosted By 9999% Disabled Grade Penalty Retail Like Karma Penalties Disabled Crafting Disabled Clan Penalties Retail Like Olympiad System Disabled Weight Penalty 48 Active Buff Slots Fully Working GeoData Fully Class Balance Custom Enchant System: When you enchant your items and the enchantmen get failed your item is going -1 enchant not to 0. Clans: The clan community is fully working. Any clan leader is getting colored title. Custom castle leader announce at login. Champion Monsters: The chance the monster to become champion is 1%. The champion monsters hp is boosted by 8%, also the rewards from killing champion are boosted by 8%. Weddings: The wedding costs 250 mil. The homosexuality is not alowed. The divorce costs 20% from your adena. Custom PvP Systems: Disabled PvP/Pk points botting. When you make 15 kills in roll you getting automatic hero status untill you restart. Customized Sieges: When you are at siege you can fight with your enemies in the towns. Customized Jail: When you get jailed you will be autamatic paralized untill you get out. Custom Zones: We have 4 custom zones. 2 Save and 2 PvP zones. We have 1 starting and leveling zone. Also we have 4 custom raid boss zones. Custom Items: We have 2 custom items: 1 Hero, 2 Reputation. 1. The hero item grands you with hero status untill restart. 2. The reputation item grands your clan with 2500 rep. score. (Only by leaders) Custom Voiced Commands: .deposit | .withdraw -> Banking system. .online -> Shows online players count. I have 2 questions. 1. Will you play on it ? 2. What you prefer Custom or No Custom ?
  12. http://www.worldstream.nl/ wrong place dude ...
  13. are you sure ? ok he will decompile but how he will compile it back and make it work ? :D no dude you cant edit the jar files without source
  14. I thing that you forget the Config.java side ... When you add it I will give it a test !
  15. maybe give me your file edit ?
  16. same post by another guy ? and you did not explane me is like l2 death avenue ?
  17. looking realy nice thanks ! - Downloading
  18. $db_serv = "no-ip or my Ip??"; Databace ip if you have dedicated add the ip there if the server is home add localhost $server = "no-ip or My Ip?"; server ip
  19. +1 :D START Fight ! :D
  20. awesome tool when you will share it ?
  21. great work seth thanks ! downloading ...
×
×
  • Create New...