Перейти к содержанию
Авторизация  
Germans

Мануал создания Баффера acis

Рекомендуемые сообщения

buffer.gif

 

И так создаём файл java/gameserver/model/actor/instance/L2BufferInstance.java

Содержимое

package net.sf.l2j.gameserver.model.actor.instance;

import java.util.StringTokenizer;

import net.sf.l2j.commons.random.Rnd;
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;

package net.sf.l2j.gameserver.model.actor.instance;

import java.util.StringTokenizer;

import net.sf.l2j.commons.random.Rnd;
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.model.actor.template.NpcTemplate;

/**
*
* @@Authority Caparso
*/

public final class L2BufferInstance extends L2NpcInstance
{
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.model.actor.template.NpcTemplate;

/**
*
* @@Authority Caparso
*/

public final class L2BufferInstance extends L2NpcInstance
{
int fighterbuffs [] = {1397,1087,1044,1243,1304,1259,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1240,1268,1032,1033,1191,1189,1182,1354,1353,1352,1392,1393,4699,4700,1416,1363,277,307,309,311,310,272,271,275,274,264,269,265,270,267,268,266,364,349,308,306,304};
int magebuffs [] = {1397,1087,1044,1243,1304,1259,1204,1040,1389,1036,1035,1048,1045,1085,1078,1303,1059,1032,1033,1191,1189,1182,1353,1354,1352,1392,1393,4703,1416,1363,273,276,365,307,309,311,264,265,270,267,268,266,363,349,308,306,304};
int voterewards [] = {1374};

int fighterbuffs [] = {1397,1087,1044,1243,1304,1259,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1240,1268,1032,1033,1191,1189,1182,1354,1353,1352,1392,1393,4699,4700,1416,1363,277,307,309,311,310,272,271,275,274,264,269,265,270,267,268,266,364,349,308,306,304};
int magebuffs [] = {1397,1087,1044,1243,1304,1259,1204,1040,1389,1036,1035,1048,1045,1085,1078,1303,1059,1032,1033,1191,1189,1182,1353,1354,1352,1392,1393,4703,1416,1363,273,276,365,307,309,311,264,265,270,267,268,266,363,349,308,306,304};
int voterewards [] = {1374};

public L2BufferInstance(int objectId, NpcTemplate 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;

String nextWindow = null;
if (st.countTokens() == 3)
{
buffid = Integer.valueOf(st.nextToken());
bufflevel = Integer.valueOf(st.nextToken());
nextWindow = st.nextToken();
}
else if (st.countTokens() == 1)
{
public L2BufferInstance(int objectId, NpcTemplate 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;

String nextWindow = null;
if (st.countTokens() == 3)
{
buffid = Integer.valueOf(st.nextToken());
bufflevel = Integer.valueOf(st.nextToken());
nextWindow = 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, -1, 0);
SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
showMessageWindow(player);
player.broadcastPacket(mgc);
showChatWindow(player, nextWindow);
}
}
else if (actualCommand.equalsIgnoreCase("fighterset"))
{
for (int id: fighterbuffs)
{
= Integer.valueOf(st.nextToken());
}

if (actualCommand.equalsIgnoreCase("getbuff"))
{
if (buffid != 0)
{
MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, -1, 0);
SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
showMessageWindow(player);
player.broadcastPacket(mgc);
showChatWindow(player, nextWindow);
}
}
else if (actualCommand.equalsIgnoreCase("fighterset"))
{
for (int id: fighterbuffs)
{
SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);
}
showChatWindow(player);
}
else if (actualCommand.equalsIgnoreCase("mageset"))
{
for (int id: magebuffs)
{
SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);
}
showChatWindow(player);
}
else if (actualCommand.equalsIgnoreCase("rewards"))
{
if (player.destroyItemByItemId("voterewards",10600,1, player.getCurrentFolkNPC(), true))
{
for (int id: voterewards)
{
SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);
}
showChatWindow(player);
}
else if (actualCommand.equalsIgnoreCase("mageset"))
{
for (int id: magebuffs)
{
SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);
}
showChatWindow(player);
}
else if (actualCommand.equalsIgnoreCase("rewards"))
{
if (player.destroyItemByItemId("voterewards",10600,1, player.getCurrentFolkNPC(), true))
{
for (int id: voterewards)
{
SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);
}
}
else
{
player.sendMessage("You don't have heroic's certifications to exchange.");
}
showChatWindow(player);
}
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
SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);
}
}
else
{
player.sendMessage("You don't have heroic's certifications to exchange.");
}
showChatWindow(player);
}
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);
}
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.INTERACT, this);
player.sendPacket(ActionFailed.STATIC_PACKET);
}
}

private void showMessageWindow(L2PcInstance player)
{
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
else
{
player.getAI().setIntention(CtrlIntention.INTERACT, this);
player.sendPacket(ActionFailed.STATIC_PACKET);
}
}

private void showMessageWindow(L2PcInstance player)
{
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";
}
}public String getHtmlPath(int npcId, int val)
{
String pom = "";
if (val == 0)
pom = "" + npcId;
else
pom = npcId + "-" + val;

return "data/html/buffer/" + pom + ".htm";
}

 

Затем и самого НПЦ

 

<npc id="9001" idTemplate="31081" name="BUFFER" title="L2EUPHORIA.COM">
        <set name="level" val="70"/>
        <set name="radius" val="8"/>
        <set name="height" val="30.5"/>
        <set name="rHand" val="0"/>
        <set name="lHand" val="5802"/>
        <set name="type" val="L2Buffer"/>
        <set name="exp" val="0"/>
        <set name="sp" val="0"/>
        <set name="hp" val="2444.46819"/>
        <set name="mp" val="1345.8"/>
        <set name="hpRegen" val="7.5"/>
        <set name="mpRegen" val="2.7"/>
        <set name="pAtk" val="688.86373"/>

id="9001" idTemplate="31081" name="BUFFER" title="L2EUPHORIA.COM">
        <set name="level" val="70"/>
        <set name="radius" val="8"/>
        <set name="height" val="30.5"/>
        <set name="rHand" val="0"/>
        <set name="lHand" val="5802"/>
        <set name="type" val="L2Buffer"/>
        <set name="exp" val="0"/>
        <set name="sp" val="0"/>
        <set name="hp" val="2444.46819"/>
        <set name="mp" val="1345.8"/>
        <set name="hpRegen" val="7.5"/>
        <set name="mpRegen" val="2.7"/>
        <set name="pAtk" val="688.86373"/>
        <set name="pDef" val="295.91597"/>
        <set name="mAtk" val="470.40463"/>
        <set name="mDef" val="216.53847"/>
        <set name="crit" val="4"/>
        <set name="atkSpd" val="253"/>
        <set name="str" val="40"/>
        <set name="int" val="21"/>
        <set name="dex" val="30"/>
        <set name="wit" val="20"/>
        <set name="con" val="43"/>
        <set name="men" val="20"/>
        <set name="corpseTime" val="7"/>
        <set name="walkSpd" val="50"/>
        <set name="runSpd" val="120"/>
        <set name="dropHerbGroup" val="0"/>

<set name="pDef" val="295.91597"/>
        <set name="mAtk" val="470.40463"/>
        <set name="mDef" val="216.53847"/>
        <set name="crit" val="4"/>
        <set name="atkSpd" val="253"/>
        <set name="str" val="40"/>
        <set name="int" val="21"/>
        <set name="dex" val="30"/>
        <set name="wit" val="20"/>
        <set name="con" val="43"/>
        <set name="men" val="20"/>
        <set name="corpseTime" val="7"/>
        <set name="walkSpd" val="50"/>
        <set name="runSpd" val="120"/>
        <set name="dropHerbGroup" val="0"/>
        <set name="attackRange" val="40"/>
        <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
        <skills>
            <skill id="4045" level="1"/>
            <skill id="4416" level="14"/>
        </skills>
    </npc>

<set name="attackRange" val="40"/>
        <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
        <skills>
            <skill id="4045" level="1"/>
            <skill id="4416" level="14"/>
        </skills>
    </npc>

 

 

+ Сылка на Html Файлы 

 

Изменено пользователем JoeyTribbiani
4.15. Нарушение в оформлении тем и сообщений.
  • Upvote 2

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

 

buffer.gif

И так создаём файл java/gameserver/model/actor/instance/L2BufferInstance.java

Содержимое

package net.sf.l2j.gameserver.model.actor.instance;

 

import java.util.StringTokenizer;

 

import net.sf.l2j.commons.random.Rnd;

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;

 

package net.sf.l2j.gameserver.model.actor.instance;

 

import java.util.StringTokenizer;

 

import net.sf.l2j.commons.random.Rnd;

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.model.actor.template.NpcTemplate;

 

/**

*

* @@Authority Caparso

*/

 

public final class L2BufferInstance extends L2NpcInstance

{

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.model.actor.template.NpcTemplate;

 

/**

*

* @@Authority Caparso

*/

 

public final class L2BufferInstance extends L2NpcInstance

{

int fighterbuffs [] = {1397,1087,1044,1243,1304,1259,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1240,1268,1032,1033,1191,1189,1182,1354,1353,1352,1392,1393,4699,4700,1416,1363,277,307,309,311,310,272,271,275,274,264,269,265,270,267,268,266,364,349,308,306,304};

int magebuffs [] = {1397,1087,1044,1243,1304,1259,1204,1040,1389,1036,1035,1048,1045,1085,1078,1303,1059,1032,1033,1191,1189,1182,1353,1354,1352,1392,1393,4703,1416,1363,273,276,365,307,309,311,264,265,270,267,268,266,363,349,308,306,304};

int voterewards [] = {1374};

 

int fighterbuffs [] = {1397,1087,1044,1243,1304,1259,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1240,1268,1032,1033,1191,1189,1182,1354,1353,1352,1392,1393,4699,4700,1416,1363,277,307,309,311,310,272,271,275,274,264,269,265,270,267,268,266,364,349,308,306,304};

int magebuffs [] = {1397,1087,1044,1243,1304,1259,1204,1040,1389,1036,1035,1048,1045,1085,1078,1303,1059,1032,1033,1191,1189,1182,1353,1354,1352,1392,1393,4703,1416,1363,273,276,365,307,309,311,264,265,270,267,268,266,363,349,308,306,304};

int voterewards [] = {1374};

 

public L2BufferInstance(int objectId, NpcTemplate 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;

 

String nextWindow = null;

if (st.countTokens() == 3)

{

buffid = Integer.valueOf(st.nextToken());

bufflevel = Integer.valueOf(st.nextToken());

nextWindow = st.nextToken();

}

else if (st.countTokens() == 1)

{

public L2BufferInstance(int objectId, NpcTemplate 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;

 

String nextWindow = null;

if (st.countTokens() == 3)

{

buffid = Integer.valueOf(st.nextToken());

bufflevel = Integer.valueOf(st.nextToken());

nextWindow = 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, -1, 0);

SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);

showMessageWindow(player);

player.broadcastPacket(mgc);

showChatWindow(player, nextWindow);

}

}

else if (actualCommand.equalsIgnoreCase("fighterset"))

{

for (int id: fighterbuffs)

{

= Integer.valueOf(st.nextToken());

}

 

if (actualCommand.equalsIgnoreCase("getbuff"))

{

if (buffid != 0)

{

MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, -1, 0);

SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);

showMessageWindow(player);

player.broadcastPacket(mgc);

showChatWindow(player, nextWindow);

}

}

else if (actualCommand.equalsIgnoreCase("fighterset"))

{

for (int id: fighterbuffs)

{

SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);

}

showChatWindow(player);

}

else if (actualCommand.equalsIgnoreCase("mageset"))

{

for (int id: magebuffs)

{

SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);

}

showChatWindow(player);

}

else if (actualCommand.equalsIgnoreCase("rewards"))

{

if (player.destroyItemByItemId("voterewards",10600,1, player.getCurrentFolkNPC(), true))

{

for (int id: voterewards)

{

SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);

}

showChatWindow(player);

}

else if (actualCommand.equalsIgnoreCase("mageset"))

{

for (int id: magebuffs)

{

SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);

}

showChatWindow(player);

}

else if (actualCommand.equalsIgnoreCase("rewards"))

{

if (player.destroyItemByItemId("voterewards",10600,1, player.getCurrentFolkNPC(), true))

{

for (int id: voterewards)

{

SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);

}

}

else

{

player.sendMessage("You don't have heroic's certifications to exchange.");

}

showChatWindow(player);

}

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

SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player);

}

}

else

{

player.sendMessage("You don't have heroic's certifications to exchange.");

}

showChatWindow(player);

}

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);

}

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.INTERACT, this);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

}

 

private void showMessageWindow(L2PcInstance player)

{

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

else

{

player.getAI().setIntention(CtrlIntention.INTERACT, this);

player.sendPacket(ActionFailed.STATIC_PACKET);

}

}

 

private void showMessageWindow(L2PcInstance player)

{

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";

}

}public String getHtmlPath(int npcId, int val)

{

String pom = "";

if (val == 0)

pom = "" + npcId;

else

pom = npcId + "-" + val;

 

return "data/html/buffer/" + pom + ".htm";

}

 

Затем и самого НПЦ

 

<npc id="9001" idTemplate="31081" name="BUFFER" title="L2EUPHORIA.COM">

        <set name="level" val="70"/>

        <set name="radius" val="8"/>

        <set name="height" val="30.5"/>

        <set name="rHand" val="0"/>

        <set name="lHand" val="5802"/>

        <set name="type" val="L2Buffer"/>

        <set name="exp" val="0"/>

        <set name="sp" val="0"/>

        <set name="hp" val="2444.46819"/>

        <set name="mp" val="1345.8"/>

        <set name="hpRegen" val="7.5"/>

        <set name="mpRegen" val="2.7"/>

        <set name="pAtk" val="688.86373"/>

id="9001" idTemplate="31081" name="BUFFER" title="L2EUPHORIA.COM">

        <set name="level" val="70"/>

        <set name="radius" val="8"/>

        <set name="height" val="30.5"/>

        <set name="rHand" val="0"/>

        <set name="lHand" val="5802"/>

        <set name="type" val="L2Buffer"/>

        <set name="exp" val="0"/>

        <set name="sp" val="0"/>

        <set name="hp" val="2444.46819"/>

        <set name="mp" val="1345.8"/>

        <set name="hpRegen" val="7.5"/>

        <set name="mpRegen" val="2.7"/>

        <set name="pAtk" val="688.86373"/>

        <set name="pDef" val="295.91597"/>

        <set name="mAtk" val="470.40463"/>

        <set name="mDef" val="216.53847"/>

        <set name="crit" val="4"/>

        <set name="atkSpd" val="253"/>

        <set name="str" val="40"/>

        <set name="int" val="21"/>

        <set name="dex" val="30"/>

        <set name="wit" val="20"/>

        <set name="con" val="43"/>

        <set name="men" val="20"/>

        <set name="corpseTime" val="7"/>

        <set name="walkSpd" val="50"/>

        <set name="runSpd" val="120"/>

        <set name="dropHerbGroup" val="0"/>

<set name="pDef" val="295.91597"/>

        <set name="mAtk" val="470.40463"/>

        <set name="mDef" val="216.53847"/>

        <set name="crit" val="4"/>

        <set name="atkSpd" val="253"/>

        <set name="str" val="40"/>

        <set name="int" val="21"/>

        <set name="dex" val="30"/>

        <set name="wit" val="20"/>

        <set name="con" val="43"/>

        <set name="men" val="20"/>

        <set name="corpseTime" val="7"/>

        <set name="walkSpd" val="50"/>

        <set name="runSpd" val="120"/>

        <set name="dropHerbGroup" val="0"/>

        <set name="attackRange" val="40"/>

        <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>

        <skills>

            <skill id="4045" level="1"/>

            <skill id="4416" level="14"/>

        </skills>

    </npc>

<set name="attackRange" val="40"/>

        <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>

        <skills>

            <skill id="4045" level="1"/>

            <skill id="4416" level="14"/>

        </skills>

    </npc>

 

 

+ Сылка на Html Файлы 

 

Под спойлер, за шару лайк.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×
×
  • Создать...