
varens
Members-
Posts
174 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by varens
-
i update that script becouse on that last if player will attack by pole or with mass skill then he will get some bugs, now it will work good: Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/config/l2jmods.properties =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/config/l2jmods.properties (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/config/l2jmods.properties (working copy) @@ -256,4 +256,8 @@ # This option will enable core support for: # Mana Drug (item ID 726), using skill ID 9007. # Mana Potion (item ID 728), using skill ID 9008. -EnableManaPotionSupport = False \ No newline at end of file +EnableManaPotionSupport = False + +#KS Protected moobs id +#Format: moobId1,moobid2 +KsProtectedMoobs = 20001,20002 \ No newline at end of file Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy) @@ -19,9 +19,12 @@ import java.text.DateFormat; import java.util.Collection; import java.util.List; +import java.util.Map; +import java.util.Vector; import java.util.logging.Level; import javolution.util.FastList; +import javolution.util.FastMap; import net.sf.l2j.Config; import net.sf.l2j.gameserver.SevenSigns; import net.sf.l2j.gameserver.SevenSignsFestival; @@ -161,6 +164,9 @@ private int _currentRHandId; // normally this shouldn't change from the template, but there exist exceptions private int _currentCollisionHeight; // used for npc grow effect skills private int _currentCollisionRadius; // used for npc grow effect skills + + public L2PcInstance[] _attackedBy; + public Double[] _attackedByDmg; /** Task launching the function onRandomAnimation() */ protected class RandomAnimationTask implements Runnable @@ -2457,6 +2463,17 @@ @Override public boolean doDie(L2Character killer) { + if(Config.KS_PROTECT_MOOBS.contains(this.getNpcId())) + { + double bestDmg = 0; + for(int i=0;i<_attackedBy.length;i++) + if (_attackedByDmg[i] > bestDmg) + { + bestDmg = _attackedByDmg[i]; + killer = _attackedBy[i]; + } + } + if (!super.doDie(killer)) return false; Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java (working copy) @@ -32,6 +32,7 @@ import net.sf.l2j.gameserver.model.actor.L2Summon; import net.sf.l2j.gameserver.model.actor.instance.L2CubicInstance; import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance; import net.sf.l2j.gameserver.model.base.PlayerState; @@ -1269,6 +1270,26 @@ damage *= attacker.calcStat(Stats.PVP_PHYS_SKILL_DMG, 1, null, null); } + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(moob._attackedBy.equals(player)) + { + for(int i=0;i<moob._attackedBy.length;i++) + { + if(moob._attackedBy[i] == player) + moob._attackedByDmg[i] += damage; + } + } + else + { + moob._attackedBy[moob._attackedBy.length] = player; + moob._attackedByDmg[moob._attackedByDmg.length] = damage; + } + } + return damage < 1 ? 1. : damage; } /** Calculated damage caused by ATTACK of attacker on target, @@ -1490,6 +1511,26 @@ damage *= calcElemental(attacker, target, skill); + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(moob._attackedBy.equals(player)) + { + for(int i=0;i<moob._attackedBy.length;i++) + { + if(moob._attackedBy[i] == player) + moob._attackedByDmg[i] += damage; + } + } + else + { + moob._attackedBy[moob._attackedBy.length] = player; + moob._attackedByDmg[moob._attackedByDmg.length] = damage; + } + } + return damage; } @@ -1596,6 +1637,26 @@ damage *= calcElemental(attacker, target, skill); + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(moob._attackedBy.equals(player)) + { + for(int i=0;i<moob._attackedBy.length;i++) + { + if(moob._attackedBy[i] == player) + moob._attackedByDmg[i] += damage; + } + } + else + { + moob._attackedBy[moob._attackedBy.length] = player; + moob._attackedByDmg[moob._attackedByDmg.length] = damage; + } + } + return damage; } @@ -1659,6 +1720,26 @@ damage *= calcElemental(owner, target, skill); + if(target instanceof L2Npc) + { + L2PcInstance player = attacker.getOwner(); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(moob._attackedBy.equals(player)) + { + for(int i=0;i<moob._attackedBy.length;i++) + { + if(moob._attackedBy[i] == player) + moob._attackedByDmg[i] += damage; + } + } + else + { + moob._attackedBy[moob._attackedBy.length] = player; + moob._attackedByDmg[moob._attackedByDmg.length] = damage; + } + } + return damage; } Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/Config.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/Config.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/Config.java (working copy) @@ -616,6 +616,7 @@ public static boolean OFFLINE_SET_NAME_COLOR; public static int OFFLINE_NAME_COLOR; public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT; + public static List<Integer> KS_PROTECT_MOOBS = new ArrayList<Integer>(); //-------------------------------------------------- @@ -2014,6 +2015,20 @@ OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getProperty("OfflineNameColor", "808080")); L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(L2JModSettings.getProperty("EnableManaPotionSupport", "false")); + + String[] propertySplit = L2JModSettings.getProperty("KsProtectedMoobs", "0").split(","); + for(String moobId: propertySplit) + { + try + { + KS_PROTECT_MOOBS.add(Integer.parseInt(moobId)); + } + catch (NumberFormatException nfe) + { + if (propertySplit.length > 0) + _log.warning("Error in load config."); + } + } } catch (Exception e) {
-
no, who make biggest dmg on moob get the drop
-
for what make new instance? here you have config for protect moobs by ID: Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/config/l2jmods.properties =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/config/l2jmods.properties (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/config/l2jmods.properties (working copy) @@ -256,4 +256,8 @@ # This option will enable core support for: # Mana Drug (item ID 726), using skill ID 9007. # Mana Potion (item ID 728), using skill ID 9008. -EnableManaPotionSupport = False \ No newline at end of file +EnableManaPotionSupport = False + +#KS Protected moobs id +#Format: moobId1,moobid2 +KsProtectedMoobs = 20001,20002 \ No newline at end of file Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -771,6 +771,9 @@ private boolean _isRidingStrider = false; private boolean _isFlyingMounted = false; + public L2NpcInstance _lastMoob = null; + public double _lastMoobDmg = 0; + /** Herbs Task Time **/ private int _herbstask = 0; /** Task for Herbs */ Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy) @@ -19,9 +19,12 @@ import java.text.DateFormat; import java.util.Collection; import java.util.List; +import java.util.Map; +import java.util.Vector; import java.util.logging.Level; import javolution.util.FastList; +import javolution.util.FastMap; import net.sf.l2j.Config; import net.sf.l2j.gameserver.SevenSigns; import net.sf.l2j.gameserver.SevenSignsFestival; @@ -161,6 +164,8 @@ private int _currentRHandId; // normally this shouldn't change from the template, but there exist exceptions private int _currentCollisionHeight; // used for npc grow effect skills private int _currentCollisionRadius; // used for npc grow effect skills + + private Vector<L2PcInstance> _attackedBy = new Vector<L2PcInstance>(); /** Task launching the function onRandomAnimation() */ protected class RandomAnimationTask implements Runnable @@ -2457,6 +2462,18 @@ @Override public boolean doDie(L2Character killer) { + if(Config.KS_PROTECT_MOOBS.contains(this.getNpcId())) + { + double bestDmg = 0; + for(L2PcInstance player: _attackedBy) + if (player._lastMoob == this) + if(player._lastMoobDmg > bestDmg) + { + bestDmg = player._lastMoobDmg; + killer = player; + } + } + if (!super.doDie(killer)) return false; Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java (working copy) @@ -32,6 +32,7 @@ import net.sf.l2j.gameserver.model.actor.L2Summon; import net.sf.l2j.gameserver.model.actor.instance.L2CubicInstance; import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance; import net.sf.l2j.gameserver.model.base.PlayerState; @@ -1269,6 +1270,20 @@ damage *= attacker.calcStat(Stats.PVP_PHYS_SKILL_DMG, 1, null, null); } + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage < 1 ? 1. : damage; } /** Calculated damage caused by ATTACK of attacker on target, @@ -1490,6 +1505,20 @@ damage *= calcElemental(attacker, target, skill); + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage; } @@ -1596,6 +1625,20 @@ damage *= calcElemental(attacker, target, skill); + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage; } @@ -1659,6 +1702,20 @@ damage *= calcElemental(owner, target, skill); + if(target instanceof L2Npc) + { + L2PcInstance player = attacker.getOwner(); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage; } Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/Config.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/Config.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/Config.java (working copy) @@ -616,6 +616,7 @@ public static boolean OFFLINE_SET_NAME_COLOR; public static int OFFLINE_NAME_COLOR; public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT; + public static List<Integer> KS_PROTECT_MOOBS = new ArrayList<Integer>(); //-------------------------------------------------- @@ -2014,6 +2015,20 @@ OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getProperty("OfflineNameColor", "808080")); L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(L2JModSettings.getProperty("EnableManaPotionSupport", "false")); + + String[] propertySplit = L2JModSettings.getProperty("KsProtectedMoobs", "0").split(","); + for(String moobId: propertySplit) + { + try + { + KS_PROTECT_MOOBS.add(Integer.parseInt(moobId)); + } + catch (NumberFormatException nfe) + { + if (propertySplit.length > 0) + _log.warning("Error in load config."); + } + } } catch (Exception e) {
-
Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -771,6 +771,9 @@ private boolean _isRidingStrider = false; private boolean _isFlyingMounted = false; + public L2NpcInstance _lastMoob = null; + public double _lastMoobDmg = 0; + /** Herbs Task Time **/ private int _herbstask = 0; /** Task for Herbs */ Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/model/actor/L2Npc.java (working copy) @@ -19,9 +19,12 @@ import java.text.DateFormat; import java.util.Collection; import java.util.List; +import java.util.Map; +import java.util.Vector; import java.util.logging.Level; import javolution.util.FastList; +import javolution.util.FastMap; import net.sf.l2j.Config; import net.sf.l2j.gameserver.SevenSigns; import net.sf.l2j.gameserver.SevenSignsFestival; @@ -161,6 +164,8 @@ private int _currentRHandId; // normally this shouldn't change from the template, but there exist exceptions private int _currentCollisionHeight; // used for npc grow effect skills private int _currentCollisionRadius; // used for npc grow effect skills + + private Vector<L2PcInstance> _attackedBy = new Vector<L2PcInstance>(); /** Task launching the function onRandomAnimation() */ protected class RandomAnimationTask implements Runnable @@ -2457,6 +2462,15 @@ @Override public boolean doDie(L2Character killer) { + double bestDmg = 0; + for(L2PcInstance player: _attackedBy) + if (player._lastMoob == this) + if(player._lastMoobDmg > bestDmg) + { + bestDmg = player._lastMoobDmg; + killer = player; + } + if (!super.doDie(killer)) return false; Index: C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java =================================================================== --- C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java (revision 4013) +++ C:/Program Files/Eclipse/workspace/L2_GameServer_T2.3_2x/java/net/sf/l2j/gameserver/skills/Formulas.java (working copy) @@ -32,6 +32,7 @@ import net.sf.l2j.gameserver.model.actor.L2Summon; import net.sf.l2j.gameserver.model.actor.instance.L2CubicInstance; import net.sf.l2j.gameserver.model.actor.instance.L2DoorInstance; +import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance; import net.sf.l2j.gameserver.model.base.PlayerState; @@ -1269,6 +1270,20 @@ damage *= attacker.calcStat(Stats.PVP_PHYS_SKILL_DMG, 1, null, null); } + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage < 1 ? 1. : damage; } /** Calculated damage caused by ATTACK of attacker on target, @@ -1490,6 +1505,20 @@ damage *= calcElemental(attacker, target, skill); + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage; } @@ -1596,6 +1625,20 @@ damage *= calcElemental(attacker, target, skill); + if((attacker instanceof L2PcInstance) && (target instanceof L2Npc)) + { + L2PcInstance player = ((L2PcInstance)attacker); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage; } @@ -1659,6 +1702,20 @@ damage *= calcElemental(owner, target, skill); + if(target instanceof L2Npc) + { + L2PcInstance player = attacker.getOwner(); + L2NpcInstance moob = ((L2NpcInstance)target); + + if(player._lastMoob == moob) + player._lastMoobDmg += damage; + else + { + player._lastMoob = moob; + player._lastMoobDmg = damage; + } + } + return damage; } not tested, test and sey;p
-
you need w8 becouse my internet is so sh it and i need download that file souroce;p
-
i have better idea, but sey my what chronicle and what team files you use:)
-
[SHARE] Configurable Olympiad Countdown
varens replied to Levi4than's topic in Server Shares & Files [L2J]
i dont want sey nathing but that code is so useless, all who know only little java can make that -
Two way for get server IP without download path
varens replied to varens's topic in Botting [English]
yep but 90% l2j servers have auto create account ;p BTW i am agree with your signature, ucoz use servers who can't make website by self, they dont need make full of script website just in html, that is so easy -
rly i dont know i just find that and give here link, just look but auto open fish is nathing specjal if you want little script for that make something like that DO USE_ITEM ItemID SLEEP 100 LOOP ZERO == ZERO
-
Two way for get server IP without download path
varens replied to varens's topic in Botting [English]
that is only if server have online status or is registered on hopzone, i dont write nathing else, then i dont understand question -
like in name, if server have profil on http://hopzone.net then we can easy get server ip and port just left click on website and press button "website source" then we yest need search that: second, uf server make online status from http://status.blackout-gaming.net/ and admin dont choice ther "Encrypt data:" then same in "website source" we have ip and port just search that http://status.blackout-gaming.net/status.php?dns=88.88.88.88&port=2106&style=1 88.88.88.88 is IP and 2106 is port that is small thing but with that life is easier :)
-
man what do you think, you have google and search here, people will not find everything for you
-
why you double post, next time try edit
-
i test that script some time ago and that dont work, i need make another fix but now i havent that problem btw dont spam, text like "nice share" is useless
-
that is useless becouse you can add adena for start, that is same like gb
-
http://www.maxcheaters.com/forum/index.php?topic=126284.0 - Biohazard http://www.maxcheaters.com/forum/index.php?topic=82733.0 - DM try search option and you find more :)
-
i dont know who make that website but that is copied, then i think copyright is for www.l2insanity.gr, just look in code <!-- Mirrored from www.l2insanity.gr/ by HTTrack Website Copier/3.x [XR&CO'2010], Thu, 11 Mar 2010 10:23:04 GMT --> btw nice graphic, but toplist are usefull then if you can try add :)
-
[Guide]How many points for hero bonus
varens replied to DominiQue's topic in Server Shares & Files [L2J]
for what you want givemore points for hero if he have biggest number of points in class? that is good idea but i think that is not fer -
and if you know how to use eclipse you dont need that config becouse change it is 20sec ;]
-
you mean "love you"? XD if yes np xD
-
http://ltwonet.com/showthread.php/4147-Fishing-Script catch :)
-
stress web problem
varens replied to EdenEternal's question in Request Server Development Help [L2J]
one man share something about that here http://www.maxcheaters.com/forum/index.php?topic=129526.0 that is almost same but too can help :) -
[SHARE] Augmentation Generator
varens replied to varens's topic in Server Development Discussion [L2J]
that is for c6 but work on all chronicles, just you dont have ls lvl 80 etc;p -
[SHARE] Augmentation Generator
varens replied to varens's topic in Server Development Discussion [L2J]
heh will be more helpfull when i add option to choice all option of augment, i write before about that but i dont find actualy time for that ;]