admin 发表于 2010-5-2 22:38:48

C#开发QQ农场辅助实践

大致功能有:
1。我的资料,查看我的等级,经验,金钱等信息
2。我的农场:可以查看我的农场信息,种了哪些作物,什么时候成熟
3。我的仓库,可以浏览仓库里的物品,并可以卖掉
4。我的背包:可以浏览背包里的东西,并可以自动播铲(没用的种子种了马上铲掉又种获取经验)
5。我的装饰:查看我购买的所有装饰
6。商店:可以购买全部值得购买的装饰用品(没2点经验需要120块以内的装饰)
7。日志:偷窃日志,刷新日志,被狗咬日志等等
8。设置:可以按自己需要设置一些自动除草之类的东西
9。手机控制:可以利用手机短信警报你出入验证码,然后手机通过wap网站浏览验证码图片,输入验证码。(这样即使人不在电脑前,也可以用手机输入验证码了)
http://p.blog.csdn.net/images/p_blog_csdn_net/woowindice/EntryImages/20091110/2009-11-10_134656.jpg
java代码片段:view plaincopy to clipboardprint?
// 得到好友列表;   
    public List getFriendList() {   
      String url = "http://happyfarm.qzone.qq.com/api.php?mod=friend";   
      try {   
            String login_time = ConfigProperties.getProperty("login_time");   
            String skey = ConfigProperties.getProperty("skey");   
            String _s_ = ConfigProperties.getProperty("_s_");   
            String uin = ConfigProperties.getProperty("uin");   
            HttpClient hc = new HttpClient();   
            // 创建GET方法的实例   
            GetMethod getMethod = new GetMethod(url);   
            //   
            getMethod.addRequestHeader("Accept", "*/*");   
            getMethod   
                  .addRequestHeader(   
                            "User-Agent",   
                            "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; 360SE)");   
            getMethod.addRequestHeader("Accept-Encoding", "gzip, deflate");   
            getMethod.addRequestHeader("Accept-Language", "zh-CN");   
            getMethod.addRequestHeader("Connection", "Keep-Alive");   
            getMethod.addRequestHeader("Pragma", "no-cache");   
            hc.getState().clearCookies();   
            //   
            String cookies = "1" + "; _s_=" + _s_ + "; uin=" + uin + "; skey="
                  + skey + "; login_time=" + login_time;   
            hc.getState().addCookie(   
                  new Cookie("happyfarm.qzone.qq.com", "jump", cookies, "/",   
                            new Date(2011, 12, 8), false));   

            // 执行getMethod   
            int statusCode = hc.executeMethod(getMethod);   
               
            String result = getMethod.getResponseBodyAsString();   
            if (result.startsWith("{\"errorType\":\"session\",")) {   

                logger.error(result);   
                return null;   
            }   
            List list = new ArrayList();   
            JSONArray jj = JSONArray.fromObject(result);   

            Iterator it = jj.iterator();   
            while (it.hasNext()) {   
                Object o = it.next();   

                JSONObject ja = JSONObject.fromObject(o);   
                int userID = ja.getInt("userId");   
                String userName = ja.getString("userName");   
                logger   
                        .debug("userid[" + userID + "]username[" + userName   
                              + "]");   
                FriendInfo fi = new FriendInfo();   
                fi.setId(userID);   
                fi.setName(userName);   
                list.add(fi);   
                if (RobotMain.myuserid == 0) {   
                  RobotMain.myuserid = userID;   
                  RobotMain.myname = userName;   
                  logger.info("我自己的userid=" + userID);   
                }   
            }   
            return list;   
      } catch (Exception e) {   
            logger.error(e, e);   
      }   
      return null;   
    }**** Hidden Message *****

501310440 发表于 2010-5-31 22:55:05

学习了,呵呵

chinaxhb 发表于 2010-6-4 14:59:35

只可惜了这个源码无法下载下来。

yangios 发表于 2010-9-8 19:01:20

xiexie~~~~~~~~~~zhichi~~~~~~

winpzs 发表于 2010-9-22 11:32:34

先顶一下, 学习学习

sunfeng 发表于 2010-10-7 20:40:53

我来学习一下

Chigco.Orc 发表于 2010-10-8 09:51:19

~~~~~~~~~~~~~~~~~~~~

molong1989 发表于 2010-10-17 07:45:57

学习++++++++++++++++++++++++++++++++++++++

avxs 发表于 2010-10-28 19:47:47

太强大了,学习了!!!灰常多谢。。。。。。。

likess 发表于 2010-11-19 13:45:38

很有用啊,学习了。谢谢

hyf123lt 发表于 2010-12-14 11:24:53

aaaaaasdadadada

496626778 发表于 2011-1-17 07:50:45

实施上述事实是事实上搜索

xjc123456 发表于 2011-10-28 16:57:28

:lol学习下

candy 发表于 2011-10-30 11:01:06

zssssssssssssssssssssssss

紫夜星辰 发表于 2011-11-18 22:51:51

我来看代码的
页: [1] 2
查看完整版本: C#开发QQ农场辅助实践