📄 gamecommand.pas
字号:
'开启/关闭登录锁');
exit;
StringGridGameCmd.Cells[0,12]:=g_GameCommand.DIARY.sCmd;
StringGridGameCmd.Cells[1,12]:=IntToStr(g_GameCommand.DIARY.nPermissionMin);
StringGridGameCmd.Cells[2,12]:='@' + g_GameCommand.DIARY.sCmd;
StringGridGameCmd.Objects[0,12]:=TObject(@g_GameCommand.DIARY);
StringGridGameCmd.Cells[0,13]:=g_GameCommand.USERMOVE.sCmd;
StringGridGameCmd.Cells[1,13]:=IntToStr(g_GameCommand.USERMOVE.nPermissionMin);
StringGridGameCmd.Cells[2,13]:='@' + g_GameCommand.USERMOVE.sCmd;
StringGridGameCmd.Objects[0,13]:=TObject(@g_GameCommand.USERMOVE);
StringGridGameCmd.Cells[0,14]:=g_GameCommand.SEARCHING.sCmd;
StringGridGameCmd.Cells[1,14]:=IntToStr(g_GameCommand.SEARCHING.nPermissionMin);
StringGridGameCmd.Cells[2,14]:='@' + g_GameCommand.SEARCHING.sCmd;
StringGridGameCmd.Objects[0,14]:=TObject(@g_GameCommand.SEARCHING);
StringGridGameCmd.Cells[0,15]:=g_GameCommand.ALLOWGROUPCALL.sCmd;
StringGridGameCmd.Cells[1,15]:=IntToStr(g_GameCommand.ALLOWGROUPCALL.nPermissionMin);
StringGridGameCmd.Cells[2,15]:='@' + g_GameCommand.ALLOWGROUPCALL.sCmd;
StringGridGameCmd.Objects[0,15]:=TObject(@g_GameCommand.ALLOWGROUPCALL);
StringGridGameCmd.Cells[0,16]:=g_GameCommand.GROUPRECALLL.sCmd;
StringGridGameCmd.Cells[1,16]:=IntToStr(g_GameCommand.GROUPRECALLL.nPermissionMin);
StringGridGameCmd.Cells[2,16]:='@' + g_GameCommand.GROUPRECALLL.sCmd;
StringGridGameCmd.Objects[0,16]:=TObject(@g_GameCommand.GROUPRECALLL);
StringGridGameCmd.Cells[0,17]:=g_GameCommand.ALLOWGUILDRECALL.sCmd;
StringGridGameCmd.Cells[1,17]:=IntToStr(g_GameCommand.ALLOWGUILDRECALL.nPermissionMin);
StringGridGameCmd.Cells[2,17]:='@' + g_GameCommand.ALLOWGUILDRECALL.sCmd;
StringGridGameCmd.Objects[0,17]:=TObject(@g_GameCommand.ALLOWGUILDRECALL);
StringGridGameCmd.Cells[0,18]:=g_GameCommand.GUILDRECALLL.sCmd;
StringGridGameCmd.Cells[1,18]:=IntToStr(g_GameCommand.GUILDRECALLL.nPermissionMin);
StringGridGameCmd.Cells[2,18]:='@' + g_GameCommand.GUILDRECALLL.sCmd;
StringGridGameCmd.Objects[0,18]:=TObject(@g_GameCommand.GUILDRECALLL);
StringGridGameCmd.Cells[0,19]:=g_GameCommand.UNLOCKSTORAGE.sCmd;
StringGridGameCmd.Cells[1,19]:=IntToStr(g_GameCommand.UNLOCKSTORAGE.nPermissionMin);
StringGridGameCmd.Cells[2,19]:='@' + g_GameCommand.UNLOCKSTORAGE.sCmd;
StringGridGameCmd.Objects[0,19]:=TObject(@g_GameCommand.UNLOCKSTORAGE);
StringGridGameCmd.Cells[0,20]:=g_GameCommand.UNLOCK.sCmd;
StringGridGameCmd.Cells[1,20]:=IntToStr(g_GameCommand.UNLOCK.nPermissionMin);
StringGridGameCmd.Cells[2,20]:='@' + g_GameCommand.UNLOCK.sCmd;
StringGridGameCmd.Objects[0,20]:=TObject(@g_GameCommand.UNLOCK);
StringGridGameCmd.Cells[0,21]:=g_GameCommand.LOCK.sCmd;
StringGridGameCmd.Cells[1,21]:=IntToStr(g_GameCommand.LOCK.nPermissionMin);
StringGridGameCmd.Cells[2,21]:='@' + g_GameCommand.LOCK.sCmd;
StringGridGameCmd.Objects[0,21]:=TObject(@g_GameCommand.LOCK);
StringGridGameCmd.Cells[0,22]:=g_GameCommand.SETPASSWORD.sCmd;
StringGridGameCmd.Cells[1,22]:=IntToStr(g_GameCommand.SETPASSWORD.nPermissionMin);
StringGridGameCmd.Cells[2,22]:='@' + g_GameCommand.SETPASSWORD.sCmd;
StringGridGameCmd.Objects[0,22]:=TObject(@g_GameCommand.SETPASSWORD);
StringGridGameCmd.Cells[0,23]:=g_GameCommand.CHGPASSWORD.sCmd;
StringGridGameCmd.Cells[1,23]:=IntToStr(g_GameCommand.CHGPASSWORD.nPermissionMin);
StringGridGameCmd.Cells[2,23]:='@' + g_GameCommand.CHGPASSWORD.sCmd;
StringGridGameCmd.Objects[0,23]:=TObject(@g_GameCommand.CHGPASSWORD);
StringGridGameCmd.Cells[0,24]:=g_GameCommand.UNPASSWORD.sCmd;
StringGridGameCmd.Cells[1,24]:=IntToStr(g_GameCommand.UNPASSWORD.nPermissionMin);
StringGridGameCmd.Cells[2,24]:='@' + g_GameCommand.UNPASSWORD.sCmd;
StringGridGameCmd.Objects[0,24]:=TObject(@g_GameCommand.UNPASSWORD);
StringGridGameCmd.Cells[0,25]:=g_GameCommand.MEMBERFUNCTION.sCmd;
StringGridGameCmd.Cells[1,25]:=IntToStr(g_GameCommand.MEMBERFUNCTION.nPermissionMin);
StringGridGameCmd.Cells[2,25]:='@' + g_GameCommand.MEMBERFUNCTION.sCmd;
StringGridGameCmd.Objects[0,25]:=TObject(@g_GameCommand.MEMBERFUNCTION);
StringGridGameCmd.Cells[0,26]:=g_GameCommand.DEAR.sCmd;
StringGridGameCmd.Cells[1,26]:=IntToStr(g_GameCommand.DEAR.nPermissionMin);
StringGridGameCmd.Cells[2,26]:='@' + g_GameCommand.DEAR.sCmd;
StringGridGameCmd.Objects[0,26]:=TObject(@g_GameCommand.DEAR);
StringGridGameCmd.Cells[0,27]:=g_GameCommand.ALLOWDEARRCALL.sCmd;
StringGridGameCmd.Cells[1,27]:=IntToStr(g_GameCommand.ALLOWDEARRCALL.nPermissionMin);
StringGridGameCmd.Cells[2,27]:='@' + g_GameCommand.ALLOWDEARRCALL.sCmd;
StringGridGameCmd.Objects[0,27]:=TObject(@g_GameCommand.ALLOWDEARRCALL);
StringGridGameCmd.Cells[0,28]:=g_GameCommand.DEARRECALL.sCmd;
StringGridGameCmd.Cells[1,28]:=IntToStr(g_GameCommand.DEARRECALL.nPermissionMin);
StringGridGameCmd.Cells[2,28]:='@' + g_GameCommand.DEARRECALL.sCmd;
StringGridGameCmd.Objects[0,28]:=TObject(@g_GameCommand.DEARRECALL);
StringGridGameCmd.Cells[0,29]:=g_GameCommand.MASTER.sCmd;
StringGridGameCmd.Cells[1,29]:=IntToStr(g_GameCommand.MASTER.nPermissionMin);
StringGridGameCmd.Cells[2,29]:='@' + g_GameCommand.MASTER.sCmd;
StringGridGameCmd.Objects[0,29]:=TObject(@g_GameCommand.MASTER);
StringGridGameCmd.Cells[0,30]:=g_GameCommand.ALLOWMASTERRECALL.sCmd;
StringGridGameCmd.Cells[1,30]:=IntToStr(g_GameCommand.ALLOWMASTERRECALL.nPermissionMin);
StringGridGameCmd.Cells[2,30]:='@' + g_GameCommand.ALLOWMASTERRECALL.sCmd;
StringGridGameCmd.Objects[0,30]:=TObject(@g_GameCommand.ALLOWMASTERRECALL);
StringGridGameCmd.Cells[0,31]:=g_GameCommand.MASTERECALL.sCmd;
StringGridGameCmd.Cells[1,31]:=IntToStr(g_GameCommand.MASTERECALL.nPermissionMin);
StringGridGameCmd.Cells[2,31]:='@' + g_GameCommand.MASTERECALL.sCmd;
StringGridGameCmd.Objects[0,31]:=TObject(@g_GameCommand.MASTERECALL);
StringGridGameCmd.Cells[0,32]:=g_GameCommand.ATTACKMODE.sCmd;
StringGridGameCmd.Cells[1,32]:=IntToStr(g_GameCommand.ATTACKMODE.nPermissionMin);
StringGridGameCmd.Cells[2,32]:='@' + g_GameCommand.ATTACKMODE.sCmd;
StringGridGameCmd.Objects[0,32]:=TObject(@g_GameCommand.ATTACKMODE);
StringGridGameCmd.Cells[0,33]:=g_GameCommand.REST.sCmd;
StringGridGameCmd.Cells[1,33]:=IntToStr(g_GameCommand.REST.nPermissionMin);
StringGridGameCmd.Cells[2,33]:='@' + g_GameCommand.REST.sCmd;
StringGridGameCmd.Objects[0,33]:=TObject(@g_GameCommand.REST);
StringGridGameCmd.Cells[0,34]:=g_GameCommand.TAKEONHORSE.sCmd;
StringGridGameCmd.Cells[1,34]:=IntToStr(g_GameCommand.TAKEONHORSE.nPermissionMin);
StringGridGameCmd.Cells[2,34]:='@' + g_GameCommand.TAKEONHORSE.sCmd;
StringGridGameCmd.Objects[0,34]:=TObject(@g_GameCommand.TAKEONHORSE);
StringGridGameCmd.Cells[0,35]:=g_GameCommand.TAKEOFHORSE.sCmd;
StringGridGameCmd.Cells[1,35]:=IntToStr(g_GameCommand.TAKEOFHORSE.nPermissionMin);
StringGridGameCmd.Cells[2,35]:='@' + g_GameCommand.TAKEOFHORSE.sCmd;
StringGridGameCmd.Objects[0,35]:=TObject(@g_GameCommand.TAKEOFHORSE);
StringGridGameCmd.Cells[0,36]:=g_GameCommand.MEMBERFUNCTIONEX.sCmd;
StringGridGameCmd.Cells[1,36]:=IntToStr(g_GameCommand.MEMBERFUNCTIONEX.nPermissionMin);
StringGridGameCmd.Cells[2,36]:='@' + g_GameCommand.MEMBERFUNCTIONEX.sCmd;
StringGridGameCmd.Objects[0,36]:=TObject(@g_GameCommand.MEMBERFUNCTIONEX);
StringGridGameCmd.Cells[0,37]:=g_GameCommand.LOCKLOGON.sCmd;
StringGridGameCmd.Cells[1,37]:=IntToStr(g_GameCommand.LOCKLOGON.nPermissionMin);
StringGridGameCmd.Cells[2,37]:='@' + g_GameCommand.LOCKLOGON.sCmd;
StringGridGameCmd.Objects[0,37]:=TObject(@g_GameCommand.LOCKLOGON);
end;
procedure TfrmGameCmd.StringGridGameCmdClick(Sender: TObject);
var
nIndex:Integer;
GameCmd:pTGameCmd;
begin
nIndex:=StringGridGameCmd.Row;
GameCmd:=pTGameCmd(StringGridGameCmd.Objects[0,nIndex]);
if GameCmd <> nil then begin
EditUserCmdName.Text:=GameCmd.sCmd;
EditUserCmdPerMission.Value:=GameCmd.nPermissionMin;
LabelUserCmdParam.Caption:=StringGridGameCmd.Cells[2,nIndex];
LabelUserCmdFunc.Caption:=StringGridGameCmd.Cells[3,nIndex];
end;
EditUserCmdOK.Enabled:=False;
end;
procedure TfrmGameCmd.EditUserCmdNameChange(Sender: TObject);
begin
EditUserCmdOK.Enabled:=True;
EditUserCmdSave.Enabled:=True;
end;
procedure TfrmGameCmd.EditUserCmdPerMissionChange(Sender: TObject);
begin
EditUserCmdOK.Enabled:=True;
EditUserCmdSave.Enabled:=True;
end;
procedure TfrmGameCmd.EditUserCmdOKClick(Sender: TObject);
var
nIndex:Integer;
GameCmd:pTGameCmd;
sCmd:String;
nPerMission:Integer;
begin
sCmd:=Trim(EditUserCmdName.Text);
nPermission:=EditUserCmdPerMission.Value;
if sCmd = '' then begin
Application.MessageBox('命令名称不能为空!!!','提示信息',MB_OK + MB_ICONERROR);
EditUserCmdName.SetFocus;
exit;
end;
nIndex:=StringGridGameCmd.Row;
GameCmd:=pTGameCmd(StringGridGameCmd.Objects[0,nIndex]);
if GameCmd <> nil then begin
GameCmd.sCmd:=sCmd;
GameCmd.nPermissionMin:=nPermission;
end;
RefUserCommand();
end;
procedure TfrmGameCmd.EditUserCmdSaveClick(Sender: TObject);
begin
EditUserCmdSave.Enabled:=False;
{$IF SoftVersion <> VERDEMO}
CommandConf.WriteString('Command','Date',g_GameCommand.DATA.sCmd);
CommandConf.WriteString('Command','PrvMsg',g_GameCommand.PRVMSG.sCmd);
CommandConf.WriteString('Command','AllowMsg',g_GameCommand.ALLOWMSG.sCmd);
CommandConf.WriteString('Command','LetShout',g_GameCommand.LETSHOUT.sCmd);
CommandConf.WriteString('Command','LetTrade',g_GameCommand.LETTRADE.sCmd);
CommandConf.WriteString('Command','LetGuild',g_GameCommand.LETGUILD.sCmd);
CommandConf.WriteString('Command','EndGuild',g_GameCommand.ENDGUILD.sCmd);
CommandConf.WriteString('Command','BanGuildChat',g_GameCommand.BANGUILDCHAT.sCmd);
CommandConf.WriteString('Command','AuthAlly',g_GameCommand.AUTHALLY.sCmd);
CommandConf.WriteString('Command','Auth',g_GameCommand.AUTH.sCmd);
CommandConf.WriteString('Command','AuthCancel',g_GameCommand.AUTHCANCEL.sCmd);
CommandConf.WriteString('Command','ViewDiary',g_GameCommand.DIARY.sCmd);
CommandConf.WriteString('Command','UserMove',g_GameCommand.USERMOVE.sCmd);
CommandConf.WriteString('Command','Searching',g_GameCommand.SEARCHING.sCmd);
CommandConf.WriteString('Command','AllowGroupCall',g_GameCommand.ALLOWGROUPCALL.sCmd);
CommandConf.WriteString('Command','GroupCall',g_GameCommand.GROUPRECALLL.sCmd);
CommandConf.WriteString('Command','AllowGuildReCall',g_GameCommand.ALLOWGUILDRECALL.sCmd);
CommandConf.WriteString('Command','GuildReCall',g_GameCommand.GUILDRECALLL.sCmd);
CommandConf.WriteString('Command','StorageUnLock',g_GameCommand.UNLOCKSTORAGE.sCmd);
CommandConf.WriteString('Command','PasswordUnLock',g_GameCommand.UNLOCK.sCmd);
CommandConf.WriteString('Command','StorageLock',g_GameCommand.LOCK.sCmd);
CommandConf.WriteString('Command','StorageSetPassword',g_GameCommand.SETPASSWORD.sCmd);
CommandConf.WriteString('Command','StorageChgPassword',g_GameCommand.CHGPASSWORD.sCmd);
// CommandConf.WriteString('Command','StorageClearPassword',g_GameCommand.CLRPASSWORD.sCmd)
// CommandConf.WriteInteger('Permission','StorageClearPassword', g_GameCommand.CLRPASSWORD.nPermissionMin)
CommandConf.WriteString('Command','StorageUserClearPassword',g_GameCommand.UNPASSWORD.sCmd);
CommandConf.WriteString('Command','MemberFunc',g_GameCommand.MEMBERFUNCTION.sCmd);
CommandConf.WriteString('Command','Dear',g_GameCommand.DEAR.sCmd);
CommandConf.WriteString('Command','Master',g_GameCommand.MASTER.sCmd);
CommandConf.WriteString('Command','DearRecall',g_GameCommand.DEARRECALL.sCmd);
CommandConf.WriteString('Command','MasterRecall',g_GameCommand.MASTERECALL.sCmd);
CommandConf.WriteString('Command','AllowDearRecall',g_GameCommand.ALLOWDEARRCALL.sCmd);
CommandConf.WriteString('Command','AllowMasterRecall',g_GameCommand.ALLOWMASTERRECALL.sCmd);
CommandConf.WriteString('Command','AttackMode',g_GameCommand.ATTACKMODE.sCmd);
CommandConf.WriteString('Command','Rest',g_GameCommand.REST.sCmd);
CommandConf.WriteString('Command','TakeOnHorse',g_GameCommand.TAKEONHORSE.sCmd);
CommandConf.WriteString('Command','TakeOffHorse',g_GameCommand.TAKEOFHORSE.sCmd);
CommandConf.WriteInteger('Permission','Date', g_GameCommand.DATA.nPermissionMin);
CommandConf.WriteInteger('Permission','PrvMsg', g_GameCommand.PRVMSG.nPermissionMin);
CommandConf.WriteInteger('Permission','AllowMsg', g_GameCommand.ALLOWMSG.nPermissionMin);
{$IFEND}
end;
procedure TfrmGameCmd.RefGameMasterCmd(GameCmd:pTGameCmd;sCmdParam,sDesc:String);
begin
Inc(nRefGameMasterIndex);
if StringGridGameMasterCmd.RowCount - 1 < nRefGameMasterIndex then begin
StringGridGameMasterCmd.RowCount:=nRefGameMasterIndex + 1;
end;
StringGridGameMasterCmd.Cells[0,nRefGameMasterIndex]:=GameCmd.sCmd;
StringGridGameMasterCmd.Cells[1,nRefGameMasterIndex]:=IntToStr(GameCmd.nPermissionMin) + '/' + IntToStr(GameCmd.nPermissionMax);
StringGridGameMasterCmd.Cells[2,nRefGameMasterIndex]:=sCmdParam;
StringGridGameMasterCmd.Cells[3,nRefGameMasterIndex]:=sDesc;
StringGridGameMasterCmd.Objects[0,nRefGameMasterIndex]:=TObject(GameCmd);
end;
procedure TfrmGameCmd.RefGameMasterCommand;
var
GameCmd:pTGameCmd;
sDesc:String;
sCmdParam:String;
begin
EditGameMasterCmdOK.Enabled:=False;
nRefGameMasterIndex:=0;
RefGameMasterCmd(@g_GameCommand.CLRPASSWORD,
'@' + g_GameCommand.CLRPASSWORD.sCmd + ' 人物名称',
'清除人物仓库/登录密码(支持权限分配)');
RefGameMasterCmd(@g_GameCommand.WHO,
'@' + g_GameCommand.WHO.sCmd,
'查看当前服务器在线人数(支持权限分配)');
RefGameMasterCmd(@g_GameCommand.TOTAL,
'@' + g_GameCommand.TOTAL.sCmd,
'查看所有服务器在线人数(支持权限分配)');
RefGameMasterCmd(@g_GameCommand.GAMEMASTER,
'@' + g_GameCommand.GAMEMASTER.sCmd,
'进入/退出管理员模式(进入模式后不会受到任何角色攻击)(支持权限分配)');
RefGameMasterCmd(@g_GameCommand.OBSERVER,
'@' + g_GameCommand.OBSERVER.sCmd,
'进入/退出隐身模式(进入模式后别人看不到自己)(支持权限分配)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -