Jump to content

Recommended Posts

Posted

Kalispera paidia Brika afto to Share tou Calsifer  Sto http://l2jserver.com/ Pistebw 8a einai poli xrisimo :)

Apo edw mporeite na Ftia3ete Chat Delay sta shout(!) kai trade(+) Pistebw na sas help :)

 

Index: java/config/options.properties

===================================================================

#[False] Does not necessarily imply that the GeoData buffer's content is not resident in physical memory.

ForceGeodata = True

+

+#True = Enable delay 

+ShoutChatDelay = False 

+TradeChatDelay = False

 

Index: java/net/sf/l2j/Config.java

===================================================================

    /** AI max thread */

    public static int AI_MAX_THREAD;

+

+    public static boolean SHOUT_CHAT_DELAY; 

+    public static boolean TRADE_CHAT_DELAY; 

+

… …   

                FORCE_GEODATA                   = Boolean.parseBoolean(optionsSettings.getProperty("ForceGeoData", "True"));

                ACCEPT_GEOEDITOR_CONN           = Boolean.parseBoolean(optionsSettings.getProperty("AcceptGeoeditorConn", "False"));

+

+                SHOUT_CHAT_DELAY                  = Boolean.parseBoolean(optionsSettings.getProperty("ShoutChatDelay", "false")); 

+                TRADE_CHAT_DELAY                  = Boolean.parseBoolean(optionsSettings.getProperty("TradeChatDelay", "false"));

 

Index: java/net/sf/l2j/Config.java

===================================================================

    /** AI max thread */

    public static int AI_MAX_THREAD;

+

+    public static boolean SHOUT_CHAT_DELAY; 

+    public static boolean TRADE_CHAT_DELAY; 

+

… …   

                FORCE_GEODATA                   = Boolean.parseBoolean(optionsSettings.getProperty("ForceGeoData", "True"));

                ACCEPT_GEOEDITOR_CONN           = Boolean.parseBoolean(optionsSettings.getProperty("AcceptGeoeditorConn", "False"));

+

+                SHOUT_CHAT_DELAY                  = Boolean.parseBoolean(optionsSettings.getProperty("ShoutChatDelay", "false")); 

+                TRADE_CHAT_DELAY                  = Boolean.parseBoolean(optionsSettings.getProperty("TradeChatDelay", "false"));

 

Index: java/net/sf/l2j/gameserver/clientpackets/Say2.java

===================================================================

case SHOUT: 

+   if (Config.SHOUT_CHAT_DELAY && !activeChar.isGM())

+ {

+ if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_SHOUTVOICE))

+ {

+ activeChar.sendMessage("Action failed. You are only able to speak in the Shout channel once every 10 seconds.");

+ return;

+ }

+ }

                if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") ||

                        (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))

… …   

case TRADE:

+   if (Config.TRADE_CHAT_DELAY && !activeChar.isGM())

+ {

+ if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_TRADEVOICE))

+ {

+ activeChar.sendMessage("Action failed. You are only able to speak in the Trade channel once every 10 seconds.");

+ return;

+ }

+ }

if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") ||

(Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))

 

Index: java/net/sf/l2j/gameserver/util/FloodProtector.java

===================================================================

         public static final int PROTECTED_ITEMPETSUMMON = 3; 

         public static final int PROTECTED_HEROVOICE             = 4; 

+         public static final int PROTECTED_SHOUTVOICE    = 5; 

+         public static final int PROTECTED_TRADEVOICE    = 6; 

 

         // =========================================================

 

 

 

Ps:Se merika pack...Dn 3erw ama einai se ola iparxei etimo sta config/options

 

# Chat configuration

# Values: GLOBAL, REGION, GM, OFF

# Global Chat - Default: REGION

GlobalChat = REGION

# Time limit between using Global Chat in 100ms

GlobalChatTime = 1

# Trade Chat - Default: REGION

TradeChat = REGION

# Time limit between using Trade Chat in 100ms

TradeChatTime = 1

 

 

Posted

Twra p vlepo to code thelei correction opos;

 

 

Index: java/net/sf/l2j/gameserver/util/FloodProtector.java

===================================================================

         public static final int PROTECTED_ITEMPETSUMMON = 3;

         public static final int PROTECTED_HEROVOICE             = 4;

+         public static final int PROTECTED_SHOUTVOICE    = 4;

+         public static final int PROTECTED_TRADEVOICE    = 4;

 

Pos mporei na einai tria 4ria sto flood? to 4 to katalaveno einai gia to hero voice .. ta alla gt einai 4? kai ta dyo ...!!

 

Isos prp na einai etsi ;

 

 

Index: java/net/sf/l2j/gameserver/util/FloodProtector.java

===================================================================

         public static final int PROTECTED_ITEMPETSUMMON = 3;

         public static final int PROTECTED_HEROVOICE             = 4;

+         public static final int PROTECTED_SHOUTVOICE    = 5;

+         public static final int PROTECTED_TRADEVOICE    = 6;

 

 

 

 

Eprepe o kodikos na dixnei kai ayto episeis;

 

// reuse delays for protected actions (in game ticks 1 tick = 100ms)

   private static final int[]         REUSEDELAY            = new int[]

                                                { 4, 42, 42, 16, 100, Config.GLOBAL_CHAT_TIME, Config.TRADE_CHAT_TIME, Config.SOCIAL_TIME, 20, 100 };

 

Se gracia pt2 einai committed !

  • 2 months later...
Posted

Einai to Chat sto trade kai sto shout.....sto l2 dn milas me !test kai +test  sto trade kai etc....tora katalabes ti enow?

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

×
×
  • Create New...