Advertisement
Second_Fry

Techies remote mines autodetonate cheat

Jul 22nd, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //// https://new.vk.com/feed?w=wall5820738_5067
  2. //// Techies remote mines autodetonate cheat's untested JS code written using Valve API.
  3. // Damn, this is too easy. Regular users should not be able to include JS scripts into official ranked games.
  4. // API reference https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Panorama/Javascript/API
  5.  
  6. var mines = Entities.GetAllEntitiesByClassname('npc_dota_techies_remote_mine');
  7. var heroes = Entities.GetAllHeroEntities();
  8. var heroes_enemy;
  9. var ability_detonate = Entities.GetAbilityByName(mines[0].id, "ability_techies_remote_mines_self_detonate")
  10. // хз что он там возвращает, поэтому кастанем forEach из прототипа Array
  11. Array.prototype.forEach.call(heroes, function(hero) {
  12.     // хз структура Entity, но как-то же она хранит свой id
  13.     if (Entities.IsEnemy(hero.id)) {heroes_enemy[] = hero; }
  14. });
  15. Array.prototype.forEach.call(mines, function(mine) {
  16.     Array.prototype.forEach.call(heroes_enemy, function(enemy) {
  17.         if (Entities.GetRangeToUnit(mine.id, enemy.id) < 425) { // 425 is remote mine damage range
  18.             Abilities.ExecuteAbility(ability_detonate.id, mine.id, false);
  19.         }
  20.     })
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement