Deferato
Пользователи-
Публикаций
43 -
Зарегистрирован
-
Посещение
-
Отзывы
0%
Репутация
1Информация о Deferato
-
Звание
Решил остаться
Информация
-
Пол
Мужчина
Контакты
-
Skype
Theweaa
- Сайт
-
ICQ
470525467
Посетители профиля
1549 просмотров профиля
-
Прикольно))))) получилось)))) А начать танцевать также можно прописать видь
-
Ошибки при компилировании [javac] D:\soft-ware\core\build.xml:41: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 1376 source files to D:\soft-ware\core\build\classes [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 [javac] D:\soft-ware\core\java\net\sf\l2j\gameserver\network\clientpackets\RequestBypassToServer.java:146: error: cannot find symbol [javac] PlaySound ps = new PlaySound(1, "d1", 0, 0, 0, 0, 0); [javac] ^ [javac] symbol: class PlaySound [javac] location: class RequestBypassToServer [javac] D:\soft-ware\core\java\net\sf\l2j\gameserver\network\clientpackets\RequestBypassToServer.java:146: error: cannot find symbol [javac] PlaySound ps = new PlaySound(1, "d1", 0, 0, 0, 0, 0); [javac] ^ [javac] symbol: class PlaySound [javac] location: class RequestBypassToServer [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 2 errors [javac] 1 warning BUILD FAILED D:\soft-ware\core\build.xml:41: Compile failed; see the compiler error output for details. Total time: 13 seconds Скрытый текстpackage net.sf.l2j.gameserver.network.clientpackets; import java.util.logging.Level; import java.util.logging.Logger; import net.sf.l2j.Config; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.communitybbs.CommunityBoard; import net.sf.l2j.gameserver.handler.AdminCommandHandler; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.handler.VoicedCommandHandler; import net.sf.l2j.gameserver.model.L2CharPosition; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.entity.L2Event; import net.sf.l2j.gameserver.model.entity.events.CTF; import net.sf.l2j.gameserver.model.olympiad.Olympiad; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; public final class RequestBypassToServer extends L2GameClientPacket { private static final String _C__21_REQUESTBYPASSTOSERVER = "[C] 21 RequestBypassToServer"; private static Logger _log = Logger.getLogger(RequestBypassToServer.class.getName()); // S private String _command; /** * @param decrypt */ @Override protected void readImpl() { _command = readS(); } @Override protected void runImpl() { L2PcInstance activeChar = getClient().getActiveChar(); if (activeChar == null) return; try { if (_command.startsWith("admin_")) //&& activeChar.getAccessLevel() >= Config.GM_ACCESSLEVEL) { if (Config.ALT_PRIVILEGES_ADMIN && !AdminCommandHandler.getInstance().checkPrivileges(activeChar, _command)) { _log.info("<GM>" + activeChar + " does not have sufficient privileges for command '" + _command + "'."); return; } IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler(_command); if (ach != null) ach.useAdminCommand(_command, activeChar); else _log.warning("No handler registered for bypass '"+_command+"'"); } else if (_command.equals("come_here") && activeChar.getAccessLevel() >= Config.GM_ACCESSLEVEL) { comeHere(activeChar); } else if (_command.startsWith("player_help ")) { playerHelp(activeChar, _command.substring(12)); } else if (_command.startsWith("npc_")) { if(!activeChar.validateBypass(_command)) return; int endOfId = _command.indexOf('_', 5); String id; if (endOfId > 0) id = _command.substring(4, endOfId); else id = _command.substring(4); try { L2Object object = L2World.getInstance().findObject(Integer.parseInt(id)); if (_command.substring(endOfId+1).startsWith("event_participate")) L2Event.inscribePlayer(activeChar); else if (_command.substring(endOfId+1).startsWith("ctf_player_join ")) { String teamName = _command.substring(endOfId+1).substring(16); if (CTF._joining) CTF.addPlayer(activeChar, teamName); else activeChar.sendMessage("The event is already started. You can not join now!"); } else if (_command.substring(endOfId+1).startsWith("ctf_player_leave")) { if (CTF._joining) CTF.removePlayer(activeChar); else activeChar.sendMessage("The event is already started. You can not leave now!"); } else if (object != null && object instanceof L2NpcInstance && endOfId > 0 && activeChar.isInsideRadius(object, L2NpcInstance.INTERACTION_DISTANCE, false, false)) { ((L2NpcInstance)object).onBypassFeedback(activeChar, _command.substring(endOfId+1)); } activeChar.sendPacket(new ActionFailed()); } catch (NumberFormatException nfe) {} } // Draw a Symbol else if (_command.equals("menu_select?ask=-16&reply=1")) { L2Object object = activeChar.getTarget(); if (object instanceof L2NpcInstance) { ((L2NpcInstance) object).onBypassFeedback(activeChar, _command); } } else if (_command.equals("menu_select?ask=-16&reply=2")) { L2Object object = activeChar.getTarget(); if (object instanceof L2NpcInstance) { ((L2NpcInstance) object).onBypassFeedback(activeChar, _command); } } // Navigate throught Manor windows else if (_command.startsWith("manor_menu_select?")) { L2Object object = activeChar.getTarget(); if (object instanceof L2NpcInstance) { ((L2NpcInstance) object).onBypassFeedback(activeChar, _command); } } else if (_command.startsWith("bbs_")) { CommunityBoard.getInstance().handleCommands(getClient(), _command); } else if(_command.startsWith("music")) { PlaySound ps = new PlaySound(1, "d1", 0, 0, 0, 0, 0); activeChar.sendPacket(ps); } else if (_command.startsWith("_bbs")) { CommunityBoard.getInstance().handleCommands(getClient(), _command); } else if (this._command.startsWith("arenawtt")) { Olympiad.bypassChangeArena(_command, activeChar); } else if (_command.startsWith("eon_menu_")) { IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler("eon_menu_"); vch.useVoicedCommand(_command, activeChar, null); } else if (_command.startsWith("Quest ")) { if(!activeChar.validateBypass(_command)) return; L2PcInstance player = getClient().getActiveChar(); if (player == null) return; String p = _command.substring(6).trim(); int idx = p.indexOf(' '); if (idx < 0) player.processQuestEvent(p, ""); else player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim()); } } catch (Exception e) { _log.log(Level.WARNING, "Bad RequestBypassToServer: ", e); } // finally // { // activeChar.clearBypass(); // } } /** * @param client */ private void comeHere(L2PcInstance activeChar) { L2Object obj = activeChar.getTarget(); if (obj == null) return; if (obj instanceof L2NpcInstance) { L2NpcInstance temp = (L2NpcInstance) obj; temp.setTarget(activeChar); temp.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(activeChar.getX(),activeChar.getY(), activeChar.getZ(), 0 )); // temp.moveTo(player.getX(),player.getY(), player.getZ(), 0 ); } } private void playerHelp(L2PcInstance activeChar, String path) { if (path.indexOf("..") != -1) return; String filename = "data/html/help/"+path; NpcHtmlMessage html = new NpcHtmlMessage(1); html.setFile(filename); activeChar.sendPacket(html); } /* (non-Javadoc) * @see net.sf.l2j.gameserver.clientpackets.ClientBasePacket#getType() */ @Override public String getType() { return _C__21_REQUESTBYPASSTOSERVER; } } Что я вставил помечено крастным
-
а как это действие прописать (например у меня музыка d1.ogg ) и куда это все вставлять
-
байпссы??? это музыкальные кристалы????
-
Вот пришла в мою темную голову дополнить сервер таким оригинальным дополнением (нпс который воспроизводит музыку) Понял что можно написать скрипт на питоне и возникло пару вопросов... скрипт моего нпс mport sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest qn = "900_Sound" NPC = [50021] class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onTalk (Self,npc,player) : st.playSound("ItemSound.quest_middle") QUEST = Quest(900,qn,"Sound") for item in NPC: ### Quest NPC starter initialization QUEST.addStartNpc(item) ### Quest NPC initialization QUEST.addTalkId(item) Вопросы 1 в какой переменой используется функция воспроизведения музыки?(подойдет ли эта "def onTalk (Self,npc,player) :" 2 Как прописать что бы играла определенная музыка st.playSound("???не знаю как путь прописать???") Думаю что эта тема будет актуальна и для других администраторов серверов!!!