Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo.
Caso seja registrado, efetue login.
Esqueceu sua senha? Clique aqui
Recomendamos o uso do Mozilla Firefox para uma melhor visualização.    


Início Postados Hoje Marcar Fóruns Como Lidos Álbums Banidos SE Team Medalhas
Voltar   Secret Experience > Área L2J > [L2J] Downloads > [Lineage] Java Mods
Registrar Loteria VIPStaff SERegras do fórum Comunidade Arcade Postados Hoje Pesquisar Experience
   

Secret Experience.NET   Secret Experience Corporation - Welcome To The Real World
     Anúncios SE

Resposta
 
Ferramentas do Tópico Modos de Exibição
Antigo 05-04-2011, 02:23 PM   #1
allanalcantara
Banido
 
Avatar de allanalcantara
 
Registrado em: Nov 2009
Localização: Fortaleza-ce
Posts: 325
Agradeceu: 125
Agradecido 203 Vezes em 82 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Enviar mensagem via Windows Live Messenger para allanalcantara Enviar mensagem via Skype para allanalcantara
Nome Real: Allan Alcântara de Alencar

Inventório de allanalcantara

Icon10 PvP Trader

Com esse MOD Os jogadores serão capazes de escolher uma recompensa (tornar-se herói até a reinicialização, tornar-se noblesse, conseguir alguma coisa (item), pegue o skill (habilidades item sugerido). Assim, o exemplo recompensa sethero, admin definido, a custar 500 pvps. Após personagem escolhe esta recompensa , 500 pvps serão tomadas a partir dele, e ele se tornará herói até a reinicialização. Além disso, uma mensagem será enviada para ele. Veja configs para mais informações.

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Index: java/config/npcs.properties
===================================================================
--- java/config/npcs.properties	(revision 66)
+++ java/config/npcs.properties	(working copy)
@@ -148,4 +148,25 @@
 # The always on option allows to ignore all this and let all grids be active at all times
 GridsAlwaysOn = False
 GridNeighborTurnOnTime = 1
-GridNeighborTurnOffTime = 90
\ No newline at end of file
+GridNeighborTurnOffTime = 90
+
+# PvP Trader npc settings.
+
+# Set hero until restart.
+# How many pvps will it cost?
+SetHeroPvpCost = 500
+# Set noblesse.
+# How many pvps will it cost?
+SetNoblePvpCost = 250
+# Give item.
+# How many pvps will it cost?
+GiveItemPvpCost = 100
+ItemId = 3470
+ItemCount = 500
+# Get a skill.
+# Suggestion: Use augment skills.
+# How many pvps will it cost?
+GetASkillPvpCost = 1500
+# Default skill: Item Skill Active: Cheer (Increases your cp by 300.)
+SkillId = 3131
+SkillLvl = 10
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PvpTraderInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PvpTraderInstance.java	(revision 0)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PvpTraderInstance.java	(revision 0)
@@ -0,0 +1,119 @@
+/* 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.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.L2DatabaseFactory;
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.model.L2Skill;
+import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
+import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate;
+import net.sf.l2j.gameserver.templates.item.L2Item;
+
+/**
+ *
+ * @author  Anarchy
+ */
+public class L2PvpTraderInstance extends L2NpcInstance
+{
+	public L2PvpTraderInstance(int objectId, L2NpcTemplate template)
+	{
+		super(objectId, template);
+	}
+	@Override
+	public void onBypassFeedback(L2PcInstance player, String command)
+	{
+		if (command.startsWith("setHero"))
+		{
+			if (player.isHero())
+			{
+				player.sendMessage("You are already hero.");
+				return;
+			}
+			else if (player.getPvpKills() < Config.SET_HERO_PVP_COST)
+			{
+				player.sendMessage("You need "+Config.SET_HERO_PVP_COST+" pvp(s) to become hero until restart.");
+				return;
+			}
+			else if (!player.isHero() && player.getPvpKills() >= Config.SET_HERO_PVP_COST)
+			{
+				player.setHero(true);
+				player.setPvpKills(player.getPvpKills() - Config.SET_HERO_PVP_COST);
+				player.broadcastUserInfo();
+				player.sendMessage("You have become a server hero until restart, and "+Config.SET_HERO_PVP_COST+" pvp(s) were taken from you.");
+			}
+		}
+		if (command.startsWith("setNoble"))
+		{
+			if (player.isNoble())
+			{
+				player.sendMessage("You are already noblesse.");
+				return;
+			}
+			else if (player.getPvpKills() < Config.SET_NOBLE_PVP_COST)
+			{
+				player.sendMessage("You need "+Config.SET_NOBLE_PVP_COST+" pvp(s) to become noblesse.");
+				return;
+			}
+			else if (!player.isNoble() && player.getPvpKills() >= Config.SET_NOBLE_PVP_COST)
+			{
+				player.setNoble(true);
+				player.setPvpKills(player.getPvpKills() - Config.SET_NOBLE_PVP_COST);
+				player.broadcastUserInfo();
+				player.sendMessage("You have become noblesse, and "+Config.SET_NOBLE_PVP_COST+" pvp(s) were taken from you.");
+			}
+		}
+		if (command.startsWith("addItem"))
+		{
+			if (player.getPvpKills() < Config.GIVE_ITEM_PVP_COST)
+			{
+				player.sendMessage("You need "+Config.SET_NOBLE_PVP_COST+" pvp(s) to get a reward.");
+				return;
+			}
+			else if (player.getPvpKills() >= Config.GIVE_ITEM_PVP_COST)
+			{
+				player.addItem("PvpReward", Config.ITEM_ID, Config.ITEM_COUNT, player, true);
+				player.setPvpKills(player.getPvpKills() - Config.GIVE_ITEM_PVP_COST);
+				player.broadcastUserInfo();
+				player.sendMessage("You have taken a reward and "+Config.GIVE_ITEM_PVP_COST+" pvp(s) have been taken from you. Check your inventory.");
+			}
+		}
+		if (command.startsWith("addSkill"))
+		{
+			if (player.getPvpKills() < Config.GET_A_SKILL_PVP_COST)
+			{
+				player.sendMessage("You need "+Config.GET_A_SKILL_PVP_COST+" pvp(s) to get a skill.");
+				return;
+			}
+			else if (player.getPvpKills() >= Config.GET_A_SKILL_PVP_COST)
+			{
+				L2Skill skill = null;
+				skill = SkillTable.getInstance().getInfo(Config.SKILL_ID, Config.SKILL_LVL);
+				player.addSkill(skill, true);
+				player.setPvpKills(player.getPvpKills() - Config.GET_A_SKILL_PVP_COST);
+				player.sendSkillList();
+				player.broadcastUserInfo();
+				player.sendMessage("You have learned "+skill.getName()+" lvl "+Config.SKILL_LVL+", and "+Config.GET_A_SKILL_PVP_COST+" pvp(s) have been taken from you. Check your skills list.");
+			}
+		}
+	}
+}
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 66)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -296,6 +296,15 @@
     public static int GRID_NEIGHBOR_TURNON_TIME;
     public static int GRID_NEIGHBOR_TURNOFF_TIME;
     
+    public static int SET_HERO_PVP_COST;
+    public static int SET_NOBLE_PVP_COST;
+    public static int GIVE_ITEM_PVP_COST;
+    public static int ITEM_ID;
+    public static int ITEM_COUNT;
+    public static int GET_A_SKILL_PVP_COST;
+    public static int SKILL_ID;
+    public static int SKILL_LVL;
+    
     //--------------------------------------------------
 	// Players
 	//--------------------------------------------------
@@ -895,6 +904,15 @@
                 GRIDS_ALWAYS_ON           	= Boolean.parseBoolean(npcsSettings.getProperty("GridsAlwaysOn", "False"));
                 GRID_NEIGHBOR_TURNON_TIME 	= Integer.parseInt(npcsSettings.getProperty("GridNeighborTurnOnTime", "1"));
                 GRID_NEIGHBOR_TURNOFF_TIME	= Integer.parseInt(npcsSettings.getProperty("GridNeighborTurnOffTime", "90"));
+                
+                SET_HERO_PVP_COST	= Integer.parseInt(npcsSettings.getProperty("SetHeroPvpCost", "500"));
+                SET_NOBLE_PVP_COST	= Integer.parseInt(npcsSettings.getProperty("SetNoblePvpCost", "250"));
+                GIVE_ITEM_PVP_COST	= Integer.parseInt(npcsSettings.getProperty("GiveItemPvpCost", "100"));
+                ITEM_ID	= Integer.parseInt(npcsSettings.getProperty("ItemId", "3470"));
+                ITEM_COUNT	= Integer.parseInt(npcsSettings.getProperty("ItemCount", "500"));
+                GET_A_SKILL_PVP_COST	= Integer.parseInt(npcsSettings.getProperty("GetASkillPvpCost", "1500"));
+                SKILL_ID	= Integer.parseInt(npcsSettings.getProperty("SkillId", "3131"));
+                SKILL_LVL	= Integer.parseInt(npcsSettings.getProperty("SkillLvl", "10"));
             }
             catch (Exception e)
             {
- Aqui está um exemplo de html, você deve colocá-lo em:
/ data / html / default (e como o nome, o id do seu NPC):

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
<html><body><br>
<center>Welcome to PvP Trader!<br>
Select your reward:<br>
<a action="bypass -h npc_%objectId%_setHero">Make me hero until restart!</a><br>
<a action="bypass -h npc_%objectId%_setNoble">Make me noblesse!</a><br>
<a action="bypass -h npc_%objectId%_addItem">Give me something!</a><br>
<a action="bypass -h npc_%objectId%_addSkill">Give me a skill!</a></center>
</body></html>
- Se você quiser mais recompensas a ser adicionadas, a resposta aqui (eu não vou adicionar recompensas bobas).
- Ele é codificado em l2jaCis, rev. 66.
- Para trabalhar, você deve fazer um npc com o tipo: L2PvpTrader.
- É 100% testado.

Divirta-se!

credits anarchy
adaptação allanalcantarA

allanalcantara está offline  
Links Patrocinados
Antigo 05-04-2011, 04:21 PM   #2
Mazokista
Membro - Veterano
 
Avatar de Mazokista
 
Registrado em: Dec 2009
Posts: 1,335
Agradeceu: 490
Agradecido 803 Vezes em 427 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Sistema
Rate Designer: Iniciante
Meu Estado:
Enviar mensagem via Windows Live Messenger para Mazokista
Nome Real: Roberto

Inventório de Mazokista

Padrão

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Mazokista está offline   Responder com Citação
Antigo 26-05-2011, 03:40 PM   #3
leonardoalves
Membro - Sargento
 
Avatar de leonardoalves
 
Registrado em: Apr 2009
Posts: 38
Agradeceu: 33
Agradecido 4 Vezes em 2 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Pontos: 3,305, Nível: 35
Pontos: 3,305, Nível: 35 Pontos: 3,305, Nível: 35 Pontos: 3,305, Nível: 35
Atividade: 5%
Atividade: 5% Atividade: 5% Atividade: 5%

Inventório de leonardoalves

Padrão

tinha que editar o mod igual remote class supondo pego 100 pvp que vc config ele ja abria a janela de troca

leonardoalves está offline   Responder com Citação
Antigo 26-05-2011, 05:49 PM   #4
mend3
Membro - Coronel
 
Avatar de mend3
 
Registrado em: Dec 2008
Localização: Campo Grande
Posts: 185
Agradeceu: 97
Agradecido 1,929 Vezes em 100 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
Enviar mensagem via ICQ para mend3 Enviar mensagem via Windows Live Messenger para mend3 Enviar mensagem via Yahoo para mend3 Enviar mensagem via Skype para mend3
Pontos: 7,143, Nível: 55
Pontos: 7,143, Nível: 55 Pontos: 7,143, Nível: 55 Pontos: 7,143, Nível: 55
Atividade: 0%
Atividade: 0% Atividade: 0% Atividade: 0%

Nome Real: Victor Mendonça

Inventório de mend3

Padrão

Santo Google Translate hein... poderia ter orgnizado o sentido do texto pra uma melhor explicação. Mas enfim...

mend3 está offline   Responder com Citação
Resposta


Regras para Posts
Você não pode postar novos tópicos
Você não pode postar respostas
Você não pode postar anexos
Você não pode editar seus posts

Código [IMG] Sim
Código HTML Não

Ir para...


Horários baseados na GMT -3. Agora são 10:33 PM.