Jump to content

Recommended Posts

Posted

Indeed, that's why I was telling not to take only the raw code and apply it, it needs some adapting also.

 

Infact it must be tested anyway

Guest Elfocrash
Posted

raw code?

raw code means FCA4 8CB8 48A8 4ACE 8488 9D48 94C9 464C

Lol raw code means just the code not a patch simple as that.

Sad to see people talking poor English and trying to be smartasses :(

Posted

Hey guys, as i already said in the main topic it can be exploitable, for example, you join a clan and a hero puts valor on you, then you can have it forever, just cancel your character with a bot or something and you get the buff with 1h delay again.

 

But its easy to avoid it, just some modifications(save the buffs in a map, for example, where the key would be the buff and the value would be the time left to be over).

Posted

Lol raw code means just the code not a patch simple as that.

Sad to see people talking poor English and trying to be smartasses :(

 

raw code, binary, octal or hexademical, a code which human brain cant process/understand

 

Raw code, smth which needs process to understood by humans

 

some kind of codes

 

raw codes, readable code

 

I think that java belongs to readable code dont you agree ?

  • 1 month later...
  • 1 month later...
  • 2 months later...
Posted

Getting this error:

    [javac] C:\Users\Domantas\Desktop\eclipse\aCis_300\aCis_gameserver\java\net\sf\l2j\gameserver\handler\skillhandlers\Cancel.java:133: error: cannot find symbol
    [javac]             ThreadPoolManager.getInstance().scheduleGeneral(new CustomCancelTask((L2PcInstance)target, cancelledBuffs), 8*1000);
    [javac]                                                                                                ^
    [javac]   symbol:   variable target
    [javac]   location: class Cancel
    [javac] 1 error

 

What should I do ?

  • 4 weeks later...
  • 2 weeks later...
  • 2 weeks later...
Posted

error on acis.

 

ubercancel.png

 

File CustomCancelTask.java

/*
 * This program 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.
 * 
 * This program 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 net.sf.l2j.gameserver.model.entity.custom;

import javolution.util.FastMap;

import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.skills.Env;
import net.sf.l2j.gameserver.skills.effects.EffectTemplate;

/**
 * @author Anarchy
 *
 */
public class CustomCancelTask implements Runnable
{
	private L2PcInstance _player = null;
	private FastMap<L2Skill, int[]> _buffs = null;
	
	public CustomCancelTask(L2PcInstance _player, FastMap<L2Skill, int[]> _buffs)
	{
		this._player = _player;
		this._buffs = _buffs;
	}
	
	@Override
	public void run()
	{
		if (_player == null || !_player.isOnline())
		{
			return;
		}
		for (L2Skill s : _buffs.keySet())
		{
			if (s == null)
			{
				continue;
			}
			
             Env env = new Env();
             env.player = _player;
             env.target = _player;
             env.skill = s;
             L2Effect ef;
             for (EffectTemplate et : s.getEffectTemplates())
             {
                ef = et.getEffect(env);
                 if (ef != null)
                 {
                     ef.setCount(_buffs.get(s)[0]);
                     ef.setFirstTime(_buffs.get(s)[1]);
                     ef.scheduleEffect();
                 }
             }
		}
	}
}

Cancel.java

/*
 * This program 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.
 * 
 * This program 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 net.sf.l2j.gameserver.handler.skillhandlers;

import javolution.util.FastMap;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.handler.ISkillHandler;
import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.ShotType;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.custom.CustomCancelTask;
import net.sf.l2j.gameserver.skills.Formulas;
import net.sf.l2j.gameserver.templates.skills.L2SkillType;
import net.sf.l2j.util.Rnd;

/**
 * @author DS
 */
public class Cancel implements ISkillHandler
{
	private static final L2SkillType[] SKILL_IDS =
	{
		L2SkillType.CANCEL,
		L2SkillType.MAGE_BANE,
		L2SkillType.WARRIOR_BANE
	};
	
	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		// Delimit min/max % success.
		final int minRate = (skill.getSkillType() == L2SkillType.CANCEL) ? 25 : 40;
		final int maxRate = (skill.getSkillType() == L2SkillType.CANCEL) ? 75 : 95;
		
		// Get skill power (which is used as baseRate).
		final double skillPower = skill.getPower();
		
		for (L2Object obj : targets)
		{
			if (!(obj instanceof L2Character))
				continue;
			
			final L2Character target = (L2Character) obj;
			if (target.isDead())
				continue;
			
			FastMap<L2Skill, int[]> cancelledBuffs = new FastMap<>();
			
			int lastCanceledSkillId = 0;
			int count = skill.getMaxNegatedEffects();
			
			if (!cancelledBuffs.containsKey(effect.getSkill()))
			{
				cancelledBuffs.put(effect.getSkill(), new int[] { effect.getCount(), effect.getTime() });
			}
			
			// Calculate the difference of level between skill level and victim, and retrieve the vuln/prof.
			final int diffLevel = skill.getMagicLevel() - target.getLevel();
			final double skillVuln = Formulas.calcSkillVulnerability(activeChar, target, skill, skill.getSkillType());
			
			for (L2Effect effect : target.getAllEffects())
			{
				// Don't cancel null effects or toggles.
				if (effect == null || effect.getSkill().isToggle())
					continue;
				
				// Mage && Warrior Bane drop only particular stacktypes.
				switch (skill.getSkillType())
				{
					case MAGE_BANE:
						if ("casting_time_down".equalsIgnoreCase(effect.getStackType()))
							break;
						
						if ("ma_up".equalsIgnoreCase(effect.getStackType()))
							break;
						
						continue;
						
					case WARRIOR_BANE:
						if ("attack_time_down".equalsIgnoreCase(effect.getStackType()))
							break;
						
						if ("speed_up".equalsIgnoreCase(effect.getStackType()))
							break;
						
						continue;
				}
				
				// If that skill effect was already canceled, continue.
				if (effect.getSkill().getId() == lastCanceledSkillId)
					continue;
				
				// Calculate the success chance following previous variables.
				if (calcCancelSuccess(effect.getPeriod(), diffLevel, skillPower, skillVuln, minRate, maxRate))
				{
					// Stores the last canceled skill for further use.
					lastCanceledSkillId = effect.getSkill().getId();
					
					if (cancelledBuffs.size() > 0)
					{
						ThreadPoolManager.getInstance().scheduleGeneral(new CustomCancelTask((L2PcInstance)target, cancelledBuffs), 5*1000);
					}
					
					// Exit the effect.
					effect.exit();
				}
				
				// Remove 1 to the stack of buffs to remove.
				count--;
				
				// If the stack goes to 0, then break the loop.
				if (count == 0)
					break;
			}
			
			// Possibility of a lethal strike
			Formulas.calcLethalHit(activeChar, target, skill);
		}
		
		if (skill.hasSelfEffects())
		{
			final L2Effect effect = activeChar.getFirstEffect(skill.getId());
			if (effect != null && effect.isSelfEffect())
				effect.exit();
			
			skill.getEffectsSelf(activeChar);
		}
		activeChar.setChargedShot(activeChar.isChargedShot(ShotType.BLESSED_SPIRITSHOT) ? ShotType.BLESSED_SPIRITSHOT : ShotType.SPIRITSHOT, skill.isStaticReuse());
	}
	
	private static boolean calcCancelSuccess(int effectPeriod, int diffLevel, double baseRate, double vuln, int minRate, int maxRate)
	{
		double rate = (2 * diffLevel + baseRate + effectPeriod / 120) * vuln;
		
		if (Config.DEVELOPER)
			_log.info("calcCancelSuccess(): diffLevel:" + diffLevel + ", baseRate:" + baseRate + ", vuln:" + vuln + ", total:" + rate);
		
		if (rate < minRate)
			rate = minRate;
		else if (rate > maxRate)
			rate = maxRate;
		
		return Rnd.get(100) < rate;
	}
	
	@Override
	public L2SkillType[] getSkillIds()
	{
		return SKILL_IDS;
	}
}
  • 5 months later...
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • the only thing you know how to do is to change drawings inside a lineage2 client and you decide to talk about the IQ of others? hahahaha
    • Web: https://cheatcenter.net/ Counter Strike 2 Nixware Hack With the Nixware cheat, you have powerful software in your hands for exciting battles in Counter-Strike 2! The perfect set of features for Rage and Semi-Rage games will provide you with confidence on the battlefield. Use antiaim to avoid being hit. Customize the world for yourself by adjusting the colors and the sky. Shoot through the walls and use other unique opportunities to defeat your rivals and become the leader of the team! Product Description LEGITBOT FOV Hitboxes Head Neck Chest Stomach Pelvis Smooth Shot delay Kill delay Lock target Lock mouse Draw FOV Disable when Smoke Flash Jump RAGEBOT Aimbot FOV changer Hitscan Head Neck Chest Stomach Pelvis HeadBody point scale Minimal damage Hitchance Force shoot PSilent Antiaim Autoscope Autostop (between shots) Bunnyhop Auto strafer with smooth adjustment Accurate walk ESP Box Glow Skeleton Footsteps Name Weapon name Health Health bar Ammo Chams Ragdoll chams Offscreen ESP Box Minimal and maximum radius customization Minimal and maximum size customization WORLD Bomb esp Timer Damage Name Weapons Icon Name Glow Grenades Color Trajectory Timer Grenade proximity warning SKINS Gloves Seed Paint kit Wear Knifes Seed Paint kit Wear Weapons Seed Paint kit Wear MISC View Model Editor View Model Chams Hand chams Glove chams Sleeve chams Weapon chams Auto Accept Show player money Spectator list World modulation (world, clouds, sky, sun) Spread circle TaserKnife range Hit markerHit effect Aspect ratio Third person REMOVALS Flash Smoke Visual recoil Scope borders Zoom Sniper crosshair check Team intro First person legs Model occlusion Shadows Fog Decals Particles Water effect Lightning  
    • Web: https://cheatcenter.net/ Counter Strike 2 Xone Hack Looking for a legit cheat for Counter-Strike 2? Xone is your perfect choice! Our product provides unsurpassed features that allow you to play legit and at the same time have an advantage over other players. Discover a new level of gaming efficiency with Xone! Product Description AIM Draw fov Draw target Only enemy Only visible Status Smooth Fov Hitbox Compensation Standalone Target switch Trigger Use aimbot Sticky mode Recoil compensation Delay Custom setting for all VISUAL Enable Box Skeleton Head Loot Health Weapon Name Defuser Bomb Visible check MISK Radar Only enemy Color Enemy/Team Scale Size Keybind Spectator list Bomb info  
    • Web: https://cheatcenter.net/ Apex Legends Phoenix Macro We are excited to introduce our new development, Phoenix private macros for Apex Legends. Recently, it has become harder to develop stable and undetectable cheats for Apex, so we decided to add a safer option to our range. Our macros offer a revolutionary solution in the world of Apex scripts and macros. Everything is launched and configured through a convenient menu and works with all weapons and computer mouse models. So, our program is very user-friendly. Phoenix Macros provide you with an advantage in the game while minimizing the risk of your account being banned. In addition, we offer our program at a very affordable price. If you don't want to risk using cheats, then Phoenix Macro is perfect for you! Product Description Weapon recoil control (Apex Macros) Enable - You can enable/disable the macro during the game Weapon - the choice of weapons with which the macro will work Works with all weapons in the game Scopes - works with all scopes in the game Attachments - works with all weapon mods in the game Control X / Y - adjustment of vertical and horizontal recoil Auto-detection of weapons in your arms Auto-detection of weapon modules Hipfire - macro works when you shoot from the hip (not aiming) Legit Mode - is a safer way to control recoil List of supported weapons (Script / Macros for All Weapons) R99 R301 Alternator RE45 Flatline Spitfire C.A.R. Hemlock Rampage Devotion Volt P2020 SCOUT G7 Havoc PDW L-Star w30-30 Nemesis List of supported modules for guns Double Tap Trigger Turbocharger 2x HCOG "Bruiser" 1x-2x Variable Holo 3x HCOG "Ranger" 2x-4x Variable AOG Barrel Stabilizer Laser Sight Add. Script Features (Phoenix Macro) Binds - bind keys to select the desired weapon Autodetection - automatic detection of weapons in hands when holding a key Selector Circle - a convenient window for selecting weapons (in the form of a circle / wheel) Anti OBS - hide the script window and menu on screenshots and when recording via OBS Languages - English, French, German, Italian, Polish, Portuguese (Brazilian), Russian, Spanish and Turkish Use Controller - phoenix macro for apex works with gamepads
  • Topics

×
×
  • Create New...