Gy6aH
Заблокирован
-
Публикаций
63 -
Зарегистрирован
-
Посещение
-
Отзывы
0%
Тип контента
Профили
Форумы
Загрузки
Магазин
Инструкции
Весь контент Gy6aH
-
Заточка оружия у нпс , работает на ура !
-
В твт есть базы ??? И еще не дописал , что бы у каждой фракции были стражники , что бы их не могли бить свои и хилить .
-
Запуск твт , в эвент менеджере , там же и время .
-
Еще бы хотелось , если можно ), как бы такой ивент , название ему "Мини ГВЕ", стоит нпс , в нем как бы выбираешь в бой , всех перераспределяет , 1 команду за зеленых другую за красных , на этот эвент как бы можно попасть в любое время он будет все время включен , можно сделать во время убийства еще пока там находятся убил 1 дается например фа ну там что бы можно было указать количество и айди , еще можно будет сделать запрет , что бы слишком близко например нельзя было подходить врагам к чужой базе .Можно поставить базы также как на гве серверах , за уничтожение например : дается всему пати распределеяется приз какой-то .Еще можно было бы вывести , запрещеные итемы . P.S Мне кажется , это бы разнообразило любой сервер , будь то сервер с дополнениями , или классика .
-
Ну хз , я видел только в пв и в l2jpride , и то там на все нпс разу заточка , а так малоли , мб кому то пригодится только на 1 вид мобов .
-
Да рандомно , в смысле в диапазоне ?)
-
Ну заточка оружия у нпс , а что бы указать точку оружия , можно было бы через базу , например пишем туда айди нпс , и какая будет заточка например , что бы у нпс была заточка от 10 до 50 , ну у нпс может быть оружие и на 10 и на 15 и на 20 ну и тд .
-
Демон , мог бы попробовать реализовать , заточка у нпс ?) Что бы заточка выводилась как бы через базу , например вписал туда айди нпс и там мин заточка и макс заточка ) .
-
Так что это за ивент который последний скинули )?
-
ну который ты последний сделал
-
А можно описание что за эвент
-
Я помню ты сказал "левых игроков не будет выкидывать с олимпа, если те каким то чудом там окажутся" , то можеш тогда тоже исправить , как бы для новой версии бойцовского клуба . =)
-
Вернулся к тому что было изночально , вот : Скрытый текст version: [exec] Execute failed: java.io.IOException: Cannot run program ".\subversio n\svnversion" (in directory "D:\svn\gameserver"): CreateProcess error=2, ?? ???? ??? ????? ????????? ???? [echo] L2jFrozen Gameserver Revision: ${l2jfrozen.revision} compile: [javac] Compiling 1469 source files to D:\svn\gameserver\build\classes [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:162: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] for (int j = 0; j < Olympiad.STADIUMS.le ngth; j++) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:162: length in Array is defined in an inaccessible class or interface [javac] for (int j = 0; j < Olympiad.STADIUMS.le ngth; j++) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:163: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] if (Olympiad.STADIUMS[j].isFreeT oUse()) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:163: isFreeToUse() in com.l2jfrozen.gameserver.mod el.entity.olympiad.OlympiadStadia is defined in an inaccessible class or interfa ce [javac] if (Olympiad.STADIUMS[j].isFreeT oUse()) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:182: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] Olympiad.STADIUMS[j].set StadiaBusy(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:182: setStadiaBusy() in com.l2jfrozen.gameserver.m odel.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inter face [javac] Olympiad.STADIUMS[j].set StadiaBusy(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:183: cannot find symbol [javac] symbol : variable _arenaFightNumber [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._arenaFightNumber = j; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:184: cannot find symbol [javac] symbol : variable _arenaFightNumber [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._arenaFightNumber = j; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:195: cannot find symbol [javac] symbol : variable _oldx [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldx = client.ge tX(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:196: cannot find symbol [javac] symbol : variable _oldy [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldy = client.ge tY(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:197: cannot find symbol [javac] symbol : variable _oldz [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldz = client.ge tZ(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:198: cannot find symbol [javac] symbol : variable _oldx [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldx = client.ge tX(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:199: cannot find symbol [javac] symbol : variable _oldy [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldy = client.ge tY(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:200: cannot find symbol [javac] symbol : variable _oldz [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldz = client.ge tZ(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] 26 errors
-
Поставил кодировку UTF-8 без BOM , теперь вот такая Скрытый текст compile: [javac] Compiling 1469 source files to D:\svn\gameserver\build\classes [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:11: cannot find symbol [javac] symbol : class olympiad [javac] location: package com.l2jfrozen.gameserver.model.entity [javac] import com.l2jfrozen.gameserver.model.entity.olympiad; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:162: package Olympiad does not exist [javac] for (int j = 0; j < Olympiad.STADIUMS.le ngth; j++) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:163: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] if (Olympiad.STADIUMS[j].isFreeT oUse()) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:182: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] Olympiad.STADIUMS[j].set StadiaBusy(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:183: cannot find symbol [javac] symbol : variable _arenaFightNumber [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._arenaFightNumber = j; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:184: cannot find symbol [javac] symbol : variable _arenaFightNumber [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._arenaFightNumber = j; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:195: cannot find symbol [javac] symbol : variable _oldx [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldx = client.ge tX(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:196: cannot find symbol [javac] symbol : variable _oldy [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldy = client.ge tY(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:197: cannot find symbol [javac] symbol : variable _oldz [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldz = client.ge tZ(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:198: cannot find symbol [javac] symbol : variable _oldx [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldx = client.ge tX(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:199: cannot find symbol [javac] symbol : variable _oldy [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldy = client.ge tY(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:200: cannot find symbol [javac] symbol : variable _oldz [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldz = client.ge tZ(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: operator + cannot be applied to <any>,int [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: cannot find symbol [javac] symbol : variable Olympiad [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2Figh tClubInstance [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac]
-
ЫЫ , а что именно не правильно ? Скрытый текст package com.l2jfrozen.gameserver.model.actor.instance; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.StringTokenizer; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.cache.HtmCache; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.entity.olympiad; import com.l2jfrozen.gameserver.network.serverpackets.ItemList; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.templates.L2NpcTemplate; import com.l2jfrozen.util.CloseUtil; import com.l2jfrozen.util.database.L2DatabaseFactory; public class L2FightClubInstance extends L2FolkInstance { public static final boolean enable = true; //включение/выключение евента public static final int rateItemId = 4037; //ID итема для заказа public static final String rateItemName = "coin of luck"; //название итема public static final int rateMin = 10; //минимальное количество итемов для заяки private final int rateMax = 100; //максимальное количество итемов для заяки private final int minLvl = 20; //минимальный уровень перса для подачи заявки private final int maxLvl = 80; //максимальный уровень перса для подачи заявки private final int lvlDifference = 20; //максимальная разница в лвлах персонажей на евенте private final int[] stopItems = { 2382 }; // список запрещенных предметов private boolean dontTp = false; public L2FightClubInstance (int objectId, L2NpcTemplate template) { super(objectId, template); } @ Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String newCommand = st.nextToken(); String val = ""; if (st.countTokens() >= 1) val = st.nextToken(); if (newCommand.equalsIgnoreCase("list")) // список заявок { String htmContent = HtmCache.getInstance().getHtm("data/html/default/10051-2.htm"); NpcHtmlMessage html = new NpcHtmlMessage(1); html.setHtml(htmContent); html.replace("%list%", getBidList()); player.sendPacket(html); html = null; } else if (newCommand.startsWith("info")) // информация о заявке { if (val.equalsIgnoreCase("")) return; getBidInfo(player, val); } else if (newCommand.startsWith("send")) // подача заявки { int rate = Integer.parseInt(val); if (player == null) return; else if (val.equalsIgnoreCase("")) { player.sendMessage("Вы не ввели ставку"); return; } else if (player.isInDuel()) { player.sendMessage("Нельзя записываться на евент во время дуели"); return; } else if (player.isInOlympiadMode()) { player.sendMessage("Нельзя записываться на евент во время олимпиады"); return; } else if (player.isInCraftMode()) { player.sendMessage("Нельзя записываться на евент во время крафта"); return; } else if (player._inEventCTF || player._inEventDM || player._inEventTvT || player._inEventVIP) { player.sendMessage("Нельзя записываться на этот эвент, пока вы зарегестрированы на других эвентах"); return; } else if ((rate < rateMin) || (rate > rateMax)) { player.sendMessage("Вы ввели неправильную ставку"); return; } else if (player.getLevel() < minLvl) { player.sendMessage("Минимальный уровень для участия: " + minLvl); return; } else if (player.getLevel() > maxLvl) { player.sendMessage("Максимальный уровень для участия: " + maxLvl); return; } else if (player.getInventory().getInventoryItemCount(rateItemId, 0) < rate) { int price = rate - player.getInventory().getInventoryItemCount(rateItemId, 0); player.sendMessage("У вас нехватает " + price + " " + rateItemName); return; } else if (playerInBid(player)) { player.sendMessage("Вы не можете подать больше одной заявки"); return; } else { player.getInventory().destroyItemByItemId("", rateItemId, rate, player, null); ItemList il = new ItemList(player, true); player.sendPacket(il); il = null; player.sendMessage("У вас исчезло " + rate + " " + rateItemName); addBid(player, rate); } } else if (newCommand.startsWith("take")) // принятие игроков заявки { if (val.equalsIgnoreCase("")) return; L2PcInstance client = L2World.getInstance().getPlayer(val); if (client.getName().equalsIgnoreCase(player.getName())) { player.sendMessage("Вы не можете принимать свою же заявку"); return; } else if (playerInBid(player)) { player.sendMessage("Вы не можете принимать бои, пока у вас лежит заявка"); return; } else if (((client.getLevel() - player.getLevel()) > lvlDifference) || ((player.getLevel() - client.getLevel()) > lvlDifference)) { player.sendMessage("У вас слишком большая разница в лвлах"); return; } else if (player.getInventory().getInventoryItemCount(rateItemId, 0) < getBet(client)) { int price = getBet(client) - player.getInventory().getInventoryItemCount(rateItemId, 0); player.sendMessage("У вас не хватает " + price + " " + rateItemName); return; } else { dontTp = false; for (int j = 0; j < Olympiad.STADIUMS.length; j++) if (Olympiad.STADIUMS[j].isFreeToUse()) { for (int si : stopItems) { L2ItemInstance it = player.getInventory().getItemByItemId(si); if (it != null) { player.sendMessage("У вас найден запрещенный предмет."); return; } it = client.getInventory().getItemByItemId(si); if (it != null) { client.sendMessage("" + player.getName() + " принял вашу заявку, но у вас есть запрещенные предметы, заявка отклонена."); player.sendMessage("У " + client.getName() + " найдены запрещенные предметы. Заявка отклонена"); return; } } Olympiad.STADIUMS[j].setStadiaBusy(); client._arenaFightNumber = j; player._arenaFightNumber = j; player.getInventory().destroyItemByItemId("", rateItemId, getBet(client), player, null); ItemList il = new ItemList(player, true); player.sendPacket(il); il = null; player.sendMessage("У вас исчезло " + getBet(client) + " " + rateItemName); player.sendMessage("Ваша заявка была принята"); insertFight(client, player, getBet(client), j); removeBidClient(client); client._oldx = client.getX(); client._oldy = client.getY(); client._oldz = client.getZ(); player._oldx = client.getX(); player._oldy = client.getY(); player._oldz = client.getZ(); client.teleToLocation(Olympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinates()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); player.teleToLocation(Olympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinates()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); client.setTeam(1); player.setTeam(2); dontTp = true; break; } } if (!dontTp) { player.sendMessage("В данный момент все арены заняты, попробуйте принять заявку позже."); return; } } super.onBypassFeedback(player, command); } /** * Проверка 2х игроков на евент * @param client - создатель заявка * @param player - аппонент * @return - возвращает true если оба игрока присутствуют на евенте */ protected static boolean playersIsInFight(L2PcInstance client, L2PcInstance player) { Connection con = null; String query = "SELECT COUNT(*) FROM fc_rival WHERE client = ? AND apponent = ?"; int count = 0; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, client.getName()); st.setString(2, player.getName()); ResultSet rs = st.executeQuery(); while (rs.next()) count = rs.getInt(1); st.close(); rs.close(); st = null; rs = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } if (count == 0) return false; else return true; } /** * Удаление заявки из БД * @param client - клиент (создатель заявки) */ private void removeBidClient(L2PcInstance client) { Connection con = null; String query = "DELETE FROM fc_bid WHERE client = ?"; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, client.getName()); st.execute(); st.close(); st = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } } /** * Занос в БД информацию о бое (принятой заявке) * @param client - создатель заявки * @param apponent - соперник * @param zone - ID зоны сражения */ private void insertFight(L2PcInstance client, L2PcInstance apponent, int bet, int zone) { Connection con = null; String query = "INSERT INTO fc_rival(client, apponent, bet, zone) VALUES(?, ?, ?, ?)"; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, client.getName()); st.setString(2, apponent.getName()); st.setInt(3, bet); st.setInt(4, zone); st.execute(); st.close(); st = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } } /** * Добавляет заявку в БД * @param player - игрок (создатель заявки) * @param bet - ставка */ private void addBid(L2PcInstance player, int bet) { Connection con = null; String query = "INSERT INTO fc_bid(client, bet) VALUES (?, ?)"; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, player.getName()); st.setInt(2, bet); st.execute(); st.close(); st = null; player.sendMessage("Ваша заявка была успешно добавлена."); } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); player.sendMessage("Произошла ошибка при добавлении вашей заявки "); } finally { CloseUtil.close(con); } } /** * Посылает игроку html окно с информацией о заявке clientName * @param player - игрок * @param clientName - имя клиента (создателя заявки) */ private void getBidInfo(L2PcInstance player, String clientName) { L2PcInstance client = L2World.getInstance().getPlayer(clientName); if (client == null) { player.sendMessage("Вашего соперника нет в игре."); return; } String htmContent = HtmCache.getInstance().getHtm("data/html/default/10051-3.htm"); NpcHtmlMessage html = new NpcHtmlMessage(1); html.setHtml(htmContent); html.replace("%nick%", client.getName()); html.replace("%class%", "" + client.getClassId()); html.replace("%lvl%", "" + client.getLevel()); int price = getBet(client); html.replace("%price%", "" + price); html.replace("%itemname%", rateItemName); html.replace("%objectId%", "" + player.getTarget().getObjectId()); player.sendPacket(html); html = null; client = null; } /** * Возвращает ставку, сделанную клиентом (таблица заявок) * @param client - клиент (создатель заявки) */ protected static int getBet(L2PcInstance client) { Connection con = null; String query = "SELECT bet FROM fc_bid WHERE client = ?"; int bet = 0; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, client.getName()); ResultSet rs = st.executeQuery(); while (rs.next()) bet = rs.getInt(1); st.close(); rs.close(); st = null; rs = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } return bet; } /** * Возвращает ставку, сделанную клиентом (таблица сражений) * @param client - клиент (создатель заявки) */ protected static int getBetNew(L2PcInstance client) { Connection con = null; String query = "SELECT bet FROM fc_rival WHERE client = ?"; int bet = 0; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, client.getName()); ResultSet rs = st.executeQuery(); while (rs.next()) bet = rs.getInt(1); st.close(); rs.close(); st = null; rs = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } return bet; } /** * Возвращает список заявок * @return возвращает только активные заявки (если клиенты онлайн), если * таких нет - то соотв. сообщение */ private String getBidList() { String result = "<table width=\"300\" border=\"1\"><tr><td>Ник</td><td>Уровень</td><td>Профессия</td><td>Ставка</td></tr>"; Connection con = null; String query = "SELECT client,bet FROM fc_bid"; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); ResultSet rs = st.executeQuery(); while (rs.next()) { L2PcInstance client = L2World.getInstance().getPlayer(rs.getString(1)); if (client != null) { result += "<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_info " + rs.getString(1) + "\">" + rs.getString(1) + "</a></td>"; result += "<td>" + client.getLevel() + "</td>"; result += "<td>" + client.getClassId() + "</td>"; result += "<td>" + rs.getInt(2) + "</td></tr>"; } } result += "</table>"; if (result.equalsIgnoreCase("<table width=\"300\" border=\"1\"><tr><td>Ник</td><td>Уровень</td><td>Профессия</td><td>Ставка</td></tr></table>")) result = "<center>Нет активных заявок</center>"; st.close(); rs.close(); st = null; rs = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } return result; } /** * Возвращает true - если у игрока есть заявка * @param player - создатель заявки */ private boolean playerInBid(L2PcInstance player) { Connection con = null; String query = "SELECT COUNT(*) FROM fc_bid WHERE client= ?"; int count = 0; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, player.getName()); ResultSet rs = st.executeQuery(); while (rs.next()) count = rs.getInt(1); st.close(); rs.close(); st = null; rs = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } if (count == 0) return false; else return true; } /** * Удаляет игроков из эвента (боя) * @param client */ protected static void deleteRival(L2PcInstance client) { Connection con = null; String query = "DELETE FROM fc_rival WHERE client = ?"; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement st = con.prepareStatement(query); st.setString(1, client.getName()); st.execute(); st.close(); st = null; } catch (Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); } } }
-
Вот что когда пытаюсь скомпилить . Скрытый текст version: [exec] Execute failed: java.io.IOException: Cannot run program ".\subversio n\svnversion" (in directory "D:\svn\gameserver"): CreateProcess error=2, ?? ???? ??? ????? ????????? ???? [echo] L2jFrozen Gameserver Revision: ${l2jfrozen.revision} compile: [javac] Compiling 953 source files to D:\svn\gameserver\build\classes [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:162: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] for (int j = 0; j < Olympiad.STADIUMS.le ngth; j++) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:162: length in Array is defined in an inaccessible class or interface [javac] for (int j = 0; j < Olympiad.STADIUMS.le ngth; j++) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:163: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] if (Olympiad.STADIUMS[j].isFreeT oUse()) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:163: isFreeToUse() in com.l2jfrozen.gameserver.mod el.entity.olympiad.OlympiadStadia is defined in an inaccessible class or interfa ce [javac] if (Olympiad.STADIUMS[j].isFreeT oUse()) [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:182: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] Olympiad.STADIUMS[j].set StadiaBusy(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:182: setStadiaBusy() in com.l2jfrozen.gameserver.m odel.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inter face [javac] Olympiad.STADIUMS[j].set StadiaBusy(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:183: cannot find symbol [javac] symbol : variable _arenaFightNumber [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._arenaFightNumber = j; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:184: cannot find symbol [javac] symbol : variable _arenaFightNumber [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._arenaFightNumber = j; [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:195: cannot find symbol [javac] symbol : variable _oldx [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldx = client.ge tX(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:196: cannot find symbol [javac] symbol : variable _oldy [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldy = client.ge tY(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:197: cannot find symbol [javac] symbol : variable _oldz [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] client._oldz = client.ge tZ(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:198: cannot find symbol [javac] symbol : variable _oldx [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldx = client.ge tX(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:199: cannot find symbol [javac] symbol : variable _oldy [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldy = client.ge tY(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:200: cannot find symbol [javac] symbol : variable _oldz [javac] location: class com.l2jfrozen.gameserver.model.actor.instance.L2PcIn stance [javac] player._oldz = client.ge tZ(); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:202: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] client.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] + 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: STADIUMS has protected access in com.l2jfroze n.gameserver.model.entity.olympiad.Olympiad [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:203: getCoordinates() in com.l2jfrozen.gameserver. model.entity.olympiad.OlympiadStadia is defined in an inaccessible class or inte rface [javac] player.teleToLocation(Ol ympiad.STADIUMS[j].getCoordinates()[0] - 800, Olympiad.STADIUMS[j].getCoordinate s()[1], Olympiad.STADIUMS[j].getCoordinates()[2]); [javac] ^ [javac] 26 errors BUILD FAILED D:\svn\gameserver\build.xml:65: Compile failed; see the compiler error output fo r details. Попробовал исправить , импорт с import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; на import com.l2jfrozen.gameserver.model.entity.olympiad; выдает это : Скрытый текст version: [exec] Execute failed: java.io.IOException: Cannot run program ".\subversio n\svnversion" (in directory "D:\svn\gameserver"): CreateProcess error=2, ?? ???? ??? ????? ????????? ???? [echo] L2jFrozen Gameserver Revision: ${l2jfrozen.revision} compile: [javac] Compiling 1469 source files to D:\svn\gameserver\build\classes [javac] D:\svn\gameserver\head-src\com\l2jfrozen\gameserver\model\actor\inst ance\L2FightClubInstance.java:1: illegal character: \65279 [javac] ?package com.l2jfrozen.gameserver.model.actor.instance; [javac] ^ [javac] 1 error BUILD FAILED D:\svn\gameserver\build.xml:65: Compile failed; see the compiler error output fo r details. P.S. сборка l2jlink
-
Знакомый может , но за спасибо делать не будет !