Jump to content

Recommended Posts

Posted

A npc where players go give an item (anything id) and he say anything on HV for 1 time !

Thanks..

Can you do it? Bro

 

Posted

A npc where players go give an item (anything id) and he say anything on HV for 1 time !

Thanks..

Can you do it? Bro

 

Done

20kvmf5.jpg

 

 

And code:

 

 


### Eclipse Workspace Patch 1.0
#P Chr.6GMS
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2HeroMessageInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2HeroMessageInstance.java	(revision 0)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2HeroMessageInstance.java	(revision 0)
@@ -0,0 +1,56 @@
+/* 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 javolution.text.TextBuilder;
+import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
+import net.sf.l2j.gameserver.templates.L2NpcTemplate;
+
+/**
+ *
+ * @author  iracundus
+ */
+public class L2HeroMessageInstance extends L2NpcInstance
+{
+
+	public L2HeroMessageInstance(int objectId, L2NpcTemplate template)
+	{
+		super(objectId, template);
+	}
+	
+	@Override
+	public void showChatWindow(L2PcInstance player, int val){
+		if(player == null)
+			return;
+		
+		TextBuilder textBuilder = new TextBuilder();
+		NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
+		
+		textBuilder.append("<html><head><title>L2 Hero chat message Npc</title></head>");
+		textBuilder.append("<body>");
+		textBuilder.append("<center>Hello i am the Hero Chat Message Npc.<br>");
+		textBuilder.append("I Need 50 adena to talk for you in hero voice</center><br>");
+		textBuilder.append("Enter your message here:<br>");
+		textBuilder.append("<multiedit var=\"hmess\" width=175 height=90><br><br>");
+		textBuilder.append("<button value=\"Message\" action=\"bypass -h hmesit $hmess\" width=204 height=20");
+		textBuilder.append("</body></html>");
+		npcHtmlMessage.setHtml(textBuilder.toString());
+		player.sendPacket(npcHtmlMessage);
+	}
+	
+}
Index: java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java	(working copy)
@@ -18,6 +18,7 @@
  */
package net.sf.l2j.gameserver.clientpackets;

+import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;

@@ -33,6 +34,7 @@
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.L2Event;
import net.sf.l2j.gameserver.serverpackets.ActionFailed;
+import net.sf.l2j.gameserver.serverpackets.CreatureSay;
import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;

/**
@@ -89,6 +91,34 @@
			{
				playerHelp(activeChar, _command.substring(12));
			}
+			else if(_command.startsWith("hmesit")){
+				String heroMessage = "";
+				int itemId = 57 , itemCount = 500;
+				StringTokenizer stringTokenizer = new StringTokenizer(_command);
+				stringTokenizer.nextToken();
+				
+						while(stringTokenizer.hasMoreTokens())
+							heroMessage = heroMessage + stringTokenizer.nextToken() + " ";
+				
+				if(heroMessage == "")
+					return;
+				
+				if(heroMessage.length() >= 100)
+				{
+					activeChar.sendMessage("too much big");
+					return;
+				}
+				
+				if(activeChar.getInventory().getItemByItemId(itemId) == null || activeChar.getInventory().getItemByItemId(itemId).getCount() < itemCount){
+					activeChar.sendMessage("You don't have enought items to use this npc instance");
+					return;
+				}
+				
+				activeChar.getInventory().destroyItemByItemId("done", itemId, itemCount, activeChar, null);
+				for(L2PcInstance heroTakers : L2World.getInstance().getAllPlayers())
+					if(heroTakers != null)
+					heroTakers.sendPacket(new CreatureSay(activeChar.getObjectId(),Say2.HERO_VOICE,activeChar.getName(),heroMessage));
+			}
			else if (_command.startsWith("npc_"))
			{
				if(!activeChar.validateBypass(_command))

Posted

Thelw..enan java code...otan kaneis vote..kai meta ingame patas .getreward..na sou dinei ta vote rewards :)

αυτό δεν είναι μόνο java side,ειναι και php που πρέπει να έχεις στο site σου.
Posted

αυτό δεν είναι μόνο java side,ειναι και php που πρέπει να έχεις στο site σου.

Tote..ena java code...na patas ingame kai na sou dinei ta vote rewards :)
Posted

ναι αλλά δεν θα checkarei εαν έχουνε κάνει vote..εκτος π.χ εαν βάλω στο java code να δίνει ένα votereward,και να του δίνει ένα buff p.x ή να του δίνει άλλα ίτεμ..θες κάτι τέτοιο;

Posted

ναι αλλά δεν θα checkarei εαν έχουνε κάνει vote..εκτος π.χ εαν βάλω στο java code να δίνει ένα votereward,και να του δίνει ένα buff p.x ή να του δίνει άλλα ίτεμ..θες κάτι τέτοιο;

Oxi..dn peirazei me ta votes...as pairnoun oloi an simplirothoun ta votes...aaa mipws mporeis na mou valeis sto GM menu..na tin exw on/off tin command dld an simlirothoun ta votes pou zhtaw..na tin energopoiw..kai na patane :) .getreward
Posted

κάτι τέτοιο,βασικά όχι ίδιο αλλά based σε αυτό που λες πρέπει να έχει γίνει share,ψάξτο λίγο.

Posted

Θα ήταν καλύτερα απο το gm menu ο gm να ανοίγει to getreward αλλά όταν θα το ανοίγει να πετάγεται ένα παραθυράκι σε όλους,

Να μην υπάρχει το command.

Posted

Θα ήταν καλύτερα απο το gm menu ο gm να ανοίγει to getreward αλλά όταν θα το ανοίγει να πετάγεται ένα παραθυράκι σε όλους,

Να μην υπάρχει το command.

Protimo na to anoigei..kai na to patane osoi einai active oxi afk...
Posted

Amazing you did it !

GOD what I can say, THANKS you are the best.

Can I ask for more stuff?? Or just 1 per person?!

Done

20kvmf5.jpg

 

 

And code:

 

 


### Eclipse Workspace Patch 1.0
#P Chr.6GMS
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2HeroMessageInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2HeroMessageInstance.java	(revision 0)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2HeroMessageInstance.java	(revision 0)
@@ -0,0 +1,56 @@
+/* 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 javolution.text.TextBuilder;
+import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
+import net.sf.l2j.gameserver.templates.L2NpcTemplate;
+
+/**
+ *
+ * @author  iracundus
+ */
+public class L2HeroMessageInstance extends L2NpcInstance
+{
+
+	public L2HeroMessageInstance(int objectId, L2NpcTemplate template)
+	{
+		super(objectId, template);
+	}
+	
+	@Override
+	public void showChatWindow(L2PcInstance player, int val){
+		if(player == null)
+			return;
+		
+		TextBuilder textBuilder = new TextBuilder();
+		NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
+		
+		textBuilder.append("<html><head><title>L2 Hero chat message Npc</title></head>");
+		textBuilder.append("<body>");
+		textBuilder.append("<center>Hello i am the Hero Chat Message Npc.<br>");
+		textBuilder.append("I Need 50 adena to talk for you in hero voice</center><br>");
+		textBuilder.append("Enter your message here:<br>");
+		textBuilder.append("<multiedit var=\"hmess\" width=175 height=90><br><br>");
+		textBuilder.append("<button value=\"Message\" action=\"bypass -h hmesit $hmess\" width=204 height=20");
+		textBuilder.append("</body></html>");
+		npcHtmlMessage.setHtml(textBuilder.toString());
+		player.sendPacket(npcHtmlMessage);
+	}
+	
+}
Index: java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java	(working copy)
@@ -18,6 +18,7 @@
  */
package net.sf.l2j.gameserver.clientpackets;

+import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;

@@ -33,6 +34,7 @@
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.L2Event;
import net.sf.l2j.gameserver.serverpackets.ActionFailed;
+import net.sf.l2j.gameserver.serverpackets.CreatureSay;
import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;

/**
@@ -89,6 +91,34 @@
			{
				playerHelp(activeChar, _command.substring(12));
			}
+			else if(_command.startsWith("hmesit")){
+				String heroMessage = "";
+				int itemId = 57 , itemCount = 500;
+				StringTokenizer stringTokenizer = new StringTokenizer(_command);
+				stringTokenizer.nextToken();
+				
+						while(stringTokenizer.hasMoreTokens())
+							heroMessage = heroMessage + stringTokenizer.nextToken() + " ";
+				
+				if(heroMessage == "")
+					return;
+				
+				if(heroMessage.length() >= 100)
+				{
+					activeChar.sendMessage("too much big");
+					return;
+				}
+				
+				if(activeChar.getInventory().getItemByItemId(itemId) == null || activeChar.getInventory().getItemByItemId(itemId).getCount() < itemCount){
+					activeChar.sendMessage("You don't have enought items to use this npc instance");
+					return;
+				}
+				
+				activeChar.getInventory().destroyItemByItemId("done", itemId, itemCount, activeChar, null);
+				for(L2PcInstance heroTakers : L2World.getInstance().getAllPlayers())
+					if(heroTakers != null)
+					heroTakers.sendPacket(new CreatureSay(activeChar.getObjectId(),Say2.HERO_VOICE,activeChar.getName(),heroMessage));
+			}
			else if (_command.startsWith("npc_"))
			{
				if(!activeChar.validateBypass(_command))

Posted

Goldex you can ask everything. Speak greek.

 

Shadow, αποφασισε και καντο ποστ γιατι εχω μπερδευτει

Posted

;) :)

Twra tha ithela ena npc pou na kanei +(enchant) ta items opws to agument pou bazeis to Weapon p thes alla sthn prokumenh periptwsh thelw na bazeis mono to item pou tha ginei enchant oxi to blesed (thelw na diagrapsw t blesed apo ton server)

To npc tha auxanei to ++ kata 1 dld +3 meta +4 +5 k loipa

Ama m katalaves. Ama boreis n baleis ena config oste na allazw to enchant rate pou tha kanei ++ to npc

Px : 100% 90% 60%

Euxaristw ek ton proteron...

;)

Posted

;) :)

Twra tha ithela ena npc pou na kanei +(enchant) ta items opws to agument pou bazeis to Weapon p thes alla sthn prokumenh periptwsh thelw na bazeis mono to item pou tha ginei enchant oxi to blesed (thelw na diagrapsw t blesed apo ton server)

To npc tha auxanei to ++ kata 1 dld +3 meta +4 +5 k loipa

Ama m katalaves. Ama boreis n baleis ena config oste na allazw to enchant rate pou tha kanei ++ to npc

Px : 100% 90% 60%

Euxaristw ek ton proteron...

;)

το βρισκω useless.

Αυτο που λες μαλλον θελει client edit, anyway εκανα το εξης αν το θες:

Πανε στο Npc πατανε το κουμπι και μετα  μπορουν να πατησουν οποιοδηποτε weapon(weapon μονο) και αυτο εχει 70% πιθανοτητα να γινει +1 αλλιως γινεται 0(σαν blessed), μετα για να το ξανακανουν πρεπει να ξαναπατησουν στο npc.

 

Tested


### Eclipse Workspace Patch 1.0
#P Chr.6GMS
Index: java/net/sf/l2j/gameserver/clientpackets/UseItem.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/UseItem.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/clientpackets/UseItem.java	(working copy)
@@ -37,6 +37,7 @@
import net.sf.l2j.gameserver.templates.L2Weapon;
import net.sf.l2j.gameserver.templates.L2WeaponType;
import net.sf.l2j.gameserver.util.FloodProtector;
+import net.sf.l2j.util.Rnd;

/**
  * This class ...
@@ -149,6 +150,28 @@
                 sm = null;
                 return;
             }
+            
+            if(activeChar.isAbility()){
+            	if(item.getItem().getItemType() instanceof L2WeaponType){
+            		int chance = 70;
+            		if(Rnd.get(100) < chance){
+            			item.setEnchantLevel(item.getEnchantLevel() + 1);
+            			item.updateDatabase();
+            			activeChar.sendMessage("Successfully enchanted");
+            		}
+            		else{
+            			if(item.getEnchantLevel() == 0){}
+            			else{
+            			item.setEnchantLevel(0);
+            			item.updateDatabase();
+            			activeChar.sendMessage("Unsuccessfully enchanted");
+            			}
+            		}
+            		activeChar.setAbility(false);
+            		return;
+            	}
+            }
+            

			// Char cannot use item when dead
			if (activeChar.isDead())
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -451,6 +451,8 @@

	private boolean _noble = false;
	private boolean _hero = false;
+	
+	private boolean _ability = false;

	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
	private L2FolkInstance _lastFolkNpc = null;
@@ -8215,6 +8217,16 @@
		return true;
	}

+	public boolean isAbility()
+	{
+		return _ability;
+	}
+	
+	public void setAbility(boolean newValue)
+	{
+		_ability = newValue;
+	}
+	
     public boolean isNoble()
     {
     	return _noble;
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2EnchanterInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2EnchanterInstance.java	(revision 0)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2EnchanterInstance.java	(revision 0)
@@ -0,0 +1,56 @@
+/* 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 javolution.text.TextBuilder;
+import net.sf.l2j.gameserver.model.L2ItemInstance;
+import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
+import net.sf.l2j.gameserver.templates.L2NpcTemplate;
+import net.sf.l2j.gameserver.templates.L2WeaponType;
+
+/**
+ *
+ * @author  iracundus
+ */
+public class L2EnchanterInstance extends L2NpcInstance
+{
+
+
+	public L2EnchanterInstance(int objectId, L2NpcTemplate template)
+	{
+		super(objectId, template);
+	}
+	
+	@Override
+	public void showChatWindow(L2PcInstance player, int val)
+	{
+		if(player == null)
+			return;
+		TextBuilder tb = new TextBuilder();
+		NpcHtmlMessage nhm = new NpcHtmlMessage(1);
+		
+		tb.append("<html><body>");
+		tb.append("I can enchant weapons for you,clik the button<br>");
+		tb.append("and then double-click on the weapon you want<br>");
+		tb.append("<button value=\"Give enchanting ability\" action=\"bypass -h enchantab\"");
+		tb.append("</body></html>");
+		nhm.setHtml(tb.toString());
+		player.sendPacket(nhm);
+	}
+	
+}
Index: java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java	(revision 5263)
+++ java/net/sf/l2j/gameserver/clientpackets/RequestBypassToServer.java	(working copy)
@@ -85,6 +85,14 @@
			{
				comeHere(activeChar);
			}
+			else if(_command.startsWith("enchantab")){
+				if(activeChar.isAbility()){
+				activeChar.sendMessage("You have already the ability to double click a weapon and enchant");
+				return;
+				}
+				activeChar.setAbility(true);
+				activeChar.sendMessage("Now you have the ability to double click a weapona and enchant it");
+		}
			else if (_command.startsWith("player_help "))
			{
				playerHelp(activeChar, _command.substring(12));

Posted

Dn boreis na to knc toulaxiston gia ola t items? Armor jewels tatou

Opws k n xei euxaristw!!

 

Guest
This topic is now closed to further replies.



  • Posts

    • ## [1.4.0] - 2026-01-28   ### ✨ New Features - **Vote System**: Lineage 2 servers can now use our vote–reward system. Players vote on the website and claim rewards in-game (1 vote = 1 claim) - **Vote Page**: On each server’s page (`/servers/<server>`), a **“Vote for Server”** button opens a dedicated vote page with cooldown info and optional Turnstile verification - **By Votes View**: The **“By Votes”** tab on the main page shows **actual vote counts** per server - **API Documentation**: New **API Docs** page at `/docs` (and footer link) with HMAC auth, endpoints, and examples for game server integration - **Vote API (My Servers)**: Server owners can open **“Vote API”** in My Servers to manage credentials, cooldown, allowed IPs, and open the docs   ### 🔄 Improvements - **Server Pages**: Single-server data is cached and loads faster; server pages can be opened by ID or by name (e.g. `/servers/my-server-name`) - **API Root**: Visiting the API root redirects to the docs URL configured in admin (default: site docs page) - **Admin Panel**: New **“Vote System”** tab for global settings (Turnstile, API security, default cooldown, docs URL)   ### 🔐 Security & Reliability - Turnstile (CAPTCHA) support for vote submissions to reduce abuse - HMAC-protected game server API for secure vote check/claim and stats
    • "I recently purchased the account panel from this developer and wanted to leave a positive review.   The transaction was smooth, and the developer demonstrated exceptional professionalism throughout the process.   What truly sets them apart is their outstanding post-sale support. They are responsive, patient, and genuinely helpful when addressing questions or issues. It's clear they care about their customers' experience beyond just the initial sale.   I am thoroughly satisfied and grateful for the service. This is a trustworthy seller who provides real value through both a quality product and reliable support. 100% recommended."
    • Server owners, Top.MaxCheaters.com is now live and accepting Lineage 2 server listings. There is no voting, no rankings manipulation, and no paid advantages. Visibility is clean and equal, and early listings naturally appear at the top while the platform grows. If your server is active, it should already be listed. Submit here https://Top.MaxCheaters.com This platform is part of the MaxCheaters.com network and is being built as a long-term reference point for the Lineage 2 community. — MaxCheaters.com Team
    • ⚙️ General Changed “No Carrier” title to “Disconnected” to avoid confusion after abnormal DC. On-screen Clan War kill notifications will no longer appear during Sieges, Epics, or Events. Bladedancer or SwordSinger classes can now log in even when Max Clients (2) is reached, you cannot have both at the same time. The max is 3 clients. Duels will now be aborted if a monster aggros players during a duel (retail-like behavior). Players can no longer send party requests to blocked players (retail-like). Fixed Researcher Euclie NPC dialogue HTML error. Changed Clan leave/kick penalty from 12 hours to 3 hours. 🧙 Skills Adjusted Decrease Atk. Spd. & Decrease Speed land rates in Varka & FoG. Fixed augmented weapons not getting cooldown when entering Olympiad. 🎉 Events New Team vs Team map added. New Save the King map added (old TvT map). Mounts disabled during Events. Letter Collector Event enabled Monsters drop letters until Feb. 13th Louie the Cat in Giran until Feb. 16th Inventory slots +10 during event period 📜 Quests Fixed “Possessor of a Precious Soul Part 1” rare stuck issue when exceeding max quest items. Fixed Seven Signs applying Strife buff/debuff every Monday until restart. 🏆 Milestones New milestone: “Defeat 700 Monsters in Varka” 🎁 Rewards: 200 Varka’s Mane + Daily Coin 🌍 NEW EXP Bonus Zones Hot Springs added Varka Silenos added (hidden spots excluded) As always, thank you for your support! L2Elixir keeps evolving, improving, and growing every day 💙   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..