its bugged.. look
collision_radius={52 collision_height={86
This is a discussion on NPCData C4 -> C1 within the Old L2 Releases forums, part of the L2Off Archives category; I made a little program to convert C4's npcdata to C1, I thought it may help someone :D Here is ...
I made a little program to convert C4's npcdata to C1, I thought it may help someone :D
Here is the source (C#):
Comments are welcome :PCode:using System; using System.IO; namespace NPCDataC4C1 { class Class1 { static void Main(string[] args) { long lg=0,i,j; string[][]c4=new string[7000][]; string ori,fix; Console.WriteLine("Original C4 file?"); ori=Console.ReadLine(); Console.WriteLine("New C1 file?"); fix=Console.ReadLine(); FileStream fs2 = new FileStream(fix,FileMode.Create,FileAccess.Write); StreamWriter sw = new StreamWriter(fs2); FileStream fs = new FileStream(ori,FileMode.Open,FileAccess.Read); StreamReader sr = new StreamReader(fs); Console.Write("Reading..."); while(sr.Peek()!=-1) { c4[lg]=C4C1(sr.ReadLine().Split('\t')); lg++; ** lg--; Console.WriteLine(" done.\nWriting..."); for(i=0;i<lg;i++) { for(j=0;j<c4[i].Length;j++) { sw.Write(c4[i][j]); if(j+1<c4[i].Length) sw.Write('\t'); ** sw.Write('\n'); ** sr.Close(); fs.Close(); sw.Close(); fs2.Close(); ** static string[] C4C1(string[]t) { string[]n=new string[82]; n[0]=t[0]; n[1]=t[1]; n[2]=t[2]; n[3]=t[3]; n[4]=t[4]; n[5]=t[28]; n[6]=t[5]; n[7]=t[21]; n[8]=t[22]; n[9]=t[6]; n[10]=t[19]; n[11]=t[20]; n[12]="temper=100"; n[13]=t[63]; n[14]="org_jump=15"; n[15]=t[16]; n[16]="magic_list={**"; n[17]="max_item=50"; n[18]=t[57]; n[19]=t[58]; n[20]=t[59]; n[21]=t[60]; n[22]=t[11]; n[23]=t[12]; n[24]=t[13]; n[25]=t[41]; n[26]="base_can_penetrate=0"; n[27]=t[42]; n[28]=t[43]; n[29]=t[44]; n[30]=t[35]; n[31]=t[36]; n[32]=t[37]; n[33]=t[38]; n[34]=t[39]; n[35]=t[40]; n[36]=t[61]; n[37]=t[62]; n[38]=t[30]; n[39]=t[32]; n[40]=t[27]; n[41]=t[26]; n[42]="underwater_low={50;0;10**"; n[43]="underwater_high={0;0;30**"; n[44]="fly_low={0;0;10**"; n[45]="fly_high={0;-30;30**"; n[46]="float_low={0;0;10**"; n[47]="float_high={0;-30;30**"; n[48]="org_earshot=100"; n[49]="sight={0;0;2500;120;5**"; n[50]=t[25]; n[51]=t[29]; n[52]=t[31]; n[53]=t[51]; n[54]=t[50]; n[55]=t[52]; n[56]=t[45]; n[57]=t[47]; n[58]=t[53]; n[59]=t[48]; n[60]=t[49]; n[61]=t[46]; n[62]="magic_use_speed_modify=0"; n[63]="status={normal**"; n[64]="align=-1"; n[65]=FixHeight(t[33]); n[66]=FixHeight(t[34]); n[67]=t[18]; n[68]=t[8]; n[69]=t[10]; n[70]="guild={**"; n[71]="pledge={**"; n[72]="pledge_leader=0"; n[73]="alliance={**"; n[74]="alliance_leader=0"; n[75]=t[9]; n[76]="ruler=0"; n[77]="ruling_domain={**"; n[78]=FixAI(t[17]); n[79]=t[23]; n[80]=t[24]; n[81]=t[64]; return n; ** static string FixHeight(string s) { string n=""; int i; for(i=0;i<18;i++) n+=s[i]; while(i<s.Length&&s[i]!=';') { n+=s[i]; i++; ** return n+='**'; ** static string FixAI(string s) { string n=""; int i; for(i=0;i<8;i++) n+=s[i]; while(i<s.Length&&s[i]!=';') { n+=s[i]; i++; ** if(i<s.Length) n+='**'; return n; ** ** **
Last edited by RubenGM; 17-07-06 at 09:33 AM.
its bugged.. look
collision_radius={52 collision_height={86
I like RZ :trumpet:
Ooops... fixed :P
can you make itemdata convertor? +))
Itemdata converter already shared on pp. ;)
can somebody share converted data?