Jump to content

Question

Posted

Hello, I'm trying to create a l2j server based on Acis, but cant find out a proper buffer for it. Maybe you can suggest a working java based buffer? ( I tried google, and I was looking in forum). I realy need a good advise, please help :(

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.actor.instance;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.MyTargetSelected;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;
import net.sf.l2j.util.StringUtil;
import net.sf.l2j.util.Rnd;

/**
*
* @author DarthVader
* @version 1.2
*/
public final class L2BufferInstance extends L2NpcInstance
{
    public L2BufferInstance(int objectId, L2NpcTemplate template)
    {
        super(objectId, template);
    }

    @Override
    public void onBypassFeedback(L2PcInstance player, String command)
    {
        StringTokenizer st = new StringTokenizer(command, " ");
        String actualCommand = st.nextToken();

        int buffid = 0;
        int bufflevel = 1;
        if (st.countTokens() == 2)
        {
            buffid = Integer.valueOf(st.nextToken());
            bufflevel = Integer.valueOf(st.nextToken());
        }
        else if (st.countTokens() == 1)
            buffid = Integer.valueOf(st.nextToken());

        if (actualCommand.equalsIgnoreCase("getbuff"))
        {
            if (buffid != 0)
            {
                MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, 5, 0);
                SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
                showMessageWindow(player);
                player.broadcastPacket(mgc);
            }
        }
        else if (actualCommand.equalsIgnoreCase("restore"))
        {
            player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
            player.setCurrentCp(player.getMaxCp());
            showMessageWindow(player);
        }
        else if (actualCommand.equalsIgnoreCase("cancel"))
        {
            player.stopAllEffects();
            showMessageWindow(player);
        }
        else
            super.onBypassFeedback(player, command);
    }

    @Override
    public void onAction(L2PcInstance player)
    {
        if (this != player.getTarget())
        {
            player.setTarget(this);
            player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()));
            player.sendPacket(new ValidateLocation(this));
        }
        else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false))
        {
            SocialAction sa = new SocialAction(this, Rnd.get(8));
            broadcastPacket(sa);
            player.setCurrentFolkNPC(this);
            showMessageWindow(player);
            player.sendPacket(ActionFailed.STATIC_PACKET);
        }
        else
        {
            player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
            player.sendPacket(ActionFailed.STATIC_PACKET);
        }
    }
    
    private void showMessageWindow(L2PcInstance player)
    {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Buffer</title><body><center>");

        if (player.isSitting())
        {
            player.sendMessage("You can't use buffer while you're sitting.");
            strBuffer.append("Stand up, <font color=\"LEVEL\">%charname%</font>!<br>");
            strBuffer.append("How dare you to talk with me while you're sitting?!<br>");
        }
        else if (player.isAlikeDead())
        {
            player.sendMessage("You can't use buffer while you're dead or using fake death.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, you're dead.<br>");
            strBuffer.append("I can't offer any support effect for dead people...<br>");
        }
        else if (player.isInCombat())
        {
            player.sendMessage("You can't use buffer while you're in combat.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, I can't serve you.<br>");
            strBuffer.append("Came back when you will not be in a combat.<br>");
        }
        else
        {
            strBuffer.append("Welcome, <font color=\"LEVEL\">%charname%</font>!<br>");
            strBuffer.append("Here is the list of all available effects:<br>");
            strBuffer.append("<table width=300>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1204 2\">Wind Walk</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1040 3\">Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1243 6\">Bless Shield</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1068 3\">Might</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1036 2\">Magic Barrier</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1259 4\">Resist Shock</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1035 4\">Mental Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1045 6\">Blessed Body</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1304 3\">Advanced Block</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1048 6\">Blessed Soul</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1062 2\">Berserker Spirit</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1189 3\">Resist Wind</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1086 2\">Haste</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1240 3\">Guidance</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1393 3\">Unholy Resistance</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1242 3\">Death Whisper</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1077 3\">Focus</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1353 1\">Divine Protection</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1268 4\">Vampiric Rage</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1087 3\">Agility</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1352 1\">Elemental Protection</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1085 3\">Acumen</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1059 3\">Empower</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1388 3\">Greater Might</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1303 2\">Wild Magic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1078 6\">Concentration</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1389 3\">Greater Shield</a></td></tr>");
            strBuffer.append("<tr><td></td><td></td><td></td></tr>");
            strBuffer.append("<tr><td></td></tr>");
            strBuffer.append("<tr><td><font color=\"ff9900\">Dances:</font></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 275 1\">Fury</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 273 1\">Mystic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 365 1\">Siren's</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 274 1\">Fire</a></td>  <td><a action=\"bypass -h npc_%objectId%_getbuff 276 1\">Concentration</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 310 1\">Vampire</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 271 1\">Warrior</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 277 1\">Light</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 272 1\">Inspiration</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 311 1\">Protection</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 309 1\">Earth Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 307 1\">Aqua Guard</a></td></tr>");
            strBuffer.append("<tr><td></td></tr>");
            strBuffer.append("<tr><td><font color=\"ff9900\">Songs:</font></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 264 1\">Earth</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 269 1\">Hunter</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 270 1\">Invocation</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 266 1\">Water</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 267 1\">Warding</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 304 1\">Vitality</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 268 1\">Wind</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 364 1\">Champion</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 349 1\">Renewal</a></td></tr>");
            strBuffer.append("<tr><td></td> <td></td> <td></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 308 1\">Storm Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 306 1\">Flame Guard</a></td></tr>");
            strBuffer.append("<tr><td></td></tr>");
            strBuffer.append("<tr><td><font color=\"ff9900\">Other:</font></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_cancel\"><font color=\"ffffff\">Cancel</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1413 1\">Magnus' Chant</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1323 1\">Noblesse</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_restore\"><font color=\"ffffff\">Restore</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1363 1\">Chant of Victory</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1356 1\">Prophecy of Fire</a></td></tr>");
            strBuffer.append("<tr><td></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1355 1\">Prophecy of Water</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1357 1\">Prophecy of Wind</a></td></tr>");
        }
        strBuffer.append("</center></body></html>");
        html.setHtml(strBuffer.toString());
        html.replace("%objectId%", String.valueOf(getObjectId()));
        html.replace("%charname%", player.getName());
        player.sendPacket(html);
    }
}
  • 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.actor.instance;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.MyTargetSelected;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;
import net.sf.l2j.util.StringUtil;
import net.sf.l2j.util.Rnd;

/**
*
* @author DarthVader
* @version 1.2
*/
public final class L2BufferInstance extends L2NpcInstance
{
    public L2BufferInstance(int objectId, L2NpcTemplate template)
    {
        super(objectId, template);
    }

    @Override
    public void onBypassFeedback(L2PcInstance player, String command)
    {
        StringTokenizer st = new StringTokenizer(command, " ");
        String actualCommand = st.nextToken();

        int buffid = 0;
        int bufflevel = 1;
        if (st.countTokens() == 2)
        {
            buffid = Integer.valueOf(st.nextToken());
            bufflevel = Integer.valueOf(st.nextToken());
        }
        else if (st.countTokens() == 1)
            buffid = Integer.valueOf(st.nextToken());

        if (actualCommand.equalsIgnoreCase("getbuff"))
        {
            if (buffid != 0)
            {
                MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, 5, 0);
                SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
                showMessageWindow(player);
                player.broadcastPacket(mgc);
            }
        }
        else if (actualCommand.equalsIgnoreCase("restore"))
        {
            player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
            player.setCurrentCp(player.getMaxCp());
            showMessageWindow(player);
        }
        else if (actualCommand.equalsIgnoreCase("cancel"))
        {
            player.stopAllEffects();
            showMessageWindow(player);
        }
        else
            super.onBypassFeedback(player, command);
    }

    @Override
    public void onAction(L2PcInstance player)
    {
        if (this != player.getTarget())
        {
            player.setTarget(this);
            player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()));
            player.sendPacket(new ValidateLocation(this));
        }
        else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false))
        {
            SocialAction sa = new SocialAction(this, Rnd.get(8));
            broadcastPacket(sa);
            player.setCurrentFolkNPC(this);
            showMessageWindow(player);
            player.sendPacket(ActionFailed.STATIC_PACKET);
        }
        else
        {
            player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
            player.sendPacket(ActionFailed.STATIC_PACKET);
        }
    }
    
    private void showMessageWindow(L2PcInstance player)
    {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Buffer</title><body><center>");

        if (player.isSitting())
        {
            player.sendMessage("You can't use buffer while you're sitting.");
            strBuffer.append("Stand up, <font color=\"LEVEL\">%charname%</font>!<br>");
            strBuffer.append("How dare you to talk with me while you're sitting?!<br>");
        }
        else if (player.isAlikeDead())
        {
            player.sendMessage("You can't use buffer while you're dead or using fake death.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, you're dead.<br>");
            strBuffer.append("I can't offer any support effect for dead people...<br>");
        }
        else if (player.isInCombat())
        {
            player.sendMessage("You can't use buffer while you're in combat.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, I can't serve you.<br>");
            strBuffer.append("Came back when you will not be in a combat.<br>");
        }
        else
        {
            strBuffer.append("Welcome, <font color=\"LEVEL\">%charname%</font>!<br>");
            strBuffer.append("Here is the list of all available effects:<br>");
            strBuffer.append("<table width=300>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1204 2\">Wind Walk</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1040 3\">Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1243 6\">Bless Shield</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1068 3\">Might</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1036 2\">Magic Barrier</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1259 4\">Resist Shock</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1035 4\">Mental Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1045 6\">Blessed Body</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1304 3\">Advanced Block</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1048 6\">Blessed Soul</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1062 2\">Berserker Spirit</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1189 3\">Resist Wind</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1086 2\">Haste</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1240 3\">Guidance</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1393 3\">Unholy Resistance</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1242 3\">Death Whisper</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1077 3\">Focus</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1353 1\">Divine Protection</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1268 4\">Vampiric Rage</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1087 3\">Agility</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1352 1\">Elemental Protection</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1085 3\">Acumen</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1059 3\">Empower</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1388 3\">Greater Might</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1303 2\">Wild Magic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1078 6\">Concentration</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1389 3\">Greater Shield</a></td></tr>");
            strBuffer.append("<tr><td></td><td></td><td></td></tr>");
            strBuffer.append("<tr><td></td></tr>");
            strBuffer.append("<tr><td><font color=\"ff9900\">Dances:</font></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 275 1\">Fury</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 273 1\">Mystic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 365 1\">Siren's</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 274 1\">Fire</a></td>  <td><a action=\"bypass -h npc_%objectId%_getbuff 276 1\">Concentration</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 310 1\">Vampire</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 271 1\">Warrior</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 277 1\">Light</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 272 1\">Inspiration</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 311 1\">Protection</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 309 1\">Earth Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 307 1\">Aqua Guard</a></td></tr>");
            strBuffer.append("<tr><td></td></tr>");
            strBuffer.append("<tr><td><font color=\"ff9900\">Songs:</font></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 264 1\">Earth</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 269 1\">Hunter</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 270 1\">Invocation</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 266 1\">Water</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 267 1\">Warding</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 304 1\">Vitality</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 268 1\">Wind</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 364 1\">Champion</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 349 1\">Renewal</a></td></tr>");
            strBuffer.append("<tr><td></td> <td></td> <td></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 308 1\">Storm Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 306 1\">Flame Guard</a></td></tr>");
            strBuffer.append("<tr><td></td></tr>");
            strBuffer.append("<tr><td><font color=\"ff9900\">Other:</font></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_cancel\"><font color=\"ffffff\">Cancel</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1413 1\">Magnus' Chant</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1323 1\">Noblesse</a></td></tr>");
            strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_restore\"><font color=\"ffffff\">Restore</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1363 1\">Chant of Victory</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1356 1\">Prophecy of Fire</a></td></tr>");
            strBuffer.append("<tr><td></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1355 1\">Prophecy of Water</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1357 1\">Prophecy of Wind</a></td></tr>");
        }
        strBuffer.append("</center></body></html>");
        html.setHtml(strBuffer.toString());
        html.replace("%objectId%", String.valueOf(getObjectId()));
        html.replace("%charname%", player.getName());
        player.sendPacket(html);
    }
}

can anyone tell me where i have to put this code?coz im neewbye....thx

  • 0
Posted

Hello, I'm trying to create a l2j server based on Acis, but cant find out a proper buffer for it. Maybe you can suggest a working java based buffer? ( I tried google, and I was looking in forum). I realy need a good advise, please help :(

If you want to open a server you have to search your files and second learn to read this files...if you put another buffer how you will fix the updates if is from old version or from another project?

  • 0
Posted
package net.sf.l2j.gameserver.model.actor.instance;

Anyway.. //spawn 

thx.I made it.Why i can't add __init__.py files? Line: -1 - Column: -1

 
No engine registered for extension (py) error.Is there any way to fix it?thx
  • 0
Posted

 

thx.I made it.Why i can't add __init__.py files? Line: -1 - Column: -1

 
No engine registered for extension (py) error.Is there any way to fix it?thx

 

acis doesnt support python script

the java buffer is a lot better and open to more possibilities

  • 0
Posted

sweets literally just posted the full file for it LOL

why cant you use that one or AT LEAST try it first

i used 1 code with eclipse,i edited L2BufferInstance and put some html on gs pack and that was it!.could u be more specific?i use eclipse and put that code?insert package or smth?i dont need html files too?Sry,i dont know much about this but i want to learn if i have the oportunity.thx for reply

  • 0
Posted

i used 1 code with eclipse,i edited L2BufferInstance and put some html on gs pack and that was it!.could u be more specific?i use eclipse and put that code?insert package or smth?i dont need html files too?Sry,i dont know much about this but i want to learn if i have the oportunity.thx for reply

L2Bufferinstance exist at acis already...just make another instance like L2Buff2Instance.java

  • 0
Posted

i used 1 code with eclipse,i edited L2BufferInstance and put some html on gs pack and that was it!.could u be more specific?i use eclipse and put that code?insert package or smth?i dont need html files too?Sry,i dont know much about this but i want to learn if i have the oportunity.thx for reply

GO TO net.sf.l2j.gameserver.model.actor.instance IN ECLIPSE

CREATE NEW CLASS

NAME CLASS L2BUFFINSTANCE OR SOMETHING

COPY PASTE THAT CODE

SAVE/FIX THE SMALL ERRORS OR WHATEVER IS PREVENTING YOU FROM SAVING

COMPILE

  • 0
Posted (edited)

on free version(370) we cant find this file on gameserver 

import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;

how and with what can we replace this?

Edited by thepsolartek

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
Answer this question...

×   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

    • Hello friend, did you do it? Please send the link to the topic, please ❤️
    • ✨ We believe that technology is worthless without a human touch. A service can be fast, convenient, and modern, but if users are not treated with respect, not listened to, and their problems are not solved, all of this loses its meaning. We believe that respect should go both ways. And that’s why we want to build an audience that’s a pleasure to work with— people who respect us just as much as we respect them (at least a little).   Website: vibe-sms.com Telegram: https://t.me/vibe_sms  
    • 价格更新 – TikTok 账号与新产品. 在流量套利中,TikTok 账号起着关键作用。广告活动的成功以及套利者的收益直接取决于账号的质量。可靠且高质量的账号能够在推广中提供稳定性、信任和长期效果。 在我们这里,您只会找到经过验证的 TikTok 账号,适合开展广告投放、扩展受众和扩大收益。正确选择账号是高效套利的基础! 我们网上商店的完整产品目录: 账号: Telegram、Facebook、Reddit、Twitter (X)、Instagram、YouTube、TikTok、Discord、VK、LinkedIn、GitHub、Snapchat、Gmail、邮箱账号 (Outlook、Firstmail、Rambler、Onet、Gazeta、GMX、Yahoo、Proton、Web.de)、Google Voice、Google Ads 高级订阅: Telegram Premium、Twitter Premium X、YouTube Premium、Spotify Premium、Netflix Premium、Discord Nitro、ChatGPT Plus/PRO、XBOX Game Pass 附加服务: Telegram Stars、代理 (IPv4、IPv6、ISP、移动)、VPN (Outline、WireGuard 等)、VDS/RDP 服务器 优惠码: AUGUST2025 (九折优惠) 支付方式: 银行卡 · 加密货币 · 其他常用方式 相关链接: ➡ 网店: 点击 ➡ Telegram 机器人: 点击 ➡ SMM 面板: 点击 – 推广您的社交媒体账号 使用我们的 SMM 面板 可提升 Facebook、Instagram、Telegram、Spotify、Soundcloud、YouTube、Reddit、Threads、Kick、Discord、LinkedIn、Likee、VK、Twitch、Kwai、Reddit、网站流量、TikTok、Trust Pilot、Apple Music、Tripadvisor、Snapchat 及其他数字产品。 首次体验 SMM 面板可获得 1 美元:只需在 我们的网站 (支持) 提交工单,主题填写 “Get Trial Bonus”。 更新后的TikTok 账号种类与价格调整: TIKTOK 新账号 TikTok 蓝 V 认证账号 | 真实账号,拥有真实粉丝与互动 | 官方认证 | 当前价格: $2500 TikTok 高质量新自动注册账号 | 国家:美国和欧洲 | 完整访问权限 (包含邮箱) | 起价 $0.2 TIKTOK – 空号自动注册 II 通过 @RAMBLER.RU/@FIRSTMAIL 验证 II 包含邮箱,使用 RU IP 注册 | 起价 $0.1 自动注册 TikTok 账号 II 通过 rambler.ru 邮箱验证,包含邮箱 II 性别混合 II 拉丁名 II 空白资料 II 使用混合 IP 注册 | 起价 $0.1 粉丝账号 自动注册 TikTok 账号 II 100+ 粉丝 II 通过邮箱验证 @hotmail/@outlook/@firstmail/@rambler,包含有效邮箱 II 性别混合 II 拉丁名 II 使用混合 IP 注册 | 起价 $0.39 自动注册 TikTok 账号 II 1000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $2.5 自动注册 TikTok 账号 II 5000 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $10 自动注册 TikTok 账号 II 10,000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $19 老号 (有/无粉丝) TikTok 高质量老号 | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.35 TikTok 高质量老号 (粉丝数量 100-10,000 可选) | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.89 TIKTOK 广告账号 TIKTOK 广告账号 | 区域:欧洲 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 TIKTOK 广告账号 | 区域:美国 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 老客户 – 额外 折扣 和 优惠码! 9–8 折 或 注册赠送 $1 如果您想获得注册赠送 $1 或首次购买享受 9–8 折优惠,可以留言: "SEND ME BONUS, MY USERNAME IS..." 您也可以在首次购买时使用优惠码: SOCNET (85 折优惠) 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp: https://wa.me/79051904467 ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ➡ Discord: socnet_support ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ➡ ✉ 邮箱: solomonbog@socnet.store 通过以上联系方式您还可以: — 咨询批发采购 — 建立合作关系 (当前合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet – 数字商品与高级订阅商店
    • 价格更新 – TikTok 账号与新产品. 在流量套利中,TikTok 账号起着关键作用。广告活动的成功以及套利者的收益直接取决于账号的质量。可靠且高质量的账号能够在推广中提供稳定性、信任和长期效果。 在我们这里,您只会找到经过验证的 TikTok 账号,适合开展广告投放、扩展受众和扩大收益。正确选择账号是高效套利的基础! 我们网上商店的完整产品目录: 账号: Telegram、Facebook、Reddit、Twitter (X)、Instagram、YouTube、TikTok、Discord、VK、LinkedIn、GitHub、Snapchat、Gmail、邮箱账号 (Outlook、Firstmail、Rambler、Onet、Gazeta、GMX、Yahoo、Proton、Web.de)、Google Voice、Google Ads 高级订阅: Telegram Premium、Twitter Premium X、YouTube Premium、Spotify Premium、Netflix Premium、Discord Nitro、ChatGPT Plus/PRO、XBOX Game Pass 附加服务: Telegram Stars、代理 (IPv4、IPv6、ISP、移动)、VPN (Outline、WireGuard 等)、VDS/RDP 服务器 优惠码: AUGUST2025 (九折优惠) 支付方式: 银行卡 · 加密货币 · 其他常用方式 相关链接: ➡ 网店: 点击 ➡ Telegram 机器人: 点击 ➡ SMM 面板: 点击 – 推广您的社交媒体账号 使用我们的 SMM 面板 可提升 Facebook、Instagram、Telegram、Spotify、Soundcloud、YouTube、Reddit、Threads、Kick、Discord、LinkedIn、Likee、VK、Twitch、Kwai、Reddit、网站流量、TikTok、Trust Pilot、Apple Music、Tripadvisor、Snapchat 及其他数字产品。 首次体验 SMM 面板可获得 1 美元:只需在 我们的网站 (支持) 提交工单,主题填写 “Get Trial Bonus”。 更新后的TikTok 账号种类与价格调整: TIKTOK 新账号 TikTok 蓝 V 认证账号 | 真实账号,拥有真实粉丝与互动 | 官方认证 | 当前价格: $2500 TikTok 高质量新自动注册账号 | 国家:美国和欧洲 | 完整访问权限 (包含邮箱) | 起价 $0.2 TIKTOK – 空号自动注册 II 通过 @RAMBLER.RU/@FIRSTMAIL 验证 II 包含邮箱,使用 RU IP 注册 | 起价 $0.1 自动注册 TikTok 账号 II 通过 rambler.ru 邮箱验证,包含邮箱 II 性别混合 II 拉丁名 II 空白资料 II 使用混合 IP 注册 | 起价 $0.1 粉丝账号 自动注册 TikTok 账号 II 100+ 粉丝 II 通过邮箱验证 @hotmail/@outlook/@firstmail/@rambler,包含有效邮箱 II 性别混合 II 拉丁名 II 使用混合 IP 注册 | 起价 $0.39 自动注册 TikTok 账号 II 1000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $2.5 自动注册 TikTok 账号 II 5000 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $10 自动注册 TikTok 账号 II 10,000+ 粉丝 II 邮箱验证,包含有效邮箱 II 性别混合 II 拉丁名 II 支持开播+可加链接 II 使用混合 IP 注册 | 起价 $19 老号 (有/无粉丝) TikTok 高质量老号 | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.35 TikTok 高质量老号 (粉丝数量 100-10,000 可选) | 年份:2022-2024 | 国家:混合 | 完整访问权限 (包含邮箱) | 起价 $0.89 TIKTOK 广告账号 TIKTOK 广告账号 | 区域:欧洲 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 预付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $1 TIKTOK 广告账号 | 区域:美国 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 企业认证 + 后付 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $3.5 TIKTOK 广告账号 | 区域:欧洲 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 TIKTOK 广告账号 | 区域:美国 | 后付+企业中心 | 3 个广告账户 + 1 个个人账户 | 可能包含 $20-$100 广告优惠券 | 手工注册 | 邮箱访问 + Cookies + VAT 信息 | 起价 $8 老客户 – 额外 折扣 和 优惠码! 9–8 折 或 注册赠送 $1 如果您想获得注册赠送 $1 或首次购买享受 9–8 折优惠,可以留言: "SEND ME BONUS, MY USERNAME IS..." 您也可以在首次购买时使用优惠码: SOCNET (85 折优惠) 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp: https://wa.me/79051904467 ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ➡ Discord: socnet_support ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ➡ ✉ 邮箱: solomonbog@socnet.store 通过以上联系方式您还可以: — 咨询批发采购 — 建立合作关系 (当前合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet – 数字商品与高级订阅商店
    • Price Update on TikTok Accounts and New Products. In traffic arbitrage, TikTok accounts play a key role. The success of advertising campaigns and, consequently, the income of an arbitrager directly depend on their quality. Reliable and high-quality accounts provide stability, trust, and long-term results in promotion. With us, you will find only verified TikTok accounts suitable for launching advertising campaigns, growing audiences, and scaling profits. The right account choice is the foundation of effective arbitrage! Full assortment of our online store: Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, mail accounts (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass Additional Services: Telegram Stars, proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, others), VDS/RDP servers Promo code: AUGUST2025 (10% discount) Payment: bank cards · cryptocurrency · other popular methods Relevant links: ➡ Online store: Click ➡ Telegram bot: Click ➡ SMM Panel: Click – promotion of your social media accounts Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, Trust Pilot, Apple Music, Tripadvisor, Snapchat, and other digital products. Get $1 for the first trial run of the SMM Panel: just open a ticket with the subject “Get Trial Bonus” on our website (Support). Updated TikTok account assortment and price changes: TIKTOK NEW ACCOUNTS TikTok Verified Account with a Blue Checkmark | Real account with genuine followers and activity | Officially verified by TikTok. Current price: $2500. TikTok High-Quality New AutoReg Account | Country: USA and Europe | Full access (email is included) | Price from $0.2 TIKTOK - Empty(clear) autoreg accounts II CONFIRMED BY @RAMBLER.RU/@FIRSTMAIL II EMAIL INCLUDED, Registered with RU IP | Price from $0.1 Autoreg TikTok accounts II Verified through email rambler.ru, email included II Gender MIX II Latin name II Empty profile II Registered with MIX IP | Price from $0.1 ACCOUNTS WITH FOLLOWERS Autoreg TikTok accounts II 100+ followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Registered with MIX IP | Price from $0.39 Autoreg TikTok accounts II 1000+ followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Open Stream + Can insert a link II Registered with MIX IP | Price from $2.5 Autoreg TikTok accounts II 5000 followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Open Stream + Can insert a link II Registered with MIX IP | Price from $10 Autoreg TikTok accounts II 10,000+ followers II Email verified @hotmail/@outlook/@firstmail/@rambler, email included in the package (working) II Gender: MIX II Latin name II Open Stream + Can insert a link II Registered with MIX IP | Price from $19 OLD ACCOUNT WITHOUT/WITH FOLLOWERS TikTok High-Quality Account | Age: 2022-2024 | Country: MIX | Full access (email is included) | Price from $0.35 TikTok Old High-Quality Account with followers: 100-10,000 (amount of followers of your choice) | Age: 2022-2024 | Country: MIX | Full access (email is included) | Price from $0.89 TIKTOK ADS TIKTOK ADS ACCOUNTS | GEO: Europe | PREPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $1 TIKTOK ADS ACCOUNTS | GEO: United States | PREPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $1 TIKTOK ADS ACCOUNTS | GEO: United States | Business Verified + POSTPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $3.5 TIKTOK ADS ACCOUNTS | GEO: Europe | Business Verified + POSTPAY | Manual Registration | Email access + Cookies + VAT Info | Price from $3.5 TIKTOK ADS ACCOUNTS | GEO: Europe | POSTPAY+BUSINESS CENTRE | 3 advertising accounts for running ads + 1 personal | May include coupons for advertising $20-$100 | Manual Registration | Email access + Cookies + VAT Info | Price from $8 TIKTOK ADS ACCOUNTS | GEO: United States | POSTPAY+BUSINESS CENTRE | 3 advertising accounts for running ads + 1 personal | May include coupons for advertising $20-$100 | Manual Registration | Email access + Cookies + VAT Info | Price from $8 For regular clients – additional discounts and promo codes! Discount 10% – 20% or BONUS $1 for registration If you want to receive a $1 BONUS for registration OR a 10% – 20% discount on your first purchase, you can leave a comment: "SEND ME BONUS, MY USERNAME IS..." You can also use a promo code for the first purchase: SOCNET (15% discount) Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ➡ Discord: socnet_support ➡ Discord Server: https://discord.gg/y9AStFFsrh ➡ ✉ Email: solomonbog@socnet.store Also via these contacts you can: — Consult about wholesale purchases — Establish a partnership (current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet – Digital Goods and Premium Subscriptions Store  
  • 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