📄 gameconfig.pas
字号:
EditLineNoticePreFix.Hint:='Prefix to a line notice. default is [!]';
EditHitIntervalTime.Hint:='Hit speed interval - default is 900';
EditMagicHitIntervalTime.Hint:='Magic speed interval - default is 800';
EditRunIntervalTime.Hint:='Run speed interval - default is 600';
EditWalkIntervalTime.Hint:='Walk speed interval - default is 600';
EditTurnIntervalTime.Hint:='Dig speed interval - default is 600';
EditItemSpeedTime.Hint:='Item speed time - default is 50';
EditStruckTime.Hint:='Time stunned when hit - default - 100';
CheckBoxDisableStruck.Hint:='Disable to ability to hit yourself';
GridLevelExp.Hint:='Exp values needed to reach level';
ComboBoxLevelExp.Hint:='Mass alter EXP values for levels';
EditKillMonExpMultiple.Hint:='Mob EXP multiplier - default is 1 - use to globally increase EXP during an event';
CheckBoxHighLevelKillMonFixExp.Hint:='Fix the EXP for high level players - default is Off';
EditRepairDoorPrice.Hint:='Cost to repair castle door (Default: 2M)';
EditRepairWallPrice.Hint:='Cost to repair walls (Default : 500000)';
EditHireArcherPrice.Hint:='Cost to hire Archers (Default : 300000)';
EditHireGuardPrice.Hint:='Cost to hire Guards (Default : 300000)';
EditCastleGoldMax.Hint:='Maximum gold castle can have (Default : 10M)';
EditCastleOneDayGold.Hint:='Maximum gold castle can get in a single day (Default : 2M)';
EditCastleHomeMap.Hint:='War and castle map (Default : 3)';
EditCastleHomeX.Hint:='X Co-ord for Teleport home and war origin point (Default : 644)';
EditCastleHomeY.Hint:='Y Co-ord for Teleport home and war origin point (Default : 290)';
EditCastleName.Hint:='This is the name given to the castle for war';
EditWarRangeX.Hint:='Distance of cells on the X axis a war will affect (Default : 100)';
EditWarRangeY.Hint:='Distance of cells on the Y axis a war will affect (Default : 100)';
CheckBoxGetAllNpcTax.Hint:='Tax all NPCs by the set amount to add funds to castle';
EditTaxRate.Hint:='Rate to apply tax to items cost 5=0.5% (Default: 5)';
end;
procedure TfrmGameConfig.GameConfigControlChanging(Sender: TObject;
var AllowChange: Boolean);
begin
if boModValued then begin
if Application.MessageBox('Save changes (Close window to cancel changes)?','Save now?',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;
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]);
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;
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;
CheckBoxDieScatterBag.Checked:=g_Config.boDieScatterBag;
CheckBoxDieDropGold.Checked:=g_Config.boDieDropGold;
CheckBoxDieRedScatterBagAll.Checked:=g_Config.boDieRedScatterBagAll;
ScrollBarDieDropUseItemRate.Min:=1;
ScrollBarDieDropUseItemRate.Max:=200;
ScrollBarDieDropUseItemRate.Position:=g_Config.nDieDropUseItemRate;
ScrollBarDieRedDropUseItemRate.Min:=1;
ScrollBarDieRedDropUseItemRate.Max:=200;
ScrollBarDieRedDropUseItemRate.Position:=g_Config.nDieRedDropUseItemRate;
ScrollBarDieScatterBagRate.Min:=1;
ScrollBarDieScatterBagRate.Max:=200;
ScrollBarDieScatterBagRate.Position:=g_Config.nDieScatterBagRate;
EditSayMsgTime.Value:=g_Config.dwSayMsgTime div 1000;
EditSayMsgCount.Value:=g_Config.nSayMsgCount;
EditDisableSayMsgTime.Value:=g_Config.dwDisableSayMsgTime div 1000;
RefGameVarConf();
RefCharStatusConf();
boOpened:=True;
GameConfigControl.ActivePageIndex:=0;
ShowModal;
end;
procedure TfrmGameConfig.RefGameSpeedConf;
begin
EditHitIntervalTime.Value:=g_Config.dwHitIntervalTime;
EditMagicHitIntervalTime.Value:=g_Config.dwMagicHitIntervalTime;
EditRunIntervalTime.Value:=g_Config.dwRunIntervalTime;
EditWalkIntervalTime.Value:=g_Config.dwWalkIntervalTime;
EditTurnIntervalTime.Value:=g_Config.dwTurnIntervalTime;
EditItemSpeedTime.Value:=g_Config.ClientConf.btItemSpeed;
EditMaxHitMsgCount.Value:=g_Config.nMaxHitMsgCount;
EditMaxSpellMsgCount.Value:=g_Config.nMaxSpellMsgCount;
EditMaxRunMsgCount.Value:=g_Config.nMaxRunMsgCount;
EditMaxWalkMsgCount.Value:=g_Config.nMaxWalkMsgCount;
EditMaxTurnMsgCount.Value:=g_Config.nMaxTurnMsgCount;
EditMaxDigUpMsgCount.Value:=g_Config.nMaxDigUpMsgCount;
CheckBoxboKickOverSpeed.Checked:=g_Config.boKickOverSpeed;
EditOverSpeedKickCount.Value:=g_Config.nOverSpeedKickCount;
EditDropOverSpeed.Value:=g_Config.dwDropOverSpeed;
CheckBoxboKickOverSpeedClick(CheckBoxboKickOverSpeed);
CheckBoxSpellSendUpdateMsg.Checked:=g_Config.boSpellSendUpdateMsg;
CheckBoxActionSendActionMsg.Checked:=g_Config.boActionSendActionMsg;
if g_Config.btSpeedControlMode = 0 then begin
RadioButtonDelyMode.Checked:=True;
RadioButtonFilterMode.Checked:=False;
end else begin
RadioButtonDelyMode.Checked:=False;
RadioButtonFilterMode.Checked:=True;
end;
CheckBoxDisableStruck.Checked:=g_Config.boDisableStruck;
CheckBoxDisableSelfStruck.Checked:=g_Config.boDisableSelfStruck;
EditStruckTime.Value:=g_Config.dwStruckTime;
end;
procedure TfrmGameConfig.ButtonGameSpeedDefaultClick(Sender: TObject);
begin
if Application.MessageBox('Are you sure you want to reset this page to default values?', 'Reset?', MB_YESNO + MB_ICONQUESTION) <> IDYES then begin
exit;
end;
g_Config.dwHitIntervalTime:=850;
g_Config.dwMagicHitIntervalTime:=1350;
g_Config.dwRunIntervalTime:=600;
g_Config.dwWalkIntervalTime:=600;
g_Config.dwTurnIntervalTime:=600;
g_Config.nMaxHitMsgCount:=1;
g_Config.nMaxSpellMsgCount:=1;
g_Config.nMaxRunMsgCount:=1;
g_Config.nMaxWalkMsgCount:=1;
g_Config.nMaxTurnMsgCount:=1;
g_Config.nMaxDigUpMsgCount:=1;
g_Config.nOverSpeedKickCount:=2;
g_Config.dwDropOverSpeed:=200;
g_Config.boKickOverSpeed:=True;
g_Config.ClientConf.btItemSpeed:=25;
g_Config.boDisableStruck:=False;
g_Config.boDisableSelfStruck:=False;
g_Config.dwStruckTime:=300;
g_Config.boSpellSendUpdateMsg:=True;
g_Config.boActionSendActionMsg:=True;
g_Config.btSpeedControlMode:=0;
RefGameSpeedConf();
ModValue();
end;
procedure TfrmGameConfig.ButtonGameSpeedSaveClick(Sender: TObject);
begin
Config.WriteInteger('Setup','HitIntervalTime',g_Config.dwHitIntervalTime);
Config.WriteInteger('Setup','MagicHitIntervalTime', g_Config.dwMagicHitIntervalTime);
Config.WriteInteger('Setup','RunIntervalTime', g_Config.dwRunIntervalTime);
Config.WriteInteger('Setup','WalkIntervalTime', g_Config.dwWalkIntervalTime);
Config.WriteInteger('Setup','TurnIntervalTime', g_Config.dwTurnIntervalTime);
Config.WriteInteger('Setup','ItemSpeedTime',g_Config.ClientConf.btItemSpeed);
Config.WriteInteger('Setup','MaxHitMsgCount',g_Config.nMaxHitMsgCount);
Config.WriteInteger('Setup','MaxSpellMsgCount',g_Config.nMaxSpellMsgCount);
Config.WriteInteger('Setup','MaxRunMsgCount',g_Config.nMaxRunMsgCount);
Config.WriteInteger('Setup','MaxWalkMsgCount',g_Config.nMaxWalkMsgCount);
Config.WriteInteger('Setup','MaxTurnMsgCount',g_Config.nMaxTurnMsgCount);
Config.WriteInteger('Setup','MaxSitDonwMsgCount', g_Config.nMaxSitDonwMsgCount);
Config.WriteInteger('Setup','MaxDigUpMsgCount', g_Config.nMaxDigUpMsgCount);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -