Перейти к содержанию
Авторизация  
brounlimited

[Share] Aio & Vip Premium Chat (Coded On Acis)

Рекомендуемые сообщения

[EN] So, I WAS kinda bored and I've Decided to make A New "premium" AiO & Chat for VIP players.

It's not Tested (Due to Technical issues) but it Should be working. If someone test it, the Post results here. Key Usage for Chat: >

 

 

 

Here is the code: http://pastebin.com/kiNNk7rD

Credits for the code: `iAndre (me) Have fun,

 

 

`iAndre.

 

[RU] (using translator)

Так, я вроде был пробурен и я решил сделать новую «наградную» болтовню для AiO & игроков VIP.

Оно не испытано (должный к техническим вопросам) но оно должно работать. Если кто-то испытание оно, вывешивает результаты здесь.

 

Ключ использования для болтовни: >

 

Здесь код: http://pastebin.com/kiNNk7rD

Кредиты для кода: iAndre ` (я)

Изменено пользователем brounlimited
  • Upvote 3

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

[EN] So, I WAS kinda bored and I've Decided to make A New "premium" AiO & Chat for VIP players.

It's not Tested (Due to Technical issues) but it Should be working. If someone test it, the Post results here. Key Usage for Chat: >

 

 

 

Here is the code: http://pastebin.com/kiNNk7rD

Credits for the code: `iAndre (me) Have fun,

 

 

`iAndre.

 

[RU] (using translator)

Так, я вроде был пробурен и я решил сделать новую «наградную» болтовню для AiO & игроков VIP.

Оно не испытано (должный к техническим вопросам) но оно должно работать. Если кто-то испытание оно, вывешивает результаты здесь.

 

Ключ использования для болтовни: >

 

Здесь код: http://pastebin.com/kiNNk7rD

Кредиты для кода: iAndre ` (я)

hm.. thanks for share.. so you didnt tested it yeah ? i will test it and share result of test.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

hm.. thanks for share.. so you didnt tested it yeah ? i will test it and share result of test.

No i didn't , i 'm having some issues with my pc . :)

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

This isn't full code. Something is missing. Var

public static FloodProtectorConfig FLOOD_PROTECTOR_AIO_VIP_VOICE;

not initialized, method isAio() is missing. Likely to have and other problems.

Изменено пользователем DiQuero

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

This isn't full code. Something is missing. Var

public static FloodProtectorConfig FLOOD_PROTECTOR_AIO_VIP_VOICE;

not initialized, method isAio() is missing. Likely to have and other problems.

In order to use it , you should implement AiO and VIP system.

This is only a new chat. AiO & VIP system are not included to this code, but there are shared everywhere though.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Updated .

I do not know How it Got deleted ..

 

Here is the code.

Index: aCis_gameserver/net/sf/l2j/gameserver/util/FloodProtectors.java
===================================================================
--- aCis_gameserver/net/sf/l2j/gameserver/util/FloodProtectors.java (revision 0)
+++ aCis_gameserver/net/sf/l2j/gameserver/util/FloodProtectors.java (working copy)[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]private final FloodProtectorAction _characterSelect;
+ private final FloodProtectorAction _AioVipVoice;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]  _characterSelect = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_CHARACTER_SELECT);
+  _AioVipVoice = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_AIO_VIP_VOICE);[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]public FloodProtectorAction getCharacterSelect()
{
 return _characterSelect;
}

+ public FloodProtectorAction getAioVipVoice()
+ {
+  return _AioVipVoice;
+ }[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/config/sf/l2j/config.java
===================================================================
--- aCis_gameserver/net/sf/l2j/config.java (revision 0)
+++ aCis_gameserver/net/sf/l2j/config.java (working copy)[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT;
+ public static FloodProtectorConfig FLOOD_PROTECTOR_AIO_VIP_VOICE;[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]+ public static boolean ALLOW_AIO_AND_VIP_CHAT;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]// --------------------------------------------------[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]   GLOBAL_LEVEL_RESTRICTION = CustomMods.getProperty("GlobalLevelRestriction", 62);
  TRADE_LEVEL_RESTRICTION = CustomMods.getProperty("TradeLevelRestriction", 41);

+   ALLOW_AIO_AND_VIP_CHAT = CustomMods.getProperty("AllowAioAndVipChat", true);

  NUMBER_OF_ACTIVE_AUGMENT_SKILLS = CustomMods.getProperty("NumberOfActiveAugmentSkills", 3);[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/config/floodprotector.properties
===================================================================
--- aCis_gameserver/config/floodprotector.properties (revision 0)
+++ aCis_gameserver/config/floodprotector.properties (working copy)[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]FloodProtectorCharacterSelectPunishmentTime = 0[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]+# AioVipVoice - AiO & Vip voice flooding, 10s on retail
+FloodProtectorAioVipVoiceInterval = 100
+FloodProtectorAioVipVoiceLogFlooding = False
+FloodProtectorAioVipVoicePunishmentLimit = 0
+FloodProtectorAioVipVoicePunishmentType = none
+FloodProtectorAioVipVoicePunishmentTime = 0[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/config/CustomMods.properties
===================================================================
--- aCis_gameserver/config/CustomMods.properties (revision 0)
+++ aCis_gameserver/config/CustomMods.properties (working copy)[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]+#=======================================
+#	  Aio & Vip Chat
+#=======================================
+# Allow Aio and Vip Chat.
+# Usage key: >
+AllowAioAndVipChat = True
+
#=======================================
#   Number Of active augment skills[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/net/sf/l2j/gameserver/network/clientpackets/Say2.java
===================================================================
--- aCis_gameserver/net/sf/l2j/gameserver/network/clientpackets/Say2.java (revision 0)
+++ aCis_gameserver/net/sf/l2j/gameserver/network/clientpackets/Say2.java (working copy)[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]public final static int HERO_VOICE = 17;
+ public final static int AIO_VIP_VOICE = 18;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]  "HERO_VOICE",
+  "AIO_VIP_VOICE"
};[/background][/size][/font]

[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]  if (_text.length() >= 100)
  return;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]+  if (Config.ALLOW_AIO_AND_VIP_CHAT && (activeChar.isAio() || VIPEngine.getInstance().isVip(activeChar)))
+  {
+   if(_text.startsWith(">"))
+    for(L2PcInstance p : L2World.getInstance().getAllPlayers().values())
+    {
+	 p.sendPacket(new CreatureSay(0,Say2.AIO_VIP_VOICE,activeChar.getName(),_text));
+	 return;
+    }
+    else
+    {
+	 activeChar.sendMessage("This chat can be used only by Donators of the server");
+    }
+  }[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/net/sf/l2j/gameserver/handler/ChatHandler.java
===================================================================
--- aCis_gameserver/net/sf/l2j/gameserver/handler/ChatHandler.java (revision 0)
+++ aCis_gameserver/net/sf/l2j/gameserver/handler/ChatHandler.java (working copy)[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]  registerChatHandler(new ChatTrade());
+  registerChatHandler(new ChatAioVipVoice());[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/net/sf/l2j/gameserver/handler/chathandlers/ChatAioVipVoice.java
===================================================================
--- aCis_gameserver/net/sf/l2j/gameserver/handler/chathandlers/ChatAioVipVoice.java (revision 0)
+++ aCis_gameserver/net/sf/l2j/gameserver/handler/chathandlers/ChatAioVipVoice.java (working copy)
/*
* 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 net.sf.l2j.gameserver.handler.chathandlers;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]import java.util.Collection;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]import net.sf.l2j.gameserver.handler.IChatHandler;
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]/**
* A chat handler
* @author iAndre
*/
public class ChatAioVipVoice implements IChatHandler
{
private static final int[] COMMAND_IDS =
{
 18
};

private static boolean _chatDisabled = false;

/**
 * Handle chat type 'AiOVip voice'
 * @see net.sf.l2j.gameserver.handler.IChatHandler#handleChat(int, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String, java.lang.String)
 */
@Override
public void handleChat(int type, L2PcInstance activeChar, String target, String text)
{
 if (isChatDisabled() && !activeChar.isGM())
 {
  activeChar.sendPacket(SystemMessageId.GM_NOTICE_CHAT_DISABLED);
  return;
 }

 if (activeChar.isAio() || VIPEngine.getInstance().isVip(activeChar))
 {
  if (!activeChar.getFloodProtectors().getAioVipVoice().tryPerformAction("AioVipVoice"))
   return;

  CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);

  Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
  for (L2PcInstance player : pls)
   player.sendPacket(cs);
 }
}

/**
 * @return Returns the chatDisabled.
 */
public static boolean isChatDisabled()
{
 return _chatDisabled;
}

/**
 * @param chatDisabled The chatDisabled to set.
 */
public static void setIsChatDisabled(boolean chatDisabled)
{
 _chatDisabled = chatDisabled;
}

/**
 * Returns the chat types registered to this handler
 * @see net.sf.l2j.gameserver.handler.IChatHandler#getChatTypeList()
 */
@Override
public int[] getChatTypeList()
{
 return COMMAND_IDS;
}
}[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]Index: aCis_gameserver/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminChatManager.java
===================================================================
--- aCis_gameserver/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminChatManager.java (revision 0)
+++ aCis_gameserver/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminChatManager.java (working copy)[/background][/size][/font]
[font='Lucida Grande', Tahoma, Helvetica, sans-serif][size=3][background=rgb(45, 48, 48)]+    else if (type.startsWith("AioVip"))
+    {
+	 if (!ChatAioVipVoice.isChatDisabled())
+	 {
+	  ChatAioVipVoice .setIsChatDisabled(true);
+	  activeChar.sendMessage("Premium Voice has been disabled!");
+	 }
+	 else
+	 {
+	  ChatAioVipVoice .setIsChatDisabled(false);
+	  activeChar.sendMessage("Premium Voice has been enabled!");
+	 }
+    }
  }
  catch (Exception e)

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×
×
  • Создать...