📄 gameconfig.pas
字号:
procedure CheckBoxHighLevelGroupFixExpClick(Sender: TObject);
procedure SpinEditLimitExpLevelChange(Sender: TObject);
procedure SpinEditLimitExpValueChange(Sender: TObject);
procedure SpinEditLimitMinOrderLevelChange(Sender: TObject);
private
boOpened: Boolean;
boModValued: Boolean;
procedure ModValue();
procedure uModValue();
procedure RefGameSpeedConf();
procedure RefCharStatusConf();
procedure RefGameVarConf();
{ Private declarations }
public
procedure Open();
{ Public declarations }
end;
var
frmGameConfig: TfrmGameConfig;
implementation
uses M2Share, HUtil32, SDK, ActionSpeedConfig;
{$R *.dfm}
{ TfrmGameConfig }
procedure TfrmGameConfig.FormCreate(Sender: TObject);
var
I: Integer;
begin
ComboBoxLineNoticeColor.Items.Add('红色');
ComboBoxLineNoticeColor.Items.Add('绿色');
ComboBoxLineNoticeColor.Items.Add('蓝色');
GridLevelExp.ColWidths[0] := 30;
GridLevelExp.ColWidths[1] := 100;
GridLevelExp.Cells[0, 0] := '等级';
GridLevelExp.Cells[1, 0] := '经验值';
for I := 1 to GridLevelExp.RowCount - 1 do begin
GridLevelExp.Cells[0, I] := IntToStr(I);
end;
ComboBoxLevelExp.AddItem('原始经验值', TObject(s_OldLevelExp));
ComboBoxLevelExp.AddItem('标准经验值', TObject(s_StdLevelExp));
ComboBoxLevelExp.AddItem('当前1/2倍经验', TObject(s_2Mult));
ComboBoxLevelExp.AddItem('当前1/5倍经验', TObject(s_5Mult));
ComboBoxLevelExp.AddItem('当前1/8倍经验', TObject(s_8Mult));
ComboBoxLevelExp.AddItem('当前1/10倍经验', TObject(s_10Mult));
ComboBoxLevelExp.AddItem('当前1/20倍经验', TObject(s_20Mult));
ComboBoxLevelExp.AddItem('当前1/30倍经验', TObject(s_30Mult));
ComboBoxLevelExp.AddItem('当前1/40倍经验', TObject(s_40Mult));
ComboBoxLevelExp.AddItem('当前1/50倍经验', TObject(s_50Mult));
ComboBoxLevelExp.AddItem('当前1/60倍经验', TObject(s_60Mult));
ComboBoxLevelExp.AddItem('当前1/70倍经验', TObject(s_70Mult));
ComboBoxLevelExp.AddItem('当前1/80倍经验', TObject(s_80Mult));
ComboBoxLevelExp.AddItem('当前1/90倍经验', TObject(s_90Mult));
ComboBoxLevelExp.AddItem('当前1/100倍经验', TObject(s_100Mult));
ComboBoxLevelExp.AddItem('当前1/150倍经验', TObject(s_150Mult));
ComboBoxLevelExp.AddItem('当前1/200倍经验', TObject(s_200Mult));
ComboBoxLevelExp.AddItem('当前1/250倍经验', TObject(s_250Mult));
ComboBoxLevelExp.AddItem('当前1/300倍经验', TObject(s_300Mult));
EditSoftVersionDate.Hint := '客户端版本日期设置,此参数默认为 20020522,此版本日期必须与客户端相匹配,否则在进入游戏时将提示版本不正确';
EditConsoleShowUserCountTime.Hint := '程序控制台上显示当前在线人数间隔时间,此参数默认为 10分钟。';
EditShowLineNoticeTime.Hint := '游戏中显示公告信息的间隔时间,此参数默认为 300秒。';
ComboBoxLineNoticeColor.Hint := '游戏中显示公告信息的文字颜色,此参数默认为 蓝色。';
EditLineNoticePreFix.Hint := '游戏中显示公告信息的文字行前缀文字。';
EditHitIntervalTime.Hint := '游戏中人物二次攻击间隔时间,此参数默认为 900毫秒。';
EditMagicHitIntervalTime.Hint := '游戏中人物二次魔法攻击间隔时间,此参数默认为 800毫秒。';
EditRunIntervalTime.Hint := '游戏中人物二次跑动间隔时间,此参数默认为 600毫秒。';
EditWalkIntervalTime.Hint := '游戏中人物二次走动间隔时间,此参数默认为 600毫秒。';
EditTurnIntervalTime.Hint := '游戏中人物二次变方向间隔时间,此参数默认为 600毫秒。';
EditItemSpeedTime.Hint := '装备加速属性速度控制,数字越小控制越严,此参数默认为 50毫秒。';
EditStruckTime.Hint := '人物被攻击后弯腰停留时间控制,此参数默认为 100毫秒。';
CheckBoxDisableStruck.Hint := '人物在被攻击后是否显示弯腰动作。';
GridLevelExp.Hint := '修改的经验在点击保存按钮后生效。';
ComboBoxLevelExp.Hint := '选择的经验计划,立即生效。';
EditKillMonExpMultiple.Hint := '人物杀怪物所得经验值倍,此参数默认为 1,此经验值以怪物数据库里的经验值为基准。';
CheckBoxHighLevelKillMonFixExp.Hint := '高等级人物杀怪经验是否保持不变,此参数默认为关闭(不打钩)。';
EditRepairDoorPrice.Hint := '维修城门所需费用,此参数默认为 2000000金币。';
EditRepairWallPrice.Hint := '维修城墙所需费用,此参数默认为 500000金币。';
EditHireArcherPrice.Hint := '雇用弓箭手所需费用,此参数默认为 300000金币。';
EditHireGuardPrice.Hint := '维修守卫所需费用,此参数默认为 300000金币。';
EditCastleGoldMax.Hint := '城堡内最高可存金币数量,此参数默认为 10000000金币。';
EditCastleOneDayGold.Hint := '城堡一天内最高收入上限,此参数默认为 2000000金币。';
EditCastleHomeMap.Hint := '行会回城点默认所在地图号,此参数默认地图号为 3,以城堡配置文件中的参数为准';
EditCastleHomeX.Hint := '行会回城点默认所在地图座标X,此参数默认座标为 644,以城堡配置文件中的参数为准';
EditCastleHomeY.Hint := '行会回城点默认所在地图座标Y,此参数默认座标为 290,以城堡配置文件中的参数为准';
EditCastleName.Hint := '城堡默认的名称,以城堡配置文件中的参数为准。';
EditWarRangeX.Hint := '攻城区域默认座标X范围大小,此参数默认为 100,以城堡配置文件中的参数为准';
EditWarRangeY.Hint := '攻城区域默认座标Y范围大小,此参数默认为 100,以城堡配置文件中的参数为准';
CheckBoxGetAllNpcTax.Hint := '是否收取所有交易NPC的交易税,此参数默认为关闭(不打钩)。';
EditTaxRate.Hint := '交易税率,此参为默认为 5,也就是 0.05%。';
{$IF SoftVersion = VERDEMO}
Caption := '游戏参数[演示版本,所有设置调整有效,但不能保存]'
{$IFEND}
end;
procedure TfrmGameConfig.GameConfigControlChanging(Sender: TObject;
var AllowChange: Boolean);
begin
if boModValued then begin
if Application.MessageBox('参数设置已经被修改,是否确认不保存修改的设置?', '确认信息', MB_YESNO + MB_ICONQUESTION) = IDYES then begin
uModValue
end else AllowChange := False;
end;
end;
procedure TfrmGameConfig.ModValue;
begin
boModValued := True;
ButtonGameSpeedSave.Enabled := True;
ButtonGeneralSave.Enabled := True;
ButtonExpSave.Enabled := True;
ButtonCastleSave.Enabled := True;
ButtonOptionSave0.Enabled := True;
ButtonOptionSave.Enabled := True;
ButtonOptionSave2.Enabled := True;
ButtonOptionSave3.Enabled := True;
ButtonTimeSave.Enabled := True;
ButtonPriceSave.Enabled := True;
ButtonMsgSave.Enabled := True;
ButtonMsgColorSave.Enabled := True;
ButtonHumanDieSave.Enabled := True;
ButtonCharStatusSave.Enabled := True;
end;
procedure TfrmGameConfig.uModValue;
begin
boModValued := False;
ButtonGameSpeedSave.Enabled := False;
ButtonGeneralSave.Enabled := False;
ButtonExpSave.Enabled := False;
ButtonCastleSave.Enabled := False;
ButtonOptionSave0.Enabled := False;
ButtonOptionSave.Enabled := False;
ButtonOptionSave2.Enabled := False;
ButtonOptionSave3.Enabled := False;
ButtonTimeSave.Enabled := False;
ButtonPriceSave.Enabled := False;
ButtonMsgSave.Enabled := False;
ButtonMsgColorSave.Enabled := False;
ButtonHumanDieSave.Enabled := False;
ButtonCharStatusSave.Enabled := False;
end;
procedure TfrmGameConfig.Open;
var
I: Integer;
begin
boOpened := False;
uModValue();
RefGameSpeedConf();
EditKillMonExpMultiple.Value := g_Config.dwKillMonExpMultiple;
CheckBoxHighLevelKillMonFixExp.Checked := g_Config.boHighLevelKillMonFixExp;
CheckBoxHighLevelGroupFixExp.Checked := g_Config.boHighLevelGroupFixExp;
EditRepairDoorPrice.Value := g_Config.nRepairDoorPrice;
EditRepairWallPrice.Value := g_Config.nRepairWallPrice;
EditHireArcherPrice.Value := g_Config.nHireArcherPrice;
EditHireGuardPrice.Value := g_Config.nHireGuardPrice;
EditCastleGoldMax.Value := g_Config.nCastleGoldMax;
EditCastleOneDayGold.Value := g_Config.nCastleOneDayGold;
EditCastleHomeMap.Text := g_Config.sCastleHomeMap;
EditCastleHomeX.Value := g_Config.nCastleHomeX;
EditCastleHomeY.Value := g_Config.nCastleHomeY;
EditCastleName.Text := g_Config.sCASTLENAME;
EditWarRangeX.Value := g_Config.nCastleWarRangeX;
EditWarRangeY.Value := g_Config.nCastleWarRangeY;
CheckBoxGetAllNpcTax.Checked := g_Config.boGetAllNpcTax;
EditTaxRate.Value := g_Config.nCastleTaxRate;
for I := 1 to GridLevelExp.RowCount - 1 do begin
GridLevelExp.Cells[1, I] := IntToStr(g_Config.dwNeedExps[I]);
end;
GroupBoxLevelExp.Caption := Format('升级经验(最高有效等级%d)', [MAXUPLEVEL]);
(*
{$IF SoftVersion = VERFREE}
GroupBoxLevelExp.Caption:='升级经验(最高有效等级255)';
{$ELSEIF SoftVersion = VERSTD}
GroupBoxLevelExp.Caption:='升级经验(最高有效等级350)';
{$ELSEIF SoftVersion = VEROEM}
GroupBoxLevelExp.Caption:='升级经验(最高有效等级350)';
{$ELSEIF SoftVersion = VERPRO}
GroupBoxLevelExp.Caption:='升级经验(最高有效等级450)';
{$ELSEIF SoftVersion = VERENT}
GroupBoxLevelExp.Caption:='升级经验(最高有效等级500)';
{$IFEND}
*)
CheckBoxDisHumRun.Checked := not g_Config.boDiableHumanRun;
CheckBoxRunHum.Checked := g_Config.boRUNHUMAN;
CheckBoxRunMon.Checked := g_Config.boRUNMON;
CheckBoxRunNpc.Checked := g_Config.boRunNpc;
CheckBoxRunGuard.Checked := g_Config.boRunGuard;
CheckBoxWarDisHumRun.Checked := g_Config.boWarDisHumRun;
CheckBoxGMRunAll.Checked := g_Config.boGMRunAll;
CheckBoxSafeArea.Checked := g_Config.boSafeAreaLimited;
CheckBoxDisHumRunClick(CheckBoxDisHumRun);
EditSafeZoneSize.Value := g_Config.nSafeZoneSize;
EditStartPointSize.Value := g_Config.nStartPointSize;
EditGroupMembersMax.Value := g_Config.nGroupMembersMax;
EditRedHomeMap.Text := g_Config.sRedHomeMap;
EditRedHomeX.Value := g_Config.nRedHomeX;
EditRedHomeY.Value := g_Config.nRedHomeY;
EditRedDieHomeMap.Text := g_Config.sRedDieHomeMap;
EditRedDieHomeX.Value := g_Config.nRedDieHomeX;
EditRedDieHomeY.Value := g_Config.nRedDieHomeY;
EditHomeMap.Text := g_Config.sHomeMap;
EditHomeX.Value := g_Config.nHomeX;
EditHomeY.Value := g_Config.nHomeY;
EditDecPkPointTime.Value := g_Config.dwDecPkPointTime div 1000;
EditDecPkPointCount.Value := g_Config.nDecPkPointCount;
EditPKFlagTime.Value := g_Config.dwPKFlagTime div 1000;
EditKillHumanAddPKPoint.Value := g_Config.nKillHumanAddPKPoint;
EditPosionDecHealthTime.Value := g_Config.dwPosionDecHealthTime;
EditPosionDamagarmor.Value := g_Config.nPosionDamagarmor;
CheckBoxTestServer.Checked := g_Config.boTestServer;
CheckBoxServiceMode.Checked := g_Config.boServiceMode;
CheckBoxVentureMode.Checked := g_Config.boVentureServer;
CheckBoxNonPKMode.Checked := g_Config.boNonPKServer;
EditStartPermission.Value := g_Config.nStartPermission;
EditTestLevel.Value := g_Config.nTestLevel;
EditTestGold.Value := g_Config.nTestGold;
EditTestUserLimit.Value := g_Config.nTestUserLimit;
EditUserFull.Value := g_Config.nUserFull;
CheckBoxTestServerClick(CheckBoxTestServer);
CheckBoxKillHumanWinLevel.Checked := g_Config.boKillHumanWinLevel;
CheckBoxKilledLostLevel.Checked := g_Config.boKilledLostLevel;
CheckBoxKillHumanWinExp.Checked := g_Config.boKillHumanWinExp;
CheckBoxKilledLostExp.Checked := g_Config.boKilledLostExp;
EditKillHumanWinLevel.Value := g_Config.nKillHumanWinLevel;
EditKilledLostLevel.Value := g_Config.nKilledLostLevel;
EditKillHumanWinExp.Value := g_Config.nKillHumanWinExp;
EditKillHumanLostExp.Value := g_Config.nKillHumanLostExp;
EditHumanLevelDiffer.Value := g_Config.nHumanLevelDiffer;
CheckBoxKillHumanWinLevelClick(CheckBoxKillHumanWinLevel);
CheckBoxKilledLostLevelClick(CheckBoxKilledLostLevel);
CheckBoxKillHumanWinExpClick(CheckBoxKillHumanWinExp);
CheckBoxKilledLostExpClick(CheckBoxKilledLostExp);
EditHumanMaxGold.Value := g_Config.nHumanMaxGold;
EditHumanTryModeMaxGold.Value := g_Config.nHumanTryModeMaxGold;
EditTryModeLevel.Value := g_Config.nTryModeLevel;
CheckBoxTryModeUseStorage.Checked := g_Config.boTryModeUseStorage;
EditSayMsgMaxLen.Value := g_Config.nSayMsgMaxLen;
EditSayRedMsgMaxLen.Value := g_Config.nSayRedMsgMaxLen;
EditCanShoutMsgLevel.Value := g_Config.nCanShoutMsgLevel;
CheckBoxShutRedMsgShowGMName.Checked := g_Config.boShutRedMsgShowGMName;
CheckBoxShowPreFixMsg.Checked := g_Config.boShowPreFixMsg;
EditGMRedMsgCmd.Text := g_GMRedMsgCmd;
EditStartCastleWarDays.Value := g_Config.nStartCastleWarDays;
EditStartCastlewarTime.Value := g_Config.nStartCastlewarTime;
EditShowCastleWarEndMsgTime.Value := g_Config.dwShowCastleWarEndMsgTime div (60 * 1000);
EditCastleWarTime.Value := g_Config.dwCastleWarTime div (60 * 1000);
EditGetCastleTime.Value := g_Config.dwGetCastleTime div (60 * 1000);
EditGuildWarTime.Value := g_Config.dwGuildWarTime div (60 * 1000);
EditMakeGhostTime.Value := g_Config.dwMakeGhostTime div 1000;
EditClearDropOnFloorItemTime.Value := g_Config.dwClearDropOnFloorItemTime div 1000;
EditSaveHumanRcdTime.Value := g_Config.dwSaveHumanRcdTime div (60 * 1000);
EditHumanFreeDelayTime.Value := g_Config.dwHumanFreeDelayTime div (60 * 1000);
EditFloorItemCanPickUpTime.Value := g_Config.dwFloorItemCanPickUpTime div 1000;
EditBuildGuildPrice.Value := g_Config.nBuildGuildPrice;
EditGuildWarPrice.Value := g_Config.nGuildWarPrice;
EditMakeDurgPrice.Value := g_Config.nMakeDurgPrice;
EditTryDealTime.Value := g_Config.dwTryDealTime div 1000;
EditDealOKTime.Value := g_Config.dwDealOKTime div 1000;
EditCastleMemberPriceRate.Value := g_Config.nCastleMemberPriceRate;
EditHearMsgFColor.Value := g_Config.btHearMsgFColor;
EdittHearMsgBColor.Value := g_Config.btHearMsgBColor;
EditWhisperMsgFColor.Value := g_Config.btWhisperMsgFColor;
EditWhisperMsgBColor.Value := g_Config.btWhisperMsgBColor;
EditGMWhisperMsgFColor.Value := g_Config.btGMWhisperMsgFColor;
EditGMWhisperMsgBColor.Value := g_Config.btGMWhisperMsgBColor;
EditRedMsgFColor.Value := g_Config.btRedMsgFColor;
EditRedMsgBColor.Value := g_Config.btRedMsgBColor;
EditGreenMsgFColor.Value := g_Config.btGreenMsgFColor;
EditGreenMsgBColor.Value := g_Config.btGreenMsgBColor;
EditBlueMsgFColor.Value := g_Config.btBlueMsgFColor;
EditBlueMsgBColor.Value := g_Config.btBlueMsgBColor;
EditCryMsgFColor.Value := g_Config.btCryMsgFColor;
EditCryMsgBColor.Value := g_Config.btCryMsgBColor;
EditGuildMsgFColor.Value := g_Config.btGuildMsgFColor;
EditGuildMsgBColor.Value := g_Config.btGuildMsgBColor;
EditGroupMsgFColor.Value := g_Config.btGroupMsgFColor;
EditGroupMsgBColor.Value := g_Config.btGroupMsgBColor;
EditCustMsgFColor.Value := g_Config.btCustMsgFColor;
EditCustMsgBColor.Value := g_Config.btCustMsgBColor;
CheckBoxPKLevelProtect.Checked := g_Config.boPKLevelProtect;
EditPKProtectLevel.Value := g_Config.nPKProtectLevel;
EditRedPKProtectLevel.Value := g_Config.nRedPKProtectLevel;
CheckBoxPKLevelProtectClick(CheckBoxPKLevelProtect);
CheckBoxCanNotGetBackDeal.Checked := g_Config.boCanNotGetBackDeal;
CheckBoxDisableDeal.Checked := g_Config.boDisableDeal;
CheckBoxControlDropItem.Checked := g_Config.boControlDropItem;
CheckBoxIsSafeDisableDrop.Checked := g_Config.boInSafeDisableDrop;
EditCanDropPrice.Value := g_Config.nCanDropPrice;
EditCanDropGold.Value := g_Config.nCanDropGold;
EditSuperRepairPriceRate.Value := g_Config.nSuperRepairPriceRate;
EditRepairItemDecDura.Value := g_Config.nRepairItemDecDura;
CheckBoxKillByMonstDropUseItem.Checked := g_Config.boKillByMonstDropUseItem;
CheckBoxKillByHumanDropUseItem.Checked := g_Config.boKillByHumanDropUseItem;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -