Для использования нужен JNGP и AdicHelper
Чтто бы установить в карту нужно:
1)Скопировать все триггерые себе в карту
2)Скопировать код из корня карты
3)Установить звуки в триггере Int
Так же имеется версия на обычном Jass2.
Если нужно - выложу.
Знающие люди дайте дельные советы
Для лентяев выкладываю код:
Code
include "cj_types.j"
bool fb=false
int array kill,array spree
timer array KillTimer
string array pcn ,array KS_Text,array TextS
sound array KS_Sound,array SoundS
Code
void Trig_Init_Actions( ) {
int i = 0
//Здесь устанавливаем звуки.Чтобы работало убери "//"
//KS_Sound[3]=gg_snd_Killing_Spree
//KS_Sound[4]=gg_snd_KS5_Dominating
//KS_Sound[5]=gg_snd_MegaKill
//KS_Sound[6]=gg_snd_KS6_Unstoppable
//KS_Sound[7]=gg_snd_monster_kill
//KS_Sound[8]=gg_snd_MK4_Multi_Kill
//KS_Sound[9]=gg_snd_GodLike
//KS_Sound[2]=gg_snd_DoubleKill
//KS_Sound[3]=gg_snd_TripleKill
//KS_Sound[4]=gg_snd_UltraKill
//KS_Sound[5]=gg_snd_Rampage
//Установка текстов
KS_Text[3] = " |cFF0042FFKillingSpree!|r"
KS_Text[4] = " |cFF20C000Dominating!|"
KS_Text[5] = " |cFFFF0303Megakill!|r"
KS_Text[6] = " |cFFFE8A0EUnstoppable!|r"
KS_Text[7] = " |cFF4E2A04Monsterkill!|r"
KS_Text[8] = " |cFFFF0555Multikill!|r"
KS_Text[9] = " |cFFFFFC01Godlike!!|r"
TextS[2] = " |cFF0042FFDouble Kill!|r"
TextS[3] = " |cFFFFFC01Triple Kill!|r"
TextS[4] = " |cFFFF0303Ultra Kill!|r"
TextS[5] = " |cFF7EBFF1Rampage!|r"
whilenot i > 11 {
KillTimer[i] = CreateTimer( )
i++
}
//Установка цветов
pcn[0] = "|cFFFF0303" + GetPlayerName( Player( 0 ) ) + "|r"
pcn[1] = "|cFF0042FF" + GetPlayerName( Player( 1 ) ) + "|r"
pcn[2] = "|cFF1CE6B9" + GetPlayerName( Player( 2 ) ) + "|r"
pcn[3] = "|cFF540081" + GetPlayerName( Player( 3 ) ) + "|r"
pcn[4] = "|cFFFFFC01" + GetPlayerName( Player( 4 ) ) + "|r"
pcn[5] = "|cFFFE8A0E" + GetPlayerName( Player( 5 ) ) + "|r"
pcn[6] = "|cFF20C000" + GetPlayerName( Player( 6 ) ) + "|r"
pcn[7] = "|cFFE55BB0" + GetPlayerName( Player( 7 ) ) + "|r"
pcn[8] = "|cFF959697" + GetPlayerName( Player( 8 ) ) + "|r"
pcn[9] = "|cFF7EBFF1" + GetPlayerName( Player( 9 ) ) + "|r"
pcn[10] = "|cFF106246" + GetPlayerName( Player( 10 ) ) + "|r"
pcn[11] = "|cFF4E2A04" + GetPlayerName( Player( 11 ) ) + "|r"
}
//===========================================================================
void InitTrig_Init( ) {
gg_trg_Init = CreateTrigger( )
TriggerRegisterTimerEvent( gg_trg_Init, 1., false )
TriggerAddAction( gg_trg_Init, function Trig_Init_Actions )
}
int i = 0
//Здесь устанавливаем звуки.Чтобы работало убери "//"
//KS_Sound[3]=gg_snd_Killing_Spree
//KS_Sound[4]=gg_snd_KS5_Dominating
//KS_Sound[5]=gg_snd_MegaKill
//KS_Sound[6]=gg_snd_KS6_Unstoppable
//KS_Sound[7]=gg_snd_monster_kill
//KS_Sound[8]=gg_snd_MK4_Multi_Kill
//KS_Sound[9]=gg_snd_GodLike
//KS_Sound[2]=gg_snd_DoubleKill
//KS_Sound[3]=gg_snd_TripleKill
//KS_Sound[4]=gg_snd_UltraKill
//KS_Sound[5]=gg_snd_Rampage
//Установка текстов
KS_Text[3] = " |cFF0042FFKillingSpree!|r"
KS_Text[4] = " |cFF20C000Dominating!|"
KS_Text[5] = " |cFFFF0303Megakill!|r"
KS_Text[6] = " |cFFFE8A0EUnstoppable!|r"
KS_Text[7] = " |cFF4E2A04Monsterkill!|r"
KS_Text[8] = " |cFFFF0555Multikill!|r"
KS_Text[9] = " |cFFFFFC01Godlike!!|r"
TextS[2] = " |cFF0042FFDouble Kill!|r"
TextS[3] = " |cFFFFFC01Triple Kill!|r"
TextS[4] = " |cFFFF0303Ultra Kill!|r"
TextS[5] = " |cFF7EBFF1Rampage!|r"
whilenot i > 11 {
KillTimer[i] = CreateTimer( )
i++
}
//Установка цветов
pcn[0] = "|cFFFF0303" + GetPlayerName( Player( 0 ) ) + "|r"
pcn[1] = "|cFF0042FF" + GetPlayerName( Player( 1 ) ) + "|r"
pcn[2] = "|cFF1CE6B9" + GetPlayerName( Player( 2 ) ) + "|r"
pcn[3] = "|cFF540081" + GetPlayerName( Player( 3 ) ) + "|r"
pcn[4] = "|cFFFFFC01" + GetPlayerName( Player( 4 ) ) + "|r"
pcn[5] = "|cFFFE8A0E" + GetPlayerName( Player( 5 ) ) + "|r"
pcn[6] = "|cFF20C000" + GetPlayerName( Player( 6 ) ) + "|r"
pcn[7] = "|cFFE55BB0" + GetPlayerName( Player( 7 ) ) + "|r"
pcn[8] = "|cFF959697" + GetPlayerName( Player( 8 ) ) + "|r"
pcn[9] = "|cFF7EBFF1" + GetPlayerName( Player( 9 ) ) + "|r"
pcn[10] = "|cFF106246" + GetPlayerName( Player( 10 ) ) + "|r"
pcn[11] = "|cFF4E2A04" + GetPlayerName( Player( 11 ) ) + "|r"
}
//===========================================================================
void InitTrig_Init( ) {
gg_trg_Init = CreateTrigger( )
TriggerRegisterTimerEvent( gg_trg_Init, 1., false )
TriggerAddAction( gg_trg_Init, function Trig_Init_Actions )
}
Code
void Trig_KillHero_Timer( ) {
timer t = GetExpiredTimer( )
int i = 0
whilenot t==KillTimer[i] {
i++
}
kill[i] = 0
t = null
}
void Trig_KillHero_Actions( ) {
int i = 0
unit k = GetKillingUnit( ), d = GetTriggerUnit( )
player pk = GetOwningPlayer( k ), pd = GetOwningPlayer( d )
int idpk = GetPlayerId( pk ), idpd = GetPlayerId( pd ), gold = 150, goldkill = ( 25 * kill[idpk] ), goldfb = 200//Награда за Первую Кровь и награды за бубийства
if IsUnitType( d, UNIT_TYPE_HERO ) {
kill[idpk] ++
if fb==false {
SetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD ) + gold + goldkill + goldfb )
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + " убил игрока " + pcn[idpd] + " и получил за его голову " + "|c00FFFF00" + I2S( R2I( gold + goldkill ) ) + " + " + I2S( R2I( goldfb ) ) + "|cFFFF0303 ( Первая Кровь )|r" + " золота!" )
//StartSound(gg_snd_firstblood)
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + " пролил |cFFFF0303первую кровь!|r" )
fb = true
}
if kill[idpk] > 1 {
// StartSound(SoundS[kill[idpk]])
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + TextS[kill[idpk]] )
}
if kill[idpk] > 5 {
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + TextS[5] )
}
TimerStart( KillTimer[idpk], 10., false, function Trig_KillHero_Timer )
SetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD ) + gold + goldkill )
SetPlayerState( pd, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pd, PLAYER_STATE_RESOURCE_GOLD ) - gold / 2 - goldkill )
if fb {
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + " убил игрока " + pcn[idpd] + " и получил за его голову " + "|c00FFFF00" + I2S( R2I( gold + goldkill ) ) + "|r золота!" )
}
}
k = null
d = null
}
//===========================================================================
void InitTrig_KillHero( ) {
int index = 0
gg_trg_KillHero = CreateTrigger( )
whilenot index > 11 {
TriggerRegisterPlayerUnitEvent( gg_trg_KillHero, Player( index ), EVENT_PLAYER_UNIT_DEATH, null )
index ++
}
TriggerAddAction( gg_trg_KillHero, function Trig_KillHero_Actions )
}
timer t = GetExpiredTimer( )
int i = 0
whilenot t==KillTimer[i] {
i++
}
kill[i] = 0
t = null
}
void Trig_KillHero_Actions( ) {
int i = 0
unit k = GetKillingUnit( ), d = GetTriggerUnit( )
player pk = GetOwningPlayer( k ), pd = GetOwningPlayer( d )
int idpk = GetPlayerId( pk ), idpd = GetPlayerId( pd ), gold = 150, goldkill = ( 25 * kill[idpk] ), goldfb = 200//Награда за Первую Кровь и награды за бубийства
if IsUnitType( d, UNIT_TYPE_HERO ) {
kill[idpk] ++
if fb==false {
SetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD ) + gold + goldkill + goldfb )
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + " убил игрока " + pcn[idpd] + " и получил за его голову " + "|c00FFFF00" + I2S( R2I( gold + goldkill ) ) + " + " + I2S( R2I( goldfb ) ) + "|cFFFF0303 ( Первая Кровь )|r" + " золота!" )
//StartSound(gg_snd_firstblood)
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + " пролил |cFFFF0303первую кровь!|r" )
fb = true
}
if kill[idpk] > 1 {
// StartSound(SoundS[kill[idpk]])
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + TextS[kill[idpk]] )
}
if kill[idpk] > 5 {
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + TextS[5] )
}
TimerStart( KillTimer[idpk], 10., false, function Trig_KillHero_Timer )
SetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pk, PLAYER_STATE_RESOURCE_GOLD ) + gold + goldkill )
SetPlayerState( pd, PLAYER_STATE_RESOURCE_GOLD, GetPlayerState( pd, PLAYER_STATE_RESOURCE_GOLD ) - gold / 2 - goldkill )
if fb {
DisplayTextToPlayer( GetLocalPlayer( ), 0., 0., pcn[idpk] + " убил игрока " + pcn[idpd] + " и получил за его голову " + "|c00FFFF00" + I2S( R2I( gold + goldkill ) ) + "|r золота!" )
}
}
k = null
d = null
}
//===========================================================================
void InitTrig_KillHero( ) {
int index = 0
gg_trg_KillHero = CreateTrigger( )
whilenot index > 11 {
TriggerRegisterPlayerUnitEvent( gg_trg_KillHero, Player( index ), EVENT_PLAYER_UNIT_DEATH, null )
index ++
}
TriggerAddAction( gg_trg_KillHero, function Trig_KillHero_Actions )
}
Code
bool Trig_SpreeSystem_Cond( ) {
return IsUnitType( GetTriggerUnit( ), UNIT_TYPE_HERO )
}
void Trig_SpreeSystem_Actions ( ) {
player pk = GetOwningPlayer( GetKillingUnit( ) ), pd = GetOwningPlayer( GetTriggerUnit( ) )
int idpk = GetPlayerId( pk ), idpd = GetPlayerId( pd )
spree[idpk] ++
spree[idpd] = 0
if spree[idpk] > 2{
if spree[idpk]>=9{
StartSound( KS_Sound[9] )
DisplayTextToPlayer( GetLocalPlayer( ), 0, 0, pcn[idpk] + KS_Text[9] )
} else {
StartSound( KS_Sound[spree[idpk]] )
DisplayTextToPlayer( GetLocalPlayer( ), 0, 0, pcn[idpk] + KS_Text[spree[idpk]] )
}
}
}
//===========================================================================
void InitTrig_SpreeSystem( ){
int index = 0
gg_trg_SpreeSystem = CreateTrigger( )
whilenot index > 11 {
TriggerRegisterPlayerUnitEvent( gg_trg_SpreeSystem, Player( index ), EVENT_PLAYER_UNIT_DEATH, null )
index ++
}
TriggerAddCondition( gg_trg_SpreeSystem, Condition( function Trig_SpreeSystem_Cond ) )
TriggerAddAction( gg_trg_SpreeSystem, function Trig_SpreeSystem_Actions )
}
return IsUnitType( GetTriggerUnit( ), UNIT_TYPE_HERO )
}
void Trig_SpreeSystem_Actions ( ) {
player pk = GetOwningPlayer( GetKillingUnit( ) ), pd = GetOwningPlayer( GetTriggerUnit( ) )
int idpk = GetPlayerId( pk ), idpd = GetPlayerId( pd )
spree[idpk] ++
spree[idpd] = 0
if spree[idpk] > 2{
if spree[idpk]>=9{
StartSound( KS_Sound[9] )
DisplayTextToPlayer( GetLocalPlayer( ), 0, 0, pcn[idpk] + KS_Text[9] )
} else {
StartSound( KS_Sound[spree[idpk]] )
DisplayTextToPlayer( GetLocalPlayer( ), 0, 0, pcn[idpk] + KS_Text[spree[idpk]] )
}
}
}
//===========================================================================
void InitTrig_SpreeSystem( ){
int index = 0
gg_trg_SpreeSystem = CreateTrigger( )
whilenot index > 11 {
TriggerRegisterPlayerUnitEvent( gg_trg_SpreeSystem, Player( index ), EVENT_PLAYER_UNIT_DEATH, null )
index ++
}
TriggerAddCondition( gg_trg_SpreeSystem, Condition( function Trig_SpreeSystem_Cond ) )
TriggerAddAction( gg_trg_SpreeSystem, function Trig_SpreeSystem_Actions )
}
Скачать