djpliku Posted July 19, 2010 Share Posted July 19, 2010 Newbish question Link to comment Share on other sites More sharing options...
PsychoJr Posted July 19, 2010 Share Posted July 19, 2010 Click dreapta pe handlers.voicedhandlers -> New -> Class pui nume/superclasa ce vrei tu .. Link to comment Share on other sites More sharing options...
djpliku Posted July 19, 2010 Share Posted July 19, 2010 Click dreapta pe handlers.voicedhandlers -> New -> Class pui nume/superclasa ce vrei tu .. ms mane Link to comment Share on other sites More sharing options...
djpliku Posted July 19, 2010 Share Posted July 19, 2010 Fi atent akm arata asa : /** * */ package handlers.voicedcommandhandlers; /** * @author Plyku * */ public class FactionInfo { } Si vreau sa bag asta in el Index: data/scripts/handlers/voicedcommandhandlers/FactionInfo.java =================================================================== --- data/scripts/handlers/voicedcommandhandlers/FactionInfo.java (revision 0) +++ data/scripts/handlers/voicedcommandhandlers/FactionInfo.java (revision 0) @@ -0,0 +1,62 @@ +/* + * 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 java.util.logging.Logger; + +import com.l2jserver.Config; +import com.l2jserver.gameserver.GameServer; +import com.l2jserver.gameserver.cache.HtmCache; +import com.l2jserver.gameserver.handler.IVoicedCommandHandler; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; + +public class FactionInfo implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = { "finfo" }; + private static final Logger _log = Logger.getLogger(GameServer.class.getName()); + + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if (command.equalsIgnoreCase("finfo")) + { + if (Config.ENABLE_FACTION_ENGINE && Config.ENABLE_FINFO_VC) + { + String htmFile = "data/html/mods/Faction/info.htm"; + String htmContent = HtmCache.getInstance().getHtm(htmFile); + if (htmContent != null) + { + NpcHtmlMessage showHtml = new NpcHtmlMessage(1); + showHtml.setHtml(htmContent); + activeChar.sendPacket(showHtml); + } + else + { + _log.info("Failed to load VCAIO File! Make sure that you fix it soon!"); + } + } + else + { + activeChar.sendMessage("Command unavailable!"); + } + } + return false; + } + + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} sterg tot + si copy/paste ? code;D? Daca imi explici asta ma descurc sal fac tot :)) Link to comment Share on other sites More sharing options...
PsychoJr Posted July 19, 2010 Share Posted July 19, 2010 adauga asta ... /* * 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 java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.GameServer; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; public class FactionInfo implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "finfo" }; private static final Logger _log = Logger.getLogger(GameServer.class.getName()); public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.equalsIgnoreCase("finfo")) { if (Config.ENABLE_FACTION_ENGINE && Config.ENABLE_FINFO_VC) { String htmFile = "data/html/mods/Faction/info.htm"; String htmContent = HtmCache.getInstance().getHtm(htmFile); if (htmContent != null) { NpcHtmlMessage showHtml = new NpcHtmlMessage(1); showHtml.setHtml(htmContent); activeChar.sendPacket(showHtml); } else { _log.info("Failed to load VCAIO File! Make sure that you fix it soon!"); } } else { activeChar.sendMessage("Command unavailable!"); } } return false; } public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } Link to comment Share on other sites More sharing options...
djpliku Posted July 19, 2010 Share Posted July 19, 2010 adauga asta ... /* * 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 java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.GameServer; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; public class FactionInfo implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "finfo" }; private static final Logger _log = Logger.getLogger(GameServer.class.getName()); public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.equalsIgnoreCase("finfo")) { if (Config.ENABLE_FACTION_ENGINE && Config.ENABLE_FINFO_VC) { String htmFile = "data/html/mods/Faction/info.htm"; String htmContent = HtmCache.getInstance().getHtm(htmFile); if (htmContent != null) { NpcHtmlMessage showHtml = new NpcHtmlMessage(1); showHtml.setHtml(htmContent); activeChar.sendPacket(showHtml); } else { _log.info("Failed to load VCAIO File! Make sure that you fix it soon!"); } } else { activeChar.sendMessage("Command unavailable!"); } } return false; } public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } Mersi mult,mam rugat de multi toata ziua, akm mai invatat:)), Dupa ce am adaugat , se salveaza singur?:)) Link to comment Share on other sites More sharing options...
PsychoJr Posted July 19, 2010 Share Posted July 19, 2010 nu .. apasa CTRL+S :)) Link to comment Share on other sites More sharing options...
djpliku Posted July 19, 2010 Share Posted July 19, 2010 bag pwla-n el de patch ca nu pot singur:(, ai yahoo:))? 5min dureaza Link to comment Share on other sites More sharing options...
PsychoJr Posted July 19, 2010 Share Posted July 19, 2010 da .. trimite un pm cu idu' tau sa-ti dau add . Link to comment Share on other sites More sharing options...
Raule Posted July 19, 2010 Author Share Posted July 19, 2010 ti-am zis ce e cu plus bagi ce e cu - stergi ce e asa greu.. Link to comment Share on other sites More sharing options...
djpliku Posted July 19, 2010 Share Posted July 19, 2010 5euro care-l face fara erori, mam saturat:)) Link to comment Share on other sites More sharing options...
Raule Posted July 19, 2010 Author Share Posted July 19, 2010 ne-am dus sa ne rugam si popa statea pi ciurci pai cum sa stea ma pe biserica? daca ciurciu era acoperit di floconi undi vrei sa shada ? si nu ii era frig? uai si gluma sinistra, cum sa-i fie frig la un om mort? ciurci = chruch = biserica flocon = fulg Link to comment Share on other sites More sharing options...
djpliku Posted July 19, 2010 Share Posted July 19, 2010 LA MULTI ANI RAULE!!! :) Link to comment Share on other sites More sharing options...
SoRa Posted July 19, 2010 Share Posted July 19, 2010 spam mare...Raule a fost ziua ta? :) Link to comment Share on other sites More sharing options...
Raule Posted July 20, 2010 Author Share Posted July 20, 2010 maine Link to comment Share on other sites More sharing options...
Recommended Posts