Jump to content

TouchAndDie

Members
  • Posts

    115
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by TouchAndDie

  1. 1. Thank you.

     

     

    2. I didn't find the method...

     

     

    public static byte calcSkillReflect(L2Character target, L2Skill skill)
    {
    	// Neither some special skills (like hero debuffs...) or those skills ignoring resistances can be reflected
    	if (skill.ignoreResists() || !skill.canBeReflected())
    	{
    		return SKILL_REFLECT_FAILED;
    	}
    
    	// Only magic and melee skills can be reflected
    	if (!skill.isMagic() && ((skill.getCastRange() == -1) || (skill.getCastRange() > MELEE_ATTACK_RANGE)))
    	{
    		return SKILL_REFLECT_FAILED;
    	}
    
    	byte reflect = SKILL_REFLECT_FAILED;
    	// Check for non-reflected skilltypes, need additional retail check
    	switch (skill.getSkillType())
    	{
    		case BUFF:
    		case HEAL_PERCENT:
    		case MANAHEAL_PERCENT:
    		case HOT:
    		case CPHOT:
    		case MPHOT:
    		case UNDEAD_DEFENSE:
    		case AGGDEBUFF:
    		case CONT:
    			return SKILL_REFLECT_FAILED;
    			// these skill types can deal damage
    		case PDAM:
    		case MDAM:
    		case BLOW:
    		case DRAIN:
    		case CHARGEDAM:
    		case FATAL:
    		case DEATHLINK:
    		case CPDAM:
    		case MANADAM:
    		case CPDAMPERCENT:
    			final Stats stat = skill.isMagic() ? Stats.VENGEANCE_SKILL_MAGIC_DAMAGE : Stats.VENGEANCE_SKILL_PHYSICAL_DAMAGE;
    			final double venganceChance = target.getStat().calcStat(stat, 0, target, skill);
    			if (venganceChance > Rnd.get(100))
    			{
    				reflect |= SKILL_REFLECT_VENGEANCE;
    			}
    			break;
    	}
    
    	final double reflectChance = target.calcStat(skill.isMagic() ? Stats.REFLECT_SKILL_MAGIC : Stats.REFLECT_SKILL_PHYSIC, 0, null, skill);
    	if (Rnd.get(100) < reflectChance)
    	{
    		reflect |= SKILL_REFLECT_SUCCEED;
    	}
    
    	return reflect;
    }

     

    i found only

    boolean isPvE = attacker.isPlayable() && target.isL2Attackable();

    in calcBlowDamage / calcPhysDam / and in

     

    public static final double calcMagicDam(L2Character attacker, L2Character target, L2Skill skill, byte shld, boolean ss, boolean bss, boolean mcrit)

    public static final double calcMagicDam(L2CubicInstance attacker, L2Character target, L2Skill skill, boolean mcrit, byte shld)

  2. Yes you are right...and something else..i have made a copy of an excisting skill on skillgrp but ingame it doesnt have a name..i mean it say noskillname or something like that...do i have to edit something else too? actually on skillgrp i could find the name of the skill only the id's..

     

    add it on skillname-e.dat too :)

  3. i've tried to add an event king engine on my server ( events are based on phoenix engine ). The event engine is done but when i add at onKill ( in phoenix events ) this code: killer.setEKills(killer.getEKills()+1); i get warning, The method getEKills() is undefined for the type EventPlayer then i maked it ((L2PcInstance) killer).setEKills(((L2PcInstance) killer).getEKills()+1); and i get Cannot cast from EventPlayer to L2PcInstance.

     

    Then i maked this in eventplayer.java ( in phoenix source )

    public int getEKills() {
    	return _owner.getEKills();
    }
    
    public void setEKills()
    {
    	_owner.setEKills(getEKills());
    }

     

     

    now i don't get and error from killer.setEKills(killer.getEKills()+1); but when i make a kill the EKills dosen't increase in database.

  4. Hello, i use this script: http://pastebin.com/iNUaykJ4 and it worked fine but i changed the html ( home.htm )

     

    <html><title>Raid Boss Informer</title>
    <body><center><br><br> 
    <img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
    <font color="FFCC00">Raid Boss Informer</font><br>
    <center><img src="L2UI.SquareGray" width=256 height=1><br><br>
    <center>
    <br><td align=center><button value="Timer" action="bypass -h Quest BossRespawn raidboss_85" width=160 height=30 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
    <br><br><img src="L2UI.SquareGray" width=256 height=1><br>
    </center>
    <table>
    </table>
    <br><br><img src="L2UI_CH3.herotower_deco" width=256 height=32><br>
    </body>
    </html>
    

     

    and now when i press " Timer ", nothing happen ...

     

     

    original html: http://pastebin.com/aASKi0zz

  5. 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);
    		}

     

    is not workin

  6. 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
    

     

    working thank you very much !!

×
×
  • 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