当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 这些日子,QQ游戏外挂是风光了一阵.俄罗斯方块,连连看,对对碰这些游戏的外挂层出不穷。
 

 

 ·quartz初始化plugin的代码    »显示摘要«
    摘要:in stdschedulerfactory.instantiate(): // add plugins for (int i = 0; i < plugins.length; i++) { plugins[i].initialize(pluginnames[i], scheduler); qs.addschedulerplugin(plugins[i]); } ......
    摘要:datagrid删除对话框 & 限制编辑模试textbox长度 private void datagrid1_itemdatabound(object sender, system.web.ui.webcontrols.datagriditemeventargs e) { ////进入编辑模试限制textbox的width//// e.item.cells[4].attributes.add(&q......


QQ游戏外挂制作教程 (对对碰) 选择自 terry6394 的 Blog
   这些日子,qq游戏外挂是风光了一阵.俄罗斯方块,连连看,对对碰这些游戏的外挂层出不穷.其实这一类外挂的原理大体都是一样的.下面我就以qq游戏对对碰外挂作为例子阐述一下qq外挂的制作原理.

  【程序编程相关:Jujube项目架构设计

【推荐阅读:关于数组

    观察qq游戏对对碰的游戏界面及游戏规则,发现玩家是在固定的一个游戏区内寻找复合要求的方块然后点击两次鼠标消去方块从而达到得分的目的.因此,我们可以通过模拟人的观察,与鼠标点击来实现外挂自动消除方块,完成全局. 【扩展信息:[经验]Mpx200上网记

    取得可消方块(模拟人观察):要判断哪个方块可以消,我们可以通过获取方块某点的颜色来判断方块的类型,然后建立方块矩阵,然后在矩阵中选择出适合消去的方块.关于取颜色,我们用到几个api函数 getpixel.getdc.releasedc.(详细的介绍请参考msdn或各种api相关资料)

    

    模拟鼠标击:在此我们使用 mouse_event 来模拟鼠标的移动,点击,弹起.个人认为用postmessage是更好的,在此使用mouse_event只是为了阐述简单.

下面是vb实现代码(带详细注释):

´模块中

´*************模块:modmain******************

´作者:cyril

´email:terry6394@126.com

´web: http://www.sguca.com/other

´书写日期:2004.10.23

´编辑日期:2002.10.23

´转载请保留此信息

´版权所有(a)cyril 405 工作室 

´********************************************

option explicit

´api声明

public declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long

public declare function setwindowpos lib "user32" (byval hwnd as long, byval hwndinsertafter as long, byval x as long, byval y as long, byval cx as long, byval cy as long, byval wflags as long) as long

private declare function screentoclient lib "user32" (byval hwnd as long, lppoint as pointapi) as long

private declare sub mouse_event lib "user32" (byval dwflags as long, byval dx as long, byval dy as long, byval cbuttons as long, byval dwextrainfo as long)

private declare function releasedc lib "user32" (byval hwnd as long, byval hdc as long) as long

private declare function getcursorpos lib "user32" (lppoint as pointapi) as long

private declare function setcursorpos lib "user32" (byval x as long, byval y as long) as long

private declare function getpixel lib "gdi32" (byval hdc as long, byval x as long, byval y as long) as long

private declare function getwindowrect lib "user32" (byval hwnd as long, lprect as rect) as long

private declare function getdc lib "user32" (byval hwnd as long) as long

´api类型定义

private type pointapi

    x as long

    y as long

end type

private type rect

    left as long

    top as long

    right as long

    bottom as long

end type

´方块类型定义

public enum box_type

ox = 0

dog = 1

panda = 2

chicken = 3

cat = 4

frog = 5

monkey = 6

end enum

´自定义方块数据类型x,y位方块坐标,type为方块类型.

´在easy对对碰1.5版中还加如了一些其他属性,例如是否带道具属性.

public type box

    x as integer

    y as integer

    type as box_type

    end type

   

    ´api常量

   

    ´鼠标事件常量

    private const mouseeventf_leftdown = &h2

    private const mouseeventf_leftup = &h4

    private const mouseeventf_move = &h1

    private const mouseeventf_absolute = &h8000

   

    public const hwnd_topmost = -1


...   下一页
 ·freemarker vs. velocity    »显示摘要«
    摘要:1、概述 l velocity是一个简单而且更加轻量级的工具,但是它没有达到freemarker能够做的许多任务,而且它的模板语言不是很强大 l 我们认为对于大多数应用程序,freemarker比velocity工作更简单,因为: Ø 使用velocity,你需要寻找特定工具或各种工作环境来一次次的解决典型的模板创作任务,结果会浪费更多时间 Ø 工作环境经常意味着在ve......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE