📄 unit1.pas
字号:
15000001..20000000: begin
jit_koucu_dn:= 20000000;
i:= 15000001;
end;
20000001..25000000: begin
jit_koucu_dn:= 25000000;
i:= 20000001;
end;
25000001..30000000: begin
jit_koucu_dn:= 30000000;
i:= 25000001;
end;
30000001..35000000: begin
jit_koucu_dn:= 35000000;
i:= 30000001;
end;
35000001..40000000: begin
jit_koucu_dn:= 40000000;
i:= 35000001;
end;
45000001..50000000: begin
jit_koucu_dn:= 50000000;
i:= 45000001;
end;
55000001..60000000: begin
jit_koucu_dn:= 60000000;
i:= 55000001;
end;
65000001..70000000: begin
jit_koucu_dn:= 70000000;
i:= 65000001;
end;
70000001..80000000: begin
jit_koucu_dn:= 80000000;
i:= 70000001;
end;
80000001..99000000: begin
jit_koucu_dn:= 99000000;
i:= 80000001;
end;
end;
jit_caifu_dn:= jit_caifu_dn-i;
end;
end;
procedure TForm1.Action2Execute(Sender: TObject);
begin
if groupbox3.Visible then
RadioButton1.Checked:= true;
end;
procedure TForm1.Action3Execute(Sender: TObject);
begin
if groupbox3.Visible then
RadioButton2.Checked:= true;
end;
procedure TForm1.Action4Execute(Sender: TObject);
begin
if groupbox3.Visible then
RadioButton3.Checked:= true;
end;
procedure TForm1.Label15Click(Sender: TObject);
begin
timer1.Enabled:= false;
groupbox3.Visible:= false;
end;
procedure TForm1.Label15MouseEnter(Sender: TObject);
begin
label15.Font.Color:= clred;
end;
procedure TForm1.Label15MouseLeave(Sender: TObject);
begin
label15.Font.Color:= clWindowText;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
CursorPos: TPoint;
begin
GetCursorPos(CursorPos);
popupmenu1.Popup(CursorPos.X, CursorPos.Y);
end;
procedure TForm1.N1Click(Sender: TObject);
begin
savedialog1.DefaultExt:='.ini';
savedialog1.FilterIndex:= 1;
if savedialog1.Execute then
begin
if combobox1.text= 'Voa特别版词库' then
begin
copyFile(pchar(extractfilepath(application.ExeName)+'words.ini'),pchar(savedialog1.FileName),false);
end else begin
if FileExists(ExtractFilePath(application.ExeName)+'Lib\'+ ComboBox1.Text) then
begin
copyFile(pchar(ExtractFilePath(application.ExeName)+'Lib\'+ ComboBox1.Text),pchar(savedialog1.FileName),false);
end else messagebox(handle,'词库文件被移走,请选择其他的试试。','文件不存在',mb_ok or MB_ICONERROR);
end;
end;
end;
procedure TForm1.N4Click(Sender: TObject);
begin
savedialog1.DefaultExt:='.dat';
savedialog1.FilterIndex:= 2;
if savedialog1.Execute then
copyFile(pchar(extractfilepath(application.ExeName)+'moneybags.dat'),pchar(savedialog1.FileName),false);
end;
procedure TForm1.N2Click(Sender: TObject);
begin
//opendialog1.DefaultExt:='.ini';
opendialog1.FilterIndex:= 1;
if opendialog1.Execute then
begin
if not DirectoryExists(extractfilepath(application.ExeName)+'Lib') then
mkdir(extractfilepath(application.ExeName)+'Lib');
copyFile(pchar(opendialog1.FileName),pchar(extractfilepath(application.ExeName)+'Lib\'+ExtractFileName(opendialog1.FileName)),false);
show_ck;
end;
end;
procedure TForm1.N5Click(Sender: TObject);
begin
//opendialog1.DefaultExt:='.dat';
opendialog1.FilterIndex:= 2;
if opendialog1.Execute then
begin
copyFile(pchar(opendialog1.FileName),pchar(extractfilepath(application.ExeName)+'moneybags.dat'),false);
messagebox(handle,'导入游戏脚本后,需关闭并重新打开游戏程序才能有效。','提示',MB_OK or MB_ICONWARNING);
end;
end;
procedure TForm1.Label16MouseEnter(Sender: TObject);
begin
(sender as tlabel).Font.Color:= clHotlight;
end;
procedure TForm1.Label16MouseLeave(Sender: TObject);
begin
(sender as tlabel).Font.Color:= clwindowtext;
end;
procedure TForm1.Label16Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://www.finer2.com/voa/', nil, nil, SW_SHOWNORMAL);
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://hi.baidu.com/3030/blog/item/4eefc9ea1ffd75d3d539c9e9.html', nil, nil, SW_SHOWNORMAL);
end;
procedure TForm1.Label17Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://www.spf.cn', nil, nil, SW_SHOWNORMAL);
end;
procedure TForm1.ListBox2MeasureItem(Control: TWinControl; Index: Integer;
var Height: Integer);
begin
Height := ListBox2.Canvas.TextHeight('W') + 6;
end;
procedure TForm1.ListBox2DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
ListBox2.Canvas.FillRect(Rect);
if pos('加',ListBox2.Items[Index])> 0 then
begin
ListBox2.Canvas.Font.Name := '宋体';
ListBox2.Canvas.Font.Color:= clgreen;
imagelist1.Draw(ListBox2.Canvas,rect.left,rect.top,0);
end else if pos('减',ListBox2.Items[Index])> 0 then
begin
ListBox2.Canvas.Font.Name := '宋体';
ListBox2.Canvas.Font.Color:= clMaroon;
imagelist1.Draw(ListBox2.Canvas,rect.left,rect.top,1);
end else if pos('进',ListBox2.Items[Index])> 0 then
begin
ListBox2.Canvas.Font.Name := '黑体';
imagelist1.Draw(ListBox2.Canvas,rect.left,rect.top,3);
end else if pos('退',ListBox2.Items[Index])> 0 then
begin
ListBox2.Canvas.Font.Name := '黑体';
imagelist1.Draw(ListBox2.Canvas,rect.left,rect.top,2);
end;
ListBox2.Canvas.TextOut(Rect.Left+20, Rect.Top, ListBox2.Items[Index]);
end;
procedure TForm1.ListBox1MeasureItem(Control: TWinControl; Index: Integer;
var Height: Integer);
begin
Height := ListBox1.Canvas.TextHeight('W') + 6;
end;
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
ListBox1.Canvas.FillRect(Rect);
case index mod 5 of
0: begin
imagelist1.Draw(ListBox1.Canvas,rect.left+1,rect.top,5);
if get_jb= 1 then
imagelist1.Draw(ListBox1.Canvas,140,rect.top,13);
end;
1: begin
imagelist1.Draw(ListBox1.Canvas,rect.left+1,rect.top,11);
end;
2: begin
imagelist1.Draw(ListBox1.Canvas,rect.left+1,rect.top,10);
end;
3: begin
imagelist1.Draw(ListBox1.Canvas,rect.left+1,rect.top,12);
end;
4: begin
imagelist1.Draw(ListBox1.Canvas,rect.left+1,rect.top,4);
end;
end;
ListBox1.Canvas.Font.Name := '宋体';
ListBox1.Canvas.TextOut(Rect.Left+20, Rect.Top, ListBox1.Items[Index]);
end;
{ jit_spk }
constructor Tjit_spk.create(COM_232: string);
begin
inherited create(false);
freeonterminate:=false;
end;
procedure Tjit_spk.Execute;
var m: TMsg;
begin
jit_h:= eciNew; //创建语音实例
eciSetVoiceParam(jit_h, 0, 7, 99); //设置音量
while not Terminated do
begin
while getMessage(M,0,0,0) do
begin
if m.message=um_ontimer then
begin
eciAddText(jit_h, pchar(spk));
eciSynthesize(jit_h);
eciSynchronize(jit_h);
// eciSpeakText(pchar(spk),false);//处理
end;
if m.message=um_quitthread then
break;
end;
end;
eciDelete(jit_h); //删除语音实例
end;
procedure TForm1.CheckBox3Click(Sender: TObject);
begin
if checkbox3.Checked then
begin
checkbox2.Checked:= false;
checkbox2.Enabled:= false;
checkbox9.Checked:= false;
end else begin
checkbox2.Checked:= true;
checkbox2.Enabled:= true;
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://www.finer2.com/voa/game.htm', nil, nil, SW_SHOWNORMAL);
end;
procedure TForm1.Button3Click(Sender: TObject);
var
CursorPos: TPoint;
begin
GetCursorPos(CursorPos);
popupmenu2.Popup(CursorPos.X, CursorPos.Y);
end;
procedure TForm1.show_ck;
begin
combobox1.Items.Clear;
combobox1.Items.Add('Voa特别版词库');
if DirectoryExists(extractfilepath(application.ExeName)+'Lib') then
begin
My_FindFiles(extractfilepath(application.ExeName)+ 'Lib\*.ini');
end;
combobox1.ItemIndex:= 0;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if combobox1.text= 'Voa特别版词库' then
begin
wordlist1.Clear;
wordlist1.LoadFromFile(ExtractFilePath(application.ExeName)+'words.ini');
end else begin
if FileExists(ExtractFilePath(application.ExeName)+'Lib\'+ ComboBox1.Text) then
begin
wordlist1.Clear;
wordlist1.LoadFromFile(ExtractFilePath(application.ExeName)+'Lib\'+ ComboBox1.Text);
end else messagebox(handle,'词库文件被移走,请选择其他的试试。','文件不存在',mb_ok or MB_ICONERROR);
end;
end;
procedure TForm1.My_FindFiles(sPath: string);
var
sr:TSearchRec;
begin
if FindFirst(sPath,faAnyFile,sr)=0 then
begin
if not((sr.Attr and faDirectory)>0) then
combobox1.Items.Add(sr.Name);
while FindNext(sr)=0 do
begin
if not((sr.Attr and faDirectory)>0) then
combobox1.Items.Add(sr.Name);
end;
end;
FindClose(sr);
end;
procedure TForm1.Button11Click(Sender: TObject);
begin
if jit_caifu <= 0 then
begin
messagebox(handle,'您的金钱为零,不能下注,请先点击“GO”按钮,赚点钱先。','提示', mb_ok or MB_ICONWARNING);
exit;
end;
if (edit1.Text = '') or (strtoint(edit1.Text)> jit_caifu) then
edit1.Text:= inttostr(jit_caifu div 10);
button1click(button11);
groupbox4.Visible:= true;
end;
procedure TForm1.GroupBox4Click(Sender: TObject);
begin
button11click(button1);
end;
procedure TForm1.Edit1Exit(Sender: TObject);
begin
if edit1.Text= '' then
edit1.Text:= inttostr(jit_caifu div 10);
if strtoint(edit1.Text) > jit_caifu then
begin
messagebox(handle,'下注不能大于您的财富值。','提示', mb_ok or MB_ICONWARNING);
edit1.Text:= inttostr(jit_caifu);
end;
end;
procedure TForm1.save_check;
begin
GameSave1.zhuangtai:= 0;
if checkbox1.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 1;
if checkbox2.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 2;
if checkbox3.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 4;
if checkbox4.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 8;
if checkbox5.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 16;
if checkbox6.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 32;
if checkbox7.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 64;
if checkbox8.Checked then
GameSave1.zhuangtai:= GameSave1.zhuangtai + 128;
if checkbox9.Checked then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -