function Trig_KillHero_Actions takes nothing returns nothing local integer i=0 local unit k=GetKillingUnit() local unit d=GetTriggerUnit() local player pk=GetOwningPlayer(k) local player pd=GetOwningPlayer(d) local integer idpk=GetPlayerId(pk) local integer idpd=GetPlayerId(pd) local integer gold=150 local integer goldfb=200 if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true then if fb==true then call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" ( "+I2S(lvl[idpk])+" )"+" убил игрока "+pcn[idpd]+" ( "+I2S(GetHeroLevel(d))+" )"+" и получил за его голову " + "|c00FFFF00"+I2S(R2I(gold))+"|r золота!") call SetPlayerState(pk,PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(pk,PLAYER_STATE_RESOURCE_GOLD)+gold) call SetPlayerState(pd,PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(pd,PLAYER_STATE_RESOURCE_GOLD)-gold/2) endif set kill[idpk]=kill[idpk]+1 set death[idpd]=death[idpd]+1 loop exitwhen i>11 if kill[idpk]==score then call CustomVictoryBJ(Player(idpk),true,true ) call CustomDefeatBJ( Player(i), "Вы проиграли!" ) endif set i=i+1 endloop if fb==false then call SetPlayerState(pk,PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(pk,PLAYER_STATE_RESOURCE_GOLD)+gold+goldfb) call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" ( "+I2S(lvl[idpk])+" )"+" убил игрока "+pcn[idpd]+" ( "+I2S(GetHeroLevel(d))+" )"+" и получил за его голову " + "|c00FFFF00"+I2S(R2I(gold))+" + "+I2S(R2I(goldfb))+"|cFFFF0303 (Первая Кровь)|r"+" золота!") call StartSound(gg_snd_firstblood) call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" пролил |cFFFF0303первую кровь!|r") set fb=true endif if kill[idpk]==2 then set gold=225 call StartSound(gg_snd_Double_Kill) call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" ( "+I2S(lvl[idpk])+" )"+" |cFF0042FFDouble Kill!|r") endif if kill[idpk]==3 then set gold=275 call StartSound(gg_snd_triple_kill) call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" ( "+I2S(lvl[idpk])+" )"+" |cFFFFFC01Triple Kill!|r") endif if kill[idpk]==4 then set gold=325 call StartSound(gg_snd_UltraKill) call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" ( "+I2S(lvl[idpk])+" )"+" |cFFFF0303Ultra Kill!|r") endif if kill[idpk]>=5 then set gold=375 call StartSound(gg_snd_DE06_Rampage) call DisplayTextToPlayer(GetLocalPlayer(),0.,0.,pcn[idpk]+" ( "+I2S(lvl[idpk])+" )"+" |cFF7EBFF1Rampage!|r") endif call TimerStart(KillTimer[idpk],10.,false,function Trig_KillHero_Timer) endif set k=null set d=null
Данный код часть моей системы убийств "Как в Доте"