标签:case break Auto Stop Entity v1.1 && hotkey enemies
function main() {
UI.AddLabel("----->-> Auto Stop <-<-----");
UI.AddCheckbox("Master Toggle");
UI.AddDropdown("Trigger Key", [
"Middle Mouse",
"Mouse 4",
"Mouse 5",
"Caps Lock",
"B",
"C",
"E",
"F",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"T",
"V",
"X",
"Z" ]);
UI.AddLabel("----- <-<->->-- v1.1 --<-<->-> -----");
Cheat.RegisterCallback("Draw", "logic");
Cheat.RegisterCallback("CreateMove", "stop");
}
main();
peeking = false;
function logic() {
if (getVal("Master Toggle")) {
peeking = false;
headVis = false;
isTrigger = false;
enemies = Entity.GetEnemies();
tKey = getVal("Trigger Key");
switch(tKey) {
case 0:
hotkey = 0x04;
break;
case 1:
hotkey = 0x05;
break;
case 2:
hotkey = 0x06;
break;
case 3:
hotkey = 0x14;
break;
case 4:
hotkey = 0x42;
break;
case 5:
hotkey = 0x43;
break;
case 6:
hotkey = 0x45;
break;
case 7:
hotkey = 0x46;
break;
case 8:
hotkey = 0x48;
break;
case 9:
hotkey = 0x49;
break;
case 10:
hotkey = 0x4A;
break;
case 11:
hotkey = 0x4B;
break;
case 12:
hotkey = 0x4C;
break;
case 13:
hotkey = 0x4D;
break;
case 14:
hotkey = 0x4E;
break;
case 15:
hotkey = 0x4F;
break;
case 16:
hotkey = 0x50;
break;
case 17:
hotkey = 0x54;
break;
case 18:
hotkey = 0x56;
break;
case 19:
hotkey = 0x58;
break;
case 20:
hotkey = 0x5A;
break;
default:
Cheat.PrintChat("Shit's broke bro");
}
for ( i = 0; i < enemies.length; i++)
{
localEnt = Entity.GetLocalPlayer();
localHeadPos = Entity.GetHitboxPosition(localEnt, 0);
headHitbox = Entity.GetHitboxPosition(enemies[i], 0);
headToHeadBT = Trace.Bullet(enemies[i], localEnt, headHitbox, localHeadPos);
headVis = 1;
if (headToHeadBT != null) { headVis = headToHeadBT[1]; }
if (Entity.IsValid(enemies[i]) && !Entity.IsDormant(enemies[i]) && Entity.IsAlive(enemies[i]) && headVis >= 1) { peeking = true; }
if (Global.IsKeyPressed(hotkey)) {
isTrigger = true;
} else { return; }
}
} else { return; }
}
function stop() {
inaccuracy = Local.GetInaccuracy();
if (getVal("Master Toggle") && peeking && isTrigger) {
if (inaccuracy >= 0.0120) {
if (Global.IsKeyPressed(0x57)) { UserCMD.SetMovement([-200, 0, 0]); }
if(Global.IsKeyPressed(0x41)) { UserCMD.SetMovement([0, 200, 0]); }
if(Global.IsKeyPressed(0x53)) { UserCMD.SetMovement([200, 0, 0]); }
if(Global.IsKeyPressed(0x44)) { UserCMD.SetMovement([0, -200, 0]); }
}else if (inaccuracy >= 0.0080 && inaccuracy <= 0.0119) {
if (Global.IsKeyPressed(0x57)) { UserCMD.SetMovement([-120, 0, 0]); }
if(Global.IsKeyPressed(0x41)) { UserCMD.SetMovement([0, 120, 0]); }
if(Global.IsKeyPressed(0x53)) { UserCMD.SetMovement([120, 0, 0]); }
if(Global.IsKeyPressed(0x44)) { UserCMD.SetMovement([0, -120, 0]); }
}
}
}
function getVal(valueName) {
return UI.GetValue("Misc", "JAVASCRIPT", "Script items", valueName);
}
标签:case,break,Auto,Stop,Entity,v1.1,&&,hotkey,enemies 来源: https://www.cnblogs.com/L1079991001/p/12237416.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。