Ir para conteúdo
  • Cadastre-se
  • 0

Como Editar AIO SHOP


tbragaaa

Pergunta

Posts recomendados


<html>
<title>Aio Shop</title>
<body>
<br>
<center><img src=L2UI.SquareWhite width=276 height=1></center>
<center>
<table width=256>
<tr>
<td><img src=L2UI.GM_Icon width=32 height=32></td>
<td width=192 align=center>
<font color="LEVEL">%servername%</font><br1>Bem Vindo ao Aio Shop!
</td>
<td><img src=L2UI.GM_Icon width=32 height=32></td>
</tr>
</table>
</center>
<br>
<center><img src=L2UI.SquareWhite width=276 height=1></center>
<br>
<center>
<font color=99FF66>Quando voce faz um AIO, seu personagem nao<br1>
podera dar hits ou usar skills fora da cidade.</font><br1>
<font color=FF0055>Use um personagem alternativo para isso!</font><br>
<img src=L2UI_CH3.herotower_deco width=256 height=32><br>
<font color=FF9900>Os precos dos pacotes de dias sao em<br1>
"Gold Bar" e os dias sao cumulativos.</font><br>
<button value="30 Dias [10 GB]" action="bypass -h npc_%objectId%_add_aio 3470 10 30" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
<button value="60 Dias [20 GB]" action="bypass -h npc_%objectId%_add_aio 3470 20 60" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
<button value="180 Dias [40 GB]" action="bypass -h npc_%objectId%_add_aio 3470 40 180" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
<button value="365 Dias [80 GB]" action="bypass -h npc_%objectId%_add_aio 3470 80 365" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
<font color=0099FF>Se voce clicar em "Remover AIO" seu status AIO<br1>
sera removido e voce perdera os creditos restantes.</font>
<button value="Remover Aio" action="bypass -h npc_%objectId%_remove_aio" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
</center>
</body>
</html>

e Neste Npc Event pra poder participar tem que serr em Party com outro player que sejam os 2 Noblesse

 

<html>
<title>Event Arena</title>
<head>
<body>
<center>
-'<font color="CD6839">Lineage 2 Girau</font>'-<br1>
-'<font color="CD6839">Event Arena Manager</font>'-<br>
<img src="L2UI.SquareGray" width=200 height=1>
<br>
<img src="L2UI.SquareGray" width=300 height=1>
<table bgcolor=000000 width=319 height=190>
<tr>
<td><center><font color="ae9988">Cadastrar para realizar essa disputa duelos</font></center><br1>
<center><font color="ae9988">do mundo, escolher se voce quer ir para cidades</font></center><br1>
<center><font color="ae9988">Voce sera levado a algumas areas a serem enfrentados,</font></center><br1>
<center><font color="ae9988">a dupla que vencer ganha o premio.</font></center><br1>
<center><font color="FF0000">OBS: Ao Registrar Todos Os Buffs e Removido </font></center><br1>
<center><font color="00FA9A">Reconpensa: 2 Ticket Event Para Party Ganhadora ! </font></center><br1>
<center>____________</center><br1>
</td>
</tr>
<tr><td><center>
<button value="Arena Event" action="bypass -h npc_%objectId%_Quest 8010_ArenaEvent" width="134" height="21" back="L2UI_ch3.BigButton3" fore="L2UI_ch3.BigButton3_over"><br1>
</center>
</td>
</tr>
</table>
<img src="L2UI.SquareGray" width=300 height=1><br>
<img src="L2UI.SquareGray" width=200 height=1><br1>
<img src="l2font-e.replay_logo-e" width=250 height=80>
</center>
</body>
</html>
Link para o comentário
Compartilhar em outros sites

onde encontro a source ?


teria como eu criar outro npc tipo se voce conseguir editar me mandava os arquivos e eu adicionava outro npc com a msma funcao soque editado pra so ter aio se for lider de clan lv 5 e noblesse e no npc event so ir pt se os 2 forem nobles ??

Link para o comentário
Compartilhar em outros sites

olha no javamods e baixa o NPC AIOSeller em java que te ajudo a mudar o script dele.

http://www.l2jbrasil.com/index.php?/topic/85645-npc-aio-shop-v2/

 

 

aqui mano

 

 

Index: data/html/mods/Aio Shop/start.htm
===================================================================
--- data/html/mods/Aio Shop/start.htm (revision 0)
+++ data/html/mods/Aio Shop/start.htm (working copy)
@@ -0,0 +1,36 @@
+<html>
+ <title>Aio Shop</title>
+ <body>
+ <br>
+ <center><img src=L2UI.SquareWhite width=276 height=1></center>
+ <center>
+ <table width=256>
+ <tr>
+ <td><img src=L2UI.GM_Icon width=32 height=32></td>
+ <td width=192 align=center>
+ <font color="LEVEL">%servername%</font><br1>Bem Vindo ao Aio Shop!
+ </td>
+ <td><img src=L2UI.GM_Icon width=32 height=32></td>
+ </tr>
+ </table>
+ </center>
+ <br>
+ <center><img src=L2UI.SquareWhite width=276 height=1></center>
+ <br>
+ <center>
+ <font color=99FF66>Quando voce faz um AIO, seu personagem nao<br1>
+ podera dar hits ou usar skills fora da cidade.</font><br1>
+ <font color=FF0055>Use um personagem alternativo para isso!</font><br>
+ <img src=L2UI_CH3.herotower_deco width=256 height=32><br>
+ <font color=FF9900>Os precos dos pacotes de dias sao em<br1>
+ "Gold Bar" e os dias sao cumulativos.</font><br>
+ <button value="30 Dias [10 GB]" action="bypass -h npc_%objectId%_add_aio 3470 10 30" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
+ <button value="60 Dias [20 GB]" action="bypass -h npc_%objectId%_add_aio 3470 20 60" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
+ <button value="180 Dias [40 GB]" action="bypass -h npc_%objectId%_add_aio 3470 40 180" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
+ <button value="365 Dias [80 GB]" action="bypass -h npc_%objectId%_add_aio 3470 80 365" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
+ <font color=0099FF>Se voce clicar em "Remover AIO" seu status AIO<br1>
+ sera removido e voce perdera os creditos restantes.</font>
+ <button value="Remover Aio" action="bypass -h npc_%objectId%_remove_aio" width=100 height=15 back="sek.cbui94" fore="sek.cbui92"><br>
+ </center>
+ </body>
+</html>
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java (revision 972)
+++ head-src/com/l2jfrozen/Config.java (working copy)
@@ -572,6 +572,8 @@
public static int AIO_TCOLOR;
public static boolean ALLOW_AIO_USE_GK;
public static boolean ALLOW_AIO_USE_CM;
+ public static int DUAL_AIO_ID;
+
public static boolean ANNOUNCE_CASTLE_LORDS;
/** Configuration to allow custom items to be given on character creation */
@@ -672,6 +674,8 @@
AIO_TCOLOR = Integer.decode("0x" + otherSettings.getProperty("AioTitleColor", "88AA88"));
ALLOW_AIO_USE_GK = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseGk", "False"));
ALLOW_AIO_USE_CM = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseClassMaster", "False"));
+ DUAL_AIO_ID = Integer.parseInt(otherSettings.getProperty("DualAioItemId", "6580"));
+
ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(otherSettings.getProperty("AnnounceCastleLords", "False"));
if(ENABLE_AIO_SYSTEM) //create map if system is enabled
{
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2AioSellerInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2AioSellerInstance.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2AioSellerInstance.java (working copy)
@@ -0,0 +1,227 @@
+/* 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.
+ *
+ *
O conteúdo está oculto, favor efetuar login ou se cadastrar!
+ */
+package com.l2jfrozen.gameserver.model.actor.instance;
+
+import java.util.StringTokenizer;
+
+import com.l2jfrozen.Config;
+import com.l2jfrozen.gameserver.ai.CtrlIntention;
+import com.l2jfrozen.gameserver.network.SystemMessageId;
+import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
+import com.l2jfrozen.gameserver.network.serverpackets.EtcStatusUpdate;
+import com.l2jfrozen.gameserver.network.serverpackets.InventoryUpdate;
+import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected;
+import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
+import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation;
+import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
+
+/**
+ * Aio Shop e um re-make do Mod Aio Seller. De uma versao para outra, muitas coisas mudaram e isto altera o modo de usar do mod por completo!
+ * Agora e possivel alterar a template, o item, o preco e o tempo via html. Em resumo, esta nova versao do codigo esta bem mais flexivel.
+ * Faca um bom uso!
+ * @author RedHoT
+ * @version 1.0.7
+ */
+public class L2AioSellerInstance extends L2FolkInstance
+{
+ public L2AioSellerInstance(int objectId, L2NpcTemplate template)
+ {
+ super(objectId, template);
+ }
+
+ @Override
+ public void onAction(L2PcInstance player)
+ {
+ if (!canTarget(player))
+ return;
+
+ player.setLastFolkNPC(this);
+
+ // Check if the L2PcInstance already target the L2NpcInstance
+ if (this != player.getTarget())
+ {
+ // Set the target of the L2PcInstance player
+ player.setTarget(this);
+
+ // Send a Server->Client packet MyTargetSelected to the L2PcInstance player
+ MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
+ player.sendPacket(my);
+ my = null;
+
+ // Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client
+ player.sendPacket(new ValidateLocation(this));
+ }
+ else
+ {
+ // Calculate the distance between the L2PcInstance and the L2NpcInstance
+ if (!canInteract(player))
+ {
+ // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
+ }
+ else
+ {
+ showMessageWindow(player);
+ }
+ }
+ // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
+ player.sendPacket(ActionFailed.STATIC_PACKET);
+ }
+
+ private void showMessageWindow(L2PcInstance player)
+ {
+ String filename = "data/html/mods/Aio Shop/start.htm";
+
+ NpcHtmlMessage html = new NpcHtmlMessage(1);
+ html.setFile(filename);
+ html.replace("%objectId%", String.valueOf(getObjectId()));
+ html.replace("%servername%", Config.ALT_Server_Name);
+ player.sendPacket(html);
+ filename = null;
+ html = null;
+ }
+
+ @Override
+ public void onBypassFeedback(L2PcInstance player, String command)
+ {
+ if (command.startsWith("add_aio"))
+ {
+ StringTokenizer st = new StringTokenizer(command);
+ st.nextToken();
+
+ String priceId = null, priceCount = null, time = null;
+ int aioPriceId = 0, aioPriceCount = 0, aioTime = 0;
+
+ if (st.hasMoreTokens())
+ {
+ priceId = st.nextToken();
+ priceCount = st.nextToken();
+ time = st.nextToken();
+
+ try
+ {
+ aioPriceId = Integer.parseInt(priceId);
+ aioPriceCount = Integer.parseInt(priceCount);
+ aioTime = Integer.parseInt(time);
+ }
+ catch(NumberFormatException e) {}
+ }
+ else
+ {
+ _log.warning("Could not update aio status of player " + player.getName());
+ return;
+ }
+
+ makeAioCharacter(player, aioPriceId, aioPriceCount, aioTime);
+ }
+ else if (command.startsWith("remove_aio"))
+ removeAio(player);
+
+ showMessageWindow(player);
+ }
+
+
+ public void makeAioCharacter(L2PcInstance player, int itemId, int itemCount, int aioTime)
+ {
+ L2ItemInstance itemInstance = player.getInventory().getItemByItemId(itemId);
+
+ if (itemInstance == null || !itemInstance.isStackable() && player.getInventory().getInventoryItemCount(itemId, -1) < (itemCount))
+ {
+ player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
+ return;
+ }
+ else if (itemInstance.isStackable())
+ {
+ if (!player.destroyItemByItemId("Aio", itemId, itemCount, player.getTarget(), true))
+ {
+ player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
+ return;
+ }
+ }
+ else
+ for (int i = 0; i < (itemCount); i++)
+ player.destroyItemByItemId("Aio", itemId, 1, player.getTarget(), true);
+
+ doAio(player, aioTime);
+ }
+ public void doAio(L2PcInstance player, int days)
+ {
+ if(player == null)
+ return;
+
+ int daysLeft = player.getAioEndTime() <= 0 ? 0 : (int) ((player.getAioEndTime() - System.currentTimeMillis()) / 86400000);
+ player.setAio(true);
+ player.setEndTime("aio", days + daysLeft);
+
+ player.getStat().addExp(player.getStat().getExpForLevel(81));
+
+ if(Config.ALLOW_AIO_NCOLOR && player.isAio())
+ player.getAppearance().setNameColor(Config.AIO_NCOLOR);
+
+ if(Config.ALLOW_AIO_TCOLOR && player.isAio())
+ player.getAppearance().setTitleColor(Config.AIO_TCOLOR);
+
+ /* Give Aio Dual */
+ L2ItemInstance item;
+ if(player.getInventory().getItemByItemId(Config.DUAL_AIO_ID) == null)
+ {
+ item = player.getInventory().addItem("", Config.DUAL_AIO_ID, 1, player, null);
+ InventoryUpdate iu = new InventoryUpdate();
+ iu.addItem(item);
+ player.sendPacket(iu);
+ }
+
+ player.rewardAioSkills();
+ player.sendPacket(new EtcStatusUpdate(player));
+ player.sendSkillList();
+ player.broadcastUserInfo();
+
+ player.sendMessage("You are now an Aio, Congratulations!");
+ }
+
+ public void removeAio(L2PcInstance player)
+ {
+ if(!player.isAio())
+ {
+ player.sendMessage("You are not an AIO.");
+ return;
+ }
+
+ player.setAio(false);
+ player.setAioEndTime(0);
+
+ player.getAppearance().setNameColor(0xFFFFFF);
+ player.getAppearance().setTitleColor(0xFFFF77);
+
+ /* Remove Aio Dual */
+ L2ItemInstance item;
+ player.getWarehouse().destroyItemByItemId("", Config.DUAL_AIO_ID, 1, player, null);
+ item = player.getInventory().destroyItemByItemId("", Config.DUAL_AIO_ID, 1, player, null);
+ InventoryUpdate iu = new InventoryUpdate();
+ iu.addItem(item);
+ player.sendPacket(iu);
+
+ player.lostAioSkills();
+ player.sendPacket(new EtcStatusUpdate(player));
+ player.sendSkillList();
+ player.broadcastUserInfo();
+
+ player.sendMessage("Now You are not an Aio..");
+ }
+}
Index: config/head/other.properties
===================================================================
--- config/head/other.properties (revision 972)
+++ config/head/other.properties (working copy)
@@ -225,6 +225,9 @@
# Aio Buffers can speak to Class Master?
AllowAioUseClassMaster = False
+# ID Item for Reward AIO's in Transformation
+DualAioItemId = 6580
+
# Announce castle lords on enter game. default = false
AnnounceCastleLords = False
Link para o comentário
Compartilhar em outros sites

Amigo esse aí você vai ter que compilar para usar , e você não tem acesso a source , se tivesse era só mudar o que você já está usando.

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites

eu me expressei mal kkkkkkkk :kkk:

 

Me desculpa fazer você perder tempo amigo , mas eu escrevi errado o que era pra fazer , você tem que baixar o NPC em java na parte DOWNLOADS

aí conseguimos adicionar ele sem precisar compilar e conseguimos editar ele.

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites

eu me expressei mal kkkkkkkk :kkk:

 

Me desculpa fazer você perder tempo amigo , mas eu escrevi errado o que era pra fazer , você tem que baixar o NPC em java na parte DOWNLOADS

 

aí conseguimos adicionar ele sem precisar compilar e conseguimos editar ele.

kkkk obrigado amigo eu ja tava desistindo dessa rev e ia baixar outra pra adiciona ele rs vo fazer isso agr abraço

olha no javamods e baixa o NPC AIOSeller em java que te ajudo a mudar o script dele.

 

package custom.AioSeller;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.quest.Quest;
import net.sf.l2j.gameserver.model.quest.QuestState;
/**
* @author TiTaM
*/
public class AioSeller extends Quest
{
//------------------------------------------------
// Id do Npc
private static final int[] NPC = {50009};
//------------------------------------------------
//Id da moeda e quantidade para a primeira opçao.
private static final int MOEDA1 = 57;
private static final int COUNT1 = 30000000;
//Dias pra a primeira opçao.
private static final int DIAS1 = 30;
//------------------------------------------------
//Id da moeda e quantidade para a segunda opçao.
private static final int MOEDA2 = 57;
private static final int COUNT2 = 60000000;
//Dias pra a segunda opçao.
private static final int DIAS2 = 60;
//------------------------------------------------
//Id da moeda e quantidade para a terceira opçao.
private static final int MOEDA3 = 57;
private static final int COUNT3 = 100000000;
//Dias pra a terceira opçao.
private static final int DIAS3 = 90;
//------------------------------------------------
public AioSeller(int questid, String name, String descr)
{
super(questid, name, descr);
for(int NPC_ID : NPC)
{
addStartNpc(NPC_ID);
addFirstTalkId(NPC_ID);
addTalkId(NPC_ID);
}
}
public String onAdvEvent (String event, L2Npc npc, L2PcInstance player)
{
QuestState st = player.getQuestState(getName());
String htmltext = "";
int npcId = npc.getNpcId();
if(event.equalsIgnoreCase("1.htm"))
{
return "1.htm";
}
if(event.equalsIgnoreCase("2.htm"))
{
return "2.htm";
}
if(event.equalsIgnoreCase("3.htm"))
{
return "3.htm";
}
if(event.equalsIgnoreCase("4.htm"))
{
return "4.htm";
}
if(event.equalsIgnoreCase("5.htm"))
{
return "5.htm";
}
if(event.equalsIgnoreCase("6.htm"))
{
return "6.htm";
}
if(event.equalsIgnoreCase("7.htm"))
{
return "7.htm";
}
if(event.equalsIgnoreCase("8.htm"))
{
return "8.htm";
}
if(event.equalsIgnoreCase("9.htm"))
{
return "9.htm";
}
if(event.equalsIgnoreCase("10.htm"))
{
return "10.htm";
}
if(event.equalsIgnoreCase("aio_option_1"))
{
if(npcId == NPC[0])
if(player.isAio())
{
htmltext = "already_isaio.htm";
}
else
{
if(st.getQuestItemsCount(MOEDA1)>= COUNT1)
{
st.takeItems(MOEDA1,COUNT1);
player.setAio(true);
player.getInventory().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getWarehouse().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getAppearance().setNameColor(Config.AIO_NCOLOR);
player.getAppearance().setTitleColor(Config.AIO_TCOLOR);
int daysleft = player.getAioEndTime() <= 0 ? 0 :(int)
((player.getAioEndTime()-System.currentTimeMillis())/86400000);
player.setEndTime("aio", daysleft + DIAS1);
player.getStat().addExp(player.getStat().getExpForLevel(81));
player.rewardAioSkills();
player.sendSkillList();
player.getInventory().addItem("", Config.AIO_ITEMID, 1, player, null);
player.broadcastUserInfo();
htmltext = "win_aio.htm";
}
else
{
htmltext = "no_item.htm";
}
}
}
if(event.equalsIgnoreCase("aio_option_2"))
{
if(npcId == NPC[0])
if(player.isAio())
{
htmltext = "already_isaio.htm";
}
else
{
if(st.getQuestItemsCount(MOEDA2)>= COUNT2)
{
st.takeItems(MOEDA2,COUNT2);
player.setAio(true);
player.getInventory().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getWarehouse().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getAppearance().setNameColor(Config.AIO_NCOLOR);
player.getAppearance().setTitleColor(Config.AIO_TCOLOR);
int daysleft = player.getAioEndTime() <= 0 ? 0 :(int)
((player.getAioEndTime()-System.currentTimeMillis())/86400000);
player.setEndTime("aio", daysleft + DIAS2);
player.getStat().addExp(player.getStat().getExpForLevel(81));
player.rewardAioSkills();
player.sendSkillList();
player.getInventory().addItem("", Config.AIO_ITEMID, 1, player, null);
player.broadcastUserInfo();
htmltext = "win_aio.htm";
}
else
{
htmltext = "no_item.htm";
}
}
}
if(event.equalsIgnoreCase("aio_option_3"))
{
if(npcId == NPC[0])
if(player.isAio())
{
htmltext = "already_isaio.htm";
}
else
{
if(st.getQuestItemsCount(MOEDA3)>= COUNT3)
{
st.takeItems(MOEDA3,COUNT3);
player.setAio(true);
player.getInventory().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getWarehouse().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getAppearance().setNameColor(Config.AIO_NCOLOR);
player.getAppearance().setTitleColor(Config.AIO_TCOLOR);
int daysleft = player.getAioEndTime() <= 0 ? 0 :(int)
((player.getAioEndTime()-System.currentTimeMillis())/86400000);
player.setEndTime("aio", daysleft + DIAS3);
player.getStat().addExp(player.getStat().getExpForLevel(81));
player.rewardAioSkills();
player.sendSkillList();
player.getInventory().addItem("", Config.AIO_ITEMID, 1, player, null);
player.broadcastUserInfo();
htmltext = "win_aio.htm";
}
else
{
htmltext = "no_item.htm";
}
}
}
if(event.equalsIgnoreCase("remove_aio"))
{
if(npcId == NPC[0])
if(player.isAio())
{
player.getInventory().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.getWarehouse().destroyItemByItemId("", Config.AIO_ITEMID, 1, player, null);
player.setAio(false);
player.setAioEndTime(0);
player.lostAioSkills();
player.getAppearance().setNameColor(0xFFFFFF);
player.getAppearance().setTitleColor(0xFFFF77);
player.broadcastUserInfo();
player.sendSkillList();
player.broadcastUserInfo();
htmltext = "remove_aio.htm";
}
else
htmltext = "none.htm";
return htmltext;
}
st.exitQuest(true);
return htmltext;
}
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
QuestState st = player.getQuestState(getName());
if(st == null)
{
st = newQuestState(player);
}
String htmltext = "";
int npcId = npc.getNpcId();
if(npcId == NPC[0])
{
htmltext = "1.htm";
}
return htmltext;
}
public static void main(String[] args)
{
new AioSeller(-1, "AioSeller", "custom");
}
}

Caso eu tenha mandado arquivo errado Amigo aqui olha o original npc aio Seller

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Link para o comentário
Compartilhar em outros sites

Primeiramente já adicionou e conseguiu fazer ele funcionar ? faça isso , se ele já estiver funcionando edito ele para você...

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites

Primeiramente já adicionou e conseguiu fazer ele funcionar ? faça isso , se ele já estiver funcionando edito ele para você...

MANO eu nao sei mecher compilar nao sei mecher com eclipse e java eu tava lendo um post se instala errado perd o npc nao vo arriscar :(

Link para o comentário
Compartilhar em outros sites

Na área de tutoriais , tem tutorial de como add npc buffer e tem vídeo tutorial também , inclusive um que eu fiz...

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites


Desculpa pela Duplicação do post Tayran, não vai acontecer mais...


Como o amigo Ivan Pires falou que podem ajudar se conseguisse o NPC AIO em Python eu consegui aqui abaixo mais nao sei como editar para testar, o player lider de clan lvl8 ser noblesse e ter 10 players online para poder no NPC colocar o nome do char que vai ter o aiox por 3 dias


essa foto aqui mostra como iria ficar +/-


O conteúdo está oculto, favor efetuar login ou se cadastrar!


O conteúdo está oculto, favor efetuar login ou se cadastrar!






Script Python do NPC AIO SELLER abaixo


#Created By Cheed!!!


import sys

from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance

from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance

from java.util import Iterator

from com.l2jfrozen.util.database import L2DatabaseFactory

from com.l2jfrozen.gameserver.model.quest import State

from com.l2jfrozen.gameserver.model.quest import QuestState

from com.l2jfrozen import Config

from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

from com.l2jfrozen.gameserver.datatables import SkillTable

from com.l2jfrozen.gameserver.network.serverpackets import SocialAction

from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest


qn = "5555_AioSeller"


NPC=[555555]


#iD do item que sera a moeda.

Moeda= 57


#Quantidade de dias e item para a opcao 1.

DIAS_AIO1= 30

ItemCount1=30000000

#Quantidade de dias e item para a opcao 2.

DIAS_AIO2= 60

ItemCount2=60000000

#Quantidade de dias e item para a opcao 3.

DIAS_AIO3= 90

ItemCount3=90000000


QuestId = 5555

QuestName = "AioSeller"

QuestDesc = "custom"

InitialHtml = "1.htm"


print "INFO AioSeller==> ON"


class Quest (JQuest) :


def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)


def onAdvEvent (self,event,npc,player) :

htmltext = event

st = player.getQuestState(qn)

if not st: return


def doAio(player,days) :

st.getPlayer().setAio(True)

st.player.setEndTime("aio", days);

st.player.broadcastPacket(SocialAction(st.player.getObjectId(),16))

st.player.getAppearance().setNameColor(Config.AIO_NCOLOR)

st.player.getAppearance().setTitleColor(Config.AIO_TCOLOR)

st.player.rewardAioSkills()

st.player.sendSkillList()



if event == "1" :

if st.getPlayer().isAio():

return "no.htm"

else :

if st.getQuestItemsCount(Moeda) >= ItemCount1 :

st.takeItems(Moeda,ItemCount1)

doAio(st.player, DIAS_AIO1)

st.player.sendMessage("Parabens Voce Virou AioX!")

return "1.htm"

else:

st.player.sendMessage("Voce Nao Tem Itens Suficiente!")

return "1.htm"


elif event == "2" :

if st.getPlayer().isAio():

return "no.htm"

else :

if st.getQuestItemsCount(Moeda) >= ItemCount2 :

st.takeItems(Moeda,ItemCount2)

doAio(st.player, DIAS_AIO2);

st.player.sendMessage("Parabens Voce Virou AioX")

return "1.htm"

else:

st.player.sendMessage("Voce Nao Tem Itens Suficiente!")

return "1.htm"


elif event == "3" :

if st.getPlayer().isAio():

return "no.htm"

else :

if st.getQuestItemsCount(Moeda) >= ItemCount3 :

st.takeItems(Moeda,ItemCount3)

doAio(st.player, DIAS_AIO3);

st.player.sendMessage("Parabens Voce Virou AioX!")

return "1.htm"

else:

st.player.sendMessage("Voce Nao Tem Itens Suficiente!")

return "1.htm"


return htmltext


def onTalk (self,npc,player):

htmltext = "<html><head><body>You can't buy while you are</body></html>"

st = player.getQuestState(qn)

if not st : return htmltext

npcId = npc.getNpcId()

if st.player.getPvpFlag() > 0 :#Player Flag

htmltext = "<html><head><body>You can't buy while you are <font color=\"800080\">flagged!</font><br>Wait some time and try again!</body></html>"

st.exitQuest(1)

elif st.player.getKarma() > 0 :#Player com Karma

st.exitQuest(1)

htmltext = "<html><head><body>You have too much <font color=\"FF0000\">karma!</font><br>Come back,<br>when you don't have any karma!</body></html>"

elif st.player.isInCombat() :#Player modo de Combate

st.exitQuest(1)

htmltext = "<html><head><body>You can't buy while you are attacking!<br>Stop your fight and try again!</body></html>"

else:


return InitialHtml

return htmltext


QUEST = Quest(5555,qn,"custom")

CREATED = State('Start', QUEST)

STARTING = State('Starting', QUEST)

STARTED = State('Started', QUEST)

COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)


for npcId in NPC:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)
Link para o comentário
Compartilhar em outros sites

já adicionou no server e o npc está funcionando ? no tópico falei pra adicionar o NPC que iria te ajudar e você não conseguiu , tenta add quando ele estiver funcionando te ajudamos a mudar o script. a html fica por sua conta...

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites

Amigo usa o em java que eu te ajudo , em python eu não manjo muito não...Faz igual te falei add o npc em java que ai só temos que colocar essa linha aqui :

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Se fizer em java fica fácil eu te ajudar.

 

essa é uma das coisas que tem que colocar nela tem outros códigos que precisa adicionar também.

Editado por Tayran.Cannabis

"Tente ser uma pessoa de valor , não de sucesso" - Albert Einstein

 

 

Link para o comentário
Compartilhar em outros sites

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.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.