/*
* 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 handlers.voicedcommandhandlers;import com.l2jserver.Config;import com.l2jserver.gameserver.handler.IVoicedCommandHandler;import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;import com.l2jserver.gameserver.model.effects.AbstractEffect;import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;/**
* @author NeverMore
*/publicclassUserActions implements IVoicedCommandHandler{publicstatic final String[] VOICED_COMMANDS ={"effecton","effectoff","tradeoff","tradeon","expoff","expon","pmoff","pmon"};@Overridepublic boolean useVoicedCommand(String command, L2PcInstance activeChar,String target){if((command.startsWith("effecton"))){if(Config.ENABLE_SPECIAL_EFFECT){if(L2PcInstance._isoneffect ==false){
activeChar.startAbstractEffect(AbstractEffect.VITALITY);
activeChar.sendMessage("Your custom effect enabled!");ExShowScreenMessage message1 =newExShowScreenMessage("Your custom effect is now enabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._isoneffect =true;}else{
activeChar.sendMessage("Your effect is already enabled!");ExShowScreenMessage message1 =newExShowScreenMessage("Your effect is already enabled!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);}}if((command.startsWith("effectoff"))){if(Config.ENABLE_SPECIAL_EFFECT){if(L2PcInstance._isoneffect ==true){
activeChar.stopAbstractEffect(AbstractEffect.VITALITY);
activeChar.sendMessage("Your custom effect is now disabled!");ExShowScreenMessage message1 =newExShowScreenMessage("Your custom effect is now disabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._isoneffect =false;}else{
activeChar.sendMessage("You dont have effect enabled");ExShowScreenMessage message1 =newExShowScreenMessage("You dont have effect enabled",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);}}if((command.startsWith("tradeoff"))){if(Config.ENABLE_TRADE_REFUSAL){if(L2PcInstance._istraderefusal ==false){
activeChar.setTradeRefusal(true);
activeChar.sendMessage("Trade refusal enabled");ExShowScreenMessage message1 =newExShowScreenMessage("Trade refusal mode is now enabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._istraderefusal =true;}else{
activeChar.sendMessage("You are already in trade refusal mode!");ExShowScreenMessage message1 =newExShowScreenMessage("You are already in trade refusal mode!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);}}if((command.startsWith("tradeon"))){if(Config.ENABLE_TRADE_REFUSAL){if(L2PcInstance._istraderefusal ==true){
activeChar.setTradeRefusal(false);
activeChar.sendMessage("Trade refusal disabled");ExShowScreenMessage message1 =newExShowScreenMessage("Trade refusal mode is now disabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._istraderefusal =false;}else{
activeChar.sendMessage("You are not in trade refusal mode!");ExShowScreenMessage message1 =newExShowScreenMessage("You are not in trade refusal mode!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);}}if((command.startsWith("expoff"))){if(Config.ENABLE_EXP_REFUSAL){if(L2PcInstance._isexpsprefusal ==false){
activeChar.sendMessage("Exp/sp refusal enabled");ExShowScreenMessage message1 =newExShowScreenMessage("Exp/sp refusal mode is now enabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._isexpsprefusal =true;}else{
activeChar.sendMessage("You are already in exp/sp refusal mode!");ExShowScreenMessage message1 =newExShowScreenMessage("You are already in exp/sp refusal mode!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);}}if((command.startsWith("expon"))){if(Config.ENABLE_TRADE_REFUSAL){if(L2PcInstance._isexpsprefusal ==true){
activeChar.sendMessage("Exp/sp refusal disabled");ExShowScreenMessage message1 =newExShowScreenMessage("Exp/sp refusal mode is now disabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._isexpsprefusal =false;}else{
activeChar.sendMessage("You are not in exp/sp refusal mode!");ExShowScreenMessage message1 =newExShowScreenMessage("You are not in exp/sp refusal mode!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);}}if((command.startsWith("pmon"))){if(Config.ENABLE_PM_REFUSAL){if(L2PcInstance._ispmrefusal ==true){
activeChar.setMessageRefusal(false);
activeChar.sendMessage("Pm refusal mode disabled");ExShowScreenMessage message1 =newExShowScreenMessage("Pm refusal mode is now disabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._ispmrefusal =false;}else{
activeChar.sendMessage("You are not in pm refusal mode!");ExShowScreenMessage message1 =newExShowScreenMessage("You are not in pm refusal mode!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);returnfalse;}}if((command.startsWith("pmoff"))){if(Config.ENABLE_PM_REFUSAL){if(L2PcInstance._ispmrefusal ==false){
activeChar.setMessageRefusal(true);
activeChar.sendMessage("Pm refusal mode enabled");ExShowScreenMessage message1 =newExShowScreenMessage("Pm refusal mode is now enabled!",4000);
activeChar.sendPacket(message1);
L2PcInstance._ispmrefusal =true;}else{
activeChar.sendMessage("You are already in pm refusal mode!");ExShowScreenMessage message1 =newExShowScreenMessage("You are already in pm refusal mode!",4000);
activeChar.sendPacket(message1);returnfalse;}}else{
activeChar.sendMessage("This command is disabled");ExShowScreenMessage message1 =newExShowScreenMessage("This command is disabled by admin!",4000);
activeChar.sendPacket(message1);returnfalse;}}returnfalse;}@OverridepublicString[] getVoicedCommandList(){return VOICED_COMMANDS;}}
And this is for UserActions.java
User.htm
<html><head><title>User Panel</title></head><body><center><br><tablewidth="270"cellpadding="5"><tr><tdvalign="top">Welcome <fontcolor="3399ff"> %name% </font>,<br1>
Use this command to enable/disable user actions or learn whatever is related with our server!</td>!
</tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><br><center><tablewidth=225border=0><tr><br><td><buttonaction="bypass -h voice .user1 $User"value="Usefull Info"width=90height=18back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td><td><buttonaction="bypass -h voice .user2 $User"value="User Actions"width=90height=18back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr></table></center><br><td><center><buttonaction="bypass -h voice .user3 $User"value="Change log"width=90height=18back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></center><br><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor="3399ff">Server Statistics</font></center><br><tableborder=0cellspacing=0cellpadding=2bgcolor=111111><tr><tdfixwidth=11></td><tdFIXWIDTH=280>Players Online</td><tdFIXWIDTH=470><fontcolor=FF6600>%online%</font></td></tr>
%serveronline%
<tr><tdfixwidth=11></td><tdFIXWIDTH=280>Server Capacity</td><tdFIXWIDTH=470><fontcolor=FF6600>%servercapacity%</font></td></tr><tr><tdfixwidth=11></td><tdFIXWIDTH=280>Server Onl.Time</td><tdFIXWIDTH=470><fontcolor=FF6600>%serverruntime%</font></td></tr></table><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor=\"A9A9A9\">~ By ShayaK ~</font></center></body></html>
User1.htm
<html><head><title>Usefull Information</title></head><body><center><br><tablewidth="270"cellpadding="5"><tr><tdvalign="top"><fontcolor="3399ff"> %name% </font>,read this usefull information and learn every feature that our server supports!</td>!
</tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor="3399ff">GamePlay Informations</font></center><br><center><table><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor="3399ff">Vote Informations</font></center><br><center><table><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><br><center><fontcolor="3399ff">PvP Informations</font></center><br><center><table><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><buttonaction="bypass -h voice .user $User"value="Back"width=50height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"><center><fontcolor=\"A9A9A9\">~ By ShayaK ~</font></center></body></html>
User2.htm
<html><head><title>User actions</title></head><body><center><br><tablewidth="270"cellpadding="5"><tr><tdvalign="top"><fontcolor="3399ff"> %name% </font>,from here you are able to use many features of our server and make your gameplay easier!</td>!
</tr></table></center><br><fontcolor="333333"align="center">_____________________________________</font><br><center><fontcolor="3399ff">Exp/Sp refusal mode</font></center><br><center><tablewidth=230><tr><tdalign=center>Info</td><tdalign=center>Status</td><tdalign=center>On/Off</td></tr><tr><tdheight="5"></td></tr><tr><tdalign=center><fontcolor="FF9933">Disable gaining </font></td><tdalign=center><fontcolor="FFFF33">%exp%</font></td><tdalign=center><buttonvalue="Enable"action="bypass -h voice .expoff $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr><tr><tdalign=center><fontcolor="FFFF33">exp/sp</font></td><tdalign=center><fontcolor="FF9933"></font></td><tdalign=center><buttonvalue="Disable"action="bypass -h voice .expon $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr></table></center><br><fontcolor="333333"align="center">_____________________________________</font><br><center><fontcolor="3399ff">Pm refusal mode</font></center><br><center><tablewidth=230><tr><tdalign=center>Info</td><tdalign=center>Status</td><tdalign=center>On/Off</td></tr><tr><tdheight="5"></td></tr><tr><tdalign=center><fontcolor="FF9933">Blocks all pm's</font></td><tdalign=center><fontcolor="FFFF33">%pm%</font></td><tdalign=center><buttonvalue="Enable"action="bypass -h voice .pmoff $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr><tr><tdalign=center><fontcolor="FFFF33"></font></td><tdalign=center><fontcolor="FF9933"></font></td><tdalign=center><buttonvalue="Disable"action="bypass -h voice .pmon $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr></table></center><br><fontcolor="333333"align="center">_____________________________________</font><br><center><fontcolor="3399ff">Trade refusal mode</font></center><br><center><tablewidth=230><tr><tdalign=center>Info</td><tdalign=center>Status</td><tdalign=center>On/Off</td></tr><tr><tdheight="5"></td></tr><tr><tdalign=center><fontcolor="FF9933">Blocks all trade's</font></td><tdalign=center><fontcolor="FFFF33">%trade%</font></td><tdalign=center><buttonvalue="Enable"action="bypass -h voice .tradeoff $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr><tr><tdalign=center><fontcolor="FFFF33"></font></td><tdalign=center><fontcolor="FF9933"></font></td><tdalign=center><buttonvalue="Disable"action="bypass -h voice .tradeon $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor="3399ff">Custom Effect</font></center><br><center><tablewidth=260><tr><tdalign=center>Info</td><tdalign=center>Status</td><tdalign=center>On/Off</td></tr><tr><tdheight="5"></td></tr><tr><tdalign=center><fontcolor="FF9933">Enable an</font></td><tdalign=center><fontcolor="FFFF33">%effect%</font></td><tdalign=center><buttonvalue="Enable"action="bypass -h voice .effecton $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr><tr><tdalign=center><fontcolor="FF9933"> custom effect</font></td><tdalign=center><fontcolor="FF9933"></font></td><tdalign=center><buttonvalue="Disable"action="bypass -h voice .effectoff $UserActions"width=65height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"></td></tr></table></center><br><br><fontcolor="333333"align="center">_______________________________________</font><br><center><buttonaction="bypass -h voice .user $User"value="Back"width=50height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"><br><center><fontcolor=\"A9A9A9\">~ by NeverMore ~</font></center></body></html>
and User3.htm
<html><head><title>Change log</title></head><body><center><br><tablewidth="270"cellpadding="5"><tr><tdvalign="top"><fontcolor="3399ff"> %name% </font>,here you can read our server changes!</td>!
</tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor="3399ff">12/8/2012</font></center><br><center><table><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><fontcolor="3399ff">10/8/2012</font></center><br><center><table><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><br><center><fontcolor="3399ff">8/8/2012</font></center><br><center><table><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr><tr><td><fontcolor="3399ff">*</font> To.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.doTo.do</td></tr></table></center><br><fontcolor="333333"align="center">_______________________________________</font><br><center><buttonaction="bypass -h voice .user $User"value="Back"width=50height=16back="L2UI_ct1.button_df"fore="L2UI_ct1.button_df"><br><center><fontcolor=\"A9A9A9\">~ By NeverMore ~</font></center></body></html>
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.
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
Hello !
I have a problem when connecting to the pack with the Salvation client, it blocks my IP, I see that the account is created in the database but it remains logged in.
Any idea what it could be? ALso with H5 CLient !
Thank you !
Question
FactorX
Hi everyone..i want to know why i when i click Userfull info (from voice command) nothign happend.
this is codes and html's.
This is user.java
this is for UserActions.java
And this is for UserActions.java
User.htm
User1.htm
User2.htm
and User3.htm
All this..java's and html's
Edited by FactorX0 answers to this question
Recommended Posts
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.