Quote:
Originally Posted by Xsense
and what the issues of the data files are.
|
first what do it make (npcpos.txt) ?
read that
PHP Code:
TxtFile.ReadFromFile(@"\data\npcpos.txt", '\t');
string s = null;
int count = TxtFile.amountLine;
uint index = 100;
int mobx = 1;
npcpos.txt like the auto spawn (x & y) of mobs & npcs ,,,
PHP Code:
if (race == 1) mobx = 1;
else mobx = 1;
for (int i = 1; i <= mobx; i++)
{
obj o = new obj();
index++;
short AREA = short.Parse(TxtFile.commands[1]);
double x = Convert.ToDouble(TxtFile.commands[2].Replace('.', ','));
double z = Convert.ToDouble(TxtFile.commands[3].Replace('.', ','));
double y = Convert.ToDouble(TxtFile.commands[4].Replace('.', ','));
byte movement = 0;
o.Agresif = movement;
o.AutoMovement = true;
if (ID == 1979 || ID == 2101 || ID == 2124 || ID == 2111 || ID == 2112) o.AutoMovement = false;
o.OrgMovement = o.AutoMovement;
if (o.AutoMovement) o.StartRunTimer(Global.RandomID.GetRandom(7000,20000));
o.ID = ID;
o.Ids = new Global.ID(Global.ID.IDS.Object);
o.UniqueID = o.Ids.GetUniqueID;
o.area = AREA;
o.xSec = Convert.ToByte((AREA).ToString("X4").Substring(2, 2), 16);
o.ySec = Convert.ToByte((AREA).ToString("X4").Substring(0, 2), 16);
o.x = (o.xSec - 135) * 192 + (x) / 10;
o.z = z;
o.y = (o.ySec - 92) * 192 + (y) / 10;
o.oX = o.x;
o.oY = o.y;
o.State = 1;
o.Move = 1;
o.LocalType = race;
o.AutoSpawn = true;
o.State = 2;
o.HP = Data.ObjectBase[ID].HP;
o.Kat = 1;
o.Agro = new List<_agro>();
o.spawnOran = 20;
if (Data.ObjectBase[ID].ObjectType != 3)
{
o.Type = Systems.RandomType(Data.ObjectBase[ID].Level, ref o.Kat);
o.HP *= o.Kat;
if (o.Type == 1) o.Agresif = 1;
Systems.Objects.Add(o);
}
else { o.AutoSpawn = false; o.Type = Data.ObjectBase[ID].ObjectType; GlobalUnique.AddObject(o); }
}
}
Print.Format("{0} non-player objektum betöltése..", TxtFile.amountLine);
}
public static void ObjectDataBase(string path)
{
TxtFile.ReadFromFile(path, '\t');
string s = null;
int count = TxtFile.amountLine;
for (int l = 0; l <= TxtFile.amountLine - 1; l++)
{
s = TxtFile.lines[l].ToString();
TxtFile.commands = s.Split('\t');
int ID = Convert.ToInt32(TxtFile.commands[1]);
objectdata o = new objectdata();
o.ID = ID;
o.Name = TxtFile.commands[2];
/*if (o.Name == "MOB_CH_MANGNYANG")
{
for (int i = 0; i <= TxtFile.commands.Length - 1; i++)
Console.WriteLine(" {0} {1}", i, TxtFile.commands[i]);
}*/
/*if (ID == 2004 || ID == 2009)
{
for (int i = 0; i <= TxtFile.commands.Length - 1; i++)
Console.WriteLine(" {0} {1}", i, TxtFile.commands[i]);
}*/
o.Level = Convert.ToByte(TxtFile.commands[57]);
o.Exp = Convert.ToInt32(TxtFile.commands[79]);
o.HP = Convert.ToInt32(TxtFile.commands[59]);
o.Type = Convert.ToByte(TxtFile.commands[11]);
o.ObjectType = Convert.ToByte(TxtFile.commands[15]);
o.PhyDef = Convert.ToInt32(TxtFile.commands[71]);
o.MagDef = Convert.ToInt32(TxtFile.commands[72]);
o.HitRatio = Convert.ToInt32(TxtFile.commands[75]);
o.ParryRatio = Convert.ToInt32(TxtFile.commands[77]);
o.Agresif = Convert.ToByte(TxtFile.commands[93]);
o.Skill = new int[9];
for (byte sk = 0; sk <= 8; sk++)
{
if (Convert.ToInt32(TxtFile.commands[83 + sk]) != 0 && Data.SkillBase[Convert.ToInt32(TxtFile.commands[83 + sk])].Per != 0)
{
o.Skill[o.amountSkill] = Convert.ToInt32(TxtFile.commands[83 + sk]);
o.amountSkill++;
}
}
Data.ObjectBase[ID] = o;
}
Print.Format("{0} Object információk betöltése innen: {1}", TxtFile.amountLine, path);
}
not npcs spawn only ...
and characterdata$.txt (all characterdata) are for mobs or database mobs ,,
secound the all data folder's file are like a complete database of mobs , npcs , mastery , etc.