Raised This Month: $51 Target: $400
 12% 

C.S 1.6 Boss Skill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 10-19-2014 , 15:24   C.S 1.6 Boss Skill
Reply With Quote #1

I'm not sure which of the Boss ( I think it is Alien Boss ) have one skill - all the players who is in the RADIUS draws them to himself when use that skill.
I wonder if anyone knows what it is and can this be used to make zombie class?
Krtola is offline
Send a message via Skype™ to Krtola
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 10-20-2014 , 01:14   Re: C.S 1.6 Boss Skill
Reply With Quote #2

Guide with this:

PHP Code:
static Float:originF[3],  victim = -1;
                    
pev(Entpev_originoriginF);
                    
                    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginF1000.0)) != 0)
                    {
                        if (!
is_user_alive(victim))
                            continue;
                
                        new 
Float:fl_Velocity[3];
                        new 
vicOrigin[3], originN[3];
                
                        
get_user_origin(victimvicOrigin);
                        
originN[0] = floatround(originF[0]);
                        
originN[1] = floatround(originF[1]);
                        
originN[2] = floatround(originF[2]);
                        
                        new 
distance get_distance(originNvicOrigin);
                
                        if (
distance 1)
                        {
                            new 
Float:fl_Time distance 900.0;
                
                            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
                            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
                            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
                        } 
                        else
                        {
                            
fl_Velocity[0] = 0.0
                            fl_Velocity
[1] = 0.0
                            fl_Velocity
[2] = 0.0
                        
}
                
                        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
                    } 
wicho is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 10-20-2014 , 05:18   Re: C.S 1.6 Boss Skill
Reply With Quote #3

@wicho is this from alien boss ?
I want to see all the code.
Krtola is offline
Send a message via Skype™ to Krtola
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 10-21-2014 , 00:01   Re: C.S 1.6 Boss Skill
Reply With Quote #4

PHP Code:
#include < amxmodx >
#include < engine >
#include < fakemeta >
#include < cstrike >
#include < hamsandwich >
#include < xs >
#include < color >
#include < dhudmessage >

native zp_cs_get_user_money(id)
native zp_cs_set_user_money(id,value)

native zp_get_user_exp(id)
native zp_set_user_exp(id,value)

new 
g_MsgSync2

enum 
(+= 100)
{
    
TASK_SHOWHUD
}

#define ID_SHOWHUD (taskid - TASK_SHOWHUD)

#define NAME        "[Boss] AlienBoss"
#define VERSION        "1.0"
#define AUTHOR        "heka"

#define PHOBOS_KILL_MONEY                30000
#define PHOBOS_KILL_EXP                    50

#define PHOBOS_DMG_MONEY                500
#define PHOBOS_DAMAGE_REWARD            600

#define PHOBOS_HEALTH                    400000.0
    
#define PHOSOS_DAMAGE_ATTACK            350.0
#define PHOBOS_DAMAGE_MAHADASH            1500.0
#define PHOBOS_DAMAGE_SHOCKWAVE_LOW        290.0
#define PHOBOS_DAMAGE_SHOCKWAVE_NORMAL    850.0
#define PHOBOS_DAMAGE_SHOCKWAVE_HIGH    1500.0

#define PHOBOS_ANIM_RUN                    4
#define PHOBOS_ANIM_SWING                6
#define PHOBOS_ANIM_SHOCKWAVE            5
#define PHOBOS_ANIM_DUSH                7
#define PHOBOS_ANIN_DEATH                1

#define PHOBOS_SOUND_SWING                "npc/alienboss/swing.wav"
#define PHOBOS_SOUND_DUSH                "npc/alienboss/voice2.wav"
#define PHOBOS_SOUND_VOICE                "npc/alienboss/voice.wav"
#define PHOBOS_SOUND_DEATH                "npc/alienboss/death.wav"
#define PHOBOS_SOUND_SHOCKWAVE            "npc/alienboss/shokwave.wav"
#define PHOBOS_SOUND_FOOTSTEP1            "npc/alienboss/footstep_1.wav"
#define PHOBOS_SOUND_FOOTSTEP2            "npc/alienboss/footstep_2.wav"
#define PHOBOS_SOUND_FLUXING            "npc/alienboss/pull_cast.wav"

#define PHOBOS_HEALTH_SPRITE            "sprites/npc_hp_grade2.spr"

static Float:Origin[3]

static 
g_Alien
new HPspr
static VictimID
static Float:g_Health
static phase
static g_countdown
static Ability
new bool:GameStart
new bool:RoundEnd

new const Resource[][] = 
{
    
"models/npc_hardcs/npc_alienboss.mdl",
    
"sprites/blood.spr",
    
"sprites/bloodspray.spr",
    
"sprites/white.spr",
    
"sprites/fluxing.spr"
}
static 
g_Resource[sizeof Resource]

new const 
SoundList[][] =
{
    
"npc/alienboss/zombie_scenario_ready.mp3",
    
"npc/alienboss/scenario_rush.mp3"
}

static 
bool:oneFloat:g_step[512]
enum 
{
    
WALK,
    
MS,
    
ATTACK,
    
FLUXING,
    
HOOK,
    
SHOCKWAVE_LOW,
    
SHOCKWAVE_NORMAL,
    
SHOCKWAVE_HIGH
}

public 
plugin_init() {
    new 
szMapName64 ];
    
get_mapnameszMapName63 );

    if( 
containszMapName"zp_boss_city" ) == -)
        return;

    
register_plugin(NAMEVERSIONAUTHOR)
            
    
register_think("AlienBoss""Think_Boss")
    
register_think("HP""Think_HP")
    
    
register_touch("AlienBoss""player""Touch_Boss"

    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_logevent("logevent_round_end"2"1=Round_End")

    
register_concmd("spawn_alien","spawn")

    
register_event("HLTV""Event_NewRound","a""1=0""2=0")

    
RegisterHam(Ham_TakeDamage"info_target""TakeDamage")
    
RegisterHam(Ham_TraceAttack"info_target""TraceAttack")

    
set_task(1.0"ShowHUD"TASK_SHOWHUD__"b")

    
register_dictionary("zp_alienboss.txt")

    
RoundEnd false

    g_MsgSync2 
CreateHudSyncObj()
}

public 
logevent_round_end(ent
{    
    
RoundEnd true
}

public 
force_team(id)
{
    
engclient_cmd(id"jointeam""2""3")
}

public 
client_disconnect()
{
    
remove_task(TASK_SHOWHUD)
}

public 
event_round_start()
{
    if(!
RoundEnd
    {
        
set_task(1.0"countdown"4441223__"b")
        
g_countdown 45
    
}
    else
    {
        
set_task(5.0"change_map")
    }
}    

public 
countdown()
{
    if(!
g_countdown)
    {
        
remove_task(4441223)
        return
    }

    
client_print(0print_center"%L"LANG_PLAYER"PREPARE_BATTLE",g_countdown)
    
    if(
g_countdown <= 5)
    {
        new 
sound[32]
        
format(sound31"city/other/%d.wav"g_countdown)
        
        
client_cmd(0"spk ^"%s^""sound)
    }

    if(
g_countdown == 20)
    {
        
client_cmd(0"mp3 play ^"sound/%s^""SoundList[0])
    }

    if(
g_countdown == 1)
    {
        
client_print(0print_center"%L"LANG_PLAYER"START_BATTLE")
        
client_cmd(0"mp3 play ^"sound/%s^""SoundList[1])

        
spawn()    
    }
    
    
g_countdown--
}

public 
ShowHUD(taskid)
{
    
set_dhudmessage(2552550, -1.00.000.01.10.00.0)
    
show_dhudmessage(ID_SHOWHUD"%L"LANG_PLAYER"BONUS_HUD")
}

public 
RandomAbility(taskid
{
    if (
Ability != WALK)
        return
    
    switch(
phase)
    {
        case 
1:
        {
            
Ability SHOCKWAVE_LOW
        
}
        case 
2:
        {
            switch(
random_num(01)) 
            {
                case 
0Ability SHOCKWAVE_LOW
                
case 1Ability SHOCKWAVE_NORMAL
            
}                            
        }
        case 
3:
        {
            switch(
random_num(03)) 
            {
                case 
0Ability SHOCKWAVE_LOW
                
case 1Ability SHOCKWAVE_NORMAL
                
case 2Ability SHOCKWAVE_HIGH
                
case 3Ability MS
            
}                            
        }
    }
}

public 
spawn() {
    
g_Alien engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    
HPspr engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))

    
engfunc(EngFunc_SetModelg_AlienResource[0])
    
engfunc(EngFunc_SetSizeg_Alien, { -32.0, -32.0, -36.0 }, { 32.032.096.0 })
    
Origin[0] = -317.0
    Origin
[1] = 17.0
    Origin
[2] = 424.0

    engfunc
(EngFunc_SetOriging_AlienOrigin)
    
    
set_pev(g_Alienpev_classname"AlienBoss")
    
set_pev(g_Alienpev_solidSOLID_BBOX)
    
set_pev(g_Alienpev_movetypeMOVETYPE_PUSHSTEP)
    
set_pev(g_Alienpev_takedamageDAMAGE_YES)
    
set_pev(g_Alienpev_healthPHOBOS_HEALTH)
    
set_pev(g_Alienpev_deadflagDEAD_NO)
    
set_pev(g_Alienpev_gravity10.0)
    
set_pev(g_Alienpev_nextthinkget_gametime())

    
Origin[2] += 300.0
    pev
(g_Alienpev_originOrigin)
    
engfunc(EngFunc_SetOriginHPsprOrigin)
    
engfunc(EngFunc_SetModelHPsprPHOBOS_HEALTH_SPRITE)
    
entity_set_float(HPsprEV_FL_scale0.6)
    
set_pev(HPsprpev_classname"HP")
    
set_pev(HPsprpev_solidSOLID_NOT)
    
set_pev(HPsprpev_movetypeMOVETYPE_NOCLIP)
    
set_pev(HPsprpev_frame100.0)
    
set_pev(HPsprpev_nextthinkget_gametime())

    
g_step[g_Alien] = 0.0
    
    Anim
(g_Alien2)
    
Ability FLUXING
    phase 
1
    PrintChatColor
(0,print_chat,"!g[ZP] %L!"LANG_PLAYER"ALIEN_PHASE"phase)

    
one true
    GameStart 
true

    set_task
(10.0"RandomAbility"1337__"b")
}

public 
client_putinserver(id)
{
    if(
GameStartset_pdata_int(id3651)
}

public 
Event_NewRound()
{
    
remove_entity_name("AlienBoss")
    
remove_entity_name("HP")
    
remove_task(3007)
    
remove_task(1337)
}

public 
Think_Boss(Ent) {
    if (
pev(Entpev_deadflag) == DEAD_DYING)
        return

    if(
pev(Entpev_health)  <= PHOBOS_HEALTH 2.0 && phase == 1)
    {
        
phase 2
        PrintChatColor
(0,print_chat,"!g[ZP] %L!"LANG_PLAYER"ALIEN_PHASE"phase)
    }
    if(
pev(Entpev_health)  <= PHOBOS_HEALTH 4.0 && phase == 2)
    {
        
phase 3
        PrintChatColor
(0,print_chat,"!g[ZP] %L!"LANG_PLAYER"ALIEN_PHASE"phase)
    }

    switch ( 
Ability ) {
        case 
WALK: {
            new 
Float:Velocity[3], Float:Angle[3]
            static 
Target
            
if (!is_user_alive(Target)) {
                
Target GetRandomAlive(random_num(1GetAliveCount()))
                
set_pev(Entpev_nextthinkget_gametime() + 0.1)
                return
            }
            if (
one) {
                
set_pev(Entpev_movetypeMOVETYPE_PUSHSTEP)
                
Anim(EntPHOBOS_ANIM_RUN)
                
one false
            
}
            new 
LenLenBuff 99999
            
for(new 1<= get_maxplayers(); i++) {
                if (!
is_user_alive(i) || is_user_bot(i))
                    continue

                
Len Move(Enti500.0VelocityAngle)
                if (
Len LenBuff) {
                    
LenBuff Len
                    Target 
i
                
}
            }
            for(new 
1get_maxplayers(); i++)
            {
                if(
is_user_alive(i) && entity_range(iEnt) <= 500.0)
                {
                    
message_begin(MSG_ONEget_user_msgid("ScreenShake"),{0,0,0}, i)
                    
write_short(1<<14)
                    
write_short(1<<13)
                    
write_short(1<<13)
                    
message_end()
                }
            }    
            
set_rendering(Ent)
            
Move(EntTarget250.0VelocityAngle)
            
Velocity[2] = 0.0
            set_pev
(Entpev_velocityVelocity)
            
set_pev(Entpev_anglesAngle)
            
set_pev(Entpev_nextthinkget_gametime() + 0.1)
        }
        case 
ATTACK: {
            static 
num    
            
switch (num) {
                case 
0: {
                    
set_pev(Entpev_velocityFloat:{0.00.0, -0.1})
                    
Anim(EntPHOBOS_ANIM_SWING)
                    
num++
                    
set_pev(Entpev_nextthinkget_gametime() + 0.2)
                    
PlaySound(0PHOBOS_SOUND_SWING)
                    return
                }
                case 
1: {
                    static 
Float:OriginA[3], Float:OriginA2[3], Float:LenAFloat:Vector[3], Float:Velocity[3]
                    
                    
pev(g_Alienpev_originOriginA)
                    
pev(VictimIDpev_originOriginA2)
                    
                    
xs_vec_sub(OriginA2OriginAVelocity)
                    
xs_vec_sub(OriginAOriginA2Vector)
                        
                    
LenA xs_vec_len(Vector)
                    
                    if (
LenA <= 400
                    {
                        
//ExecuteHamB(Ham_TakeDamage, VictimID, 0, VictimID, PHOSOS_DAMAGE_ATTACK, DMG_BLAST)
                        
boss_damage(VictimIDPHOSOS_DAMAGE_ATTACK)
                        
ScreenShake(VictimID)
                        
ScreenFade(VictimID3, {25500}, 120)
                    }
                }
            }
            
num 0
            one 
true
            Ability 
WALK
            set_pev
(Entpev_nextthinkget_gametime() + 1.2)
        }
        case 
MS: {
            static 
numFloat:Origin[3], Float:Origin2[3], Float:Vector[3], Float:Angle[3]
            switch ( 
num ) {
                case 
0: {
                    new 
MS_Attack GetRandomAlive(random_num(1GetAliveCount()))
                    
                    
pev(MS_Attackpev_originOrigin)
                    
pev(Entpev_originOrigin2)

                    
set_pev(g_Alienpev_gravity1.0)
                    
                    
xs_vec_sub(OriginOrigin2Vector)
                    
vector_to_angle(VectorAngle)
                    
xs_vec_normalize(VectorVector)
                    
xs_vec_mul_scalar(Vector1200.0Vector)
                    
Angle[0] = 0.0
                    Angle
[2] = 0.0
                    Vector
[2] = 0.0
                    set_pev
(Entpev_anglesAngle)
                    
set_pev(Entpev_movetypeMOVETYPE_NONE)
                    
Anim(EntPHOBOS_ANIM_DUSH)
                    
set_pev(Entpev_nextthinkget_gametime() + 1.0)
                    
PlaySound(0PHOBOS_SOUND_DUSH)
                    
num++
                    return
                }
                case 
1: {
                    
set_pev(Entpev_movetypeMOVETYPE_FLY)
                    
set_pev(Entpev_velocityVector)
                    
set_pev(Entpev_nextthinkget_gametime() + 0.7)

                    
num++
                    return
                }
            }
            
set_pev(Entpev_nextthinkget_gametime() + 0.1)
            
num 0
            Ability 
WALK
            one 
true
            
return
        }
        case 
FLUXING:
        {
            static 
numFluxSprFloat:Origin[3]
            switch ( 
num ) {
                case 
0: {
                    
Anim(Ent2)
                    
FluxSpr engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"env_sprite"))
                    
pev(Entpev_originOrigin)
                    
Origin[2] += 70
                    engfunc
(EngFunc_SetOriginFluxSprOrigin)
                    
engfunc(EngFunc_SetModelFluxSprResource[4])
                    
set_pev(FluxSprpev_solidSOLID_NOT)
                    
set_pev(FluxSprpev_movetypeMOVETYPE_NOCLIP)
                    
set_rendering(FluxSprkRenderFxFadeSlow255255255kRenderTransAdd255)
                    
set_rendering(EntkRenderFxGlowShell255255255kRenderNormal30)
                    
set_pev(FluxSprpev_framerate5.0)
                    
dllfunc(DLLFunc_SpawnFluxSpr)
                    
PlaySound(0PHOBOS_SOUND_FLUXING)
                    
set_pev(Entpev_nextthinkget_gametime() + 0.2)
                    
num++
                    return 
                }
                case 
1..9: {
                    static 
Float:originF[3],  victim = -1;
                    
pev(Entpev_originoriginF);
                    
                    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginF1000.0)) != 0)
                    {
                        if (!
is_user_alive(victim))
                            continue;
                
                        new 
Float:fl_Velocity[3];
                        new 
vicOrigin[3], originN[3];
                
                        
get_user_origin(victimvicOrigin);
                        
originN[0] = floatround(originF[0]);
                        
originN[1] = floatround(originF[1]);
                        
originN[2] = floatround(originF[2]);
                        
                        new 
distance get_distance(originNvicOrigin);
                
                        if (
distance 1)
                        {
                            new 
Float:fl_Time distance 900.0;
                
                            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
                            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
                            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
                        } 
                        else
                        {
                            
fl_Velocity[0] = 0.0
                            fl_Velocity
[1] = 0.0
                            fl_Velocity
[2] = 0.0
                        
}
                
                        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
                    }

                    
set_pev(Entpev_nextthinkget_gametime() + 0.2)
                    
num++
                    return
                }
                case 
10: {
                    
engfunc(EngFunc_RemoveEntityFluxSpr)
                    
set_rendering(Ent)
                    switch(
phase)
                    {
                        case 
1:
                        {
                            switch(
random_num(01)) 
                            {
                                case 
0Ability ATTACK
                                
case 1Ability SHOCKWAVE_LOW
                            
}
                        }
                        case 
2:
                        {
                            switch(
random_num(02)) 
                            {
                                case 
0Ability ATTACK
                                
case 1Ability SHOCKWAVE_LOW
                                
case 2Ability SHOCKWAVE_NORMAL
                            
}                            
                        }
                        case 
3:
                        {
                            switch(
random_num(04)) 
                            {
                                case 
0Ability ATTACK
                                
case 1Ability SHOCKWAVE_LOW
                                
case 2Ability SHOCKWAVE_NORMAL
                                
case 3Ability SHOCKWAVE_HIGH
                                
case 4Ability MS
                            
}                            
                        }
                    }
                    
one true
                    num 
0
                    set_pev
(Entpev_nextthinkget_gametime() + 0.1)
                    return
                }
            }
        }
        case 
HOOK:
        {
            static 
num
            
switch ( num ) {
                case 
0: {
                    
Anim(Ent2)
                    
set_rendering(EntkRenderFxGlowShell255255255kRenderNormal30)
                    
PlaySound(0PHOBOS_SOUND_FLUXING)
                    
set_pev(Entpev_nextthinkget_gametime() + 0.2)
                    
num++
                    return 
                }
                case 
1..9: {
                    static 
Float:originF[3],  victim = -1;
                    
pev(Entpev_originoriginF);
                    
                    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginF1000.0)) != 0)
                    {
                        if (!
is_user_alive(victim))
                            continue;
                
                        new 
Float:fl_Velocity[3];
                        new 
vicOrigin[3], originN[3];
                
                        
get_user_origin(victimvicOrigin);
                        
originN[0] = floatround(originF[0]);
                        
originN[1] = floatround(originF[1]);
                        
originN[2] = floatround(originF[2]);
                        
                        new 
distance get_distance(originNvicOrigin);
                
                        if (
distance 1)
                        {
                            new 
Float:fl_Time distance 900.0;
                
                            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
                            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
                            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
                        } 
                        else
                        {
                            
fl_Velocity[0] = 0.0
                            fl_Velocity
[1] = 0.0
                            fl_Velocity
[2] = 0.0
                        
}
                
                        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
                    }

                    
set_pev(Entpev_nextthinkget_gametime() + 0.2)
                    
num++
                    return
                }
                case 
10: {
                    
set_rendering(Ent)
                    switch(
phase)
                    {
                        case 
1:
                        {
                            switch(
random_num(01)) 
                            {
                                case 
0Ability ATTACK
                                
case 1Ability SHOCKWAVE_LOW
                            
}
                        }
                        case 
2:
                        {
                            switch(
random_num(02)) 
                            {
                                case 
0Ability ATTACK
                                
case 1Ability SHOCKWAVE_LOW
                                
case 2Ability SHOCKWAVE_NORMAL
                            
}                            
                        }
                        case 
3:
                        {
                            switch(
random_num(04)) 
                            {
                                case 
0Ability ATTACK
                                
case 1Ability SHOCKWAVE_LOW
                                
case 2Ability SHOCKWAVE_NORMAL
                                
case 3Ability SHOCKWAVE_HIGH
                                
case 4Ability MS
                            
}                            
                        }
                    }
                    
one true
                    num 
0
                    set_pev
(Entpev_nextthinkget_gametime() + 0.1)
                    return
                }
            }
        }
        case 
SHOCKWAVE_LOW: {
            static 
num
            
switch ( num ) {
                case 
0: {
                    
set_pev(Entpev_velocityFloat:{0.00.0, -0.1})
                    
Anim(EntPHOBOS_ANIM_SHOCKWAVE)
                    
PlaySound(0PHOBOS_SOUND_VOICE)
                    
set_pev(Entpev_nextthinkget_gametime() + 2.2)
                    
num++
                    return
                }
                case 
1: {
                    static 
Float:Orig[3]
                    
pev(Entpev_originOrig)
                    
                    
ShockWave(Orig750.0, {174870}) // 450
                    
PlaySound(0PHOBOS_SOUND_SHOCKWAVE)
                    
                    for(new 
id 1id <= get_maxplayers(); id++) 
                    {
                        if (!
is_user_alive(id))
                            continue

                        if (~
pev(idpev_flags) & FL_ONGROUND)
                                 continue        

                        static 
Float:gOrigin[3], Float:Vec[3], Float:Len
                        pev
(idpev_origingOrigin)
                        
xs_vec_sub(OriggOriginVec)
                        
Len xs_vec_len(Vec)
                        if (
Len <= 550.0
                        {
                            
//ExecuteHamB(Ham_TakeDamage, id, 0, id, PHOBOS_DAMAGE_SHOCKWAVE_LOW, DMG_BLAST)
                            
boss_damage(idPHOBOS_DAMAGE_SHOCKWAVE_LOW)
                            
ScreenFade(id3, {174870}, 120)
                            
client_cmd(id"drop")
                            
ScreenShake(id)
                        }
                    }
                    
Ability WALK
                    one 
true
                    num 
0
                    set_pev
(Entpev_nextthinkget_gametime() + 0.6)
                    return
                }
            }
        }
        case 
SHOCKWAVE_NORMAL: {
            static 
num
            
switch ( num ) {
                case 
0: {
                    
set_pev(Entpev_velocityFloat:{0.00.0, -0.1})
                    
Anim(EntPHOBOS_ANIM_SHOCKWAVE)
                    
PlaySound(0PHOBOS_SOUND_VOICE)
                    
set_rendering(EntkRenderFxGlowShell2714135kRenderNormal30)
                    
set_pev(Entpev_nextthinkget_gametime() + 2.2)
                    
num++
                    return
                }
                case 
1: {
                    static 
Float:Orig[3]
                    
pev(Entpev_originOrig)
                    
                    
ShockWave(Orig950.0, {2714135}) // 450
                    
PlaySound(0PHOBOS_SOUND_SHOCKWAVE)
                    
                    for(new 
id 1id <= get_maxplayers(); id++) {
                        if (!
is_user_alive(id))
                            continue

                        if (~
pev(idpev_flags) & FL_ONGROUND)
                                 continue    
    
                        static 
Float:gOrigin[3], Float:Vec[3], Float:Len
                        pev
(idpev_origingOrigin)
                        
xs_vec_sub(OriggOriginVec)
                        
Len xs_vec_len(Vec)
                        if (
Len <= 800.0
                        {
                            
//ExecuteHamB(Ham_TakeDamage, id, 0, id, PHOBOS_DAMAGE_SHOCKWAVE_NORMAL, DMG_BLAST)
                            
boss_damage(idPHOBOS_DAMAGE_SHOCKWAVE_NORMAL)
                            
client_cmd(id"drop")
                            
ScreenShake(id)
                            
ScreenFade(id3, {2714135}, 120)
                        }
                    }
                    
Ability WALK
                    one 
true
                    num 
0
                    set_pev
(Entpev_nextthinkget_gametime() + 0.6)
                    return
                }
            }
        }
        case 
SHOCKWAVE_HIGH: {
            static 
num
            
switch ( num ) {
                case 
0: {
                    
set_pev(Entpev_velocityFloat:{0.00.0, -0.1})
                    
Anim(EntPHOBOS_ANIM_SHOCKWAVE)
                    
PlaySound(0PHOBOS_SOUND_VOICE)
                    
set_rendering(EntkRenderFxGlowShell25500kRenderNormal30)
                    
set_pev(Entpev_nextthinkget_gametime() + 2.2)
                    
num++
                    return
                }
                case 
1: {
                    static 
Float:Orig[3]
                    
pev(Entpev_originOrig)
                    
                    
ShockWave(Orig1650.0, {25500}) // 450
                    
PlaySound(0PHOBOS_SOUND_SHOCKWAVE)
                    
                    for(new 
id 1id <= get_maxplayers(); id++) 
                    {
                        if (!
is_user_alive(id))
                            continue

                        if (~
pev(idpev_flags) & FL_ONGROUND)
                                 continue
        
                        static 
Float:gOrigin[3], Float:Vec[3], Float:Len
                        pev
(idpev_origingOrigin)
                        
xs_vec_sub(OriggOriginVec)
                        
Len xs_vec_len(Vec)
                        if (
Len <= 1400.0
                        {
                            
//ExecuteHamB(Ham_TakeDamage, id, 0, id, PHOBOS_DAMAGE_SHOCKWAVE_HIGH, DMG_BLAST)
                            
boss_damage(idPHOBOS_DAMAGE_MAHADASH)
                            
client_cmd(id"drop")
                            
ScreenShake(id)
                            
ScreenFade(id3, {25500}, 120)
                        }    
                    }
                    
Ability WALK
                    one 
true
                    num 
0
                    set_pev
(Entpev_nextthinkget_gametime() + 0.6)
                    return
                }
            }
        }
    }
}

public 
Think_HP(Ent)
 {
    static 
Float:Origin[3], num
    pev
(g_Alienpev_originOrigin)
    
Origin[2] += 300.0
    set_pev
(Entpev_originOrigin)
    switch ( 
num ) {
        case 
0: {
            
num++
        }
        case 
1: {
            static 
Float:frame
            frame 
g_Health 100.0 PHOBOS_HEALTH
            
            
if (frame)
                
set_pev(Entpev_frameframe)

            if (
pev(g_Alienpev_deadflag) == DEAD_DYING
            {
                
engfunc(EngFunc_RemoveEntityEnt)
                return
            }
        }
    }
    
set_pev(Entpev_nextthinkget_gametime() + 0.1)
}

public 
TraceAttack(victimattackerFloat:damageFloat:direction[3], thdt) {
    static 
Float:End[3], ClassName[32]
    
pev(victimpev_classnameClassNamecharsmax(ClassName))
    if (
equal(ClassName"AlienBoss")) {
        
get_tr2(thTR_vecEndPosEnd)
        
Blood(End)
    }
}

public 
TakeDamage(victimweaponattackerFloat:damagedamagetype) {
    static 
ClassName[32], Float:dmg_buffer[33]
    
pev(victimpev_classnameClassNamecharsmax(ClassName))
    if (
equal(ClassName"AlienBoss")) 
    {
        
pev(victimpev_healthg_Health)
        if (
g_Health <= damage
        {
            
set_pev(victimpev_velocityFloat:{0.00.0, -0.1})
            
Anim(victimPHOBOS_ANIN_DEATH)    
            
PlaySound(0PHOBOS_SOUND_DEATH)
            
set_pev(victimpev_movetypeMOVETYPE_FLY)
            
set_pev(victimpev_solidSOLID_NOT)
            
set_pev(victimpev_velocity, {0.00.00.0})
            
set_pev(victimpev_deadflagDEAD_DYING)

            
zp_cs_set_user_money(attackerzp_cs_get_user_money(attacker) + PHOBOS_KILL_MONEY)    
            
zp_set_user_exp(attackerzp_get_user_exp(attacker) + PHOBOS_KILL_EXP)

            new 
szKillerName[32]
            
get_user_name(attackerszKillerName31)
    
            
set_hudmessage(25525500.120.505.05.0)
            
ShowSyncHudMsg(0g_MsgSync2"%L"LANG_PLAYER"ALIEN_DEATH_KILLER"szKillerNamePHOBOS_KILL_EXP,PHOBOS_KILL_MONEY)

            
PrintChatColor(0,print_chat,"!g[ZP] %L"LANG_PLAYER"ALIEN_DEATH")

            
remove_task(1337)
            
remove_task(3007)

            
set_task(5.0"change_map")
            return 
HAM_SUPERCEDE
        
}
        if(
g_Health >= damage)
        {
            
dmg_buffer[attacker] += damage
            
if(dmg_buffer[attacker] >= PHOBOS_DAMAGE_REWARD)
            {
                
dmg_buffer[attacker] = 0.0
                zp_cs_set_user_money
(attackerzp_cs_get_user_money(attacker) + PHOBOS_DMG_MONEY)
            }

        }
    }
    return 
HAM_HANDLED
}

public 
change_map()
{
    
server_cmd("changelevel zp_outskirts")
}

public 
Touch_Boss(EntWorldEnt) {
    if (
Ability == MS) {
        static 
victim = -1Float:Origin[3]
        
pev(Entpev_originOrigin)
        while((
victim engfunc(EngFunc_FindEntityInSpherevictimOrigin500.0)) != 0) {
            if (!
is_user_alive(victim))
                continue
            
            
//ExecuteHamB(Ham_TakeDamage, victim, 0, victim, PHOBOS_DAMAGE_MAHADASH, DMG_BLAST)
            
boss_damage(victimPHOBOS_DAMAGE_MAHADASH)
            
ScreenFade(victim3, {25500} ,120)
        }
    }
    
    if (
Ability == WALK) {
        
Ability ATTACK
        VictimID 
WorldEnt
    
}
}

boss_damage(victimFloat:damage
{
    if (
pev(victimpev_health) - damage <= 0ExecuteHamB(Ham_Killedvictimvictim1)
    else 
ExecuteHamB(Ham_TakeDamagevictim0victimdamageDMG_BLAST)
}

public 
plugin_precache() {
    new 
szMapName64 ];
    
get_mapnameszMapName63 );

    if( 
containszMapName"zp_boss_city" ) == -)
        return;

    for(new 
i<= charsmax(Resource); i++)
        
g_Resource[i] = precache_model(Resource[i])

    for(new 
e<= charsmax(SoundList); e++)
        
precache_sound(SoundList[e])

    
precache_sound(PHOBOS_SOUND_SWING)
    
precache_sound(PHOBOS_SOUND_DUSH)
    
precache_sound(PHOBOS_SOUND_VOICE)
    
precache_sound(PHOBOS_SOUND_DEATH)
    
precache_sound(PHOBOS_SOUND_SHOCKWAVE)
    
precache_sound(PHOBOS_SOUND_FOOTSTEP1)
    
precache_sound(PHOBOS_SOUND_FOOTSTEP2)
    
precache_model(PHOBOS_HEALTH_SPRITE)
}

stock Blood(Float:Orig[3]) {    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_BLOODSPRITE);
    
engfunc(EngFunc_WriteCoordOrig[0])
    
engfunc(EngFunc_WriteCoordOrig[1])
    
engfunc(EngFunc_WriteCoordOrig[2])
    
write_short(g_Resource[1])
    
write_short(g_Resource[2])
    
write_byte(218)
    
write_byte(random_num(12))
    
message_end();
}

stock Anim(entsequence
{
    
set_pev(entpev_sequencesequence)
    
set_pev(entpev_animtimehalflife_time())
    
set_pev(entpev_framerate1.0)    
}

stock ShockWave(Float:Orig[3], Float:RadiusColor[3]) {
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYOrig0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordOrig[0]) // x
    
engfunc(EngFunc_WriteCoordOrig[1]) // y
    
engfunc(EngFunc_WriteCoordOrig[2]-24.0// z
    
engfunc(EngFunc_WriteCoordOrig[0]) // x axis
    
engfunc(EngFunc_WriteCoordOrig[1]) // y axis
    
engfunc(EngFunc_WriteCoordOrig[2]+Radius// z axis
    
write_short(g_Resource[3]) // sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(5// life (4)
    
write_byte(30// width (20)
    
write_byte(0// noise
    
write_byte(Color[0]) // red
    
write_byte(Color[1]) // green
    
write_byte(Color[2]) // blue
    
write_byte(255// brightness
    
write_byte(0// speed
    
message_end()
}

stock ScreenShake(id) {
    
message_begin(MSG_ONEget_user_msgid("ScreenShake"),{0,0,0}, id)
    
write_short(1<<14)
    
write_short(1<<13)
    
write_short(1<<13)
    
message_end()
}

stock ScreenFade(idTimerColors[3], Alpha) {    
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("ScreenFade"), _id);
    
write_short((1<<12) * Timer)
    
write_short(1<<12)
    
write_short(0)
    
write_byte(Colors[0])
    
write_byte(Colors[1])
    
write_byte(Colors[2])
    
write_byte(Alpha)
    
message_end()
}

GetRandomAlive(target_index) {            // :3
    
new iAlive
    
for (new id 1id <= get_maxplayers(); id++) {
        if (
is_user_alive(id)) iAlive++
        if (
iAlive == target_index) return id
    
}
    return -
1
}

stock Move(StartEndFloat:speedFloat:Velocity[], Float:Angles[]) {
    new 
Float:Origin[3], Float:Origin2[3], Float:Angle[3], Float:Vector[3], Float:Len
    pev
(Startpev_originOrigin2)
    
pev(Endpev_originOrigin)
    
xs_vec_sub(OriginOrigin2Vector)
    
Len xs_vec_len(Vector)
    
vector_to_angle(VectorAngle)
    
Angles[0] = 0.0
    Angles
[1] = Angle[1]
    
Angles[2] = 0.0
    xs_vec_normalize
(VectorVector)
    
xs_vec_mul_scalar(VectorspeedVelocity)
    return 
floatround(Lenfloatround_round)
}

GetAliveCount() {                // ^^
    
new iAlive
    
for (new id 1id <= get_maxplayers(); id++) if (is_user_alive(id)) iAlive++
    return 
iAlive
}

PlaySound(id, const sound[])
{
    
client_cmd(id"spk ^"%s^""sound)

wicho is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode