- 0
-
Quem Está Navegando
- Nenhum usuário registrado visualizando esta página.
-
Posts
-
Alguém ja conseguiu por na REV l2jsunrise diz que e compatível mais tentei ligar a banco de dados dele e da vários erros de colunas que não existe como se nao fosse compativel os bancos de dados l2jsunrise.
-
Hola rosh yo también soy argentino y quisiera contribuir en este proyecto, veo que vos ya estas mas interiorizado, estaría genial si nos pondríamos en contacto para ver que podemos hacer en base a este proyecto y por que no otras cuestiones futuras para algun server... si te interesa te estaré enviando el contacto. Estoy en la misma situación y nivel de conocimiento que vos, nada mas que yo solo utilice Jteon, Jfrozen, JArchid y tambien Jacis. Todo en interlude.
-
Esse set ficaria show otimizado em um só .u pois tem vários modelos diferentes, msm assim parabéns!! Um dos mais bonitos que eu já vi além do Morai que é meu preferido..
-
O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se
-
Boa Noite Galera o @Mr.Kadu postou o link do projeto mas eu fiz um erro e estarei postando a correção. aqueles que baixou o projeto e tentou ligar e deu erro e por causa do java que foi copilado eu copilei no java 22 e o projeto e no java 17 vou postar o link aqui para vcs, vai incluso a Geodata O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se
-
Nova Revisão com AutoFarm e .Menu O conteúdo está oculto, favor efetuar login ou se cadastrar! Entre ou Cadastre-se
-
alguem tambem esta tendo problemas com email ? quando vc loga com a conta e nao tem email cadastrado. eu levo erro 500
-
muito bom meu amigo. vou começar os testes........
-
Pergunta
-Eli-
Olá galera, to com um projeto de um servidor pvp, low rate, medio para hard e queria muito por o mod do npc skillseller nele, será que alguem poderia me ajudar por favor
vou deixar aqui a rev que estou usando e o mod
Rev:
Link do MOD:
Codigo do MOD:
Index: net.sf.l2j;Config.java
===================================================================
--- net.sf.l2j;Config.java (revision 84)
+++ net.sf.l2j;Config.java (working copy)
+ public static final String SKILLS_SELLER = "./config/aCis/NpcSkillSeller.properties";
+ /** Seller Npc Skills */
+ public static int SELLER_SKILLS_NPCID;
+ public static int SELLER_SKILLS_ITEM;
+ public static String SELLER_SKILLS_MESSAGE_TEXT;
+ public static int SELLER_SKILLS_COUNT;
+ private static final void loadSellerSkills() {
+
+ final ExProperties NpcSkillSeller = initProperties(Config.SKILLS_SELLER);
+
+ SELLER_SKILLS_NPCID = Integer.parseInt(NpcSkillSeller.getProperty("SellerSkillsNpcId", "1"));
+ SELLER_SKILLS_ITEM = NpcSkillSeller.getProperty("SellerItemId", 57);
+ SELLER_SKILLS_COUNT = NpcSkillSeller.getProperty("SellerItemCount", 100);
+
+ SELLER_SKILLS_MESSAGE_TEXT = NpcSkillSeller.getProperty("ItemName", "Adena");
+
+
+
+
+ }
- // siege settings
- loadSieges();
+ // siege settings
+ loadSieges();
+ loadSellerSkills();
Index: net.sf.l2j.gameserver.model.actor.Npc.java
===================================================================
--- net.sf.l2j.gameserver.model.actor.Npc.java (revision 84)
+++ net.sf.l2j.gameserver.model.actor.Npc.java (working copy)
@Override
public void onAction(Player player)
{
+ if (getNpcId() == SkillSeller.NPC_ID)
+ {
+ ItemInstance i = player.getInventory().getItemByItemId(SkillSeller.ITEM_ID);
+
+ if (i == null || i.getCount() < SkillSeller.ITEM_COUNT)
+ {
+ player.sendMessage("You need " + SkillSeller.ITEM_COUNT + " " + Config.SELLER_SKILLS_MESSAGE_TEXT + "to use this Npc.");
+ player.sendPacket(new ActionFailed());
+ return;
+ }
+ }
// Set the target of the player
if (player.getTarget() != this)
player.setTarget(this);
else
Index: net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.java
===================================================================
--- net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.java (revision 84)
+++ net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.java (working copy)
+ // L2SkillSeller
+ if (_command.startsWith("skill"))
+ {
+ String b = _command.substring(5);
+ int id = 0;
+ try
+ {
+ id = Integer.parseInt(b);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ if (id == 0)
+ return;
+
+ L2Skill s = SkillTable.getInstance().getInfo(id, 10);
+ ItemInstance i = player.getInventory().getItemByItemId(SkillSeller.ITEM_ID);
+
+ if (i == null || i.getCount() < SkillSeller.ITEM_COUNT)
+ {
+ player.sendMessage("You don't have enought " + Config.SELLER_SKILLS_MESSAGE_TEXT);
+ return;
+ }
+
+ player.getInventory().destroyItemByItemId("", SkillSeller.ITEM_ID, SkillSeller.ITEM_COUNT, player, null);
+ player.sendMessage("You rewarded successfully with " + s.getName() + " Lvl:10, " + Config.SELLER_SKILLS_COUNT + " " + Config.SELLER_SKILLS_MESSAGE_TEXT + " dissapeared");
+ player.addSkill(s, false);
+ player.broadcastPacket(new SocialAction(player, 9));
+ }
+
+ }
Index: net.sf.l2j.gameserver.model.actor.instance.SkillSeller.java
===================================================================
--- net.sf.l2j.gameserver.model.actor.instance.SkillSeller.java (no exist)
+++ net.sf.l2j.gameserver.model.actor.instance.SkillSeller.java (no exist)
+ package net.sf.l2j.gameserver.model.actor.instance;
+
+ import net.sf.l2j.Config;
+ import net.sf.l2j.gameserver.data.SkillTable;
+
+ import net.sf.l2j.gameserver.model.L2Skill;
+ import net.sf.l2j.gameserver.model.actor.Npc;
+ import net.sf.l2j.gameserver.model.actor.Player;
+ import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
+ import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
+
+ public class SkillSeller extends Npc
+ {
+ public final static int NPC_ID = Config.SELLER_SKILLS_NPCID;
+ public final static int ITEM_ID = Config.SELLER_SKILLS_ITEM;
+ public final static int ITEM_COUNT = Config.SELLER_SKILLS_COUNT;
+
+ private final int[] SKILL_IDS =
+ {
+ 3134, 3132, 3124, 3125, 3133, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3134
+ };
+
+
+
+ public SkillSeller(int objectId, NpcTemplate template)
+ {
+ super(objectId, template);
+ }
+
+ @Override
+ public void showChatWindow(Player j, int val)
+ {
+ if (j == null)
+ return;
+
+ StringBuilder t = new StringBuilder();
+ NpcHtmlMessage n = new NpcHtmlMessage(getObjectId());
+ sendHtml(t, n, j);
+
+ }
+
+
+
+ private void sendHtml(StringBuilder t, NpcHtmlMessage n, Player j)
+ {
+ t.append("<html><head><title>");
+ t.append("L2Skill Seller");
+ t.append("</title</head>");
+ t.append("<body><center>");
+ t.append("<br>Hello , do you want some special skills?");
+ t.append("<br>Choose whatever you want but don't forget");
+ t.append("<br>you need " + Config.SELLER_SKILLS_MESSAGE_TEXT + " Bars for each one");
+ for (int i : SKILL_IDS)
+ {
+ L2Skill s = SkillTable.getInstance().getInfo(i, 10);
+ String name = "";
+ if (s != null)
+ name = s.getName();
+ if (name != "")
+ t.append("<center><button value=\"" + name + " LvL:10\" action=\"bypass -h skill" + i + "\" width=204 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><br>");
+ }
+ t.append("</center></body></html>
sreli
Link para o comentário
Compartilhar em outros sites
2 respostass a esta questão
Posts recomendados
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.