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 ***** 学习了,呵呵 只可惜了这个源码无法下载下来。 xiexie~~~~~~~~~~zhichi~~~~~~ 先顶一下, 学习学习 我来学习一下 ~~~~~~~~~~~~~~~~~~~~ 学习++++++++++++++++++++++++++++++++++++++ 太强大了,学习了!!!灰常多谢。。。。。。。 很有用啊,学习了。谢谢 aaaaaasdadadada 实施上述事实是事实上搜索 :lol学习下 zssssssssssssssssssssssss 我来看代码的
页:
[1]
2