Сообщений: 12
Тем: 5
Зарегистрирован: Nov 2010
Репутация:
0
Тут на днях делал сервер всё работало перезагрузил его и бац пишу команду //admin и он выдаёт (уже перевёл) команды администратор не существует. Проверял я админ всё остальные команды работают.
Что делать?
Сообщений: 12
Тем: 5
Зарегистрирован: Nov 2010
Репутация:
0
11-08-2010, 08:55 PM
(Сообщение последний раз редактировалось: 11-08-2010, 09:10 PM sasha266.)
не работает пробовал
Добавлено через 49 секунд
не работает пробовал.
Добавлено через 1 минуту
попробую базу акаунтов и чаров почистить
Добавлено через 14 минут
НЕ РАБОТАЕТ!!!
Сообщений: 12
Тем: 5
Зарегистрирован: Nov 2010
Репутация:
0
вот что я делал я изменял статы мобов и дроп гм шоп редактироввал и всё.
Сообщений: 185
Тем: 11
Зарегистрирован: Sep 2010
Репутация:
-34
Может в папке Data/Scripts/command/admin удалили файлы?
Сообщений: 12
Тем: 5
Зарегистрирован: Nov 2010
Репутация:
0
11-08-2010, 09:34 PM
(Сообщение последний раз редактировалось: 11-08-2010, 09:39 PM sasha266.)
Щас проверю не отходи далеко =)
Добавлено через 1 минуту
такой папки в скриптах нету
Добавлено через 3 минуты
а вот нашёл смотри
Добавлено через 4 минуты
/*
* 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.admincommandhandlers;
import java.util.StringTokenizer;
import javolution.text.TextBuilder;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.GmListTable;
import net.sf.l2j.gameserver.cache.HtmCache;
import net.sf.l2j.gameserver.datatables.AccessLevels;
import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
import net.sf.l2j.gameserver.datatables.ItemTable;
import net.sf.l2j.gameserver.datatables.NpcTable;
import net.sf.l2j.gameserver.datatables.NpcWalkerRoutesTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.datatables.TeleportLocationTable;
import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
import net.sf.l2j.gameserver.handler.admincommandhandlers.*;
import net.sf.l2j.gameserver.instancemanager.Manager;
import net.sf.l2j.gameserver.instancemanager.QuestManager;
import net.sf.l2j.gameserver.model.L2Multisell;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.olympiad.Olympiad;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
/**
* This class handles following admin commands:
* - admin|admin1/admin2/admin3/admin4/admin5 = slots for the 5 starting admin menus
* - gmliston/gmlistoff = includes/excludes active character from /gmlist results
* - silence = toggles private messages acceptance mode
* - diet = toggles weight penalty mode
* - tradeoff = toggles trade acceptance mode
* - reload = reloads specified component from multisell|skill|npc|htm|item|instancemanager
* - set/set_menu/set_mod = alters specified server setting
* - saveolymp = saves olympiad state manually
* - manualhero = cycles olympiad and calculate new heroes.
* @version $Revision: 1.3.2.1.2.4 $ $Date: 2007/07/28 10:06:06 $
*/
public class AdminAdmin implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_admin",
"admin_admin1",
"admin_admin2",
"admin_admin3",
"admin_admin4",
"admin_admin5",
"admin_admin6",
"admin_admin7",
"admin_admin8",
"admin_gmliston",
"admin_gmlistoff",
"admin_silence",
"admin_diet",
"admin_tradeoff",
"admin_reload",
"admin_set",
"admin_set_menu",
"admin_set_mod",
"admin_saveolymp",
"admin_manualhero",
"admin_sethero",
"admin_endolympiad",
"admin_config_server",
"admin_setconfig"
};
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
if (command.startsWith("admin_admin"))
{
showMainPage(activeChar, command);
}
else if (command.equals("admin_config_server"))
{
showConfigPage(activeChar);
}
else if (command.startsWith("admin_gmliston"))
{
GmListTable.getInstance().showGm(activeChar);
activeChar.sendMessage("Registered into gm list");
}
else if (command.startsWith("admin_gmlistoff"))
{
GmListTable.getInstance().hideGm(activeChar);
activeChar.sendMessage("Removed from gm list");
}
else if (command.startsWith("admin_silence"))
{
if (activeChar.getMessageRefusal()) // already in message refusal mode
{
activeChar.setMessageRefusal(false);
activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE));
}
else
{
activeChar.setMessageRefusal(true);
activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE));
}
}
else if (command.startsWith("admin_saveolymp"))
{
Olympiad.getInstance().saveOlympiadStatus();
activeChar.sendMessage("olympiad system saved.");
}
else if (command.startsWith("admin_endolympiad"))
{
try
{
Olympiad.getInstance().manualSelectHeroes();
}
catch (Exception e)
{
e.printStackTrace();
}
activeChar.sendMessage("Heroes formed");
}
else if (command.startsWith("admin_manualhero") || command.startsWith("admin_sethero"))
{
L2PcInstance target = null;
if (activeChar.getTarget() instanceof L2PcInstance)
{
target = (L2PcInstance) activeChar.getTarget();
target.setHero(target.isHero() ? false : true);
}
else
{
target = activeChar;
target.setHero(target.isHero() ? false : true);
}
target.broadcastUserInfo();
}
else if (command.startsWith("admin_diet"))
{
try
{
StringTokenizer st = new StringTokenizer(command);
st.nextToken();
if (st.nextToken().equalsIgnoreCase("on"))
{
activeChar.setDietMode(true);
activeChar.sendMessage("Diet mode on");
}
else if (st.nextToken().equalsIgnoreCase("off"))
{
activeChar.setDietMode(false);
activeChar.sendMessage("Diet mode off");
}
}
catch (Exception ex)
{
if (activeChar.getDietMode())
{
activeChar.setDietMode(false);
activeChar.sendMessage("Diet mode off");
}
else
{
activeChar.setDietMode(true);
activeChar.sendMessage("Diet mode on");
}
}
finally
{
activeChar.refreshOverloaded();
}
}
else if (command.startsWith("admin_tradeoff"))
{
try
{
String mode = command.substring(15);
if (mode.equalsIgnoreCase("on"))
{
activeChar.setTradeRefusal(true);
activeChar.sendMessage("Trade refusal enabled");
}
else if (mode.equalsIgnoreCase("off"))
{
activeChar.setTradeRefusal(false);
activeChar.sendMessage("Trade refusal disabled");
}
}
catch (Exception ex)
{
if (activeChar.getTradeRefusal())
{
activeChar.setTradeRefusal(false);
activeChar.sendMessage("Trade refusal disabled");
}
else
{
activeChar.setTradeRefusal(true);
activeChar.sendMessage("Trade refusal enabled");
}
}
}
else if (command.startsWith("admin_reload"))
{
StringTokenizer st = new StringTokenizer(command);
st.nextToken();
try
{
String type = st.nextToken();
if (type.equals("multisell"))
{
L2Multisell.getInstance().reload();
activeChar.sendMessage("multisell reloaded");
}
else if (type.startsWith("teleport"))
{
TeleportLocationTable.getInstance().reloadAll();
activeChar.sendMessage("teleport location table reloaded");
}
else if (type.startsWith("skill"))
{
SkillTable.getInstance().reload();
activeChar.sendMessage("skills reloaded");
}
else if (type.equals("npc"))
{
NpcTable.getInstance().reloadAllNpc();
QuestManager.getInstance().reloadAllQuests();
activeChar.sendMessage("npcs reloaded");
}
else if (type.startsWith("htm"))
{
HtmCache.getInstance().reload();
activeChar.sendMessage("Cache[HTML]: " + HtmCache.getInstance().getMemoryUsage() + " megabytes on " + HtmCache.getInstance().getLoadedFiles() + " files loaded");
}
else if (type.startsWith("item"))
{
ItemTable.getInstance().reload();
activeChar.sendMessage("Item templates reloaded");
}
else if (type.startsWith("config"))
{
Config.load();
activeChar.sendMessage("All config settings have been reload");
}
else if (type.startsWith("instancemanager"))
{
Manager.reloadAll();
activeChar.sendMessage("All instance manager has been reloaded");
}
else if (type.startsWith("npcwalkers"))
{
NpcWalkerRoutesTable.getInstance().load();
activeChar.sendMessage("All NPC walker routes have been reloaded");
}
else if (type.startsWith("access"))
{
AccessLevels.getInstance().reloadAccessLevels();
AdminCommandAccessRights.getInstance().reloadAdminCommandAccessRights();
activeChar.sendMessage("Access Rights have been reloaded");
}
else if (type.startsWith("quests"))
{
QuestManager.getInstance().reloadAllQuests();
activeChar.sendMessage("All Quests have been reloaded");
}
}
catch (Exception e)
{
activeChar.sendMessage("Usage: //reload <multisell|skill|npc|htm|item|instancemanager>");
}
}
else if (command.startsWith("admin_setconfig"))
{
StringTokenizer st = new StringTokenizer(command);
st.nextToken();
try
{
String pName = st.nextToken();
String pValue = st.nextToken();
if (Config.setParameterValue(pName, pValue))
activeChar.sendMessage("Config parameter " + pName + " set to " + pValue);
else
activeChar.sendMessage("Invalid parameter!");
}
catch (Exception e)
{
activeChar.sendMessage("Usage: //setconfig <parameter> <value>");
}
finally
{
showConfigPage(activeChar);
}
}
else if (command.startsWith("admin_set"))
{
StringTokenizer st = new StringTokenizer(command);
String[] cmd = st.nextToken().split("_");
try
{
String[] parameter = st.nextToken().split("=");
String pName = parameter[0].trim();
String pValue = parameter[1].trim();
if (Config.setParameterValue(pName, pValue))
activeChar.sendMessage("parameter " + pName + " succesfully set to " + pValue);
else
activeChar.sendMessage("Invalid parameter!");
}
catch (Exception e)
{
if (cmd.length == 2)
activeChar.sendMessage("Usage: //set parameter=value");
}
finally
{
if (cmd.length == 3)
{
if (cmd[2].equalsIgnoreCase("menu"))
AdminHelpPage.showHelpPage(activeChar, "submenus/settings.htm");
else if (cmd[2].equalsIgnoreCase("mod"))
AdminHelpPage.showHelpPage(activeChar, "menus/mods_menu.htm");
}
}
}
return true;
}
public String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private void showMainPage(L2PcInstance activeChar, String command)
{
int mode = 0;
String filename = null;
try
{
mode = Integer.parseInt(command.substring(11));
}
catch (Exception e)
{
}
switch (mode)
{
case 1:
filename = "main";
break;
case 2:
filename = "game";
break;
case 3:
filename = "char";
break;
case 4:
filename = "effects";
break;
case 5:
filename = "mods";
break;
case 6:
filename = "server";
break;
case 7:
filename = "config";
break;
case 8:
filename = "gm";
break;
default:
if (Config.GM_ADMIN_MENU_STYLE.equals("modern"))
filename = "main";
else
filename = "classic";
break;
}
AdminHelpPage.showHelpPage(activeChar, "menus/" + filename + "_menu.htm");
}
public void showConfigPage(L2PcInstance activeChar)
{
NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
TextBuilder replyMSG = new TextBuilder("<html><title>L2J :: Config</title><body>");
replyMSG.append("<center><table width=270><tr><td width=60><button value=\"Main\" action=\"bypass -h admin_admin\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=150>Config Server Panel</td><td width=60><button value=\"Back\" action=\"bypass -h admin_admin\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table></center><br>");
replyMSG.append("<center><table width=260><tr><td width=140></td><td width=40></td><td width=40></td></tr>");
replyMSG.append("<tr><td><font color=\"00AA00\">Drop:</font></td><td></td><td></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Rate EXP</font> = "
+ Config.RATE_XP
+ "</td><td><edit var=\"param1\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig RateXp $param1\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Rate SP</font> = "
+ Config.RATE_SP
+ "</td><td><edit var=\"param2\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig RateSp $param2\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Rate Drop Adena</font> = "
+ Config.RATE_DROP_ADENA
+ "</td><td><edit var=\"param3\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig RateDropAdena $param3\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Rate Drop Spoil</font> = "
+ Config.RATE_DROP_SPOIL
+ "</td><td><edit var=\"param4\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig RateDropSpoil $param4\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td width=140></td><td width=40></td><td width=40></td></tr>");
replyMSG.append("<tr><td><font color=\"00AA00\">Enchant:</font></td><td></td><td></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Weapon</font> = "
+ Config.ENCHANT_CHANCE_WEAPON
+ "</td><td><edit var=\"param5\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceWeapon $param5\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Armor</font> = "
+ Config.ENCHANT_CHANCE_ARMOR
+ "</td><td><edit var=\"param6\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceArmor $param6\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Jewelry</font> = "
+ Config.ENCHANT_CHANCE_JEWELRY
+ "</td><td><edit var=\"param7\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceJewelry $param7\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("<tr><td><font color=\"LEVEL\">Enchant Element</font> = "
+ Config.ENCHANT_CHANCE_ELEMENT
+ "</td><td><edit var=\"param8\" width=40 height=15></td><td><button value=\"Set\" action=\"bypass -h admin_setconfig EnchantChanceElement $param8\" width=40 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
replyMSG.append("</table></body></html>");
adminReply.setHtml(replyMSG.toString());
activeChar.sendPacket(adminReply);
}
}
Сообщений: 185
Тем: 11
Зарегистрирован: Sep 2010
Репутация:
-34
AdminAdmin.java Такой файл в папке commands/admin есть?
Сообщений: 12
Тем: 5
Зарегистрирован: Nov 2010
Репутация:
0
11-08-2010, 09:50 PM
(Сообщение последний раз редактировалось: 11-09-2010, 06:28 AM sasha266.)
папка другая но фаил именно такой в настоящей сборке также
Добавлено через 8 часов 37 минут
у кавониить есть варианты как исправить то?