JS-скрипт Nemesis hitlogs by qurani#7181

Забаненный
Статус
Оффлайн
Регистрация
16 Ноя 2020
Сообщения
15
Реакции[?]
3
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
nemesis hitlogs by qurani#7181
 

Вложения

Начинающий
Статус
Оффлайн
Регистрация
3 Дек 2020
Сообщения
4
Реакции[?]
0
Поинты[?]
0
Забаненный
Статус
Оффлайн
Регистрация
31 Дек 2018
Сообщения
442
Реакции[?]
212
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Пофиксил баги, и сделал что-бы цвет лога брался из самого вантапа (это сделать мега супер пупер сложно (10 сек), не знающие челы не смогут)
JavaScript:
UI.AddLabel("  nemesis hitlogs by qurani#7181");
UI.AddLabel("  nemesis hitlogs fixed by DarkLunyj#1337");

hitboxes = [
    'generic',
    'head',
    'chest',
    'stomach',
    'left arm',
    'right arm',
    'left leg',
    'right leg',
    '?'
];
var scriptitems = ("Misc", "JAVASCRIPT", "Script items");
var shots = 0;
var predicthc = 0;
var safety = 0;
var hitboxName = "";
var choked = 0;
var exploit = 0;
var logs = [];
var logsct = [];
var logsalpha = [];
function getHitboxName(index)
{
    switch (index)
    {
        case 0:
            hitboxName = "head";
            break;
        case 1:
            hitboxName = "head";
            break;
        case 2:
            hitboxName = "stomach";
            break;
        case 3:
            hitboxName = "stomach";
            break;
        case 4:
            hitboxName = "stomach";
            break;
        case 5:
            hitboxName = "chest";
            break;
        case 6:
            hitboxName = "chest";
            break;
        case 7:
            hitboxName = "left leg";
            break;
        case 8:
            hitboxName = "right leg";
            break;
        case 9:
            hitboxName = "left leg";
            break;
        case 10:
            hitboxName = "right leg";
            break;
        case 11:
            hitboxName = "left leg";
            break;
        case 12:
            hitboxName = "right leg";
            break;
        case 13:
            hitboxName = "left arm";
            break;
        case 14:
            hitboxName = "right arm";
            break;
        case 15:
            hitboxName = "left arm";
            break;
        case 16:
            hitboxName = "left arm";
            break;
        case 17:
            hitboxName = "right arm";
            break;
        case 18:
            hitboxName = "right arm";
            break;
        default:
            hitboxName = "body";
    }
    return hitboxName;
}
function HitgroupName(index) {
    return hitboxes[index] || 'body';
}

var target = -1;
var shots_fired = 0;
var hits = 0;
var lastUpdate = 0;
var logged = false;

function ragebot_fire() {
    predicthc = Event.GetInt("hitchance");
    safety = Event.GetInt("safepoint");
    hitboxName = getHitboxName(Event.GetInt("hitbox"));
    exploit = (Event.GetInt("exploit")+1).toString();
  target = Event.GetInt("target_index");
  shots_fired++;
  logged = false;
  lastUpdate = Globals.Curtime();
}

function hitlog() {
    var hit = Entity.GetEntityFromUserID(Event.GetInt("userid"));
    var attacker = Entity.GetEntityFromUserID(Event.GetInt("attacker"));
    if (attacker == Entity.GetLocalPlayer() && hit == target) hits++;

    var hittype = "hurt ";
    me = Entity.GetLocalPlayer();
    hitbox = Event.GetInt('hitgroup');
    target_damage = Event.GetInt("dmg_health");
    target_health = Event.GetInt("health");
    victim = Event.GetInt('userid');
    attacker = Event.GetInt('attacker');
    weapon = Event.GetString('weapon');
    victimIndex = Entity.GetEntityFromUserID(victim);
    attackerIndex = Entity.GetEntityFromUserID(attacker);
    name = Entity.GetName(victimIndex);
      var simtime = Globals.Tickcount() % 17;

    var flags = "";

    if (exploit == 2)
      flags += "T";

    flags += "B";

    if (hitbox == 1)
      flags += "H";

      if (safety == 1) {
          safety = "true";
      }
      else {
          safety = "false";
      }

    if (weapon == "hegrenade")
      hittype = "Naded ";
    else if (weapon == "inferno")
      hittype = "Burned ";
    else if (weapon == "knife")
      hittype = "Knifed ";

    if (me == attackerIndex && me != victimIndex) {
        Cheat.PrintColor(UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output"), "[ nem ] ");
    if (hittype == "hurt") {
        if (UI.GetValue("Script items", "Enable chat logging")) {
            Cheat.PrintChat(" \x08[\x0cgamesense\x08] [\x0c"+shots.toString()+"\x08] "+hittype+name+"'s \x10"+HitgroupName(hitbox)+"\x08 for \x07"+target_damage.toString()+"\x08 ("+target_health.toString()+" remaining) aimed=\x10"+hitboxName+"\x08("+predicthc.toString()+"%%) safety=\x03"+safety+"\x08 (\x10"+flags+"\x08) (\x10"+simtime+"\x08:\x10"+exploit+"\x08)\n");
        }
      Cheat.Print(""+hittype+name+" in the "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) aimed="+hitboxName+"("+predicthc.toString()+"%%) safety="+safety+" ("+flags+") ("+simtime+":"+exploit+")\n");
          logs.push(""+hittype+name+" in "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) aimed="+hitboxName+"("+predicthc.toString()+"%%) safety="+safety+" ("+flags+") ("+simtime+":"+exploit+")\n");
    }
    else {
      Cheat.Print(""+hittype+name+" in the "+HitgroupName(hitbox)+" for "+target_damage.toString()+" damage ("+target_health.toString()+" remaining).\n");
          logs.push(""+hittype+name+" in the "+HitgroupName(hitbox)+" for "+target_damage.toString()+" damage ("+target_health.toString()+" remaining).\n");
    }

        logsct.push(Globals.Curtime());
        logsalpha.push(255);
    }

  if (shots == 99)
    shots = 0;
  else
    shots++;

}

function removelogs() {
    if (logs.length > 6) {
        logs.shift();
        logsct.shift();
        logsalpha.shift();
    }

    if (logsct[0] + 6.5 < Globals.Curtime()) {
        logsalpha[0] -= Globals.Frametime() * 600;
        if (logsalpha[0] < 0) {
            logs.shift();
            logsct.shift();
            logsalpha.shift();
        }
    }
}
//UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output")
function item_purchase() {
    Cheat.PrintColor(UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output"), "[ nem ] ");
    Cheat.Print(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")))+" bought "+Event.GetString("weapon")+"\n");
    logs.push(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")))+" bought "+Event.GetString("weapon")+"\n");
    logsct.push(Globals.Curtime());
    logsalpha.push(255);
}

function onDraw() {
    if (!World.GetServerString()) return;
    var font = Render.AddFont("Lucida Console", 8, 0);


    for (i = 0; i < logs.length; i++) {
        Render.StringCustom(4, 4 + 13*i, 0, logs[i], [0, 0, 0, logsalpha[i]], font);
        Render.StringCustom(3, 3 + 13*i, 0, logs[i], [255, 255, 255, logsalpha[i]], font);
    }

    if (shots_fired > hits && (Globals.Curtime() - lastUpdate > 0.33)) {
      if (Globals.Curtime() - lastUpdate > 1) {
        shots_fired = 0;
        hits = 0;
      }
      if (!logged) {
        var simtime = Globals.Tickcount() % 16;
        logged = true;
        var issafe = "true";
        var reason = "?";
        if (safety == 0) {
          issafe = "false";
        }

        else if (Entity.IsAlive(Entity.GetLocalPlayer()) == false)
            reason = "unregistred";
        else if (safety == true && predicthc < 81)
            reason = "spread";
        else if (safety == true && predicthc > 80)
            reason = "resolver";
        if (exploit == 2)

          var flags = "";

        if (exploit == 2)
          flags += "T";

          flags += "B";

        Cheat.PrintColor(UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output"), "[ nem ] ");
        Cheat.Print(""+"Missed shot due to "+reason+"\n")
            logs.push(""+"Missed shot due to "+reason+"\n") 
        logsct.push(Globals.Curtime());
        logsalpha.push(255);
        if (shots == 99)
          shots = 0;
        else
          shots++;
      }
    }
}

function main() {
    Global.RegisterCallback("ragebot_fire", "ragebot_fire");
    Global.RegisterCallback("item_purchase", "item_purchase");
  Global.RegisterCallback("player_hurt", "hitlog");
    Global.RegisterCallback("Draw", "onDraw");
    Global.RegisterCallback("Draw", "removelogs");
}

main();
 
Пользователь
Статус
Оффлайн
Регистрация
9 Ноя 2019
Сообщения
429
Реакции[?]
84
Поинты[?]
2K
Пофиксил баги, и сделал что-бы цвет лога брался из самого вантапа (это сделать мега супер пупер сложно (10 сек), не знающие челы не смогут)
JavaScript:
UI.AddLabel("  nemesis hitlogs by qurani#7181");
UI.AddLabel("  nemesis hitlogs fixed by DarkLunyj#1337");

hitboxes = [
    'generic',
    'head',
    'chest',
    'stomach',
    'left arm',
    'right arm',
    'left leg',
    'right leg',
    '?'
];
var scriptitems = ("Misc", "JAVASCRIPT", "Script items");
var shots = 0;
var predicthc = 0;
var safety = 0;
var hitboxName = "";
var choked = 0;
var exploit = 0;
var logs = [];
var logsct = [];
var logsalpha = [];
function getHitboxName(index)
{
    switch (index)
    {
        case 0:
            hitboxName = "head";
            break;
        case 1:
            hitboxName = "head";
            break;
        case 2:
            hitboxName = "stomach";
            break;
        case 3:
            hitboxName = "stomach";
            break;
        case 4:
            hitboxName = "stomach";
            break;
        case 5:
            hitboxName = "chest";
            break;
        case 6:
            hitboxName = "chest";
            break;
        case 7:
            hitboxName = "left leg";
            break;
        case 8:
            hitboxName = "right leg";
            break;
        case 9:
            hitboxName = "left leg";
            break;
        case 10:
            hitboxName = "right leg";
            break;
        case 11:
            hitboxName = "left leg";
            break;
        case 12:
            hitboxName = "right leg";
            break;
        case 13:
            hitboxName = "left arm";
            break;
        case 14:
            hitboxName = "right arm";
            break;
        case 15:
            hitboxName = "left arm";
            break;
        case 16:
            hitboxName = "left arm";
            break;
        case 17:
            hitboxName = "right arm";
            break;
        case 18:
            hitboxName = "right arm";
            break;
        default:
            hitboxName = "body";
    }
    return hitboxName;
}
function HitgroupName(index) {
    return hitboxes[index] || 'body';
}

var target = -1;
var shots_fired = 0;
var hits = 0;
var lastUpdate = 0;
var logged = false;

function ragebot_fire() {
    predicthc = Event.GetInt("hitchance");
    safety = Event.GetInt("safepoint");
    hitboxName = getHitboxName(Event.GetInt("hitbox"));
    exploit = (Event.GetInt("exploit")+1).toString();
  target = Event.GetInt("target_index");
  shots_fired++;
  logged = false;
  lastUpdate = Globals.Curtime();
}

function hitlog() {
    var hit = Entity.GetEntityFromUserID(Event.GetInt("userid"));
    var attacker = Entity.GetEntityFromUserID(Event.GetInt("attacker"));
    if (attacker == Entity.GetLocalPlayer() && hit == target) hits++;

    var hittype = "hurt ";
    me = Entity.GetLocalPlayer();
    hitbox = Event.GetInt('hitgroup');
    target_damage = Event.GetInt("dmg_health");
    target_health = Event.GetInt("health");
    victim = Event.GetInt('userid');
    attacker = Event.GetInt('attacker');
    weapon = Event.GetString('weapon');
    victimIndex = Entity.GetEntityFromUserID(victim);
    attackerIndex = Entity.GetEntityFromUserID(attacker);
    name = Entity.GetName(victimIndex);
      var simtime = Globals.Tickcount() % 17;

    var flags = "";

    if (exploit == 2)
      flags += "T";

    flags += "B";

    if (hitbox == 1)
      flags += "H";

      if (safety == 1) {
          safety = "true";
      }
      else {
          safety = "false";
      }

    if (weapon == "hegrenade")
      hittype = "Naded ";
    else if (weapon == "inferno")
      hittype = "Burned ";
    else if (weapon == "knife")
      hittype = "Knifed ";

    if (me == attackerIndex && me != victimIndex) {
        Cheat.PrintColor(UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output"), "[ nem ] ");
    if (hittype == "hurt") {
        if (UI.GetValue("Script items", "Enable chat logging")) {
            Cheat.PrintChat(" \x08[\x0cgamesense\x08] [\x0c"+shots.toString()+"\x08] "+hittype+name+"'s \x10"+HitgroupName(hitbox)+"\x08 for \x07"+target_damage.toString()+"\x08 ("+target_health.toString()+" remaining) aimed=\x10"+hitboxName+"\x08("+predicthc.toString()+"%%) safety=\x03"+safety+"\x08 (\x10"+flags+"\x08) (\x10"+simtime+"\x08:\x10"+exploit+"\x08)\n");
        }
      Cheat.Print(""+hittype+name+" in the "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) aimed="+hitboxName+"("+predicthc.toString()+"%%) safety="+safety+" ("+flags+") ("+simtime+":"+exploit+")\n");
          logs.push(""+hittype+name+" in "+HitgroupName(hitbox)+" for "+target_damage.toString()+" ("+target_health.toString()+" remaining) aimed="+hitboxName+"("+predicthc.toString()+"%%) safety="+safety+" ("+flags+") ("+simtime+":"+exploit+")\n");
    }
    else {
      Cheat.Print(""+hittype+name+" in the "+HitgroupName(hitbox)+" for "+target_damage.toString()+" damage ("+target_health.toString()+" remaining).\n");
          logs.push(""+hittype+name+" in the "+HitgroupName(hitbox)+" for "+target_damage.toString()+" damage ("+target_health.toString()+" remaining).\n");
    }

        logsct.push(Globals.Curtime());
        logsalpha.push(255);
    }

  if (shots == 99)
    shots = 0;
  else
    shots++;

}

function removelogs() {
    if (logs.length > 6) {
        logs.shift();
        logsct.shift();
        logsalpha.shift();
    }

    if (logsct[0] + 6.5 < Globals.Curtime()) {
        logsalpha[0] -= Globals.Frametime() * 600;
        if (logsalpha[0] < 0) {
            logs.shift();
            logsct.shift();
            logsalpha.shift();
        }
    }
}
//UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output")
function item_purchase() {
    Cheat.PrintColor(UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output"), "[ nem ] ");
    Cheat.Print(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")))+" bought "+Event.GetString("weapon")+"\n");
    logs.push(Entity.GetName(Entity.GetEntityFromUserID(Event.GetInt("userid")))+" bought "+Event.GetString("weapon")+"\n");
    logsct.push(Globals.Curtime());
    logsalpha.push(255);
}

function onDraw() {
    if (!World.GetServerString()) return;
    var font = Render.AddFont("Lucida Console", 8, 0);


    for (i = 0; i < logs.length; i++) {
        Render.StringCustom(4, 4 + 13*i, 0, logs[i], [0, 0, 0, logsalpha[i]], font);
        Render.StringCustom(3, 3 + 13*i, 0, logs[i], [255, 255, 255, logsalpha[i]], font);
    }

    if (shots_fired > hits && (Globals.Curtime() - lastUpdate > 0.33)) {
      if (Globals.Curtime() - lastUpdate > 1) {
        shots_fired = 0;
        hits = 0;
      }
      if (!logged) {
        var simtime = Globals.Tickcount() % 16;
        logged = true;
        var issafe = "true";
        var reason = "?";
        if (safety == 0) {
          issafe = "false";
        }

        else if (Entity.IsAlive(Entity.GetLocalPlayer()) == false)
            reason = "unregistred";
        else if (safety == true && predicthc < 81)
            reason = "spread";
        else if (safety == true && predicthc > 80)
            reason = "resolver";
        if (exploit == 2)

          var flags = "";

        if (exploit == 2)
          flags += "T";

          flags += "B";

        Cheat.PrintColor(UI.GetColor("Misc", "PERFORMANCE & INFORMATION", "Information", "Log output"), "[ nem ] ");
        Cheat.Print(""+"Missed shot due to "+reason+"\n")
            logs.push(""+"Missed shot due to "+reason+"\n")
        logsct.push(Globals.Curtime());
        logsalpha.push(255);
        if (shots == 99)
          shots = 0;
        else
          shots++;
      }
    }
}

function main() {
    Global.RegisterCallback("ragebot_fire", "ragebot_fire");
    Global.RegisterCallback("item_purchase", "item_purchase");
  Global.RegisterCallback("player_hurt", "hitlog");
    Global.RegisterCallback("Draw", "onDraw");
    Global.RegisterCallback("Draw", "removelogs");
}

main();
оч оч сложно никто бы не смог догадаться написать UI.GetColor
 
Забаненный
Статус
Оффлайн
Регистрация
31 Дек 2018
Сообщения
442
Реакции[?]
212
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
e1reim = Eirem, запомните
Забаненный
Статус
Оффлайн
Регистрация
25 Дек 2018
Сообщения
383
Реакции[?]
76
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сможет кто то фиксануть под в4? буду благодарен
 
(*^-^*)
Забаненный
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
507
Реакции[?]
163
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу