Jump to content
  • 0

[Question] Clan Leader's Message


Question

Recommended Posts

  • 0
Posted

Dεbian μήπως το έφτιαξες?

Γιατι είπες θα το είχες έτοιμο χθες.

είμαι πολύ απασχολημένος.. όταν μπορέσω θα το κάνω.
  • 0
Posted

είμαι πολύ απασχολημένος.. όταν μπορέσω θα το κάνω.

Αυτό που λες τώρα γιατί δεν το είπες χθές?

Εσυ είπες οτι χθες θα το έχετε έτοιμο και τώρα λες άλλα?

Τέλος πάντον...

  • 0
Posted

Ευχαριστώ πολύ Dεbian θα το ποστάρεις εδω?

 

egw me ton Debian doulevoume mazi tha to exei ready smr ;) kai nai tha to postari edw.

  • 0
Posted

egw me ton Debian doulevoume mazi tha to exei ready smr ;) kai nai tha to postari edw.

Το σήμερα πότε το εννοείς `Яoмɛo ?

Απλά για να ξέρουμε ρωτάω....

  • 0
Posted

Το σήμερα πότε το εννοείς `Яoмɛo ?

Απλά για να ξέρουμε ρωτάω....

 

stile pm ston Debian aftos 3erei.

  • 0
Posted

Ήθελα να ήξερα αφού δεν μπορείτε να κάνετε edit τον code γιατι δεν το λέτε να το ζητήσουμε απο αλλού.  :P

  • 0
Posted

Ήθελα να ήξερα αφού δεν μπορείτε να κάνετε edit τον code γιατι δεν το λέτε να το ζητήσουμε απο αλλού.  :P

Αυτό έπρεπε να το καταλάβεις απο την αρχή , τα συγκεκριμένα άτομα πριν κάτι μέρες είχαν κάνει ενα  ποστ για να βοηθήσουν newbies

αλλα απο την τόση "δουλειά" που εχουν το ποστ έκλεισαι και φυσικά δεν βοήθησαν κανέναν.

Η ειρωνεία είναι οτι βοήθησε ο elfocrash κάποια άτομα και του την είπαν κιόλας.

Οποτε μην περιμένεις πολλά :)

  • 0
Posted

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ClanMessageCmd.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ClanMessageCmd.java	(revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ClanMessageCmd.java	(working copy)
@@ -0,0 +1,127 @@
+/*
+ * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
+
+import java.util.StringTokenizer;
+
+import javolution.text.TextBuilder;
+
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.network.clientpackets.Say2;
+import com.l2jfrozen.gameserver.network.serverpackets.CreatureSay;
+import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
+
+/**
+ * @author Elfocrash
+ *
+ */
+public class ClanMessageCmd implements IVoicedCommandHandler
+{
+    private static String[]    VOICED_COMMANDS    =
+                                            { "setclanmes", "setmes" , "clanmes" };
+
+
+    @Override
+    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+    {
+            if(command.equals("clanmes"))
+            {
+                if(activeChar.getClan() != null)
+                {
+                    if(activeChar.getClan().getClanMes() != null)
+                    {
+                        CreatureSay np = new CreatureSay(0, Say2.ALLIANCE,activeChar.getClan().getLeader().getName() , activeChar.getClan().getClanMes());
+                        activeChar.sendPacket(np);
+                    }
+                }
+                return true;
+            }
+
+
+            if(command.equals("setclanmes"))
+            {
+                if(activeChar.isClanLeader())
+                    mainHtml(activeChar);
+            }
+
+            if(command.startsWith("setmes"))
+            {
+                if(activeChar.isClanLeader())
+                {
+                    String clanmes = "";
+                    StringTokenizer s = new StringTokenizer(command);
+                    s.nextToken();
+
+                    try{
+
+                        while(s.hasMoreTokens())
+                        clanmes = clanmes + s.nextToken() + " ";
+                        activeChar.getClan().setClanMes(clanmes);
+                        mainHtml(activeChar);
+                        return true;
+
+                    }
+                    catch(Exception e)
+                    {
+                        e.printStackTrace();
+                    }
+                    return true;
+                }
+                activeChar.sendMessage("You are not a clan leader. You cannot set a clan message.");
+                return false;
+            }
+
+
+     return true;
+    }
+
+    public static void mainHtml(L2PcInstance activeChar)
+    {
+        String clanMes = null;
+        clanMes = activeChar.getClan().getClanMes();
+        if(clanMes == null)
+            clanMes = "No clan message set.";
+        NpcHtmlMessage nhm = new NpcHtmlMessage(5);
+        TextBuilder tb = new TextBuilder("");
+
+        tb.append("<html><head><title>Clan Message</title></head><body>");
+        tb.append("<center>");
+        tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
+        tb.append("<tr>");
+        tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
+        tb.append("<td valign=\"top\"><font color=\"FF6600\">Set Clan Message</font>");
+        tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>,here you can set your clan's message.<br1></td>");
+        tb.append("</tr>");
+        tb.append("</table>");
+        tb.append("The current message set is: <br><font color=\"77FB99\">" + clanMes+"</font>");
+        tb.append("<multiedit var=\"mes\" width=170 height=20><br>");
+        tb.append("<a action=\"bypass voiced_setmes $mes\">Save Message</a></center>");
+
+        tb.append("</center>");
+        tb.append("</body></html>");
+
+
+        nhm.setHtml(tb.toString());
+        activeChar.sendPacket(nhm);
+
+    }
+
+    @Override
+    public String[] getVoicedCommandList()
+    {
+        return VOICED_COMMANDS;
+    }
+}
\ No newline at end of file
Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java	(revision 972)
+++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java	(working copy)
@@ -28,6 +28,7 @@
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.AwayCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.BankingCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.CTFCmd;
+import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.ClanMessageCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.DMCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.FarmPvpCmd;
import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online;
@@ -112,6 +113,8 @@
		{
			registerVoicedCommandHandler(new Online());
		}
+		
+		registerVoicedCommandHandler(new ClanMessageCmd());

		_log.config("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers.");

Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java	(revision 972)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java	(working copy)
@@ -295,6 +295,15 @@
		if (Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN)
		    if (!activeChar.isAio())
		    		activeChar.checkAllowedSkills();
+		
+		if(activeChar.getClan() != null)
+		{
+			if(activeChar.getClan().getClanMes() != null)
+			{
+                 CreatureSay np = new CreatureSay(0, Say2.ALLIANCE,activeChar.getClan().getLeader().getName() , activeChar.getClan().getClanMes());
+			     activeChar.sendPacket(np);
+			}
+		}

		PetitionManager.getInstance().checkPetitionMessages(activeChar);

Index: head-src/com/l2jfrozen/gameserver/model/L2Clan.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/L2Clan.java	(revision 972)
+++ head-src/com/l2jfrozen/gameserver/model/L2Clan.java	(working copy)
@@ -565,6 +565,41 @@

		return limit;
	}
+	
+	    public String getClanMes()
+	    {
+	        String clanMes = null;
+	        Connection con = null;
+	        PreparedStatement statement = null;
+	        try
+	        {
+	                con = L2DatabaseFactory.getInstance().getConnection();
+	                   
+	                statement = con.prepareStatement("SELECT clan_mes FROM clan_data WHERE clan_id=?");
+	                statement.setInt(1, getClanId());
+	                
+	                ResultSet rset = statement.executeQuery();
+	                while (rset.next())
+	                {
+	                    clanMes = rset.getString("clan_mes");
+	                }
+	                    
+	        }
+	        catch (Exception e)
+	        {}
+	        finally
+	        {
+	        try
+	        {
+	        if(con != null)
+	            con.close();
+	        }
+	              catch(Exception e) {}
+	        }
+	        return clanMes;
+	        
+	    }
+	

	public L2PcInstance[] getOnlineMembers(String exclude)
	{
@@ -1314,6 +1349,32 @@
			}
		}
	}
+	
+	    public void setClanMes(String clanmes)
+	    {
+	          Connection con = null;
+	                     
+	          try
+	          {
+	                con = L2DatabaseFactory.getInstance().getConnection();
+	                PreparedStatement statement = con.prepareStatement("UPDATE clan_data SET clan_mes=? WHERE clan_id=?");
+	                statement.setString(1, clanmes);
+	                statement.setInt(2, getClanId());
+	                statement.execute();
+	                statement.close();
+	          }
+	          catch (Exception e)
+	          {}
+	          finally
+	          {
+	          try
+	          {
+	          if(con != null)
+	                  con.close();
+	          }
+	                  catch(Exception e) {}
+	          }
+	    }

	public void broadcastToOnlineAllyMembers(L2GameServerPacket packet)
	{

 

το sql δεν το έκανα.

  • 0
Posted

  [javac] C:\workspace\old\trunk\CORE\java\net\sf\l2j\gameserver\model\L2Clan.java:473: cannot find symbol

    [javac] symbol  : class Connection

    [javac] location: class net.sf.l2j.gameserver.model.L2Clan

    [javac]         Connection con = null;

    [javac]         ^

    [javac] C:\workspace\old\trunk\CORE\java\net\sf\l2j\gameserver\model\L2Clan.java:1199: cannot find symbol

    [javac] symbol  : class Connection

    [javac] location: class net.sf.l2j.gameserver.model.L2Clan

    [javac]           Connection con = null;

    [javac]           ^

    [javac] Note: C:\workspace\old\trunk\CORE\java\net\sf\l2j\gameserver\GeoEngine.java uses or overrides a deprecated API.

    [javac] Note: Recompile with -Xlint:deprecation for details.

    [javac] 2 errors

 

 

oriste ke ta error

  • 0
Posted

Τελικά δεν νομίζω οτι μπορείς να το κάνεις.

Νόμιζες οτι αλλάζοντας τα imports οτι θα δούλευε τέλος πάντον.

Aqueen πολύ καλά τα λες φίλε. ;)

  • 0
Posted

Τελικά δεν νομίζω οτι μπορείς να το κάνεις.

Νόμιζες οτι αλλάζοντας τα imports οτι θα δούλευε τέλος πάντον.

Aqueen πολύ καλά τα λες φίλε. ;)

ke esy to idio provlimma exis ???

Guest
This topic is now closed to further replies.



  • Posts

    • HELLO EVERYONE. WE ARE SELLING A LOT OF ADENA ON L2 REBORN / E-Global x Lu4 DISCORD - GODDARDSHOP   HURRY TO BUY OR YOU MAY NOT MAKE IT!!!
    • Added: 🎁 Seasonal Bonus System When the seasonal bonus is enabled, players receive additional bonus coins equal to bonus_season_percent of their donation amount. 💡 How it works (example): A player donates through their personal account and immediately receives regular coins. At the same time, bonus coins equal to 30% of the donation are credited. Example: Donation: 1000 coins → Bonus: 300 coins (30%) These bonus coins are not available immediately — they can be claimed later when the next season begins. 📅 When the bonus can be claimed: bonus_season_claim_start_date – the date when the "Claim" button becomes available. bonus_season_claim_end_date – the date after which the bonus can no longer be claimed. During this time window, the "Claim" button will appear in the personal account, allowing players to collect their accumulated bonus. 'bonus_season_enabled' => true, // Enable/disable the seasonal bonus system 'bonus_season_percent' => 30, // Percentage of the donation to be given as bonus coins (30 = 30%) 'bonus_season_claim_start_date' => '2025-07-30 00:00:00', // Date when the Claim button becomes available in the new season   'bonus_season_enabled' => true, // Вкл./Выкл Сезонную бонусную систему? 'bonus_season_percent' => 30, // Процент, при донате получает монеты в процентах 30 = 30%, которые может использовать в следующем открытии 'bonus_season_claim_start_date' => '2025-07-30 00:00:00', // Дата когда доступна кнопка Claim в новом сезоне 'bonus_season_claim_end_date' => '2025-08-15 20:00:00', // Дата окончания когда кнопка Claim в новом сезоне
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market  
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock