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

    • From Salvation onwards I think you need a patched nwindow.dll that allows such modifications, try to see if you get what you need here: https://drive.google.com/drive/u/1/folders/1LLbQFGf8KlR-O0Iv5umfF-pwZgrDh9bd
    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
  • Topics

×
×
  • Create New...