Рейтинг темы:
  • 5 Голос(ов) - 4.2 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Работа над Goddess of Destruction (part 2)
вв распакованном варианте дллки все есть, но как сказал товарищ вистал не достаточно знать структуру - многое приходиться делать тупым перебором
А как задать цикл в структуре дат едитора?
Пытался так открывать тоже не как!
Код:
FS = "\t";
HEADER = 1;
RECCNT = OFF;
MTXCNT_OUT = 1;
MATCNT_OUT = 1;
ORD_IGNORE = 0;

{
   UINT item_id;
   UNICODE name;
   UNICODE additionalname;
   ASCF popup;
   INT description;
   UINT name_class;
   UINT setid_1;
   ASCF effect_1;
   UINT setid_2;
   UINT effect_2;
   UINT setid_3;
   ASCF effect_3;
   UINT set_enchant_count;
   ASCF set_enchant_effect;
}

На щёт тупого перебора!Я уже сутки тупо перебираю))
сложные файлы методом перебора никак не сделаеш.

Цитата:200BAA85 PUSH Engine.205909F8 UNICODE "questmark_begin"
200BAAFA PUSH Engine.20590A18 UNICODE "quest_id"
200BAB6D PUSH Engine.2058FCF8 UNICODE "npc_id"
200BABE0 PUSH Engine.20590A2C UNICODE "race_filter"
200BAC53 PUSH Engine.20590A44 UNICODE "class_filter"
200BACC6 PUSH Engine.20590A60 UNICODE "start_npc_loc"
200BAD39 PUSH Engine.20590A7C UNICODE "questmark_end"
200BADC5 PUSH Engine.20590970 UNICODE "FL2QuestMarkConditionDataManager::FL2QuestMarkConditionDataManager"

и орыгинал
[src=#xml]
<file pattern="questmarkconditiondata.dat">
<node name="data" reader="UINT"/>
<for name="data">
<node name="quest_id" reader="UINT" />
<node name="npc_id" reader="UINT" />
<node name="race_filter" reader="SHORT_SHORT" />
<for name="race_filter">
<node name="race" reader="UINT" />
</for>
<node name="class_filter" reader="SHORT_SHORT" />
<for name="class_filter">
<node name="class" reader="UINT" />
</for>
<node name="start_npc_x" reader="FLOAT" />
<node name="start_npc_y" reader="FLOAT" />
<node name="start_npc_z" reader="FLOAT" />
</for>
<node name="file_end" reader="ASCF" value="SafePackage" />
</file>
[/src]
VISTALL Написал:сложные файлы методом перебора никак не сделаеш.



и орыгинал
[src=#xml]
<file pattern="questmarkconditiondata.dat">
<node name="data" reader="UINT"/>
<for name="data">
<node name="quest_id" reader="UINT" />
<node name="npc_id" reader="UINT" />
<node name="race_filter" reader="SHORT_SHORT" />
<for name="race_filter">
<node name="race" reader="UINT" />
</for>
<node name="class_filter" reader="SHORT_SHORT" />
<for name="class_filter">
<node name="class" reader="UINT" />
</for>
<node name="start_npc_x" reader="FLOAT" />
<node name="start_npc_y" reader="FLOAT" />
<node name="start_npc_z" reader="FLOAT" />
</for>
<node name="file_end" reader="ASCF" value="SafePackage" />
</file>
[/src]

А что это у тебя за структуры интерестные!Каким едитором пользуешся? L2Dat_DecEnc ? Если да то не как не найду где структуры хранятся в нём!
l2j-ct Написал:А что это у тебя за структуры интерестные!Каким едитором пользуешся? L2Dat_DecEnc ? Если да то не как не найду где структуры хранятся в нём!

свою прогу Path Editor (наследний L2Dat_DecEnc), я признал устаревшим и пишу новую прогу, и структура с неё
Понятно!Ну эт плохо не могу перевод зделать!Хотя бы где структуры лежат в L2Dat_EncDec ? облазил много там нет!Файл эдитор знаю где а тут не найду!
Народ, поделитесь пожалуйста RequestActionUse.java :+25 Duals:
http://dump.ru/file/5246966 декодированый npcgrp.dat
Еще раз всем привет. Подскажите, где я ошибаюсь.

PHP код:
<?php 
package com
.l2jserver.gameserver.network.clientpackets;

import com.l2jserver.gameserver.network.serverpackets.ExIsCharNameCreatable;

public class
RequestCharacterNameCreatable extends L2GameClientPacket
{
protected
String _name;

@
Override
protected void readImpl()
{
_name = readS();
}

@
Override
protected void runImpl()
{
sendPacket(new ExIsCharNameCreatable());
}

@
Override
public String getType()
{
return
"[С] D0:B0 RequestCharacterNameCreatable".intern();
}
}

PHP код:
<?php 
package com
.l2jserver.gameserver.network.serverpackets;

public class
ExIsCharNameCreatable extends L2GameServerPacket
{
@
Override
protected void writeImpl()
{
writeC(0xfe);
writeH(0x10f);
writeD(0x01);
}

@
Override
public String getType()
{
return
"[S] FE:10F ExIsCharNameCreatable".intern();
}
}
CharSelectionInfo
PHP код:
<?php 
protected final void writeImpl()
{
writeC(0x09);
int size = (_characterPackages.length);
writeD(size);

// Can prevent players from creating new characters (if 0); (if 1, the client will ask if chars may be created (0x13) Response: (0x0D) )
writeD(0x07);
writeC(0x00);

long lastAccess = 0L;

if (
_activeId == -1)
{
for (
int i = 0; i < size; i++)
{
if (
lastAccess < _characterPackages[i].getLastAccess())
{
lastAccess = _characterPackages[i].getLastAccess();
_activeId = i;
}
}
}

for (
int i = 0; i < size; i++)
{
CharSelectInfoPackage charInfoPackage = _characterPackages[i];
writeS(charInfoPackage.getName());
writeD(charInfoPackage.getCharId());
writeS(_loginName);
writeD(_sessionId);
writeD(charInfoPackage.getClanId());
writeD(0x00); // ??
writeD(charInfoPackage.getSex());
writeD(charInfoPackage.getRace());
if (
charInfoPackage.getClassId() == charInfoPackage.getBaseClassId())
writeD(charInfoPackage.getClassId());
else
writeD(charInfoPackage.getBaseClassId());
writeD(0x01); // active ??
writeD(charInfoPackage.getX()); // x
writeD(charInfoPackage.getY()); // y
writeD(charInfoPackage.getZ()); // z
writeF(charInfoPackage.getCurrentHp()); // hp cur
writeF(charInfoPackage.getCurrentMp()); // mp cur
writeD(charInfoPackage.getSp());
writeQ(charInfoPackage.getExp());
writeF((float)(charInfoPackage.getExp() - Experience.LEVEL[charInfoPackage.getLevel()]) / (Experience.LEVEL[charInfoPackage.getLevel() + 1] - Experience.LEVEL[charInfoPackage.getLevel()])); // High Five exp %
writeD(charInfoPackage.getLevel());
writeD(charInfoPackage.getKarma()); // karma
writeD(charInfoPackage.getPkKills());
writeD(charInfoPackage.getPvPKills());
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_REAR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_NECK));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_CLOAK));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RBRACELET));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LBRACELET));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO1));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO2));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO3));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO4));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO5));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO6));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_BELT));
writeD(charInfoPackage.getHairStyle());
writeD(charInfoPackage.getHairColor());
writeD(charInfoPackage.getFace());
writeF(charInfoPackage.getMaxHp()); // hp max
writeF(charInfoPackage.getMaxMp()); // mp max
long deleteTime = charInfoPackage.getDeleteTimer();
int deletedays = 0;
if (
deleteTime > 0)
deletedays = (int)((deleteTime-System.currentTimeMillis())/1000);
writeD(deletedays); // days left before
// delete .. if != 0
// then char is inactive
writeD(charInfoPackage.getClassId());
if (
i == _activeId)
writeD(0x01);
else
writeD(0x00); //c3 auto-select char

writeC(charInfoPackage.getEnchantEffect() > 127 ? 127 : charInfoPackage.getEnchantEffect());
writeH(0);
writeH(0);
//writeD(charInfoPackage.getAugmentationId());


//writeD(charInfoPackage.getTransformId()); // Used to display Transformations
writeD(0x00); // Currently on retail when you are on character select you don't see your transformation.

// Freya by Vistall:
writeD(0); // npdid - 16024 Tame Tiny Baby Kookaburra A9E89C
writeD(0); // level
writeD(0); // ?
writeD(0); // food? - 1200
writeF(0); // max Hp
writeF(0); // cur Hp

// High Five by Vistall:
writeD(charInfoPackage.getVitalityPoints()); // H5 Vitality
}
}

В L2GamePacketHandler зарегистрировал RequestCharacterNameCreatable как B0 в In_Game.
PS. завал на работе( Прихожу домой и смотрю в один и тот же код и немогу понять где ошибаюсь.
Paka Написал:Еще раз всем привет. Подскажите, где я ошибаюсь.

PHP код:
<?php 
package com
.l2jserver.gameserver.network.clientpackets;

import com.l2jserver.gameserver.network.serverpackets.ExIsCharNameCreatable;

public class
RequestCharacterNameCreatable extends L2GameClientPacket
{
protected
String _name;

@
Override
protected void readImpl()
{
_name = readS();
}

@
Override
protected void runImpl()
{
sendPacket(new ExIsCharNameCreatable());
}

@
Override
public String getType()
{
return
"[С] D0:B0 RequestCharacterNameCreatable".intern();
}
}

PHP код:
<?php 
package com
.l2jserver.gameserver.network.serverpackets;

public class
ExIsCharNameCreatable extends L2GameServerPacket
{
@
Override
protected void writeImpl()
{
writeC(0xfe);
writeH(0x10f);
writeD(0x01);
}

@
Override
public String getType()
{
return
"[S] FE:10F ExIsCharNameCreatable".intern();
}
}
CharSelectionInfo
PHP код:
<?php 
protected final void writeImpl()
{
writeC(0x09);
int size = (_characterPackages.length);
writeD(size);

// Can prevent players from creating new characters (if 0); (if 1, the client will ask if chars may be created (0x13) Response: (0x0D) )
writeD(0x07);
writeC(0x00);

long lastAccess = 0L;

if (
_activeId == -1)
{
for (
int i = 0; i < size; i++)
{
if (
lastAccess < _characterPackages[i].getLastAccess())
{
lastAccess = _characterPackages[i].getLastAccess();
_activeId = i;
}
}
}

for (
int i = 0; i < size; i++)
{
CharSelectInfoPackage charInfoPackage = _characterPackages[i];
writeS(charInfoPackage.getName());
writeD(charInfoPackage.getCharId());
writeS(_loginName);
writeD(_sessionId);
writeD(charInfoPackage.getClanId());
writeD(0x00); // ??
writeD(charInfoPackage.getSex());
writeD(charInfoPackage.getRace());
if (
charInfoPackage.getClassId() == charInfoPackage.getBaseClassId())
writeD(charInfoPackage.getClassId());
else
writeD(charInfoPackage.getBaseClassId());
writeD(0x01); // active ??
writeD(charInfoPackage.getX()); // x
writeD(charInfoPackage.getY()); // y
writeD(charInfoPackage.getZ()); // z
writeF(charInfoPackage.getCurrentHp()); // hp cur
writeF(charInfoPackage.getCurrentMp()); // mp cur
writeD(charInfoPackage.getSp());
writeQ(charInfoPackage.getExp());
writeF((float)(charInfoPackage.getExp() - Experience.LEVEL[charInfoPackage.getLevel()]) / (Experience.LEVEL[charInfoPackage.getLevel() + 1] - Experience.LEVEL[charInfoPackage.getLevel()])); // High Five exp %
writeD(charInfoPackage.getLevel());
writeD(charInfoPackage.getKarma()); // karma
writeD(charInfoPackage.getPkKills());
writeD(charInfoPackage.getPvPKills());
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_REAR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_NECK));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_CLOAK));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RBRACELET));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_LBRACELET));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO1));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO2));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO3));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO4));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO5));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_DECO6));
writeD(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_BELT));
writeD(charInfoPackage.getHairStyle());
writeD(charInfoPackage.getHairColor());
writeD(charInfoPackage.getFace());
writeF(charInfoPackage.getMaxHp()); // hp max
writeF(charInfoPackage.getMaxMp()); // mp max
long deleteTime = charInfoPackage.getDeleteTimer();
int deletedays = 0;
if (
deleteTime > 0)
deletedays = (int)((deleteTime-System.currentTimeMillis())/1000);
writeD(deletedays); // days left before
// delete .. if != 0
// then char is inactive
writeD(charInfoPackage.getClassId());
if (
i == _activeId)
writeD(0x01);
else
writeD(0x00); //c3 auto-select char

writeC(charInfoPackage.getEnchantEffect() > 127 ? 127 : charInfoPackage.getEnchantEffect());
writeH(0);
writeH(0);
//writeD(charInfoPackage.getAugmentationId());


//writeD(charInfoPackage.getTransformId()); // Used to display Transformations
writeD(0x00); // Currently on retail when you are on character select you don't see your transformation.

// Freya by Vistall:
writeD(0); // npdid - 16024 Tame Tiny Baby Kookaburra A9E89C
writeD(0); // level
writeD(0); // ?
writeD(0); // food? - 1200
writeF(0); // max Hp
writeF(0); // cur Hp

// High Five by Vistall:
writeD(charInfoPackage.getVitalityPoints()); // H5 Vitality
}
}

В L2GamePacketHandler зарегистрировал RequestCharacterNameCreatable как B0 в In_Game.
PS. завал на работе( Прихожу домой и смотрю в один и тот же код и немогу понять где ошибаюсь.Надо не в In_game, а в AUTHED


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Работа над Goddess of Destruction (part 7) n3k0nation 459 174,238 03-21-2022, 04:21 PM
Последний пост: TieLay
  Помогите с Сервером L2Dream версии 439 для Lineage 2 Gracia Part 2 CAHTEX 4 3,379 10-01-2021, 02:40 PM
Последний пост: tenor
  Работа с камерой и Энтер чат FriendlyGhost 0 1,301 04-29-2018, 06:07 AM
Последний пост: FriendlyGhost
  Goddess of Destruction ( новая ветка от NcSoft ) Bacek 180 58,980 08-22-2017, 12:32 PM
Последний пост: BadStealth
  EmuRT Gracia part 2 ? knaif 3 1,622 02-08-2016, 01:19 PM
Последний пост: knaif
  Gracia Part 1 от l2emu исходы TFH 6 1,964 10-05-2015, 07:53 PM
Последний пост: G1ta0
  Ищу исходы L2-Dream gracia part 2 knaif 1 1,385 10-05-2015, 07:51 PM
Последний пост: G1ta0
  Оплачиваемая работа Grek1993 1 1,349 08-01-2015, 11:29 AM
Последний пост: ztaecz
  Работа над Goddess of Destruction (part 6) Ashe 1,274 471,507 07-11-2015, 08:00 PM
Последний пост: n3k0nation
  Работа с мультиселлом Evencelance 11 2,446 09-19-2014, 12:43 PM
Последний пост: Evencelance

Перейти к форуму:


Пользователи, просматривающие эту тему: 4 Гость(ей)