Jump to content
  • 0

Need Help with Java...


Question

Recommended Posts

  • 0
Posted


/* 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.model.custom;

import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.base.Experience;

/**
*
* @author  xAddytzu
*/
public class AioPackage
{
//Singleton
private static AioPackage _instance;
public static final AioPackage getInstance()
    {
        if (_instance == null)
        	_instance = new AioPackage();

        return _instance;
    }
public void AioSkills(L2PcInstance player)
{
	player.addSkill(SkillTable.getInstance().getInfo(4342, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(4344, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(4345, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(4346, 4),true);
	player.addSkill(SkillTable.getInstance().getInfo(4347, 6),true);
	player.addSkill(SkillTable.getInstance().getInfo(4348, 6),true);
	player.addSkill(SkillTable.getInstance().getInfo(4349, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(4351, 6),true);
	player.addSkill(SkillTable.getInstance().getInfo(4352, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(4353, 6),true);
	player.addSkill(SkillTable.getInstance().getInfo(4354, 4),true);
	player.addSkill(SkillTable.getInstance().getInfo(4355, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(4356, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(4357, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(4358, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(4359, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(4360, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(274, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(275, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(271, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(272, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(273, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(276, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(277, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(307, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(309, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(365, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(310, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(264, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(265, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(266, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(267, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(268, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(269, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(270, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(304, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(305, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(306, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(308, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(364, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(349, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(363, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1007, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1009, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1006, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1002, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1251, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(1252, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1253, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1310, 4),true);
	player.addSkill(SkillTable.getInstance().getInfo(1309, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1308, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1362, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1363, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1413, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1390, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1391, 3),true);
	//OTHER BUFFS
	player.addSkill(SkillTable.getInstance().getInfo(1388, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1389, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1311, 6),true);
	player.addSkill(SkillTable.getInstance().getInfo(1033, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1182, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1189, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1191, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1259, 4),true);
	player.addSkill(SkillTable.getInstance().getInfo(1392, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1393, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1303, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(4699, 13),true);
	player.addSkill(SkillTable.getInstance().getInfo(4700, 13),true);
	player.addSkill(SkillTable.getInstance().getInfo(4702, 13),true);
	player.addSkill(SkillTable.getInstance().getInfo(4703, 13),true);
	player.addSkill(SkillTable.getInstance().getInfo(1353, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1352, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1284, 3),true);
	//PROPHECY
	player.addSkill(SkillTable.getInstance().getInfo(1355, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1356, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1357, 1),true);
	//OL
	player.addSkill(SkillTable.getInstance().getInfo(1004, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1005, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1008, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1249, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1250, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1256, 13),true);
	player.addSkill(SkillTable.getInstance().getInfo(1260, 3),true);
	player.addSkill(SkillTable.getInstance().getInfo(1261, 2),true);
	player.addSkill(SkillTable.getInstance().getInfo(1305, 5),true);
	player.addSkill(SkillTable.getInstance().getInfo(1364, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1365, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1414, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1415, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1416, 1),true);
	//HAEL
	player.addSkill(SkillTable.getInstance().getInfo(1335, 1),true);
	player.addSkill(SkillTable.getInstance().getInfo(1219, 33),true);
	//NOBLESSE
	player.addSkill(SkillTable.getInstance().getInfo(1323, 1),true);
	//MP
	player.addSkill(SkillTable.getInstance().getInfo(4409, 20),true);
}
public void AioEquipable(L2PcInstance player)
{
	if (player == null)
		return;

	player.addItem("Weapon", 8938, 1, player, true);
	player.addItem("Dark Crystal", 2407, 1, player, true);
	player.addItem("Dark Crystal", 512, 1, player, true);
	player.addItem("Dark Crystal", 5767, 1, player, true);
	player.addItem("Dark Crystal", 5779, 1, player, true);
	player.addExpAndSp(player.getExp() + Experience.LEVEL[80], 0);
}
}

 

AdminAdmin.java

	else if(command.startsWith("admin_set"))
	{
		StringTokenizer st = new StringTokenizer(command);
		String[] cmd=st.nextToken().split("_");
		try
		{
			String[] parameter = st.nextToken().split("=");
			String pName = parameter[0].trim();
			String pValue = parameter[1].trim();
			if (Config.setParameterValue(pName, pValue))
				activeChar.sendMessage("parameter "+pName+" succesfully set to "+pValue);
			else
				activeChar.sendMessage("Invalid parameter!");
		}
		catch(Exception e)
		{
			if (cmd.length ==2)
				activeChar.sendMessage("Usage: //set parameter=vaue");
		}
		finally
		{
			if (cmd.length ==3)
			{
				if (cmd[2].equalsIgnoreCase("menu"))
					AdminHelpPage.showHelpPage(activeChar, "settings.htm");
				else if (cmd[2].equalsIgnoreCase("mod"))
					AdminHelpPage.showHelpPage(activeChar, "mods_menu.htm");
			}
		}
	}
+		else if(command.startsWith("admin_aio"))
+		{
+	        L2Object target = activeChar.getTarget();
+	        if (target == null) 
+	        	target = activeChar;
+	        L2PcInstance player = null;
+	        if (target instanceof L2PcInstance)
+	            player = (L2PcInstance) target;
+	        else
+	        {
+	            activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
+	            return false;
+	        }
+			if (player != null)
+			{
+				AioPackage.getInstance().AioEquipable(player);
+				AioPackage.getInstance().AioSkills(player);
+			}
+		}
+

 

  • 0
Posted

its no custom folder so what i need to do? and how to name 1 script?. And maybe someone know how to put ANTI-BUFF shield ? i try not working :/ maybe someone have another skript?

  • 0
Posted

Create a folder with name Custom :D

 

Name it AioPackage.java

 

 

or you can change package location package net.sf.l2j.gameserver.model.custom;

  • 0
Posted

error:

 

    [javac] D:\Users\xxx\workspace\xxx\CORE\java\net\sf\l2j\gameserver\handler\admincommandhandlers\AdminAdmin.java:272: cannot find symbol
   [javac] symbol  : variable AioPackage
   [javac] location: class net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAdmin
   [javac] 				AioPackage.getInstance().AioEquipable(player);
   [javac] 				^
   [javac] D:\Users\xxx\workspace\xxx\CORE\java\net\sf\l2j\gameserver\handler\admincommandhandlers\AdminAdmin.java:273: cannot find symbol
   [javac] symbol  : variable AioPackage
   [javac] location: class net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAdmin
   [javac] 				AioPackage.getInstance().AioSkills(player);
   [javac] 				^

  • 0
Posted

Edit the topic title to any other which makes more sense or thread will be locked

 

Edited, so someone know?

 

   [javac] D:\Users\xxx\workspace\xxx\CORE\java\net\sf\l2j\gameserver\handler\admincommandhandlers\AdminAdmin.java:272: cannot find symbol
    [javac] symbol  : variable AioPackage
    [javac] location: class net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAdmin
    [javac] 				AioPackage.getInstance().AioEquipable(player);
    [javac] 				^
    [javac] D:\Users\xxx\workspace\xxx\CORE\java\net\sf\l2j\gameserver\handler\admincommandhandlers\AdminAdmin.java:273: cannot find symbol
    [javac] symbol  : variable AioPackage
    [javac] location: class net.sf.l2j.gameserver.handler.admincommandhandlers.AdminAdmin
    [javac] 				AioPackage.getInstance().AioSkills(player);
    [javac] 				^

 

where is that problem i can't fix it ;( someone help me please.

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

    • Rosyk or rusik or whatever u blaim me that my mouth stinks but I assume you the one who stinks and your perfect pack will be now shared and you can suck a DICK )  https://eu2.contabostorage.com/d4b39866f6bb4084b6c969ec8fe20063:kita/Lucera_Classic_Remaster/Lucera Classic Remaster Server and Datapack files.rar  https://eu2.contabostorage.com/d4b39866f6bb4084b6c969ec8fe20063:kita/Lucera_Classic_Remaster/Lucera Classic Remaster Eng Client.rar Drama link    For this crap u need Lucera 2 classic license ) people paying 300 euros for this shit  lol Some Shit will come out soon mxc website need shake it a bit coz getting boring here )    Whats happen rosyk lost speach  xD Your pack was downloded  29 times bussines  not going as plan xD?
    • @Huggo Thank you for asking! When you join our Discord, on the Nexus Marketing section there is a #work-showcase channel. There you can see a little bit of what we are able to produce as a final ready-to-post product.  There is also this link in my new personal montage YouTube channel, in which I will be uploading every recent work: https://youtube.com/playlist?list=PLkzBKexKw8Wj8dC2diYndd5yOWOXUQCJW&si=-HGxlovqzvD4qqy2 Two more videos are coming up this week, and a #reviews channel has opened for our clients to let other people know about their experience working with us. Feel free to join our Hub in Discord, and for any inquries you might have don't hesitate to contact me or post your suggestion at #suggestions channel.  
    • Следи за своим вонючим языком, мудак.   Your mouth stinks, go wash your mouth, it's a dump) I don't know who you are or what you are, and I don't recommend buying anything from people outside of my network, as they may sell garbage under the guise of my work. There have been cases where my sales have been compromised. Additionally, reselling below the purchase price has been prohibited. I wish you all the best and peace. I kindly request that the moderators close this topic, as it is no longer relevant and the contact information is outdated.    
  • 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