传奇一条龙,复古传奇,GM基地,传奇服务端

 找回密码
 立即注册

QQ登录

只需一步,快速开始

网友自助信息发布区,请自行甄别

查看: 702|回复: 2

Delphi传奇3服务端GM管理工具源码

[复制链接]

624

帖子

2132

钻石

1355

积分

管理员

Rank: 9Rank: 9Rank: 9

在线时间
110 小时
发表于 2018-12-3 00:00:16 | 显示全部楼层 |阅读模式
Delphi传奇3服务端GM管理工具源码
var
  form_renwu: Tform_renwu;
  function showinfo():string;
implementation

uses Unit1, Unit2_create,unit_rename, Unit_RNEID, Unit_renid;

{$R *.dfm}

procedure Tform_renwu.FormClose(Sender: TObject; var Action: TCloseAction);
begin
     adoconn.Connected:=false;
     form_renwu.Close;;
end;

procedure Tform_renwu.Button1Click(Sender: TObject);
begin
   adoconn.Connected :=false;
   ADOConn.ConnectionString:='Provider=SQLOLEDB.1;Password='+edit3.Text+';Persist Security Info=True;User ID='+edit2.Text+';Initial Catalog='+edit1.Text+';Data Source='+edit4.Text;
   try
     adoconn.Connected:=true;
   except
     Application.MessageBox('连接数据库失败!!','错误',MB_OK+MB_ICONERROR);
     statusbar1.Panels.Items[0].Text :='数据库连接失败....';
     exit;
   end;
     edit1.Enabled:=false;
     edit2.Enabled:=false;
     edit3.Enabled:=false;
     edit4.Enabled:=false;
     button1.Enabled:=false;
     button2.Enabled:=true;
     RadioButton1.Enabled :=true;
     RadioButton2.Enabled:=True;
     edit6.Enabled :=true;
     edit7.Enabled  :=true;
     statusbar1.Panels.Items[0].Text :='数据库连接成功....';
     Application.MessageBox('数据库已成功连接.但请注意,如果你想要进行修改数据前最好先备份.并请自行确认修改值的可行性和正确性.因为你修改的值程序不会经过判断而是直接写入SQL数据库!!','提醒',MB_OK+MB_ICONINFORMATION);
end;

procedure Tform_renwu.FormShow(Sender: TObject);
begin
  edit1.Text:='game1';
  edit2.Text:='sa';
//  edit3.Text:='';
  //edit4.Text:='127.0.0.1';
  RadioButton1.Checked:=true;
  RadioButton2.Checked:=false;
  edit6.Enabled:=false;
  edit7.Enabled:=false;
  ComboBox1.Enabled:=false;
  Button3.Enabled:=false;
// itemidtype:=20;
end;

procedure Tform_renwu.RadioButton1Click(Sender: TObject);
begin
    if RadioButton1.Checked then RadioButton2.Checked:=false else RadioButton2.Checked:=true;
    edit6.Enabled :=true;
end;

procedure Tform_renwu.RadioButton2Click(Sender: TObject);
begin
    if RadioButton2.Checked then RadioButton1.Checked:=false else RadioButton1.Checked:=true;
    edit7.Enabled :=true;
end;

procedure Tform_renwu.Button2Click(Sender: TObject);
var
i:Integer ;
begin
          adoconn.Connected :=false;
   ADOConn.ConnectionString:='Provider=SQLOLEDB.1;Password='+edit3.Text+';Persist Security Info=True;User ID='+edit2.Text+';Initial Catalog='+edit1.Text+';Data Source='+edit4.Text;
   try
     adoconn.Connected:=true;
   except
     Application.MessageBox('连接game数据库失败,无法进行修改!!','错误',MB_OK+MB_ICONERROR);
     statusbar1.Panels.Items[0].Text :='数据库连接失败....';
     exit;
   end;
   ADOQ.SQL.Clear;
   if RadioButton1.Checked then
   begin
     adoq.SQL.Add('select * from TBL_CHARACTER WHERE FLD_CHARACTER='+''''+edit6.Text +'''');
     adoq.Open ;
      if adoq.RecordCount > 0 then
      begin
              combobox1.Enabled :=false;
              //从数据库中读到控件中去。(注意。这个是基本信息。);
              edit6.Enabled :=false;
              edit7.Enabled :=false;
              showinfo();


      end
      else
      begin
                        //没有找到角色。
                            Application.MessageBox('没有你输入的角色!!','错误',MB_OK+MB_ICONERROR);
      end;
   end
   else
   begin
     adoq.SQL.Add('select * FROM TBL_CHARACTER where FLD_USERID='+''''+edit7.Text +'''');
     adoq.Open ;
       if adoq.RecordCount > 0 then
       begin
         combobox1.Enabled :=true;
         combobox1.Items.Clear ;
         for i:=0 to adoq.RecordCount-1 do
           begin
              //加入LIST
              combobox1.Items.append(adoq.FieldValues['FLD_CHARACTER']);
              adoq.Next ;
           end;
           combobox1.ItemIndex :=0;
           edit6.Text :=combobox1.Text ;
           combobox1.SetFocus;
        end
       else
           Application.MessageBox('没有你输入的帐号的角色,或者本帐号还没有建立角色!!','错误',MB_OK+MB_ICONERROR);
   end;
end;

procedure Tform_renwu.Edit24KeyPress(Sender: TObject; var Key: Char);
begin
        if not(key in['0'..'9',#8]) then
  begin
      key:=#0;
       MessageBeep(1);
     end;   //fdfdfdfdf}
end;

function showinfo():string;
begin
      form_renwu.Edit5.Text :=form_renwu.ADOQ.FieldValues ['FLD_USERID'];
  //    if form_renwu.ADOQ.get`
      if (form_renwu.ADOQ.FieldByName('FLD_DEleted').AsInteger=0) then form_renwu.combobox2.ItemIndex:=0  else form_renwu.combobox2.ItemIndex:=1;
   //   if (form_renwu.ADOQ.Filtered ['FLD_DEleted']=true) then form_renwu.combobox2.ItemIndex:=0  else form_renwu.combobox2.ItemIndex:=1;
      form_renwu.Edit30.Text :=form_renwu.ADOQ.FieldValues['FLD_UPDATEDATETIME'];
      form_renwu.Edit15.Text :=form_renwu.ADOQ.FieldValues['FLD_CHARACTER'];
      form_renwu.edit31.Text :=form_renwu.ADOQ.FieldValues ['FLD_DBVERSION'];
      form_renwu.Edit32.Text:=form_renwu.ADOQ.FieldValues['FLD_MAPNAME'];
      FORM_renwu.Edit33.Text:=form_renwu.ADOQ.FieldValues ['FLD_CX'];
      FORM_renwu.Edit34.Text:=form_renwu.ADOQ.FieldValues ['FLD_CY'];
      FORM_renwu.Edit35.Text:=form_renwu.ADOQ.FieldValues ['FLD_DIR'];
      FORM_renwu.Edit36.Text:=form_renwu.ADOQ.FieldValues ['FLD_HAIR'];
      FORM_renwu.Edit37.Text:=form_renwu.ADOQ.FieldValues ['FLD_HAIRCOLORR'];
      FORM_renwu.Edit38.Text:=form_renwu.ADOQ.FieldValues ['FLD_HAIRCOLORG'];
      FORM_renwu.Edit39.Text:=form_renwu.ADOQ.FieldValues ['FLD_HAIRCOLORB'];
      if (form_renwu.ADOQ.FieldValues ['FLD_SEX'])=0 then form_renwu.combobox3.ItemIndex:=0  else form_renwu.combobox3.ItemIndex:=1;
      form_renwu.combobox4.itemIndex:=form_renwu.ADOQ.FieldValues ['FLD_JOB'];
      FORM_renwu.Edit40.Text:=form_renwu.ADOQ.FieldValues ['FLD_LEVEL'];
      FORM_renwu.Edit41.Text:=form_renwu.ADOQ.FieldValues ['FLD_GOLD'];
      FORM_renwu.Edit42.Text:=form_renwu.ADOQ.FieldValues ['FLD_HOMEMAP'];
      FORM_renwu.Edit43.Text:=form_renwu.ADOQ.FieldValues ['FLD_HOMEX'];
      FORM_renwu.Edit44.Text:=form_renwu.ADOQ.FieldValues ['FLD_HOMEY'];
      FORM_renwu.Edit45.Text:=form_renwu.ADOQ.FieldValues ['FLD_PKPOINT'];
      FORM_renwu.Edit46.Text:=form_renwu.ADOQ.FieldValues ['FLD_ALLOWPARTY'];
      FORM_renwu.Edit47.Text:=form_renwu.ADOQ.FieldValues ['FLD_FREEGULITYCOUNT'];
      FORM_renwu.Edit48.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATTACKMODE'];
      FORM_renwu.Edit49.Text:=form_renwu.ADOQ.FieldValues ['FLD_FIGHTZONEDIE'];
      FORM_renwu.Edit50.Text:=form_renwu.ADOQ.FieldValues ['FLD_BODYLUCK'];
      FORM_renwu.Edit51.Text:=form_renwu.ADOQ.FieldValues ['FLD_INCHEALTH'];
      FORM_renwu.Edit52.Text:=form_renwu.ADOQ.FieldValues ['FLD_INCSPELL'];
      FORM_renwu.Edit53.Text:=form_renwu.ADOQ.FieldValues ['FLD_INCHEALING'];
      FORM_renwu.Edit54.Text:=form_renwu.ADOQ.FieldValues ['FLD_BONUSAPpLY'];
      FORM_renwu.Edit55.Text:=form_renwu.ADOQ.FieldValues ['FLD_BONUSPOINT'];
      FORM_renwu.Edit56.Text:=form_renwu.ADOQ.FieldValues ['FLD_HUNGRYSTATE'];
      FORM_renwu.Edit57.Text:=form_renwu.ADOQ.FieldValues ['FLD_TESTSERVERRESETCOUNT'];
      FORM_renwu.Edit58.Text:=form_renwu.ADOQ.FieldValues ['FLD_CGHUSETIME'];
      if form_renwu.ADOQ.FieldValues ['FLD_RESERVED']<>null then FORM_renwu.Edit59.Text:=form_renwu.ADOQ.FieldValues ['FLD_RESERVED'] else form_renwu.Edit59.Text:='';
      FORM_renwu.Edit60.Text:=form_renwu.ADOQ.FieldValues ['FLD_ENABLEGRECALL'];
      FORM_renwu.Edit61.Text:=form_renwu.ADOQ.FieldValues ['FLD_BYTES_1'];
      FORM_renwu.Edit62.Text:=form_renwu.ADOQ.FieldValues ['FLD_HORSERACE'];
      FORM_renwu.Edit63.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAKEDATE'];
      FORM_renwu.Edit64.Text:=form_renwu.ADOQ.FieldValues ['FLD_STORAGEPASSWD'];
      FORM_renwu.Edit65.Text:=form_renwu.ADOQ.FieldValues ['FLD_SHOOTERTYPE'];
      FORM_renwu.Edit66.Text:=form_renwu.ADOQ.FieldValues ['FLD_READYSHOOTS'];
      FORM_renwu.Edit67.Text:=form_renwu.ADOQ.FieldValues ['FLD_CHRFAME'];
      FORM_renwu.Edit68.Text:=form_renwu.ADOQ.FieldValues ['FLD_CHRSETTING'];
      FORM_renwu.Edit69.Text:=form_renwu.ADOQ.FieldValues ['FLD_LEVELBONUS'];
      FORM_renwu.Edit70.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAHP'];
       FORM_renwu.Edit71.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAMP'];
       FORM_renwu.Edit72.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS0'];
       FORM_renwu.Edit73.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS1'];
       FORM_renwu.Edit74.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS2'];
       FORM_renwu.Edit75.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS3'];
       FORM_renwu.Edit76.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS4'];
       FORM_renwu.Edit77.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS5'];
       FORM_renwu.Edit78.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS6'];
       FORM_renwu.Edit79.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS7'];
       FORM_renwu.Edit80.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS8'];
       FORM_renwu.Edit81.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS9'];
       FORM_renwu.Edit82.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS10'];
       FORM_renwu.Edit83.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS11'];
       if form_renwu.adoq.fieldValues ['FLD_EXTRAPWRS12']<>null then FORM_renwu.Edit84.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXTRAPWRS12'] else FORM_renwu.Edit84.Text:='';
       FORM_renwu.Edit86.Text:=form_renwu.ADOQ.FieldValues ['FLD_INDEX'];
       form_renwu.ADOQ.SQL.Clear ;
       if form_renwu.RadioButton1.Checked then form_renwu.ADOQ.SQL.Add('select * from TBL_SUBHUMAN where FLD_CHARACTER='+''''+form_renwu.Edit6.Text +'''') else form_renwu.ADOQ.SQL.Add('select * from TBL_SUBHUMAN where FLD_CHARACTER='+''''+form_renwu.ComboBox1.Text+'''');
       form_renwu.ADOQ.Open ;
       if form_renwu.ADOQ.RecordCount >0 then  form_renwu.Edit88.Text :=form_renwu.ADOQ.FieldValues ['FLD_SPOUSE'] else form_renwu.Edit88.Text :='无配偶';
       form_renwu.ADOQ.SQL.Clear ;
       form_renwu.adoq.SQL.Add('select * from TBL_ABILITY where FLD_CHARACTER='+''''+form_renwu.Edit6.Text +'''');
       form_renwu.adoq.Open ;
       if form_renwu.ADOQ.RecordCount > 0 then
       begin
       FORM_renwu.Edit85.Text:=form_renwu.ADOQ.FieldValues ['FLD_LEVEL'];
       if form_renwu.ADOQ.FieldValues ['FLD_RESERVED1']<>null then FORM_renwu.Edit87.Text:=form_renwu.ADOQ.FieldValues ['FLD_RESERVED1'] else FORM_renwu.Edit87.Text:='';
       FORM_renwu.Edit89.Text:=form_renwu.ADOQ.FieldValues ['FLD_AC'];
       FORM_renwu.Edit90.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAC'];
       FORM_renwu.Edit92.Text:=form_renwu.ADOQ.FieldValues ['FLD_DC'];
       FORM_renwu.Edit93.Text:=form_renwu.ADOQ.FieldValues ['FLD_MC'];
       FORM_renwu.Edit91.Text:=form_renwu.ADOQ.FieldValues ['FLD_SC'];
       FORM_renwu.Edit94.Text:=form_renwu.ADOQ.FieldValues ['FLD_HP'];
       FORM_renwu.Edit95.Text:=form_renwu.ADOQ.FieldValues ['FLD_MP'];
       FORM_renwu.Edit96.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAXHP'];
       FORM_renwu.Edit97.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAXMP'];
       FORM_renwu.Edit98.Text:=form_renwu.ADOQ.FieldValues ['FLD_EXP'];
       FORM_renwu.Edit99.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAXEXP'];
       FORM_renwu.Edit100.Text:=form_renwu.ADOQ.FieldValues ['FLD_WEIGHT'];
       FORM_renwu.Edit101.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAXWEIGHT'];
       FORM_renwu.Edit102.Text:=form_renwu.ADOQ.FieldValues ['FLD_WEARWEIGHT'];
       FORM_renwu.Edit103.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAXWEARWEIGHT'];
       FORM_renwu.Edit104.Text:=form_renwu.ADOQ.FieldValues ['FLD_HANDWEIGHT'];
       FORM_renwu.Edit105.Text:=form_renwu.ADOQ.FieldValues ['FLD_MAXHANDWEIGHT'];
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMFIRE_MC']<> null then FORM_renwu.Edit106.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMFIRE_MC'] else FORM_renwu.Edit106.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMICE_MC']<>null  then  FORM_renwu.Edit107.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMICE_MC']  else FORM_renwu.Edit107.Text:='' ;
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMLIGHT_MC'] <>null then FORM_renwu.Edit108.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMLIGHT_MC'] else form_renwu.Edit108.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMWIND_MC'] <>null then FORM_renwu.Edit109.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMWIND_MC'] else form_renwu.Edit109.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMHOLY_MC'] <>null then FORM_renwu.Edit110.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMHOLY_MC'] else form_renwu.Edit110.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMDARK_MC'] <>null then FORM_renwu.Edit111.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMDARK_MC'] else form_renwu.Edit111.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMPHANTOM_MC'] <>null then FORM_renwu.Edit112.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMPHANTOM_MC'] else form_renwu.Edit112.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMFIRE_MAC'] <>null then FORM_renwu.Edit113.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMFIRE_MAC'] else form_renwu.Edit113.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMICE_MAC'] <>null then FORM_renwu.Edit114.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMICE_MAC'] else form_renwu.Edit114.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMLIGHT_MAC'] <>null then FORM_renwu.Edit115.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMLIGHT_MAC'] else form_renwu.Edit115.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMWIND_MAC'] <>null then FORM_renwu.Edit116.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMWIND_MAC'] else form_renwu.Edit116.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMHOLY_MAC'] <>null then FORM_renwu.Edit117.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMHOLY_MAC'] else form_renwu.Edit117.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMDARK_MAC'] <>null then FORM_renwu.Edit118.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMDARK_MAC'] else form_renwu.Edit118.Text:='';
       if form_renwu.ADOQ.FieldValues ['FLD_ATOMLIGHT_MC'] <>null then FORM_renwu.Edit119.Text:=form_renwu.ADOQ.FieldValues ['FLD_ATOMPHANTOM_MAC'] else form_renwu.Edit119.Text:='';
       form_renwu.Edit171.Text :=form_renwu.Edit6.Text ;
       form_renwu.Caption :='传奇3人物属性修改器  ID:'+form_renwu.Edit5.Text +'  角色:'+form_renwu.Edit15.Text ;
       form_renwu.Button5.Enabled :=true;
       form_renwu.Button4.Enabled :=true;
      end;
end;


procedure Tform_renwu.Edit172KeyPress(Sender: TObject; var Key: Char);
begin
        if not(key in['0'..'9',#8]) then
  begin
      key:=#0;
       MessageBeep(1);
     end;
end;
游客,如果您要查看本帖隐藏内容请回复


回复

使用道具 举报

19

帖子

52

钻石

19

积分

初级GM

Rank: 1

在线时间
0 小时
发表于 2020-7-15 16:26:32 | 显示全部楼层
Delphi传奇3服务端GM管理工具源码
回复

使用道具 举报

201

帖子

74

钻石

212

积分

中级GM

Rank: 2

在线时间
11 小时
发表于 2020-8-31 08:43:57 | 显示全部楼层
客户端和服务器C++工程使用
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|85ji.com Inc.最大的GM论坛交流基地 ( 粤ICP备11015868号-18 ) 传奇私服 Array7.2 版权所有 © 八五论坛 Comsenz Inc.

快速回复 快速发帖 返回顶部 返回列表