如何使广告条自动运行,仅供学习参考[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 zhujunfeng 的 blog

各位程序员,大家辛苦了!!!

今天我一同事要我为他赚钱的东东做一个作弊程序,出于好玩,就即兴做了一个,现在贴出来让大家参考参考。我本对这类东西不感兴趣,赚钱是假,学习是真。但是看到点数快速的增加,不免也感到非常开心,不敢独享,所以一方面让大家一起学习探讨,一方面让大家赚点小钱,一方面我也可以发展几个下线。。。呵呵

程序制作说明

广告条左角的小人在走动时,表示在计费,如果小人停止了,请用光标点击小人,让它走动。
注意!!当广告条打开时,计算机屏幕右下角启动条上会显示一个cashsurfers"$"图标,当它是绿色时,表示在计费。- 正在赚点 (任务栏上的图标为绿色) 每隔一段时间,cashsurfers"$"图标就会变红. - 停止
赚点(任务栏上的"$"图标为红色) 广告条在任务栏上的"$"图标变红或小人坐下时请在广告条上移动鼠标 ,此时小人会拍拍手站起来走,如果不行请点击广告后在广告条上移动鼠标。 小人如果跑到广告条里去就要点 击他,让他回到广告条左侧,否则不会继续放广告。 技巧:当小人开始走进广告条里面时,在小人前方点击鼠 标他马上会回去,时间不会超过10 秒。cashfiesta每月付款,50美元起付,未满则累积至下月。

根据以上说明,我们可以通过移动鼠标和点击鼠标来完成广告条的自动运行。

并且考虑到无人模式和有人模式,分别做不同的处理工作。无人的情况下可以由程序自动完成,有人的情况下,仅当广告条不活动时做声音提示。

废话不说了,源代码如下:

unit unit1;

interface

uses
  windows, messages, sysutils, variants, classes, graphics, controls, forms,
  dialogs, stdctrls, extctrls,mmsystem;

type
  tform1 = class(tform)
    timer1: ttimer;
    button1: tbutton;
    label1: tlabel;
    label2: tlabel;
    memo2: tmemo;
    checkbox1: tcheckbox;
    procedure timer1timer(sender: tobject);
    procedure button1click(sender: tobject);
  private
    { private declarations }
    function hexb(b:byte):string;
    function isrun:boolean;
    procedure step1;
    procedure step2;
    procedure closeie;
  public
    { public declarations }
  end;

  function enumwindowsproc(ahwnd:longint;aform:tform1):boolean;stdcall;

var
  form1: tform1;
  isstep2:boolean;

const
  digits : array[0..$f] of char = '0123456789abcdef';

  pmanx:integer=45;//小人中心的位置
  pmany:integer=721;//小人中心的位置

  pmancolor:integer=9355247;//小人身上的颜色
  pmandownx:integer=44;//小人坐下时头顶的坐标
  pmandowny:integer=710;//小人坐下时头顶的坐标
  pmandowncolor:string='ffcc00';//小人头顶的颜色

implementation

{$r *.dfm}
function tform1.hexb(b:byte):string;//16进制转换成字符串
begin
  hexb:=digits[b shr 4]+digits[b and $f];
end;

function enumwindowsproc(ahwnd:longint;aform:tform1):boolean;//回调函数
var
  lpszwindowtext:array[0..255] of char;
  wndtext:string;
begin
  getwindowtext(ahwnd,lpszwindowtext,256);
  wndtext:=strpas(lpszwindowtext);
  if pos('microsoft internet explorer',wndtext)>0 then//如果是ie窗口则关闭
  begin
    postmessage(ahwnd,wm_close,0,0);
    postmessage(ahwnd,wm_quit,0,0);
  end;
  result:=true;
end;

procedure tform1.closeie;
begin
  enumwindows(@enumwindowsproc,longint(self));
end;

procedure tform1.step1;
var
  i:integer;
begin
  setcursorpos(pmandownx,pmandowny);//小人坐下时,把鼠标移至小人头顶,然后移动鼠标激活广告条
  for i:=1 to 10 do
  begin
    mouse_event(mouseeventf_move,0,1,0,0);
    application.processmessages;
  end;
end;

procedure tform1.step2;//小人走开时,检索小人的位置,并点击他,激活广告条
var
  bkcolor:tcolor;
  x,y:integer;
  dc:hdc;
begin
  isstep2:=true;
  x:=pmanx;
  y:=pmany;
  dc:=getdc(0);

  while (x<1000) and (isstep2) do
  begin
    bkcolor:=getpixel(dc,x,y);
    if (bkcolor<pmancolor+1000000) and (bkcolor>pmancolor-1000000) then//检索小人
    begin
      setcursorpos(x,y);
      mouse_event(mouseeventf_leftdown,0,0,0,0);
      mouse_event(mouseeventf_leftup,0,0,0,0);
//      break;
    end;
    x:=x+1;
    application.processmessages;
  end;
  isstep2:=false;
end;

procedure tform1.timer1timer(sender: tobject);
var
  x,y:integer;
begin
  if isstep2 then exit;
  if not checkbox1.checked then//无人模式下,随机移动鼠标,防监测
  begin
    randomize;
    x:=random(1024);
    y:=random(768);
    setcursorpos(x,y);
    mouse_event(mouseeventf_move,1,0,0,0);
  end;
  if isrun then
  begin
    label2.font.color:=clgreen;
    timer1.tag:=0;
    exit;
  end;
  if checkbox1.checked then//在工作模式下,如果广告条不计点了,就用声音提醒,不做其他操作,以免影响计算机的使用
  begin
    sndplaysound('c:\windows\media\tada.wav',snd_async);
    exit;
  end;
  label2.font.color:=clred;
  if timer1.tag=1 then

本文关键:广告条 作弊
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top