"ui";
/*
Command Assistant (命令助手)
Copyright (C) 2017-2018 ProjectXero
E-mail: projectxero@163.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see [http://www.gnu.org/licenses/].
*/
function attackHook(attacker, victim) {}
function chatHook(str) {}
function continueDestroyBlock(x, y, z, side, progress) {}
function destroyBlock(x, y, z, side) {}
function projectileHitEntityHook(projectile, targetEntity) {}
function eatHook(hearts, saturationRatio) {}
function entityAddedHook(entity) {}
function entityHurtHook(attacker, victim, halfhearts) {}
function entityRemovedHook(entity) {}
function explodeHook(entity, x, y, z, power, onFire) {}
function serverMessageReceiveHook(str) {}
function deathHook(attacker, victim) {}
function playerAddExpHook(player, experienceAdded) {}
function playerExpLevelChangeHook(player, levelsAdded) {}
function redstoneUpdateHook(x, y, z, newCurrent, someBooleanIDontKnow, blockId, blockData) {}
function screenChangeHook(screenName) {}
function newLevel() {}
function startDestroyBlock(x, y, z, side) {}
function projectileHitBlockHook(projectile, blockX, blockY, blockZ, side) {}
function modTick() {}
function leaveGame() {}
function useItem(x, y, z, itemid, blockid, side, itemDamage, blockDamage) {}
function initialize() {}
function unload() {}
var MapScript = {
//世界目录
baseDir : android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/games/com.mojang/minecraftWorlds/",
//可访问钩子
hooks : ["attackHook", "chatHook", "continueDestroyBlock", "destroyBlock", "projectileHitEntityHook", "eatHook", "entityAddedHook", "entityHurtHook", "entityRemovedHook", "explodeHook", "serverMessageReceiveHook", "deathHook", "playerAddExpHook", "playerExpLevelChangeHook", "redstoneUpdateHook", "screenChangeHook", "newLevel", "startDestroyBlock", "projectileHitBlockHook", "modTick", "leaveGame", "useItem", "initialize", "unload"],
//已加载模块列表
modules : [],
//重置函数代码
clearCode : function(func) {
if (!(func in this) || typeof this[func] != "function") return null;
var q = this[func].toString();
q = q.slice(q.indexOf("function"), q.indexOf("{"));
return this[func] = eval("(" + q + "{})");
},
//补充函数代码
addCode : function(func, code) {
if (!(func in this) || typeof this[func] != "function") return null;
var q = this[func].toString();
q = q.slice(q.indexOf("function"), q.lastIndexOf("}"));
return this[func] = eval("(" + q + code + "})");
},
//读取并解析JSON-EX
readJSON : function(path, defaultValue, gzipped) {
try{
if (!(new java.io.File(path)).isFile()) return defaultValue;
var rd, s = [], q;
if (gzipped) {
rd = new java.io.BufferedReader(new java.io.InputStreamReader(new java.util.zip.GZIPInputStream(new java.io.FileInputStream(path))));
} else {
rd = new java.io.BufferedReader(new java.io.FileReader(path));
}
while (q = rd.readLine()) s.push(q);
rd.close();
return eval("(" + s.join("\n") + ")");
} catch(e) {
return defaultValue;
}
},
//保存JSON-EX
saveJSON : function(path, object, gzipped) {
var wr;
var f = new java.io.File(path).getParentFile();
if (f) f.mkdirs();
if (gzipped) {
wr = new java.util.zip.GZIPOutputStream(new java.io.FileOutputStream(path));
} else {
wr = new java.io.FileOutputStream(path);
}
wr.write(new java.lang.String(this.toSource(object)).getBytes());
wr.close();
},
//加载模块
loadModule : function(name, obj, ignoreHook) {
var i, sn, dx = this.modules.indexOf(name);
if (obj === undefined && dx >= 0) {
delete this.global[name];
} else if (!(name in this.global) || dx >= 0) {
this.global[name] = obj;
if (dx < 0) this.modules.push(name);
if (!ignoreHook && (obj instanceof Object)) {
if (typeof obj.onCreate == "function") obj.onCreate();
sn = this.toSource(name);
for (i in obj)
if (typeof obj[i] == "function" && this.hooks.indexOf(i) >= 0 && this.global[i].length == obj[i].length)
this.addCode.call(this.global, i, "this[" + sn + "]." + i + ".apply(this[" + sn + "],arguments);");
}
} else return false;
return true;
},
//返回对象源代码
toSource : function(obj) {
var strtok = ["\\\\", "\\n", "\\t", /*"\\b",*/ "\\r", "\\f", "\\\"", "\\\'"];
var _toJSON = function toJSON(x, lev) {
var p = "", r, i;
if (lev < 0) return String(x);
if (typeof x == "string") {
for (i = 0; i < strtok.length; i++) x = x.replace(new RegExp(strtok[i], "g"), strtok[i]);
return "\"" + x + "\"";
} else if (Array.isArray(x)) {
r = new Array();
for (i = 0; i < x.length; i++) r.push(toJSON(x[i], lev - 1));
p = "[" + r.join(",") + "]";
} else if (x instanceof Error) {
p = "new Error(" + toJSON(x.message) + ")";
} else if (x instanceof RegExp) {
p = x.toString();
} else if (x instanceof Date) {
p = "new Date(" + x.getTime() + ")";
} else if (x instanceof Function) {
p = x.toString();
} else if (x instanceof Object) {
r = new Array();
for (i in x) r.push(toJSON(i, lev) + ":" + toJSON(x[i], lev - 1));
p = "{" + r.join(",") + "}";
} else {
p = String(x);
}
return p;
}
return _toJSON(obj, 32);
},
//初始化
init : function(g) {
Object.defineProperty(this, "global", {
enumerable: false,
configurable: false,
writable: false,
value: g
});
if ("module" in g) { //Node.js
module.exports = function(name) {
return g[name];
}
}
},
initialize : function() {
this.global.initialize();
}
}
MapScript.init(this);
MapScript.loadModule("ctx", (function(global) {
if ("ModPE" in global) { //以ModPE脚本加载(BlockLauncher及衍生App)
MapScript.host = "BlockLauncher";
return com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
} else if ("activity" in global) { //以AutoJS脚本加载(UI模式)
MapScript.host = "AutoJs";
return activity;
} else if ("context" in global) { //以AutoJS脚本加载(非UI模式)
MapScript.host = "AutoJsNoUI";
return context;
} else if ("ScriptActivity" in global) { //在Android脚本外壳中加载
MapScript.host = "Android";
return ScriptActivity;
} else if ("World" in global) { //在Inner Core中加载
MapScript.host = "InnerCore";
return Packages.zhekasmirnov.launcher.utils.UIUtils.getContext();
} else {
MapScript.host = "Unknown";
return com.mojang.minecraftpe.MainActivity.currentMainActivity.get();
}
})(this));
MapScript.loadModule("gHandler", new android.os.Handler(ctx.getMainLooper()));
MapScript.loadModule("erp", function self(error) {
var tech = [error, "\n版本: 2018-05-16\n堆栈: ", error.stack, "\n来源: ", error.fileName, "\n包名: ", ctx.getPackageName(), "\nSDK版本: ", android.os.Build.VERSION.SDK_INT].join("");
if (MapScript.host == "BlockLauncher") tech += "\nMinecraft版本: " + ModPE.getMinecraftVersion();
if (error.javaException) {
var strw = new java.io.StringWriter(), strp = new java.io.PrintWriter(strw);
error.javaException.printStackTrace(strp);
tech += "\nJavaException: " + strw.toString();
}
android.util.Log.e("CA", tech);
try {
var fs = new java.io.PrintWriter(new java.io.FileOutputStream(android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/com.xero.ca.error.log", true));
fs.println("* Error: " + new Date().toLocaleString());
fs.println(tech);
fs.close();
} catch(e) {
android.util.Log.e
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
autojs例子大全,一千六百多个脚本,简单的到复杂的例子,统统有,小白学完马上变大神,大神学了变超神。 脚本内容包含: 几十种类型的UI脚本,抖音、QQ、微信、陌陌、支付宝等自动化操作的脚本、还有部分协议列表,HTTP协议(POST、GET)上传下载,接码模块,百度文字识别api模块,文件操作模块:txt文本读一行删一行,等等其他例子
资源推荐
资源详情
资源评论
收起资源包目录
Autojs 例子 源码 1600多个教程源码 (1668个子文件)
2018-05-16.js 464KB
情书-Luv-Letter.js 448KB
命令助手3.0.0_alpha50.js 401KB
写脚本助手3.0_Bate50.js 397KB
hl4a.js 359KB
像素印画_v1.4.js 289KB
脚本合集离线版.js 273KB
jquery1.js 236KB
像素印画Ⅱ_正式版.js 232KB
rhinoneteasecloudmusic.js 221KB
天天爱消除(1).js 214KB
111.js 199KB
魔法代码.js 184KB
消愁-毛不易(3).js 184KB
生成随机字符串待解密.js 161KB
提示音.js 159KB
绿色(2).js 144KB
代码格式化_beautify.js 139KB
极乐净土。.js 126KB
多功能工具箱(5).js 121KB
克罗地亚狂想曲.js 120KB
有点甜-汪苏泷(1).js 118KB
花之舞.js 113KB
连连看.js 109KB
多功能工具箱 v 0.27.3.js 100KB
多功能工具箱.js 100KB
抛物线及直线的回归计算[游戏中弹道预测算法核心].js 96KB
(小瓜)九州行(720x1440)多账号游戏辅助.js 96KB
极乐净土(1).js 93KB
正式版《勿试运行》。.js 91KB
梦一轩字母卡妙.js 88KB
QQ聊天加密↙.js 76KB
动态解密↘.js 70KB
2.0示例脚本合集.js 68KB
funnyEncoderPlus2.0.js 67KB
编码解析.js 66KB
9420-麦小兜(1).js 62KB
王者荣耀冒险关卡通用版6.7.js 62KB
病毒 (1).js 58KB
sun_rise&set.js 56KB
QQ刷屏#.js 53KB
加密码,本身密码6.js 52KB
relationship.js 52KB
js加密器.js 52KB
1233.js 52KB
给脚本加密码,支持所有脚本。密码是 拜见宫主大人.js 52KB
给脚本加密码。密码是 我爱你.js 52KB
假装是加密后的脚本.js 52KB
一键加密(密钥).js 52KB
autojs常用函数(1).js 50KB
取色_多点.js 48KB
文字转语音.js 47KB
快手小游戏2048合成概率较大.js 47KB
病毒.js 46KB
找图数据生成.js 45KB
找图点击代码生成器↗.js 44KB
找图点击代码生成器↑.js 42KB
多点_取色_点线.js 39KB
js查询.js 39KB
QQ_微信_自定义小尾巴.js 38KB
脚本管理工具UI示例.js 37KB
UI.js 36KB
common(1).js 35KB
wzry.ugly.min.ugly.min.ugly.min.ugly.min.ugly.min.ugly.min.js 35KB
Calender.js 34KB
UI示例(支付UI).js 33KB
红米_陌陌8.16.1.7(内测版)(8)(1).js 33KB
告白气球.js 31KB
取色_多点v1209.js 31KB
Alipay_collect_energy_Optimize.js 30KB
common.js 29KB
Animal.js 29KB
获取首字母中英文.js 29KB
山海经异兽录全能辅助.js 28KB
图片处理查看.js 28KB
main(14).js 28KB
微信跳一跳一键刷分免root免7.0全机型.js 27KB
教程_画布(2).js 27KB
教程_画布.js 27KB
图片剪切↑.js 27KB
王者冒险挑战关卡通用版8.5.js 27KB
日期农历时间显示.js 26KB
Autojs悬浮按钮.js 26KB
0计分器.js 26KB
手指动作录制↘.js 25KB
uitest - 副本.js 25KB
Autojs悬浮按钮(全版本可用).js 25KB
获取农历.js 24KB
悬浮按钮-停靠隐藏-上下自动切换.js 24KB
王者击杀自动截图.js 24KB
抢单大神源代码.js 23KB
qtiao.js 23KB
脚本云 v0.3.2(半成品).js 23KB
龙小证0106.js 23KB
JS代码加密例子.js 22KB
接码平台模块.js 22KB
3d视角.js 22KB
单词答题4级.js 22KB
jimu.js 22KB
juexin_Qtiao.js 22KB
共 1668 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
baidu_32268051
- 粉丝: 27
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页