Git Product home page Git Product logo

Comments (2)

lxhjdqw2 avatar lxhjdqw2 commented on August 15, 2024

`//Показывает начало каста скилов
//Пока что 100% показывает следующие скилы: стан лины, санстрайк, стан лешрака, торрент кунки

for ( var i in Game.Particles.skillalert_garbage )
try{ Particles.DestroyParticleEffect(Game.Particles.skillalert_garbage[i],Game.Particles.skillalert_garbage[i]) }catch(e){}
try{ GameEvents.Unsubscribe( parseInt( Game.Subscribes.SkillAlert ) ) }catch(e){}
Game.Particles.skillalert_garbage=[]

function MapLoaded(){
try{ GameEvents.Unsubscribe( Game.Subscribes.SkillAlert ) }catch(e){}
Game.Particles.skillalert_garbage = []
}

function find(array, value){
for (var i = 0; i < array.length; i++) {
if (array[i] == value) return i;
}
return -1;
}

SAllertEvery = function(){
thinkers = Entities.GetAllEntitiesByName('npc_dota_thinker')
for ( var m in thinkers){
EntityIndex = thinkers[m]
Abs = Entities.GetAbsOrigin( EntityIndex )
if ( !Abs ){
if ( Game.Particles.skillalert_garbage[ EntityIndex ] ){
try{ Particles.DestroyParticleEffect( Game.Particles.skillalert_garbage[ EntityIndex ], Game.Particles.skillalert_garbage[ EntityIndex ] ) }catch(e){}
delete Game.Particles.skillalert_garbage[ EntityIndex ]
}
continue
}
if ( !Game.Particles.skillalert_garbage[ EntityIndex ] ){
Game.Particles.skillalert_garbage[ EntityIndex ] = Particles.CreateParticle("particles/neutral_fx/roshan_spawn.vpcf", ParticleAttachment_t.PATTACH_ABSORIGIN, 0)
var MyID = Game.GetLocalPlayerID()
var MyEnt = Players.GetPlayerHeroEntityIndex(Game.GetLocalPlayerID())
var myxyz = Entities.GetAbsOrigin(Players.GetPlayerHeroEntityIndex(Game.GetLocalPlayerID()))

        var x = myxyz[0]
        var y = myxyz[1]
        var a = Abs[0]
        var b = Abs[1]
        var r = 250
        var num = (x-a)*(x-a)+(y-b)*(y-b)

        if(num > 30625){
            Game.ScriptLogMsg("off", '#00ff00')
        }else{
            Game.ScriptLogMsg("on", '#00ff00')
            var distance_x = x - a  
            if(distance_x  >  0 ){
                myxyz[0] = myxyz[0] + (r - distance_x)

            }else{
                myxyz[0] = myxyz[0] - (r + distance_x)

            }

            var Ents = Entities.GetAllHeroEntities()                
            for (i in Ents) {
                for(m=0;m<Entities.GetAbilityCount(Ents[i]);m++){
                    var Abil = Entities.GetAbility(Ents[i], m)
                    Game.ScriptLogMsg(Abilities.GetAbilityName(Abil) , '#00ff00')
                }
                if(Entities.IsEnemy(EntityIndex)){

                    Game.MoveTo(MyEnt,myxyz)
                }else{
                    return -1;
                }
            }

        }

    }
    Particles.SetParticleControl(Game.Particles.skillalert_garbage[ EntityIndex ], 0, Abs) 
}
for ( var i in Game.Particles.skillalert_garbage ){
    if ( find(thinkers,i) == -1 ){
        try{ Particles.DestroyParticleEffect(Game.Particles.skillalert_garbage[i],Game.Particles.skillalert_garbage[i]) }catch(e){}
        delete Game.Particles.skillalert_garbage[i]
    }
}

}

function OnOff(){
if ( !SkillAlert.checked ){
Game.DTick(SAllertEvery)
Game.ScriptLogMsg('Script disabled: SkillAlert', '#ff0000')
for ( var i in Game.Particles.skillalert_garbage )
try{ Particles.DestroyParticleEffect(Game.Particles.skillalert_garbage[i],Game.Particles.skillalert_garbage[i]) }catch(e){}
try{ GameEvents.Unsubscribe( Game.Subscribes.SkillAlert ) }catch(e){}
Game.Particles.skillalert_garbage = []
}else{
Game.Tick(SAllertEvery)
Game.ScriptLogMsg('Script enabled: SkillAlert', '#00ff00')
Game.Subscribes.SkillAlert = GameEvents.Subscribe('game_newmap', MapLoaded)
}
}

var Temp = $.CreatePanel( "Panel", $('#trics'), "SkillAlert" )
Temp.SetPanelEvent( 'onactivate', OnOff )
Temp.BLoadLayoutFromString( '', false, false)
var SkillAlert = $.GetContextPanel().FindChildTraverse( 'SkillAlert' ).Children()[0]

`

from d2jscriptsofficial.

91k avatar 91k commented on August 15, 2024

Hello! This version script is outdated.
as I understand, you want to make your character left (Game.MoveTo...) of stun?

from d2jscriptsofficial.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.