Jump to content

[Share]AIO buff system for aCis


Recommended Posts

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`)
) ;

Link to comment
Share on other sites

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 :)
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 4 months later...

 

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.

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

  • 10 years 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

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...