A Project for Chronicle 4 based on L2JServer.


    [MOD] //setaio L2jliisvus

    Share

    kallone

    Posts : 60
    Join date : 2013-05-27

    [MOD] //setaio L2jliisvus

    Post  kallone on 17th March 2015, 00:13

    I made this mod for l2jlisvus, I have helped at all!

    Code:
    Index: java.net.sf.l2j.gameserver/gameserver.java

    import net.sf.l2j.gameserver.datatables.SkillTable;
    +import net.sf.l2j.gameserver.datatables.AioSkillTable;

    Olympiad.getInstance();
          Hero.getInstance();
    +      AioSkillTable.getInstance();


    Index: java.net.sf.l2j.gameserver.datatables/AioSkillTable.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 2, 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, write to the Free Software
    + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    + * 02111-1307, USA.
    + *
    + * http://www.gnu.org/copyleft/gpl.html
    + */
    +package net.sf.l2j.gameserver.datatables;
    +
    +import net.sf.l2j.gameserver.model.L2Skill;
    +
    +/**
    + * @author KallonE
    + */
    +public class AioSkillTable
    +{
    +   private static AioSkillTable _instance;
    +   private static L2Skill[] _AioSkills;
    +   
    +   private AioSkillTable()
    +   {
    +      _AioSkills = new L2Skill[95];
    +      _AioSkills[0] = SkillTable.getInstance().getInfo(1085, 3);
    +      _AioSkills[1] = SkillTable.getInstance().getInfo(1304, 3);
    +      _AioSkills[2] = SkillTable.getInstance().getInfo(1087, 3);
    +      _AioSkills[3] = SkillTable.getInstance().getInfo(1354, 1);
    +      _AioSkills[4] = SkillTable.getInstance().getInfo(1062, 2);
    +      _AioSkills[5] = SkillTable.getInstance().getInfo(1005, 3);
    +      _AioSkills[6] = SkillTable.getInstance().getInfo(1243, 6);
    +      _AioSkills[7] = SkillTable.getInstance().getInfo(1045, 6);
    +      _AioSkills[8] = SkillTable.getInstance().getInfo(1048, 6);
    +      _AioSkills[9] = SkillTable.getInstance().getInfo(1311, 6);
    +      _AioSkills[10] = SkillTable.getInstance().getInfo(168, 3);
    +      _AioSkills[11] = SkillTable.getInstance().getInfo(213, 8);
    +      _AioSkills[12] = SkillTable.getInstance().getInfo(1007, 3);
    +      _AioSkills[13] = SkillTable.getInstance().getInfo(1309, 3);
    +      _AioSkills[14] = SkillTable.getInstance().getInfo(1552, 3);
    +      _AioSkills[15] = SkillTable.getInstance().getInfo(1006, 3);
    +      _AioSkills[16] = SkillTable.getInstance().getInfo(1229, 15);
    +      _AioSkills[17] = SkillTable.getInstance().getInfo(1308, 3);
    +      _AioSkills[18] = SkillTable.getInstance().getInfo(1253, 3);
    +      _AioSkills[19] = SkillTable.getInstance().getInfo(1284, 3);
    +      _AioSkills[20] = SkillTable.getInstance().getInfo(1009, 3);
    +      _AioSkills[21] = SkillTable.getInstance().getInfo(1310, 4);
    +      _AioSkills[22] = SkillTable.getInstance().getInfo(1363, 1);
    +      _AioSkills[23] = SkillTable.getInstance().getInfo(1362, 1);
    +      _AioSkills[24] = SkillTable.getInstance().getInfo(1397, 3);
    +      _AioSkills[25] = SkillTable.getInstance().getInfo(1292, 6);
    +      _AioSkills[26] = SkillTable.getInstance().getInfo(1078, 6);
    +      _AioSkills[27] = SkillTable.getInstance().getInfo(307, 1);
    +      _AioSkills[28] = SkillTable.getInstance().getInfo(276, 1);
    +      _AioSkills[29] = SkillTable.getInstance().getInfo(309, 1);
    +      _AioSkills[30] = SkillTable.getInstance().getInfo(274, 1);
    +      _AioSkills[31] = SkillTable.getInstance().getInfo(275, 1);
    +      _AioSkills[32] = SkillTable.getInstance().getInfo(272, 1);
    +      _AioSkills[33] = SkillTable.getInstance().getInfo(277, 1);
    +      _AioSkills[34] = SkillTable.getInstance().getInfo(273, 1);
    +      _AioSkills[35] = SkillTable.getInstance().getInfo(311, 1);
    +      _AioSkills[36] = SkillTable.getInstance().getInfo(366, 1);
    +      _AioSkills[37] = SkillTable.getInstance().getInfo(365, 1);
    +      _AioSkills[38] = SkillTable.getInstance().getInfo(310, 1);
    +      _AioSkills[39] = SkillTable.getInstance().getInfo(271, 1);
    +      _AioSkills[40] = SkillTable.getInstance().getInfo(1242, 3);
    +      _AioSkills[41] = SkillTable.getInstance().getInfo(1257, 3);
    +      _AioSkills[42] = SkillTable.getInstance().getInfo(1353, 3);
    +      _AioSkills[43] = SkillTable.getInstance().getInfo(1391, 3);
    +      _AioSkills[44] = SkillTable.getInstance().getInfo(1352, 1);
    +      _AioSkills[45] = SkillTable.getInstance().getInfo(229, 7);
    +      _AioSkills[46] = SkillTable.getInstance().getInfo(228, 3);
    +      _AioSkills[47] = SkillTable.getInstance().getInfo(1077, 3);
    +      _AioSkills[48] = SkillTable.getInstance().getInfo(1218, 33);
    +      _AioSkills[49] = SkillTable.getInstance().getInfo(1059, 3);
    +      _AioSkills[50] = SkillTable.getInstance().getInfo(1219, 33);
    +      _AioSkills[51] = SkillTable.getInstance().getInfo(1217, 33);
    +      _AioSkills[52] = SkillTable.getInstance().getInfo(1388, 3);
    +      _AioSkills[53] = SkillTable.getInstance().getInfo(1389, 3);
    +      _AioSkills[54] = SkillTable.getInstance().getInfo(1240, 3);
    +      _AioSkills[55] = SkillTable.getInstance().getInfo(1086, 2);
    +      _AioSkills[56] = SkillTable.getInstance().getInfo(1032, 3);
    +      _AioSkills[57] = SkillTable.getInstance().getInfo(1073, 2);
    +      _AioSkills[58] = SkillTable.getInstance().getInfo(1036, 2);
    +      _AioSkills[59] = SkillTable.getInstance().getInfo(1035, 4);
    +      _AioSkills[60] = SkillTable.getInstance().getInfo(1068, 3);
    +      _AioSkills[61] = SkillTable.getInstance().getInfo(1003, 3);
    +      _AioSkills[62] = SkillTable.getInstance().getInfo(1282, 2);
    +      _AioSkills[63] = SkillTable.getInstance().getInfo(1356, 1);
    +      _AioSkills[64] = SkillTable.getInstance().getInfo(1355, 1);
    +      _AioSkills[65] = SkillTable.getInstance().getInfo(1357, 33);
    +      _AioSkills[66] = SkillTable.getInstance().getInfo(1044, 3);
    +      _AioSkills[67] = SkillTable.getInstance().getInfo(1182, 3);
    +      _AioSkills[68] = SkillTable.getInstance().getInfo(1191, 3);
    +      _AioSkills[69] = SkillTable.getInstance().getInfo(1033, 3);
    +      _AioSkills[70] = SkillTable.getInstance().getInfo(1189, 3);
    +      _AioSkills[71] = SkillTable.getInstance().getInfo(1259, 4);
    +      _AioSkills[72] = SkillTable.getInstance().getInfo(1306, 6);
    +      _AioSkills[73] = SkillTable.getInstance().getInfo(234, 23);
    +      _AioSkills[74] = SkillTable.getInstance().getInfo(1040, 3);
    +      _AioSkills[75] = SkillTable.getInstance().getInfo(364, 1);
    +      _AioSkills[76] = SkillTable.getInstance().getInfo(264, 1);
    +      _AioSkills[77] = SkillTable.getInstance().getInfo(306, 1);
    +      _AioSkills[78] = SkillTable.getInstance().getInfo(269, 1);
    +      _AioSkills[79] = SkillTable.getInstance().getInfo(270, 1);
    +      _AioSkills[80] = SkillTable.getInstance().getInfo(265, 1);
    +      _AioSkills[81] = SkillTable.getInstance().getInfo(363, 1);
    +      _AioSkills[82] = SkillTable.getInstance().getInfo(349, 1);
    +      _AioSkills[83] = SkillTable.getInstance().getInfo(308, 1);
    +      _AioSkills[84] = SkillTable.getInstance().getInfo(305, 1);
    +      _AioSkills[85] = SkillTable.getInstance().getInfo(304, 1);
    +      _AioSkills[86] = SkillTable.getInstance().getInfo(267, 1);
    +      _AioSkills[87] = SkillTable.getInstance().getInfo(266, 1);
    +      _AioSkills[88] = SkillTable.getInstance().getInfo(268, 1);
    +      _AioSkills[89] = SkillTable.getInstance().getInfo(1390, 3);
    +      _AioSkills[90] = SkillTable.getInstance().getInfo(1303, 2);
    +      _AioSkills[91] = SkillTable.getInstance().getInfo(1204, 2);
    +      _AioSkills[92] = SkillTable.getInstance().getInfo(1268, 4);
    +      _AioSkills[93] = SkillTable.getInstance().getInfo(1323, 1);
    +   }
    +   
    +   public static AioSkillTable getInstance()
    +   {
    +      if (_instance == null)
    +      {
    +         _instance = new AioSkillTable();
    +      }
    +      return _instance;
    +   }
    +   
    +   public static L2Skill[] GetAioSkills()
    +   {
    +      return _AioSkills;
    +   }
    +   
    +   public static boolean isAioSkill(int skillid)
    +   {
    +      Integer[] _AioSkillsId = new Integer[]
    +      {
    +         1085,
    +         1304,
    +         1087,
    +         1354,
    +         1062,
    +         1005,
    +         1243,
    +         1045,
    +         1048,
    +         1311,
    +         168,
    +         213,
    +         1007,
    +         1309,
    +         1552,
    +         1006,
    +         1229,
    +         1308,
    +         1253,
    +         1284,
    +         1009,
    +         1310,
    +         1363,
    +         1362,
    +         1397,
    +         1292,
    +         1078,
    +         307,
    +         276,
    +         309,
    +         274,
    +         275,
    +         272,
    +         277,
    +         273,
    +         311,
    +         366,
    +         365,
    +         310,
    +         271,
    +         1242,
    +         1257,
    +         1353,
    +         1391,
    +         1352,
    +         229,
    +         228,
    +         1077,
    +         1218,
    +         1059,
    +         1219,
    +         1217,
    +         1388,
    +         1389,
    +         1240,
    +         1086,
    +         1032,
    +         1073,
    +         1036,
    +         1035,
    +         1068,
    +         1003,
    +         1282,
    +         1356,
    +         1355,
    +         1357,
    +         1044,
    +         1182,
    +         1191,
    +         1033,
    +         1189,
    +         1259,
    +         1306,
    +         234,
    +         1040,
    +         364,
    +         264,
    +         306,
    +         269,
    +         270,
    +         265,
    +         363,
    +         349,
    +         308,
    +         305,
    +         304,
    +         267,
    +         266,
    +         268,
    +         1390,
    +         1303,
    +         1204,
    +         1268,
    +         1323
    +      };
    +      
    +      for (int id : _AioSkillsId)
    +      {
    +         if (id == skillid)
    +         {
    +            return true;
    +         }
    +      }
    +      
    +      return false;
    +   }
    +}
    +


    Index: java.net.sf.l2j.gameserver.handler.admincommandhandlers/AdminAdmin.java

    "admin_endolympiad",
    +      "admin_setaio",

    else if (command.startsWith("admin_sethero"))
          {
             L2PcInstance target = activeChar;
             if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
             {
                target = (L2PcInstance) activeChar.getTarget();
             }
             
             target.setHero(target.isHero() ? false : true);
             target.broadcastUserInfo();
          }
    +      else if (command.startsWith("admin_setaio"))
    +      {
    +         L2PcInstance target = activeChar;
    +         if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
    +         {
    +            target = (L2PcInstance) activeChar.getTarget();
    +         }
    +         
    +         target.setAio(target.isAio() ? false : true);
    +         target.broadcastUserInfo();
    +      }



    Index: java.net.sf.l2j.gameserver.model.actor.instance/L2Pcinstance.java

    import net.sf.l2j.gameserver.datatables.SkillTable;
    + import net.sf.l2j.gameserver.datatables.AioSkillTable;


    -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, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, clan_join_expiry_time, clan_create_expiry_time, base_class, onlinetime, in_jail, jail_timer, newbie, nobless, last_recom_date, varka_ketra_ally FROM characters 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, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, clan_join_expiry_time, clan_create_expiry_time, base_class, onlinetime, in_jail, jail_timer, newbie, nobless, aio, last_recom_date, varka_ketra_ally FROM characters WHERE obj_Id=?";



       private boolean _noble = false;

    +   private boolean _aio = false;



                player.setNewbieState(rset.getInt("newbie"));
    +            player.setAio(rset.getInt("aio") == 1);
                player.setNoble((rset.getInt("nobless") == 1) || Config.AUTO_NOBLE_STATUS);



       public void setNoble(boolean val)
       {
          if (val)

          {

             for (L2Skill s : NobleSkillTable.getInstance().GetNobleSkills())
             {
                addSkill(s, false);
             }

          }

          else

          {

             for (L2Skill s : NobleSkillTable.getInstance().GetNobleSkills())
             {
                removeSkill(s);
             }

          }
          _noble = val;
       }
    +
    +   public boolean isAio()
    +   {
    +
    +      return _aio;
    +   }
    +
    +   public void setAio(boolean Aio)
    +   {
    +      if (Aio)
    +
    +      {
    +
    +         for (L2Skill s : AioSkillTable.getInstance().GetAioSkills())
    +         {
    +            addSkill(s, false);
    +         }
    +
    +      }
    +
    +      else
    +
    +      {
    +
    +         for (L2Skill s : AioSkillTable.getInstance().GetAioSkills())
    +         {
    +            removeSkill(s);
    +         }
    +
    +      }
    +      _aio = Aio;
    +   }
    +


    In its Navicat L2jdb (characters) will be necessary to create (  `aio` decimal(1,0) DEFAULT '0', )!
    I have helped at all !!!!!
    avatar
    DanielaCZ

    Posts : 507
    Join date : 2013-01-07
    Age : 27
    Location : Newcastle Upon Tyne

    Re: [MOD] //setaio L2jliisvus

    Post  DanielaCZ on 17th March 2015, 11:46

    mod about? for? MOE INFO PLEASE :-)

      Current date/time is 20th September 2017, 16:01