⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gameconfig.pas

📁 原版翎风(LF)引擎(M2)源码(Delphi)
💻 PAS
📖 第 1 页 / 共 5 页
字号:
  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;

  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('是否确认恢复默认设置?', '确认信息', 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;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -