So I take aCis free 254 rev and decided to make a buffer to it. I found the Buffer of darthvader
Changed the showMessageWindow to make a html file.
and know i have this
/*
* 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.3
*/
public final class L2Buffer2Instance extends L2NpcInstance
{
public L2Buffer2Instance(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)
{
/*
player.sendPacket(ActionFailed.STATIC_PACKET);
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
html.setFile("data/html/Buffer/" + getTemplate().getNpcId() + ".htm");
html.replace("%objectId%", String.valueOf(getObjectId()));
html.replace("%name%", player.getName());
player.sendPacket(html);
*/
String filename = "data/html/buffer/" + getNpcId() + ".htm";
filename = getHtmlPath(getNpcId(), 0);
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
html.setFile(filename);
html.replace("%objectId%", String.valueOf(getObjectId()));
html.replace("%npcname%", getName());
player.sendPacket(html);
}
@Override
public String getHtmlPath(int npcId, int val)
{
String pom = "";
if (val == 0)
pom = "" + npcId;
else
pom = npcId + "-" + val;
return "data/html/buffer/" + pom + ".htm";
}
}
I made html for buffer in data/html/buffer/id.htm. id-1.htm for buffs, id-2.htm for dances etc.
but when i am on dances htm and get for example Dance of fire, I'm going to main htm.(id.htm) I want to go back to id-2.htm.
Did you get it what I want? can you give me opinions?
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
Xmas Wolf Chariot Mount | Lineage 2 Mod
Celebrate the holiday spirit in Lineage 2 with this festive Xmas Wolf Chariot Mount! Created for protocol 166, this unique modification features majestic wolf mounts with holiday-themed harnesses pulling a decorative chariot.
If you have questions or want to add this updated skill to your game, feel free to contact me via Skype or Discord.
Download or in Discord Client Dev channel https://discord.gg/XdCb9dmTtf
06/12/2024 21:00 GMT +2
High Five - PvP server x45 - Aria Victoria Style 2004
NPC Buffer & Enchanted NPC Buffer.
Global Gatekeeper.
Clan Hall Teleports & Clan GM Shop (-20%).
Offline Shop.
GM shop up to B Grade.
Auto Farm system.
TvT - CTF - DM - Party Farm - Event Boss
Craftable Hero Weapon.
Instances Solo and Party, weekly and daily.
No kamael.
More informations can be found on our website including a "how to connect" greek guide
Valkyria is based on aCis
https://l2valkyria.com
Question
EdenEternal
So I take aCis free 254 rev and decided to make a buffer to it. I found the Buffer of darthvader
Changed the showMessageWindow to make a html file.
and know i have this
I made html for buffer in data/html/buffer/id.htm. id-1.htm for buffs, id-2.htm for dances etc.
but when i am on dances htm and get for example Dance of fire, I'm going to main htm.(id.htm) I want to go back to id-2.htm.
Did you get it what I want? can you give me opinions?
2 answers to this question
Recommended Posts