-
Posts
1,418 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by ^Wyatt
-
sorry I'm editing the post w8... don't rage -.-...
-
this?
-
for free? l2jserver stable not free? it's not polite but I offer you to take a look on mine project x'D l2jhidden
-
Not get pvp kill other zone
^Wyatt replied to AlexCardyz's question in Request Server Development Help [L2J]
use () anyway post the checkIfPvP() method pd: go skype dude :p // Check if it's pvp if((checkIfPvP(target) && targetPlayer.getPvpFlag() != 0) || (isInsideZone(ZONE_FLAGZONE) && targetPlayer.isInsideZone(ZONE_FLAGZONE))) // Check if you and target is in pvp zone { increasePvpKills(); } -
@Elfocrash Thanks but I'm pretty sure other projects can also have it xD
-
@author check PM's @vampir what do u said that needs client mod? O.o
-
@vampir do u mean the ... ? I have made it now and I just wake up xD I thought it wouldn't work with coz u have to take the info of each arena... and I'm pretty newbie on java, less than 4 months since I started looking for it... so I do what I can... I code with my "level"... anyway it's a share... I don't force anyone to use/look it xd
-
So, you did it wrong. Revert the patch and apply it again... or try to solve... but should be some errors in what u did. Check only the java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java part of the patch.
-
bump! New Event Engine interface 0.3 New event: Zombies New quests: Q10504, Q10505, Q904, Q907, Q693, Q00026 New instance: M.ounted Troops, Keucereus Fortress, Rim Kamaloka's New AI's: Mucokians, Ancient treasure Boxs, Chests, Cruma Border, Deinonychus, FoG, LoA, DV, SelMahum, Stubborn, The Spirit Of Pigs, UD When Attacked, Ancient Herb Slayer, Overlord's, Prison guards, Anais, Outpost Captain, Reed Herb Sower, Knoriks, Drake Lord, Behemoth Leader, Dragon Beast, Town Pets, Lindvior and more also [H5]-Geodata project is now available
-
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
It should be the final one (bored :x): Index: dist/game/data/scripts/handlers/skillhandlers/Cancel.java =================================================================== --- dist/game/data/scripts/handlers/skillhandlers/Cancel.java (revision 176) +++ dist/game/data/scripts/handlers/skillhandlers/Cancel.java (working copy) @@ -14,7 +14,11 @@ */ package handlers.skillhandlers; +import javolution.util.FastList; + +import com.l2jhidden.game.ThreadPoolManager; import com.l2jhidden.main.Config; +import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.handler.ISkillHandler; import com.l2jserver.gameserver.model.L2Effect; import com.l2jserver.gameserver.model.L2Object; @@ -22,6 +26,7 @@ import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Summon; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.item.instance.L2ItemInstance; import com.l2jserver.gameserver.skills.Formulas; import com.l2jserver.gameserver.skills.Stats; @@ -43,6 +48,23 @@ * * @see com.l2jserver.gameserver.handler.ISkillHandler#useSkill(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.L2Skill, com.l2jserver.gameserver.model.L2Object[]) */ + + private int seconds = 5; + + private void returnbuffs (L2Character player, FastList<L2Effect>list) + { + for (L2Effect e : list) + { + L2Skill skill = SkillTable.getInstance().getInfo(e.getSkill().getId(), e.getLevel()); + + if(skill != null) + { + skill.getEffects(player, player); + } + } + ((L2PcInstance)player).isoncanceltask=false; + } + @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { @@ -75,10 +98,9 @@ ((L2Npc)activeChar)._spiritshotcharged = false; } - L2Character target; L2Effect effect; final int cancelLvl, minRate, maxRate; cancelLvl = skill.getMagicLevel(); minRate = 25; maxRate = 80; @@ -87,8 +109,9 @@ { if (!(obj instanceof L2Character)) continue; - target = (L2Character)obj; + final L2Character target = (L2Character)obj; if (target.isDead()) continue; @@ -132,6 +155,7 @@ } final L2Effect[] effects = target.getAllEffects(); + ((L2PcInstance)target).clearcancelbuffs(); if (skill.getNegateAbnormals() != null) // Cancel for abnormals { @@ -178,6 +202,11 @@ continue; lastCanceledSkillId = effect.getSkill().getId(); + + if (target instanceof L2PcInstance) + { + ((L2PcInstance)target).addcancelbuffs(effect); + } effect.exit(); count--; @@ -208,6 +237,11 @@ continue; lastCanceledSkillId = effect.getSkill().getId(); + + if (target instanceof L2PcInstance) + { + ((L2PcInstance)target).addcancelbuffs(effect); + } effect.exit(); count--; @@ -216,9 +250,23 @@ } } } - //Possibility of a lethal strike Formulas.calcLethalHit(activeChar, target, skill); + + if (target instanceof L2PcInstance && ((L2PcInstance)target).getcancelbuffs()!=null && !((L2PcInstance)target).isoncanceltask) + { + ((L2PcInstance)target).sendMessage("You will get back your buffs in "+seconds+" seconds."); + + ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() + { + @Override + public void run() + { + ((L2PcInstance)target).isoncanceltask=true; + returnbuffs(target, ((L2PcInstance)target).getcancelbuffs()); + } + },seconds * 1000); + } } // Applying self-effects -
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
try to move waitS(seconds); and put it inside : private void returnbuffs (L2Character player, FastList<L2Effect>list) { waitS(seconds); for (L2Effect e : list) -
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
@PoRnosJH It should solve the 3 problems, try it and feedback :x ### Eclipse Workspace Patch 1.0 #P L2JH_DataPack Index: dist/game/data/scripts/handlers/skillhandlers/Cancel.java =================================================================== --- dist/game/data/scripts/handlers/skillhandlers/Cancel.java (revision 176) +++ dist/game/data/scripts/handlers/skillhandlers/Cancel.java (working copy) @@ -14,7 +14,9 @@ */ package handlers.skillhandlers; +import javolution.util.FastList; import com.l2jhidden.main.Config; +import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.handler.ISkillHandler; import com.l2jserver.gameserver.model.L2Effect; import com.l2jserver.gameserver.model.L2Object; @@ -22,6 +24,7 @@ import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Summon; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.item.instance.L2ItemInstance; import com.l2jserver.gameserver.skills.Formulas; import com.l2jserver.gameserver.skills.Stats; @@ -43,6 +46,36 @@ * * @see com.l2jserver.gameserver.handler.ISkillHandler#useSkill(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.L2Skill, com.l2jserver.gameserver.model.L2Object[]) */ + + private int seconds = 120; + + private static void waitS(int seconds) + { + try + { + Thread.sleep(1000*seconds); + } + + catch (InterruptedException ie) + { + + } + } + + private void returnbuffs (L2Character player, FastList<L2Effect>list) + { + for (L2Effect e : list) + { + L2Skill skill = SkillTable.getInstance().getInfo(e.getSkill().getId(), e.getLevel()); + + if(skill != null) + { + skill.getEffects(player, player); + } + } + ((L2PcInstance)player).isoncanceltask=false; + } + @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { @@ -132,6 +166,7 @@ } final L2Effect[] effects = target.getAllEffects(); + ((L2PcInstance)target).clearcancelbuffs(); if (skill.getNegateAbnormals() != null) // Cancel for abnormals { @@ -178,6 +213,11 @@ continue; lastCanceledSkillId = effect.getSkill().getId(); + + if (target instanceof L2PcInstance) + { + ((L2PcInstance)target).addcancelbuffs(effect); + } effect.exit(); count--; @@ -208,6 +248,11 @@ continue; lastCanceledSkillId = effect.getSkill().getId(); + + if (target instanceof L2PcInstance) + { + ((L2PcInstance)target).addcancelbuffs(effect); + } effect.exit(); count--; @@ -216,9 +261,15 @@ } } } - //Possibility of a lethal strike Formulas.calcLethalHit(activeChar, target, skill); + + if (target instanceof L2PcInstance && ((L2PcInstance)target).getcancelbuffs()!=null && !((L2PcInstance)target).isoncanceltask) + { + ((L2PcInstance)target).sendMessage("You'll get back your cancelled buffs in "+seconds+" seconds."); + ((L2PcInstance)target).isoncanceltask=true; + waitS(seconds); + returnbuffs(target, ((L2PcInstance)target).getcancelbuffs()); + } } // Applying self-effects -
Should appear on db `olympiad_data` field `olympiad_end`
-
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
try changing this: ((L2PcInstance)_player).isoncanceltask=false; for this: ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() { @Override public void run() { ((L2PcInstance)_player).isoncanceltask=false; } },10000); -
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
hmmm :X could be? Index: java/com/l2jserver/gameserver/model/L2Effect.java =================================================================== --- java/com/l2jserver/gameserver/model/L2Effect.java (revision 167) +++ java/com/l2jserver/gameserver/model/L2Effect.java (working copy) @@ -525,9 +525,12 @@ //If the time left is equal to zero, send the message if (_count == 0 && _icon && getEffected() instanceof L2PcInstance) { - SystemMessage smsg3 = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_WORN_OFF); - smsg3.addSkillName(_skill); - getEffected().sendPacket(smsg3); + if (!((L2PcInstance)getEffected()).isoncanceltask) + { + SystemMessage smsg3 = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_WORN_OFF); + smsg3.addSkillName(_skill); + getEffected().sendPacket(smsg3); + } } // if task is null - stopEffectTask does not remove effect if (_currentFuture == null && getEffected() != null) -
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
Yep, my fault. Try it, should work. Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 167) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -372,7 +372,25 @@ private static final String RESTORE_TP_BOOKMARK = "SELECT Id,x,y,z,icon,tag,name FROM character_tpbookmark WHERE charId=?"; private static final String DELETE_TP_BOOKMARK = "DELETE FROM character_tpbookmark WHERE charId=? AND Id=?"; + //Cancel return back buffs + private FastList<L2Effect> cancelbuffs = new FastList<L2Effect>(); //wyatt + public boolean isoncanceltask = false; + public FastList<L2Effect> getcancelbuffs() + { + return cancelbuffs; + } + + public void addcancelbuffs(L2Effect effect) + { + cancelbuffs.add(effect); + } + + public void clearcancelbuffs() + { + cancelbuffs.clear(); + } + // Character Subclass SQL String Definitions: private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE charId=? ORDER BY class_index ASC"; private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (charId,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)"; Index: dist/game/data/scripts/handlers/skillhandlers/Cancel.java =================================================================== --- dist/game/data/scripts/handlers/skillhandlers/Cancel.java (revision 176) +++ dist/game/data/scripts/handlers/skillhandlers/Cancel.java (working copy) @@ -14,7 +14,11 @@ */ package handlers.skillhandlers; +import javolution.util.FastList; + +import com.l2jhidden.game.ThreadPoolManager; import com.l2jhidden.main.Config; +import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.handler.ISkillHandler; import com.l2jserver.gameserver.model.L2Effect; import com.l2jserver.gameserver.model.L2Object; @@ -22,6 +26,7 @@ import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.L2Summon; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.item.instance.L2ItemInstance; import com.l2jserver.gameserver.skills.Formulas; import com.l2jserver.gameserver.skills.Stats; @@ -43,6 +48,49 @@ * * @see com.l2jserver.gameserver.handler.ISkillHandler#useSkill(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.L2Skill, com.l2jserver.gameserver.model.L2Object[]) */ + +private int minutes = 2; + + class ReturnEffects implements Runnable //wyatt + { + private int _time; + FastList<L2Effect> _list; + L2Character _player; + + public ReturnEffects (int time, L2Character player, FastList<L2Effect>list) + { + _time = time; + _list = list; + _player = player; + } + + @Override + public void run() + { + if (_time > 0) + { + ThreadPoolManager.getInstance().scheduleGeneral(this, 1000); + _time-=1000; + } + + if (_time==0) + { + ((L2PcInstance)_player).stopAllEffectsExceptThoseThatLastThroughDeath(); + + for (L2Effect e : _list) + { + L2Skill skill = SkillTable.getInstance().getInfo(e.getSkill().getId(), e.getLevel()); + + if(skill != null) + { + skill.getEffects(_player, _player); + } + } + ((L2PcInstance)_player).isoncanceltask=false; + } + } + } + @Override public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) { @@ -133,6 +184,22 @@ final L2Effect[] effects = target.getAllEffects(); + if (target instanceof L2PcInstance) //wyatt + { + ((L2PcInstance)target).clearcancelbuffs(); + + for (L2Effect effect2 : target.getAllEffects()) + { + ((L2PcInstance)target).addcancelbuffs(effect2); + } + + if (((L2PcInstance)target).getcancelbuffs()!=null && !((L2PcInstance)target).isoncanceltask) + { + ((L2PcInstance)target).isoncanceltask=true; + ThreadPoolManager.getInstance().executeTask(new ReturnEffects(minutes * 60000, target, ((L2PcInstance)target).getcancelbuffs())); + } + } + if (skill.getNegateAbnormals() != null) // Cancel for abnormals { for (L2Effect eff : effects) -
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
any error on console? PD: "}" must be closed before threadpoolmanager... blabla, I edited it, check it and test :p -
cancellation skill
^Wyatt replied to TouchAndDie's question in Request Server Development Help [L2J]
Try it dude. Index: dist/game/data/scripts/handlers/skillhandlers/Disablers.java =================================================================== --- dist/game/data/scripts/handlers/skillhandlers/Disablers.java (revision 176) +++ dist/game/data/scripts/handlers/skillhandlers/Disablers.java (working copy) @@ -15,11 +15,13 @@ package handlers.skillhandlers; import java.util.logging.Logger; +import javolution.util.FastList; +import com.l2jhidden.game.ThreadPoolManager; import com.l2jserver.gameserver.ai.CtrlEvent; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.ai.L2AttackableAI; import com.l2jserver.gameserver.datatables.ExperienceTable; +import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.handler.ISkillHandler; import com.l2jserver.gameserver.handler.SkillHandler; import com.l2jserver.gameserver.model.L2Effect; @@ -70,7 +72,49 @@ protected static final Logger _log = Logger.getLogger(L2Skill.class.getName()); + private int minutes = 2; + class ReturnEffects implements Runnable//wyatt + { + private int _time; + FastList<L2Effect> _list; + L2Character _player; + + public ReturnEffects (int time, L2Character player, FastList<L2Effect>list) + { + _time = time; + _list = list; + _player = player; + } + + @Override + public void run() + { + if (_time > 0) + { + ThreadPoolManager.getInstance().scheduleGeneral(this, 1000); + _time-=1000; + } + + if (_time==0) + { + ((L2PcInstance)_player).stopAllEffectsExceptThoseThatLastThroughDeath(); + + for (L2Effect e : _list) + { + L2Skill skill = SkillTable.getInstance().getInfo(e.getSkill().getId(), e.getLevel()); + + if(skill != null) + { + skill.getEffects(_player, _player); + } + } + ((L2PcInstance)_player).clearcancelbuffs(); + } + } + } + + /** * * @see com.l2jserver.gameserver.handler.ISkillHandler#useSkill(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.L2Skill, com.l2jserver.gameserver.model.L2Object[]) @@ -566,7 +610,17 @@ landrate = (int) activeChar.calcStat(Stats.CANCEL_VULN, landrate, target, null); if (Rnd.get(100) < landrate) + { removedBuffs += negateEffect(target, L2SkillType.BUFF, -1, skill.getMaxNegatedEffects()); + if (target instanceof L2PcInstance) + { + for (L2Effect effect : target.getAllEffects()) + { + ((L2PcInstance)target).addcancelbuffs(effect); + } ThreadPoolManager.getInstance().executeTask(new ReturnEffects(minutes * 60000, target, ((L2PcInstance)target).getcancelbuffs())); + + } + } break; case HEAL: ISkillHandler Healhandler = SkillHandler.getInstance().getHandler(L2SkillType.HEAL); Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 167) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -372,7 +372,24 @@ private static final String RESTORE_TP_BOOKMARK = "SELECT Id,x,y,z,icon,tag,name FROM character_tpbookmark WHERE charId=?"; private static final String DELETE_TP_BOOKMARK = "DELETE FROM character_tpbookmark WHERE charId=? AND Id=?"; + //Cancel return back buffs + private FastList<L2Effect> cancelbuffs = new FastList<L2Effect>(); + public FastList<L2Effect> getcancelbuffs() + { + return cancelbuffs; + } + + public void addcancelbuffs(L2Effect effect) + { + cancelbuffs.add(effect); + } + + public void clearcancelbuffs() + { + cancelbuffs.clear(); + } + // Character Subclass SQL String Definitions: private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE charId=? ORDER BY class_index ASC"; private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (charId,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)"; -
U can try to put it on doDie task of L2Attackable if (this.getNpcId()==NPC_ID && killer instanceof L2PcInstance) { int plus = 5; byte lvl = ((L2PcInstance)killer).getStat().getLevel(); byte lvlup = (byte) (lvl+plus); ((L2PcInstance)killer).getStat().setLevel(lvlup); }
-
@inpetto7 Please, go trolling far from here. You aren't customer of l2jhidden so stop trolling the thread.
-
Are u kidding right?... divide it by 10 and maybe u get the correct price for that...
-
I think I have what are u looking for, if u still look for it. Msn: sales@l2jhidden.com
-
@Mimosin Thx mate. Also I have to announce a couple of things: We are near to finish our own geodata project that will be available for 30EUR, for Customers 15EUR and for Vip Customers 10EUR. And we're gonna start giving free domains (.com .net etc...) to our customers. They will be elected by drawing lots, at the end of the month. Latest work: Q10296_SevenSignsPoweroftheSeal
-
[HELP] equip the weapon automatic ?
^Wyatt replied to SnYpEr®'s question in Request Server Development Help [L2J]
I dunno if u mean that: player.getInventory().equipItem(ItemTable.getInstance().createItem("", ITEM_ID, 1, player, null));
