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