📄 database.pas
字号:
begin
DamageFixR[2] := 7;
DamageFixR[3] := 7;
DamageFixR[4] := 7;
DamageFixR[7] := 7;
end;
1131: {Ice Falchion}
begin
WeaponID := 1131;
WeaponSkillLv := 3;
WeaponSkill := 14;
SkillWeapon := true;
end;
1133: {Firebrand}
begin
WeaponID := 1133;
WeaponSkillLv := 3;
WeaponSkill := 19;
SkillWeapon := true;
end;
1167: {Schweizersabel}
begin
WeaponID := 1167;
WeaponSkillLv := 3;
WeaponSkill := 20;
SkillWeapon := true;
end;
1413: {Gungnir}
begin
GungnirEquipped := true;
end;
1468: {Zephyrus}
begin
WeaponID := 1468;
WeaponSkillLv := 3;
WeaponSkill := 21;
SkillWeapon := true;
end;
1470: {Brionic}
begin
WeaponID := 1470;
WeaponSkillLv := 3;
WeaponSkill := 13;
SkillWeapon := true;
end;
1471: {Hell Fire}
begin
WeaponID := 1471;
WeaponSkillLv := 3;
WeaponSkill := 17;
SkillWeapon := true;
end;
1528: {Grand Cross}
begin
WeaponID := 1528;
WeaponSkillLv := 3;
WeaponSkill := 77;
SkillWeapon := true;
end;
1164: LVL4WeaponASPD := true; {Muramasa}
1165: LVL4WeaponASPD := true; {Masamune}
1363: FastWalk := true; {Blood Axe}
1530: DoppelgagnerASPD := true;{Mjolnir}
1814: DoppelgagnerASPD := true; {Berserk Knuckle}
{ Oat says this makes you invincible when it shouldn't. Commented out Temporarily. }
//幽灵波利 卡片
4047: GhostArmor := true; {Ghostring Card}
//幽灵波利 卡片
4077: NoCastInterrupt := true;{Phen Card}
4147: SplashAttack := true; {Baphomet Card}
4123: UnlimitedEndure := true;{Eddgar Card}
4128: NoTarget := true; {Gold Thief Bug Card}
4131: FastWalk := true; {Moonlight Card}
4132: NoJamstone := true; {Mistress Card}
4144: FullRecover := true; {Osiris Card}
4148: LessSP := true; {Pharoh Card}
4135: OrcReflect := true; {Orc Lord Card}
4142: DoppelgagnerASPD := true;{Doppleganger Card}
4164: AnolianReflect := true; {Anolian Card}
4146: MagicReflect := true; {Maya Card}
4137: PerfectDamage := true; {Drake Card}
end;//case
end;
ItemDB.AddObject(td.ID, td);
ItemDBName.AddObject(td.Name, td);
end;
CloseFile(txt);
debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('-> Total %d item(s) database loaded.', [ItemDB.Count]));
Application.ProcessMessages;
{捛壛}
//傾僀僥儉摿庩掕媊
debugout.lines.add('[' + TimeToStr(Now) + '] ' + 'Special database loading...');
Application.ProcessMessages;
if FileExists(AppPath + 'database\special_db.txt') then begin
AssignFile(txt, AppPath + 'database\special_db.txt');
Reset(txt);
Readln(txt, str);
k := 0;
while not eof(txt) do begin
sl.Clear;
Readln(txt, str);
sl.DelimitedText := str;
j := StrToInt(sl[0]);
if j = 0 then continue;
i := ItemDB.IndexOf(j);
if i <> -1 then begin
td := ItemDB.Objects[i] as TItemDB;
with td do begin
for i :=1 to sl.Count - 1 do begin
//XYZZ
w := StrToInt(sl.Strings[i]);
if w > 10000 then begin
w := w - 10000;
AddSkill[w div 10] := w mod 10 + 1;
end else begin
//X = 1:庬懓 2:懏惈 3:僒僀僘
case ( w div 1000 ) of
//庬懓 Y = 0:柍宍 1:晄巰 2:摦暔 3:怉暔 4:崺拵 5:悈惐 6:埆杺 7:恖娫 8:揤巊 9:棾懓
1: DamageFixR[( w mod 1000 ) div 100] := w mod 100;
//懏惈 Y = 0:柍, 1:悈, 2:抧, 3:壩, 4:晽, 5:撆, 6:惞, 7:埮, 8:擮, 9:晄巰
2: DamageFixE[( w mod 1000 ) div 100] := w mod 100;
//僒僀僘 Y = 0:彫, 1:拞, 2:戝
3: DamageFixS[( w mod 1000 ) div 100] := w mod 100;
//忬懺1 Y = 01:愇壔 02:搥寢 03:僗僞儞 04:悋柊 05:LexA? 06:愇壔慜偺堏峴忬懺
4: SFixPer1[( w mod 1000 ) div 100 -1] := w mod 100;
//忬懺2 Y = 01:撆 02:庺偄 03:捑栙 04:崿棎丠 05:埫埮
5: SFixPer2[( w mod 1000 ) div 100 -1 ] := w mod 100;
6: begin //HP媧廂 XYYZ YY:媧廂検 Z:媧廂妋棪
DrainFix[0] := w mod 10;
DrainPer[0] := ( w mod 1000 ) div 10;
end;
7: begin //SP媧廂 XYYZ YY:媧廂検 Z:媧廂妋棪
DrainFix[1] := w mod 10;
DrainPer[1] := ( w mod 1000 ) div 10;
end;
8: begin //偦偺懠
case ( ( w mod 1000 ) div 100 ) of
0: SplashAttack := True;
1: NoJamstone := True;
else //壗傕偟側偄
end;
end;
else //壗傕偟側偄
end; // "case ( w div 1000 ) of"
end;
end; // "for i :=0 to 3 do"
end
end;
Inc(k);
end;
CloseFile(txt);
debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('-> Total %d item(s) database change.', [k]));
Application.ProcessMessages;
end else begin
debugout.lines.add('[' + TimeToStr(Now) + '] ' + '-> Special database Not Find.');
Application.ProcessMessages;
end;
{捛壛僐僐傑偱}
{傾僀僥儉惢憿捛壛}
//傾僀僥儉惢憿僨乕僞儀乕僗撉傒崬傒
debugout.lines.add('[' + TimeToStr(Now) + '] ' + 'MetalProcess database loading...');
Application.ProcessMessages;
AssignFile(txt, AppPath + 'database\metalprocess_db.txt');
Reset(txt);
Readln(txt, str);
while not eof(txt) do begin
sl.Clear;
Readln(txt, str);
sl.DelimitedText := str;
for i := sl.Count to 8 do
sl.Add('0');
for i := 0 to 8 do
if (i <> 0) and (sl.Strings[i] = '') then sl.Strings[i] := '0';
tma := TMaterialDB.Create;
with tma do begin
ID := StrToInt(sl.Strings[0]);
ItemLv := StrToInt(sl.Strings[1]);
RequireSkill := StrToInt(sl.Strings[2]);
for j := 0 to 2 do begin
MaterialID[j] := StrToInt(sl.Strings[3+j*2]);
MaterialAmount[j] := StrToInt(sl.Strings[4+j*2]);
end;
end;
MaterialDB.AddObject(tma.ID, tma);
end;
CloseFile(txt);
debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('-> Total %d metalprocess(s) database loaded.', [MaterialDB.Count]));
Application.ProcessMessages;
{傾僀僥儉惢憿捛壛僐僐傑偱}
//儌儞僗僞乕僨乕僞儀乕僗撉傒崬傒
debugout.lines.add('[' + TimeToStr(Now) + '] ' + 'Monster database loading...');
Application.ProcessMessages;
AssignFile(txt, AppPath + 'database\mob_db.txt');
Reset(txt);
Readln(txt, str);
while not eof(txt) do begin
sl.Clear;
Readln(txt, str);
sl.DelimitedText := str;
for i := sl.Count to 54 do
sl.Add('0');
for i := 0 to 54 do
if (i <> 1) and (i <> 2) and (sl.Strings[i] = '') then sl.Strings[i] := '0';
tb := TMobDB.Create;
//ID,Name,JName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,
//Range2,Range3,Scale,Race,Element,Mode,Speed,ADelay,aMotion,dMotion,
//Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,
//Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,
//Item1,Item2,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
with tb do begin
ID := StrToInt(sl.Strings[0]);
Name := sl.Strings[1];
JName := sl.Strings[2];
LV := StrToInt(sl.Strings[3]);
HP := StrToInt(sl.Strings[4]);
SP := StrToInt(sl.Strings[5]);
EXP := StrToInt(sl.Strings[6]);
JEXP := StrToInt(sl.Strings[7]);
Range1 := StrToInt(sl.Strings[8]);
ATK1 := StrToInt(sl.Strings[9]);
ATK2 := StrToInt(sl.Strings[10]);
DEF := StrToInt(sl.Strings[11]);
MDEF := StrToInt(sl.Strings[12]);
for j := 0 to 4 do Param[j] := StrToInt(sl.Strings[13+j]);
LUK := StrToInt(sl.Strings[18]);
Range2 := StrToInt(sl.Strings[19]);
Range3 := StrToInt(sl.Strings[20]);
Scale := StrToInt(sl.Strings[21]);
Race := StrToInt(sl.Strings[22]);
Element := StrToInt(sl.Strings[23]);
Mode := StrToInt(sl.Strings[24]);
Speed := StrToInt(sl.Strings[25]);
ADelay := StrToInt(sl.Strings[26]);
aMotion := StrToInt(sl.Strings[27]);
dMotion := StrToInt(sl.Strings[28]);
for j := 0 to 7 do begin
Drop[j].ID := StrToInt(sl.Strings[29+j*2]);
Drop[j].Per := StrToInt(sl.Strings[30+j*2]);
k := ItemDB.IndexOf(Drop[j].ID);
if k <> -1 then begin
Drop[j].Data := ItemDB.Objects[k] as TItemDB;
end else begin
k := ItemDB.IndexOf(512);
Drop[j].Data := ItemDB.Objects[k] as TItemDB;
Drop[j].ID := 512;
Drop[j].Per := 0;
end;
end;
Item1 := StrToInt(sl.Strings[45]);
Item2 := StrToInt(sl.Strings[46]);
MEXP := StrToInt(sl.Strings[47]);
MEXPPer := StrToInt(sl.Strings[48]);
for j := 0 to 2 do begin
MVPItem[j].ID := StrToInt(sl.Strings[49+j*2]);
MVPItem[j].Per := StrToInt(sl.Strings[50+j*2]);
end;
HIT := LV + Param[4];
FLEE := LV + Param[1];
isDontMove := boolean((Mode and 1) = 0);
isActive := boolean(((Mode and 4) <> 0) and not DisableMonsterActive);
isLoot := boolean((Mode and 2) <> 0);
isLink := boolean((Mode and 8) <> 0);
end;
MobDB.AddObject(tb.ID, tb);
MobDBName.AddObject(tb.Name, tb);
end;
CloseFile(txt);
debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('-> Total %d monster(s) database loaded.', [MobDB.Count]));
Application.ProcessMessages;
{巵{敔捛壛}
//巬僨乕僞儀乕僗撉傒崬傒
{Colus, 20040130: Since we put the pharmacy entires in the metalprocess we don't
need this here any more...}
{ChrstphrR - removed TPharmacyDB class and related code entirely, that Colus
was referring to}
{Aegis Monster Skills Load}
debugout.lines.add('[' + TimeToStr(Now) + '] ' + 'Nweiss Monster AI database loading...');
Application.ProcessMessages;
AssignFile(txt, AppPath + 'database\Monster_AI.txt');
Reset(txt);
Readln(txt, str);
{
AssignFile(txt2, 'Monster_AI.txt');
Rewrite(txt2);
Writeln(txt2, 'ID,Name,STATUS,SKILL_ID,SKILL_LV,PERCENT,CASTING_TIME,COOLDOWN_TIME,DISPEL,IF,IfCondition');
}
j := 1;
while not eof(txt) do begin
sl.Clear;
Readln(txt, str);
sl.DelimitedText := str;
for i := sl.Count to 9 do
sl.Add('0');
for i := 0 to 9 do
if (sl.Strings[i] = '') then sl.Strings[i] := '0';
tsAI2 := TMobAIDBFusion.Create;
if (sl.Strings[0] <> '//') and (sl.Strings[0] <> '') then begin
with tsAI2 do begin
tsAI2.ID := StrToInt(sl.Strings[0]);
tsAI2.Number := j;
tsAI2.Name := sl.Strings[1];
tsAI2.Status := sl.Strings[2];
tsAI2.SkillID := sl.Strings[3];
tsAI2.SkillLV := StrToInt(sl.Strings[4]);
tsAI2.Percent := StrToInt(sl.Strings[5]);
tsAI2.Cast_Time := StrToInt(sl.Strings[6]);
tsAI2.Cool_Time := StrToInt(sl.Strings[7]);
if (sl.Strings[7] = 'NO_DISPEL') or (sl.Strings[8] = '0') then begin
tsAI2.Dispel := sl.Strings[8];
tsAI2.IfState := sl.Strings[9];
tsAI2.IfCond := sl.Strings[10];
end else begin
tsAI2.Dispel := '0';
tsAI2.IfState := sl.Strings[8];
tsAI2.IfCond := sl.Strings[9];
end;
j := j + 1;
//debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('%d', [j]));
//Data Converting
{
if MobDBName.IndexOf(tsAI2.Name) <> -1 then begin
ts := MobDBName.Objects[MobDBName.IndexOf(tsAI2.Name)] as TMobDB;
str1 := IntToStr(ts.ID) + ',' + str;
str1 := IntToStr(ts.ID) + ',' + tsAI2.Name + ',' + tsAI2.Status + ',' + tsAI2.SkillID + ',' + IntToStr(tsAI2.SkillLv) + ',' + IntToStr(tsAI2.Percent) + ',' + IntToStr(tsAI2.Cast_Time) + ',' + IntToStr(tsAI2.Cool_Time) + ',' + tsAI2.Dispel + ',' + tsAI2.IfState + ',' + tsAI2.IfCond;
Writeln(txt2, str1);
end else if tsAI2.Name <> '0' then begin
str1 := 'ID ERROR' + ',' + tsAI2.Name;
Writeln(txt2, str1);
end;}
MobAIDBFusion.AddObject(tsAI2.Number, tsAI2);
end;
end;
end;
CloseFile(txt);
debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('-> Total %d Nweiss monster(s) skills loaded.', [MobAIDBFusion.Count]));
Application.ProcessMessages;
{Global Variables Load}
if not FileExists(AppPath + 'Global_Vars.txt') then begin
AssignFile(txt, AppPath + 'Global_Vars.txt');
Rewrite(txt);
Writeln(txt, '// Variable, Value');
CloseFile(txt);
end;
debugout.lines.add('[' + TimeToStr(Now) + '] ' + 'Global Variables loading...');
Application.ProcessMessages;
AssignFile(txt, AppPath + 'Global_Vars.txt');
Reset(txt);
Readln(txt, str);
while not eof(txt) do begin
sl.Clear;
Readln(txt, str);
sl.Delimiter := ',';
sl.DelimitedText := str;
tGlobal := TGlobalVars.Create;
if (sl.Strings[0] <> '//') and (sl.Strings[0] <> '') then begin
with tGlobal do begin
tGlobal.Variable := sl.Strings[0];
tGlobal.Value := StrToInt(sl.Strings[1]);
GlobalVars.AddObject(tGlobal.Variable, tGlobal);
end;
end;
end;
CloseFile(txt);
debugout.lines.add('[' + TimeToStr(Now) + '] ' + Format('-> Total %d Global Variables loaded.', [GlobalVars.Count]));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -