Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Значит ни как, если нет знаний или денегНаписал б я не их клиєнт зборку здесь скачал
private boolean _noble = true поставил true но ничого не далоChacterCreate
Скинь файл
нет такого файлаChacterCreate
CharacterCreate.java скинь в теле CODE.
package jf.gameserver.network.l2.c2s;
import jf.gameserver.Config;
import jf.gameserver.dao.CharacterDAO;
import jf.gameserver.data.QuestHolder;
import jf.gameserver.data.xml.holder.SkillAcquireHolder;
import jf.gameserver.listener.hooks.ListenerHook;
import jf.gameserver.listener.hooks.ListenerHookType;
import jf.gameserver.model.Player;
import jf.gameserver.model.actor.instances.player.ShortCut;
import jf.gameserver.model.SkillLearn;
import jf.gameserver.model.base.AcquireType;
import jf.gameserver.model.base.ClassId;
import jf.gameserver.model.base.ClassLevel;
import jf.gameserver.model.items.ItemInstance;
import jf.gameserver.model.quest.Quest;
import jf.gameserver.network.l2.GameClient;
import jf.gameserver.network.l2.s2c.CharacterCreateFail;
import jf.gameserver.network.l2.s2c.CharacterCreateSuccess;
import jf.gameserver.network.l2.s2c.CharacterSelectionInfo;
import jf.gameserver.tables.SkillTable;
import jf.gameserver.templates.player.PlayerTemplate;
import jf.gameserver.templates.item.StartItem;
import jf.gameserver.utils.ItemFunctions;
import jf.gameserver.utils.Util;
import java.io.File;
import jf.gameserver.utils.Log;
public class CharacterCreate extends L2GameClientPacket
{
// cSdddddddddddd
private String _name;
private int _sex;
private int _classId;
private int _hairStyle;
private int _hairColor;
private int _face;
@Override
protected void readImpl()
{
_name = readS();
readD(); // race
_sex = readD();
_classId = readD();
readD(); // int
readD(); // str
readD(); // con
readD(); // men
readD(); // dex
readD(); // wit
_hairStyle = readD();
_hairColor = readD();
_face = readD();
}
@Override
protected void runImpl()
{
for(ClassId cid : ClassId.VALUES)
if(cid.getId() == _classId && !cid.isOfLevel(ClassLevel.NONE))
return;
if(CharacterDAO.getInstance().accountCharNumber(getClient().getLogin()) >= 8)
{
sendPacket(CharacterCreateFail.REASON_TOO_MANY_CHARACTERS);
return;
}
if(!Util.isMatchingRegexp(_name, Config.CNAME_TEMPLATE))
{
sendPacket(CharacterCreateFail.REASON_16_ENG_CHARS);
return;
}
else if(CharacterDAO.getInstance().getObjectIdByName(_name) > 0)
{
sendPacket(CharacterCreateFail.REASON_NAME_ALREADY_EXISTS);
return;
}
if(_face > 0)
{
if(_face == 5)
{
System.out.println("Invis hack from "+_name+" ban this player!");
_face = 0;
}
}
Player newChar = Player.create(_classId, _sex, getClient().getLogin(), _name, _hairStyle, _hairColor, _face);
if(newChar == null)
return;
sendPacket(CharacterCreateSuccess.STATIC);
initNewChar(getClient(), newChar);
}
public static void initNewChar(Player newChar)
{
initNewChar(null, newChar);
}
public static void initNewChar(GameClient client, Player newChar)
{
PlayerTemplate template = newChar.getTemplate();
Player.restoreCharSubClasses(newChar);
if(Config.STARTING_ADENA > 0)
newChar.addAdena(Config.STARTING_ADENA);
newChar.setLoc(template.getStartLocation());
if(Config.CHAR_TITLE)
newChar.setTitle(Config.ADD_CHAR_TITLE);
else
newChar.setTitle("");
for(StartItem i : template.getStartItems())
{
ItemInstance item = ItemFunctions.createItem(i.getId());
long count = i.getCount();
if(item.isStackable())
{
item.setCount(count);
item.setEnchantLevel(i.getEnchantLevel());
newChar.getInventory().addItem(item);
}
else
{
for(long n = 0; n < count; n+:-)
{
item = ItemFunctions.createItem(i.getId());
item.setEnchantLevel(i.getEnchantLevel());
newChar.getInventory().addItem(item);
}
if(item.isEquipable() && i.isEquiped())
newChar.getInventory().equipItem(item);
}
if(item.getItemId() == 5588) // tutorial book
newChar.registerShortCut(new ShortCut(11, 0, ShortCut.TYPE_ITEM, item.getObjectId(), -1, 1));
}
for(ListenerHook hook : ListenerHook.getGlobalListenerHooks(ListenerHookType.PLAYER_CREATE))
hook.onPlayerCreate(newChar);
for(SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(newChar, AcquireType.NORMAL))
newChar.addSkill(SkillTable.getInstance().getInfo(skill.getId(), skill.getLevel()), true);
if(newChar.getSkillLevel(1001) > 0) // Soul Cry
newChar.registerShortCut(new ShortCut(1, 0, ShortCut.TYPE_SKILL, 1001, 1, 1));
if(newChar.getSkillLevel(1177) > 0) // Wind Strike
newChar.registerShortCut(new ShortCut(1, 0, ShortCut.TYPE_SKILL, 1177, 1, 1));
if(newChar.getSkillLevel(1216) > 0) // Self Heal
newChar.registerShortCut(new ShortCut(2, 0, ShortCut.TYPE_SKILL, 1216, 1, 1));
// add attack, take, sit shortcut
newChar.registerShortCut(new ShortCut(0, 0, ShortCut.TYPE_ACTION, 2, -1, 1));
newChar.registerShortCut(new ShortCut(3, 0, ShortCut.TYPE_ACTION, 5, -1, 1));
newChar.registerShortCut(new ShortCut(10, 0, ShortCut.TYPE_ACTION, 0, -1, 1));
// понял как на панельке отобразить. нц софт 10-11 панели сделали(by VISTALL)
// fly transform
newChar.registerShortCut(new ShortCut(0, ShortCut.PAGE_FLY_TRANSFORM, ShortCut.TYPE_SKILL, 911, 1, 1));
newChar.registerShortCut(new ShortCut(3, ShortCut.PAGE_FLY_TRANSFORM, ShortCut.TYPE_SKILL, 884, 1, 1));
newChar.registerShortCut(new ShortCut(4, ShortCut.PAGE_FLY_TRANSFORM, ShortCut.TYPE_SKILL, 885, 1, 1));
// air ship
newChar.registerShortCut(new ShortCut(0, ShortCut.PAGE_AIRSHIP, ShortCut.TYPE_ACTION, 70, 0, 1));
startTutorialQuest(newChar);
newChar.setCurrentHpMp(newChar.getMaxHp(), newChar.getMaxMp());
newChar.setCurrentCp(0); // retail
newChar.setOnlineStatus(false);
newChar.store(false);
newChar.getInventory().store();
newChar.deleteMe();
new File("./log/chars/"+newChar.getName()+"/").mkdir();
Log.LogEvent(newChar.getName(), newChar.getIP(), "charCreated", "created");
if(client != null)
client.setCharSelection(CharacterSelectionInfo.loadCharacterSelectInfo(client.getLogin()));
}
public static void startTutorialQuest(Player player)
{
Quest q = QuestHolder.getInstance().getQuest(255);
if(q != null)
q.newQuestState(player);
}
}