Сообщений: 3,968
Тем: 90
Зарегистрирован: Nov 2010
Репутация:
15,337
Сообщений: 544
Тем: 45
Зарегистрирован: Dec 2010
Репутация:
106
сохраняю и перекодирываю в utf-8 без бом, выхожу, сново захожу стоит ANSI, втф?
Uploaded with ImageShack.us
то есть не перекодировывает почему-то...
Сообщений: 5,670
Тем: 145
Зарегистрирован: Nov 2008
Репутация:
33,771
Открой блокнотом и сохранить как... там выберешь кодировку.
Web программист\разработчик
— Есть только один способ проделать большую работу — полюбить ее. Если вы к этому не пришли, подождите. Не беритесь за дело.
Сообщений: 544
Тем: 45
Зарегистрирован: Dec 2010
Репутация:
106
02-25-2011, 01:06 PM
(Сообщение последний раз редактировалось: 02-25-2011, 01:09 PM Amorph1s.)
http://otvety.google.ru/otvety/thread?ti...bd22c5eeb4
столкнулся с такой проблемой, нотепад++ не кодирует в это, но почему-то не во всех случаях...(у меня иногда сохраняет как надо)
Добавлено через 2 минуты
[OverCome];110541 Написал:Открой блокнотом и сохранить как... там выберешь кодировку. но блакнот кодирует только в UTF8 с BOM
Сообщений: 3,968
Тем: 90
Зарегистрирован: Nov 2010
Репутация:
15,337
Попробуй поставить пробел где-нибудь, чтобы НотПад думал, что ты внес изменения.. и сохрани (после смены кодировки и изменений).
Сообщений: 544
Тем: 45
Зарегистрирован: Dec 2010
Репутация:
106
02-25-2011, 01:48 PM
(Сообщение последний раз редактировалось: 02-25-2011, 04:18 PM Amorph1s.)
проблема решилась настройкой нотепад, в настройках поставил что бы анси распозновалось как ютф8 без бом. сча компильнем проверим)
Добавлено через 42 минуты
Код: Making a full backup into 25.02.2011-16'17'28_backup_full.sql
Backup complite 25.02.2011-16'17'28_backup_full.sql
Starting L2P Game Server.
16:17:30.915 Gameserver Version: ${l2p.revision}, build date: 2011.02.25 16:04
16:17:30.942 Loading gameserver config.
16:17:30.982 Abuse: Loaded 18 abuse words.
16:17:31.017 loading xml GMAccess
16:17:31.053 MLog clients using java 1.4+ standard logging.
16:17:31.144 Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true
; trace: 10]
16:17:31.236 Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSourc
e [ acquireIncrement -> 5, acquireRetryAttempts -> 0, acquireRetryDelay -> 100,
autoCommitOnClose -> true, automaticTestTable -> null, breakAfterAcquireFailure
-> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectio
nTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSource
Name -> 1hge0ys8epsmdlb12u26ax|332611a7, debugUnreturnedConnectionStackTraces ->
false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassL
ocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1h
ge0ys8epsmdlb12u26ax|332611a7, idleConnectionTestPeriod -> 60, initialPoolSize -
> 1, jdbcUrl -> jdbc:mysql://localhost/l2pdb, maxAdministrativeTaskTime -> 0, ma
xConnectionAge -> 0, maxIdleTime -> 600, maxIdleTimeExcessConnections -> 0, maxP
oolSize -> 50, maxStatements -> 100, maxStatementsPerConnection -> 0, minPoolSiz
e -> 1, numHelperThreads -> 5, numThreadsAwaitingCheckoutDefaultUser -> 0, prefe
rredTestQuery -> null, properties -> {user=******, password=******}, propertyCyc
le -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, un
returnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
16:17:31.450 Loaded 418 translit entrys
16:17:31.455 Clear characters online status and accesslevel.
16:17:31.462 Total cleaned: 0, updated: 0 elements in database.
16:17:31.478 IdFactory: Extracting 0 used id's from data tables...
16:17:31.479 IdFactory: Successfully extracted 0 used id's from data tables.
16:17:31.479 IDFactory: 102912 id's available.
16:17:31.513 CrestCache: Loaded 0 crests
16:17:31.519 Initializing AuctionManager
16:17:31.634 Loaded: 76 active auction(s)
16:17:36.021 SkillsEngine: Loaded 61000 skill templates from XML files. Max id:
26073, max level: 259
16:17:38.069 PetSkillsTable: Loaded 2187 skills.
16:17:38.444 ItemTable: Loaded 2919 Armors.
16:17:38.578 ItemTable: Loaded 10077 Items.
16:17:38.768 ItemTable: Loaded 3499 Weapons.
16:17:39.038 ArmorSetsTable: Loaded 171 armor sets.
16:17:39.199 TradeController: Loaded 4 file(s).
16:17:39.199 TradeController: Loaded 27864 Items.
16:17:39.200 TradeController: Loaded 822 Buylists.
16:17:39.479 RecipeController: Loaded 936 Recipes.
16:17:42.654 SkillTreeTable: Loaded 16575 skills.
16:17:42.654 SkillTreeTable: Loaded 109 fishing skills.
16:17:42.655 SkillTreeTable: Loaded 20 transformation skills.
16:17:42.655 SkillTreeTable: Loaded 64 clan skills.
16:17:42.656 SkillTreeTable: Loaded 523 enchanted skills.
16:17:42.660 SkillSpellbookTable: Loaded 335 Spellbooks.
16:17:42.678 CharTemplateTable: Loaded 206 Character Templates.
16:17:42.683 NpcTable: Loaded 375 AI params for 278 NPCs.
16:17:42.909 Scripts loading...
.\data\scripts\commands\admin\AdminCreateItem.java:1: illegal character: \65279
16:17:44.840 Can't compile scripts!
16:17:44.841 Scripts loaded with errors. Loaded 0 classes.
Server halting [status=0] / Reason: Scripts loaded with errors. Loaded 0 classes
.
server terminated
Для продолжения нажмите любую клавишу . . .
просто залейте плиз мне этот файлик в готовом виде, кому не сложно))) Я замудохался паротся с этим бредом)
Сообщений: 544
Тем: 45
Зарегистрирован: Dec 2010
Репутация:
106
Ro0TT Написал:Делал для шайтановской сборки, а подходит для любой феневской сборки. Мелочи жизни, но приятные .
Что и с чем едят смотрим на скрине.
Открыть спойлер
./data/html/admin/itemcreation.htm
<html><title>Items</title><body>
<table width=260>
<tr>
<td width=40><button value="Main" action="bypass -h admin_admin" width=40 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td width=180><center>Item Creation Menu</center></td>
<td width=40><button value="Back" action="bypass -h admin_admin" width=40 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table><br><br>
<table width=270>
<tr><td>Введите ID предмета и кол-во для создания.</td></tr>
<tr><td></td></tr>
<tr><td><font color=LEVEL>(*)</font>Опционально в поле "Кому", можете указать ник персонажа, которому будет выдан предмет.</td></tr>
</table>
<center>
<table>
<tr>
<td width=60>ID-Item:</td>
<td width=60>Кол-во:</td>
<td width=60>Кому(*):</td>
</tr>
<tr>
<td width=60><edit var="itemid" width=60></td>
<td width=60><edit var="itemnum" width=60></td>
<td width=60><edit var="player" width=60></td>
</tr>
</table>
<table><tr>
<td><button value="Создать предмет(*)" action="bypass -h admin_create_item $itemid $itemnum $player" width=195 height=25 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Создать предмет всем игрокам" action="bypass -h admin_create_item_all $itemid $itemnum" width=195 height=25 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr></table>
</center><br>
<center>
<table>
<tr><td><center>Assets: <edit var="asset" width=70 height=11></center></td></tr>
</table><br>
<table>
<tr>
<td><button value="GM Shop" action="bypass -h admin_gmshop" width=95 height=23 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<table>
<tr>
<td><button value="Adena" action="bypass -h admin_create_item 57 $asset" width=95 height=23 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Ancient Adena" action="bypass -h admin_create_item 5575 $asset" width=95 height=23 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<table>
<tr>
<td><button value="Blue Seal Stones" action="bypass -h admin_create_item 6360 $asset" width=95 height=23 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Green Seal Stones" action="bypass -h admin_create_item 6361 $asset" width=95 height=23 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Red Seal Stones" action="bypass -h admin_create_item 6362 $asset" width=95 height=23 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
</center>
</body></html>
Открыть спойлер
data\scripts\commands\admin\AdminCreateItem.java
Код: package commands.admin;
import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.handler.AdminCommandHandler;
import l2p.gameserver.handler.IAdminCommandHandler;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ItemList;
import l2p.gameserver.serverpackets.NpcHtmlMessage;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.tables.ItemTable;
import l2p.util.Log;
import l2p.util.Rnd;
import l2p.util.Util;
import l2p.gameserver.model.L2ObjectsStorage;
public class AdminCreateItem implements IAdminCommandHandler, ScriptFile
{
private static enum Commands
{
admin_itemcreate,
admin_create_item,
admin_create_item_all,
admin_spreaditem
}
public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, L2Player activeChar)
{
Commands command = (Commands) comm;
if(!activeChar.getPlayerAccess().UseGMShop)
{
return false;
}
switch(command)
{
case admin_itemcreate:
activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/itemcreation.htm"));
break;
case admin_create_item:
try
{
if(wordList.length < 2)
{
activeChar.sendMessage("USAGE: create_item [id] [count]");
return false;
}
L2Player player;
int item_id = Integer.parseInt(wordList[1]);
long item_count = wordList.length < 3 ? 1 : Long.parseLong(wordList[2]);
if (wordList.length == 4)
{
String name = Util.joinStrings(" ", wordList, 3);
player = L2ObjectsStorage.getPlayer(name);
if (player==null)
{
activeChar.sendMessage("Персонаж, " + name + ", не был найден в игре.");
return false;
}
}
else player=activeChar;
createItem(player,activeChar, item_id, item_count);
}
catch(NumberFormatException nfe)
{
activeChar.sendMessage("USAGE: create_item id [count]");
}
activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/itemcreation.htm"));
break;
case admin_create_item_all:
try
{
if(wordList.length < 2)
{
activeChar.sendMessage("USAGE: create_item [id] [count]");
return false;
}
int item_id = Integer.parseInt(wordList[1]);
long item_count = wordList.length < 3 ? 1 : Long.parseLong(wordList[2]);
int count = 0;
for(L2Player player : L2ObjectsStorage.getAllPlayers())
{
if (player!=null)
if (player.isOnline())
createItem(player, player, item_id, item_count);
count++;
}
activeChar.sendMessage("Предметы выданы: " + count + " игрокам.");
}
catch(NumberFormatException nfe)
{
activeChar.sendMessage("USAGE: create_item [id] [count]");
}
activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/itemcreation.htm"));
break;
case admin_spreaditem:
try
{
int id = Integer.parseInt(wordList[1]);
int num = wordList.length > 2 ? Integer.parseInt(wordList[2]) : 1;
long count = wordList.length > 3 ? Long.parseLong(wordList[3]) : 1;
for(int i = 0; i < num; i++)
{
L2ItemInstance createditem = ItemTable.getInstance().createItem(id);
createditem.setCount(count);
createditem.dropToTheGround(activeChar, Rnd.coordsRandomize(activeChar, 100));
}
}
catch(NumberFormatException nfe)
{
activeChar.sendMessage("Specify a valid number.");
}
catch(StringIndexOutOfBoundsException e)
{
activeChar.sendMessage("Can't create this item.");
}
break;
}
return true;
}
public Enum[] getAdminCommandEnum()
{
return Commands.values();
}
private void createItem(L2Player activeChar, L2Player player, int id, long num)
{
L2ItemInstance createditem = ItemTable.getInstance().createItem(id);
createditem.setCount(num);
activeChar.getInventory().addItem(createditem);
Log.LogItem(activeChar, Log.Adm_AddItem, createditem);
if(!createditem.isStackable())
{
for(long i = 0; i < num - 1; i++)
{
createditem = ItemTable.getInstance().createItem(id);
activeChar.getInventory().addItem(createditem);
Log.LogItem(activeChar, Log.Adm_AddItem, createditem);
}
}
if (activeChar != player) player.sendMessage("Персонажу, " + activeChar.getName() + " было успешно добавленно " + num + " " + createditem.getName()+".");
activeChar.sendPacket(new ItemList(activeChar, true), SystemMessage.obtainItems(id, num, 0));
}
public void onLoad()
{
AdminCommandHandler.getInstance().registerAdminCommandHandler(this);
}
public void onReload()
{
}
public void onShutdown()
{
}
}
Добавлено через 6 минут
Делал для Фреи, тоже Феникса, потом переделал под сборку шайтана, подходит под любой Эпилог феникса.
.\data\html\admin\attribute.htm
<html>
<table width=260>
<tr>
<td width=40><button value="Main" action="bypass -h admin_admin" width=40 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
<td width=180><center>Enchant Menu</center></td>
<td width=40><button value="Back" action="bypass -h admin_admin" width=40 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
</tr>
</table>
<center>
<br>
<font color="LEVEL">Enchant Enhancement:</font><br>
<table width=300>
<tr>
<td width=150>Enchant Value 0-300 :</td>
<td><edit var="qbox" width=80 height=15></td>
</tr>
<tr>
<td width=150>Target Element:</td>
<td><combobox width=80 var="element" list="Fire;Water;Wind;Earth;Holy;Dark"></td>
</tr>
</table>
<br>
<table width=260>
<tr>
<td><button value="Helmet" action="bypass -h admin_setatreh $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Upper Earring" action="bypass -h admin_setatrle $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Chest" action="bypass -h admin_setatrec $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Lower Earring" action="bypass -h admin_setatrre $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Leggings" action="bypass -h admin_setatrel $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Necklace" action="bypass -h admin_setatren $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Gloves" action="bypass -h admin_setatreg $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Upper Ring" action="bypass -h admin_setatrlf $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Boots" action="bypass -h admin_setatreb $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Lower Ring" action="bypass -h admin_setatrrf $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Cloak" action="bypass -h admin_setatrba $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Shirt" action="bypass -h admin_setatrun $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Belt" action="bypass -h admin_setatrbe $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
<tr>
<td><button value="Weapon" action="bypass -h admin_setatrew $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
<td><button value="Shield / Sigil" action="bypass -h admin_setatres $qbox $element" width=85 height=20 back="L2UI_ct1.button_df_down" fore="L2UI_ct1.button_df"></td>
</tr>
</table>
</center>
</body></html>
.\data\scripts\commands\admin\AdminAttribute.java
Код: package commands.admin;
import javolution.text.TextBuilder;
import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.handler.AdminCommandHandler;
import l2p.gameserver.handler.IAdminCommandHandler;
import l2p.gameserver.model.L2Object;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.Inventory;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.InventoryUpdate;
import l2p.gameserver.serverpackets.NpcHtmlMessage;
import l2p.util.Log;
public class AdminAttribute implements IAdminCommandHandler, ScriptFile
{
private static enum Commands
{
admin_setatreh, // 6
admin_setatrec, // 10
admin_setatreg, // 9
admin_setatrel, // 11
admin_setatreb, // 12
admin_setatrew, // 7
admin_setatres, // 8
admin_setatrle, // 1
admin_setatrre, // 2
admin_setatrlf, // 4
admin_setatrrf, // 5
admin_setatren, // 3
admin_setatrun, // 0
admin_setatrbl, // 24
admin_attribute
}
public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, L2Player activeChar)
{
Commands command = (Commands) comm;
if(!activeChar.getPlayerAccess().CanEditChar)
return false;
int armorType = -1;
switch(command)
{
case admin_attribute:
showMainPage(activeChar);
return true;
case admin_setatreh:
armorType = Inventory.PAPERDOLL_HEAD;
break;
case admin_setatrec:
armorType = Inventory.PAPERDOLL_CHEST;
break;
case admin_setatreg:
armorType = Inventory.PAPERDOLL_GLOVES;
break;
case admin_setatreb:
armorType = Inventory.PAPERDOLL_FEET;
break;
case admin_setatrel:
armorType = Inventory.PAPERDOLL_LEGS;
break;
case admin_setatrew:
armorType = Inventory.PAPERDOLL_RHAND;
break;
case admin_setatres:
armorType = Inventory.PAPERDOLL_LHAND;
break;
case admin_setatrle:
armorType = Inventory.PAPERDOLL_LEAR;
break;
case admin_setatrre:
armorType = Inventory.PAPERDOLL_REAR;
break;
case admin_setatrlf:
armorType = Inventory.PAPERDOLL_LFINGER;
break;
case admin_setatrrf:
armorType = Inventory.PAPERDOLL_RFINGER;
break;
case admin_setatren:
armorType = Inventory.PAPERDOLL_NECK;
break;
case admin_setatrun:
armorType = Inventory.PAPERDOLL_UNDER;
break;
case admin_setatrbl:
armorType = Inventory.PAPERDOLL_BELT;
break;
}
if(armorType == -1 || wordList.length < 2 || activeChar.getInventory().getPaperdollItem(armorType)==null)
{
showMainPage(activeChar);
return true;
}
try
{
int ench = Integer.parseInt(wordList[1]);
byte element = -2;
if (wordList[2].equals("Fire")) element=0;
if (wordList[2].equals("Water")) element=1;
if (wordList[2].equals("Wind")) element=2;
if (wordList[2].equals("Earth")) element=3;
if (wordList[2].equals("Holy")) element=4;
if (wordList[2].equals("Dark")) element=5;
if (ench < 0 || ench > 450)
activeChar.sendMessage("You must set the enchant level for ARMOR to be between 0-300.");
else
setEnchant(activeChar, ench, element, armorType);
}
catch(StringIndexOutOfBoundsException e)
{
activeChar.sendMessage("Please specify a new enchant value.");
}
catch(NumberFormatException e)
{
activeChar.sendMessage("Please specify a valid new enchant value.");
}
// show the enchant menu after an action
showMainPage(activeChar);
return true;
}
private void setEnchant(L2Player activeChar, int value, byte element , int armorType)
{
L2Object target = activeChar.getTarget();
if(target == null)
target = activeChar;
if(!target.isPlayer())
{
activeChar.sendMessage("Wrong target type.");
return;
}
L2Player player = (L2Player) target;
L2ItemInstance item = player.getInventory().getPaperdollItem(armorType);
if(item != null)
{
item.setAttributeElement(element, value, true);
player.getInventory().refreshListeners();
player.sendPacket(new InventoryUpdate().addModifiedItem(item));
player.sendChanges();
}
}
private void showMainPage(L2Player activeChar)
{
activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/attribute.htm"));
}
public Enum[] getAdminCommandEnum()
{
return Commands.values();
}
public void onLoad()
{
AdminCommandHandler.getInstance().registerAdminCommandHandler(this);
}
public void onReload()
{}
public void onShutdown()
{}
}
Крейт айтм пашет а вот атрибута как небыло так и нет, как его запустить, мб он не в админ панели?)
Сообщений: 290
Тем: 23
Зарегистрирован: Aug 2009
Репутация:
116
attribute команда там есть
|