Jump to content

Recommended Posts

Posted

since this one doesn't work on l2jacis here is a rework

### Eclipse Workspace Patch 1.0
#P aVa Tester
Index: java/net/sf/l2j/gameserver/Olympiad.java
===================================================================
--- java/net/sf/l2j/gameserver/model/Olympiad/OlympiadManager.java	(revision 9)
+++ java/net/sf/l2j/gameserver//model/Olympiad/OlympiadManager.java	(working copy)
@@ -392,6 +392,12 @@
     player.sendPacket(SystemMessageId.THE_OLYMPIAD_GAME_IS_NOT_CURRENTLY_IN_PROGRESS);
		return false;
	}
+      if(player.isAio())
+		{
+			player.sendMessage("AIO players can't register in Olympiad");
+			return false;
+		}

         if (Olympiad.getInstance().getMillisToCompEnd() < 600000)
	{
Index: java/net/sf/l2j/gameserver/model/AioBuffHandler.java
===================================================================
--- java/net/sf/l2j/gameserver/model/AioBuffHandler.java	(revision 0)
+++ java/net/sf/l2j/gameserver/model/AioBuffHandler.java	(revision 0)
@@ -0,0 +1,190 @@
+
+package net.sf.l2j.gameserver.model;
+
+import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.clientpackets.Say2;
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.datatables.SkillTreeTable;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
+import net.sf.l2j.gameserver.util.Broadcast;
+
+/**
+ * This class handles AIO buffers
+ *@author irat
+ *@editor Zake
+ */
+
+public class AioBuffHandler
+{
+	private static final Logger _log = Logger.getLogger((AioBuffHandler.class.getName()));
+	
+	private final static int SKILL_IDS_LEVELS[][] =
+	{
+		{264,1},  
+		{265,1},
+		{266,1},
+		{267,1},
+		{268,1},
+		{269,1}
+	};
+	
+	public static void setAio(L2PcInstance player , L2PcInstance target)
+	{
+		if(player == null || target == null)
+			return;
+		
+		if(target.isAio())
+		{
+			player.sendMessage("Player "+target.getName()+" is already an AIO");
+			return;
+		}
+		
+		else if(target.isSubClassActive())
+		{
+			player.sendMessage("Player must be at main class in order to become an AIO");
+			return;
+		}
+		
+		else if(target.isTeleporting() || target.isInOlympiadMode() || target.isDead() || target.isAlikeDead())
+		{
+			player.sendMessage("Action failed , nothing happened");
+			return;
+		}
+		
+			target.setAio(true);
+			Broadcast.toAllOnlinePlayers(new CreatureSay(0,15,"Server","Attention: Player "+target.getName()+" has been granted with AIO status."));
+			player.sendMessage("Player "+target.getName()+" is now an AIO!");
+			target.sendPacket(new CreatureSay(0,Say2.TELL,"Aio System","Dear player, you have AIO status now with special abilities , congratulations."));
+
+	} 
+	
+	public static void changeName(String beforeName,L2PcInstance target)
+	{
+		if(beforeName == null || beforeName == "" || target == null)
+			return;
+		
+		String currentName = target.getName();
+		String newName = beforeName + currentName;
+		
+		target.setName(newName);
+		target.setRecomHave(255);
+		target.broadcastUserInfo();
+	}
+	
+	public static void removeCurrentSkills(L2PcInstance player,L2PcInstance target)
+	{
+		if(player == null || target == null)
+			return;
+		
+		L2Skill[] playerCurrentSkills = target.getAllSkills();
+		
+		//loop into skills to remove one by one
+		for(L2Skill skill : playerCurrentSkills)
+		{
+			if(skill == null)
+			{
+				player.sendMessage("Warning:Error occured in skill "+ skill.getName() +".");
+				continue;
+			}
+			target.removeSkill(skill);
+			
+		}
+        target.sendSkillList();
+	}
+	
+	public static void giveAioSkills(L2PcInstance player,L2PcInstance target)
+	{
+		for(int[] skillIdLevel : SKILL_IDS_LEVELS)
+		{
+			int id = skillIdLevel[0];
+			int level = skillIdLevel[1];
+			
+			if(id == 0 || level == 0)
+				continue;
+			
+			L2Skill skillToAdd = SkillTable.getInstance().getInfo(id,level);
+			
+			if(skillToAdd == null){
+				player.sendMessage("An error occured to give skills to "+target.getName()+",check your skill infos please and try again.");
+			    return;
+			}
+			
+			target.addSkill(skillToAdd, true);
+		}
+        target.sendSkillList();
+	}
+	
+	public static void removeAio(L2PcInstance player,L2PcInstance target)
+	{
+		if(target == null || player == null)
+			return;
+		
+		if(!target.isAio())
+		{
+			player.sendMessage("This character is not AIO at the moment!");
+			return;
+		}
+		
+		if(target.isTeleporting())
+		{
+			player.sendMessage("An error occured, nothing happened");
+			return;
+		}
+		
+		target.setAio(false);
+
+			L2Skill[] aioBuffs = target.getAllSkills();
+			
+			for(L2Skill skill : aioBuffs)
+			{
+				if(skill == null)
+					continue;
+				
+				target.removeSkill(skill);
+			}
+			
+			boolean countUnlearnable = true;
+			int unLearnable = 0;
+			int skillCounter = 0;
+			L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(target, target.getClassId());
+			while(skills.length > unLearnable)
+			{
+				for (L2SkillLearn s : skills)
+				{
+					L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
+					if (sk == null || !sk.getCanLearn(target.getClassId()))
+					{
+						if(countUnlearnable)
+							unLearnable++;
+						continue;
+					}
+					if(target.getSkillLevel(sk.getId()) == -1)
+						skillCounter++;
+					target.addSkill(sk, true);
+				}
+				countUnlearnable = false;
+				skills = SkillTreeTable.getInstance().getAvailableSkills(target, target.getClassId());
+			}
+			
+			String aioName = target.getName();
+			String name = null;
+			
+			if(aioName.startsWith("[AIO]"))
+				name = aioName.substring(5);
+		
+			
+			if(name != null)
+				target.setName(name);
+			
+			target.broadcastUserInfo();
+			target.sendSkillList();
+			target.setRecomHave(0);
+			target.sendPacket(new CreatureSay(0,Say2.TELL,"Aio System","You are no longer an AIO , you rewarded with your normal skills."));
+			player.sendMessage("Player "+target.getName()+" successfully removed from AIO");
+			Broadcast.toAllOnlinePlayers(new CreatureSay(0,15,"Server","Attention: Player "+target.getName()+" is no more a server AIO"));
+			
+		
+	}
+	
+}
Index: java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- java/net/sf/l2j/gameserver/GameServer.java	(revision 9)
+++ java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -72,6 +72,7 @@
import net.sf.l2j.gameserver.handler.UserCommandHandler;
import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAdmin;
+import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAio;
import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAnnouncements;
import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminBBS;
import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminBan;
@@ -516,6 +517,7 @@

		_adminCommandHandler = AdminCommandHandler.getInstance();
		_adminCommandHandler.registerAdminCommandHandler(new AdminAdmin());
+		_adminCommandHandler.registerAdminCommandHandler(new AdminAio());
		_adminCommandHandler.registerAdminCommandHandler(new AdminInvul());
		_adminCommandHandler.registerAdminCommandHandler(new AdminDelete());
		_adminCommandHandler.registerAdminCommandHandler(new AdminKill());
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 9)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -211,8 +211,8 @@
	private static final String ADD_SKILL_SAVE = "INSERT INTO character_skills_save (char_obj_id,skill_id,skill_level,effect_count,effect_cur_time,reuse_delay,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?)";
	private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC";
	private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?";
-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=-	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=? WHERE obj_id=?";
-	private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level FROM characters WHERE obj_id=?";
+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=+	private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,aio=? WHERE obj_id=?";
+	private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,aio FROM characters WHERE obj_id=?";
	private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC";
	private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
	private static final String UPDATE_CHAR_SUBCLASS = "UPDATE character_subclasses SET exp=?,sp=?,level=?,class_id=? WHERE char_obj_id=? AND class_index =?";
@@ -314,6 +314,12 @@
		@Override
		public void doCast(L2Skill skill)
		{
+			if(isAio() && !isInsideZone(ZONE_PEACE))
+			{
+				sendMessage("An AIO buffer can use his abilities only in PEACE ZONE");
+				return;
+			}
+					
			super.doCast(skill);

			// cancel the recent fake-death protection instantly if the player attacks or casts spells
@@ -548,6 +554,9 @@
	/** The _noble. */
	private boolean _noble = false;

+	/** Aio system */
+	private boolean _aio = false;
+	
	/** The _hero. */
	private boolean _hero = false;

@@ -6864,6 +6873,7 @@
				player.setOnlineTime(rset.getLong("onlinetime"));
				player.setNewbie(rset.getInt("newbie") == 1);
				player.setNoble(rset.getInt("nobless") == 1);
+				player.setAio(rset.getInt("aio") == 1);

				player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time"));
				if (player.getClanJoinExpiryTime() < System.currentTimeMillis())
@@ -7412,7 +7422,8 @@
			statement.setLong(54, getClanCreateExpiryTime());
			statement.setString(55, getName());
			statement.setLong(56, getDeathPenaltyBuffLevel());
-			statement.setInt(57, getObjectId());
+			statement.setInt(57, isAio() ? 1 : 0);
+			statement.setInt(58, getObjectId());

			statement.execute();
			statement.close();
@@ -10077,6 +10088,16 @@
		return true;
	}

+	public void setAio(boolean becomeAio)
+	{
+		_aio = becomeAio;
+	}
+	
+	public boolean isAio()
+	{
+		return _aio;
+	}
+	
	/**
	 * Checks if is noble.
	 * @return true, if is noble
@@ -11099,6 +11120,10 @@
		// Force a revalidation
		revalidateZone(true);

+		if(isAio() && !isInsideZone(ZONE_PEACE))
+			teleToLocation(MapRegionTable.TeleportWhereType.Town);
+			
+		
		if (Config.PLAYER_SPAWN_PROTECTION > 0)
		{
			setProtection(true);
Index: java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(revision 9)
+++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -277,6 +277,13 @@
			activeChar.removeSkill(FrequentSkill.THE_VANQUISHED_OF_WAR.getSkill());
	}
+		
+		if (activeChar.isAio())
+		{
+			activeChar.setIsImmobilized(false);
+			activeChar.setIsParalyzed(false);
+			activeChar.setIsOverloaded(false);
+			activeChar.setIsTeleporting(false);
+			activeChar.setInsideZone(L2Character.ZONE_TOWN, true);
+			activeChar.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ());
+			
+			if (!activeChar.isInsideZone(L2Character.ZONE_TOWN))
+			{
+				activeChar.teleToLocation(MapRegionTable.TeleportWhereType.Town);
+			}

		if (Config.PLAYER_SPAWN_PROTECTION > 0)
		activeChar.setProtection(true);
Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAio.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAio.java	(revision 0)
+++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAio.java	(revision 0)
@@ -0,0 +1,58 @@
+
+package net.sf.l2j.gameserver.handler.admincommandhandlers;
+
+import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
+import net.sf.l2j.gameserver.model.AioBuffHandler;
+import net.sf.l2j.gameserver.model.L2Object;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ *This class handles the admin commands for AIO system
+ * @author irat
+ * @editor Zake
+ */
+
+public class AdminAio implements IAdminCommandHandler
+{
+
+	private final String[] AIO_COMMANDS = {"admin_setaio","admin_removeaio"};
+
+	@Override
+	public boolean useAdminCommand(String command, L2PcInstance activeChar)
+	{
+		L2Object target = activeChar.getTarget();
+		L2PcInstance targ = null;
+		if(target == null)
+		{
+			activeChar.sendMessage("Using this command in the air?");
+			return false;
+		}
+		if(!(target instanceof L2PcInstance))
+		{
+			activeChar.sendMessage("This command can be used only in players.");
+			return false;
+		}
+		targ = (L2PcInstance) target;	
+		
+		if(command.equalsIgnoreCase("admin_setaio"))
+		{
+			AioBuffHandler.setAio(activeChar, targ);
+			AioBuffHandler.removeCurrentSkills(activeChar, targ);
+			AioBuffHandler.giveAioSkills(activeChar, targ);
+			AioBuffHandler.changeName("[AIO]", targ);
+		}
+		else if(command.equalsIgnoreCase("admin_removeaio"))
+		{
+			AioBuffHandler.removeAio(activeChar, targ);
+		}
+		
+		return true;
+	}
+
+
+	@Override
+	public String[] getAdminCommandList()
+	{
+		return AIO_COMMANDS;
+	}
+	
+}
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java	(revision 9)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java	(working copy)
@@ -168,7 +168,14 @@
                 player.sendPacket(new SystemMessage(SystemMessageId.SUBCLASS_NO_CHANGE_OR_CREATE_WHILE_SKILL_IN_USE));
                 return;
             }
-
+            
+            // Subclasses may not be changed if player is AIO
+            if(player.isAio())
+            {
+            	player.sendMessage("An AIO has not the ability to change or add subclasses");
+            	return;
+            }
+            
             TextBuilder content = new TextBuilder("<html><body>");
             NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
             Set<PlayerClass> subsAvailable;
Index: java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java	(revision 9)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2TownZone.java	(working copy)
@@ -18,6 +18,8 @@
package net.sf.l2j.gameserver.model.zone.type;

import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.ThreadPoolManager;
+import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.model.L2Character;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.L2ZoneType;
@@ -111,12 +113,36 @@
character.setInsideZone(L2Character.ZONE_PEACE, false);
	if (character instanceof L2PcInstance)
	{
+                                      if (((L2PcInstance) character).isAio())
+			{
+				((L2PcInstance) character).sendMessage("Aio characters can't leave towns!");
+				((L2PcInstance) character).teleToLocation(TeleportWhereType.Town); // teleport the aio to the closest town
+			}
Index: sql/characters.sql
===================================================================
--- sql/characters.sql	(revision 8)
+++ sql/characters.sql	(working copy)
@@ -79,6 +79,7 @@
  `clan_join_expiry_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
  `clan_create_expiry_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
  `death_penalty_level` SMALLINT UNSIGNED NOT NULL DEFAULT 0
+ `aio` TINYINT UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (obj_Id),
  KEY `clanid` (`clanid`)
) ;

Posted

Bah, it took me much time and i didn't manage to solve it, really thanks :)

np

Good try bro , thanks for sharing it for aCis too.

thanks dude :)
  • 3 weeks later...
  • 1 month later...
  • 4 months later...
Posted

Not rly, it's fake.. ;D It may be 9, but in his own svn or so. :)

No , when you create diff it gets the current rev which you created it, so if its aCis then its 9 tho

Posted

 

No , when you create diff it gets the current rev which you created it, so if its aCis then its 9 tho

 

You are wrong. He could set his own SVN with xxx aCis rev and the rev count simply gets reset, since it's a 'new' project afterwards.

Posted

see the diff , (revision 9)

 

You missed part 'own svn'. Like IKnowWtf said

 

You are wrong. He could set his own SVN with xxx aCis rev and the rev count simply gets reset, since it's a 'new' project afterwards.

 

Plus, IF it was 9 rev, the post date would be like.. 2 years ago?  :troll:

  • 10 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • SELLING EMPTY TELEGRAM BOTS WITH AGE Registration date: November 2024 High-quality & clean bots — no subscribers, no bans, created on fresh IPs. y rested and reliable — perfect for: — Telegram search ranking — any technical or marketing tasks Delivery options: tdata, by phone number, ownership transfer, or via tokens. Current price list: From 3 pcs — $3 each From 20 pcs — $2.5 each From 60 pcs — $2.3 each From 100 pcs — $2.2 each From 400 pcs — $1.9 each Over 15,000+ bots available — ready for instant delivery. Contact on Telegram: @SMMTG6
    • Telegram Bot TOP Search Promotion | SEO Optimization for Bots | SMMTG.PRO We promote Telegram bots to the TOP of search results — by keywords, topics, and countries. What’s included: • Promotion to the TOP of Telegram search • Bot optimization for Telegram algorithms • Competitor analysis and keyword selection • Testing and securing stable ranking Delivery time: 2–3 days per bot Pricing: Starts from $40 per bot (final cost depends on competition level and target country) We work with 50+ countries: Russia • Ukraine • USA • Israel • Uzbekistan • Turkey • China • Thailand • Europe • India Training is also available: Telegram bot SEO optimization Techniques & insights for reaching TOP search positions Real-world cases and recommendations Contact: Telegram — @SMMTG6 Our SMM panel: SMMTG.PRO
    • SMMTG.PRO — TELEGRAM SERVICES PROVIDER PRICE LIST ★ Premium Subscribers for Bots Russia — from $5.6 / 1,000 subs Ukraine — from $5.6 / 1,000 subs USA — from $6.4 / 1,000 subs Israel — from $6.4 / 1,000 subs Uzbekistan — from $6.4 / 1,000 subs Turkey — from $6.4 / 1,000 subs China — from $6.4 / 1,000 subs Thailand — from $6.4 / 1,000 subs Europe — from $6.4 / 1,000 subs India — from $6.4 / 1,000 subs Other countries — from $13 / 1,000 subs OTHER SERVICES Telegram Boost — from $42 / 1,000 votes Premium Subscribers for Channels — from $2.9 / 1,000 Telegram Stars — from $16.9 / 1,000 stars Regular Subscribers for Channels — from $0.19 / 1,000 Regular Subscribers for Bots — from $0.25 / 1,000 Post Reactions — from $0.14 / 1,000 reactions Post Views — from $0.07 / 1,000 views EXCLUSIVE SERVICES ★ Telegram Search TOP Ranking | SEO Optimization ★ Aged Telegram Bots (registered accounts) — from $1.9 / bot ★ Telegram SEO & Search Training PAYMENT METHODS Heleket — any cryptocurrency CrystalPay — RUB | KZT | SBP | CryptoBot & more Payeer — multiple payment options ➤ Website (24/7): SMMTG.PRO ➤ Telegram Channel: t.me/+e_DKWnC5AFw0ZDhi ➤ 24/7 Support: @SMMTG6
    • IOThread [3][47] (good) good IOThread [3][47] (good) good IOThread [3][47] (good) good     IOThread [6][78] (ahehe): ahehe
    • rly swired...leave low npcmakers ,its worked..not crash L2server.exe.   A:I:S:E:PE:DI:DE:BO=1.000000:1.000000:1.000000:1.000000:1.000000:0:0:0 L:Y:X:H=0:0:0:0:0 Crashed Thread[6]. Server Up Time : Wed Oct 15 13:11:08 2025 Current Time : Wed Oct 15 13:13:35 2025 Elapsed Time : 0 days 0 hours 2 minutes 27 seconds IOBufferPool - 39989 / 40000, PendingWrite 0 bytes [0] =============== object report user[0/0], npc[820/0], item[0/0], usersocket[0] =============== npc server connection log Connect : Wed Oct 15 13:13:34 2025 [(16328) 2025/10/15 13:13:35]: ======================= an Access Violation in module L2Server.exe at 0033:00518eef. start at 2025/10/15 13:11:08 Read from location ffffffff caused an access violation. Registers: EAX=0003dc7b CS=0033 EIP=00518eef EFLGS=00010207 EBX=a2228c44 SS=002b ESP=7da7f870 EBP=00000000 ECX=0003dc7b DS=002b ESI=00000000 FS=0053 EDX=00400000 ES=002b EDI=0c200dc0 GS=002b Bytes at CS:EIP: 48 8b 0c f0 80 79 5d 00 74 23 44 39 69 10 7f 1d Stack dump: 7da7f870: a2228c44 00000000 0004c158 00000000 009b2a10 00000000 00400000 00000000 7da7f890: 00000001 00000000 00000000 00000000 fffffffe ffffffff 00000000 40cae180 7da7f8b0: 00000000 40d11740 00000000 c0b1be00 00000000 00000000 00000000 00000000 7da7f8d0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7da7f8f0: 3b19e2dc 00000000 0078e4c8 00000000 3b19e2dc 00000000 00400000 00000000 7da7f910: 0004c158 00000000 00000000 00000000 00000000 00000000 006c688a 00000000 7da7f930: a2228c44 00000000 00000000 00000000 00000000 00000000 00a2aa10 00000000 7da7f950: 012e6dc0 00000000 9beaee10 00000000 00000000 00000000 0004c158 00000000 7da7f970: 00000000 00000000 00a12d50 00000000 fffffffe ffffffff 0064dd24 00000000 7da7f990: fffffffe ffffffff 00000000 00000000 00000000 00000000 00000000 00000000 ver = Dec 16 2005_22:03:13 GuardInfo : IOThread [0][63] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [1][63] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [2][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [3][47] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [4][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [5][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [6][78] (ahehe): void IOThread_common(void *arglist) -> void CIOObject::TimerDispatch(bool bRootLoop) -> void CThreadLocalTimer::Dispath -> void CEnterWorldSerializer::TimerExpired(int id) -> void CNPC::EnterWorld(bool bSetDefaultParam, int nHP, int nMP) -> CCreature::EnterWorld Lock Stack : .\NpcSocket.cpp(278[116]) IOThread [7][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) -> void Push(int index, int x, int y, int z, int dir, int nSetDefaultParam, int nHP, int nMP) Lock Stack : .\NpcSocket.cpp(389[185]) ListenThread [13][141] (good): void ListenThread_common() -> unsigned __stdcall WaitThread(void *) Lock Stack : MainThread [12][156] (good): Lock Stack : GuardInfo end [(16328) 2025/10/15 13:13:35]: *.\ioc.cpp:648(Tue Dec 13 02:52:40 2005) exception  
  • Topics

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