AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
|
10-14-2014
, 10:09
Re: [BOSSES] Redmond Mann & Blutarch Mann
|
#15
|
Quote:
Originally Posted by Spyper
Carge_salmon have ability slot i think it can usabled as rage.
|
Otokiru mentioned the code had to be modified before it could be used as a rage. If you simply set charge_salmon's arg0 to 0 or -1, it won't work as a rage.
All i did was remove the charge-specific code to make it work as a rage.
Charge_Salmon untouched:
PHP Code:
Charge_Salmon(const String:ability_name[],index,slot,action) { new Float:charge=FF2_GetBossCharge(index,slot); new Boss=GetClientOfUserId(FF2_GetBossUserId(index)); new var3=FF2_GetAbilityArgument(index,this_plugin_name,ability_name, 3); //sound new var4=FF2_GetAbilityArgument(index,this_plugin_name,ability_name, 4); //summon_per_rage new Float:duration=FF2_GetAbilityArgumentFloat(index,this_plugin_name,ability_name,5,3.0); //uber_protection
switch (action) { case 1: { SetHudTextParams(-1.0, 0.88, 0.15, 255, 255, 255, 255); ShowSyncHudText(Boss, jumpHUD, "%t","salmon_status_2",-RoundFloat(charge)); } case 2: { SetHudTextParams(-1.0, 0.88, 0.15, 255, 255, 255, 255); if (bEnableSuperDuperJump[index]) { SetHudTextParams(-1.0, 0.88, 0.15, 255, 64, 64, 255); ShowSyncHudText(Boss, jumpHUD,"%t","super_duper_jump"); } else ShowSyncHudText(Boss, jumpHUD, "%t","salmon_status",RoundFloat(charge)); } case 3: { new Action:act = Plugin_Continue; new super = bEnableSuperDuperJump[index]; Call_StartForward(OnHaleJump); Call_PushCellRef(super); Call_Finish(act); if (act != Plugin_Continue && act != Plugin_Changed) return; if (act == Plugin_Changed) bEnableSuperDuperJump[index] = super; if (bEnableSuperDuperJump[index]) { decl Float:vel[3]; decl Float:rot[3]; GetEntPropVector(Boss, Prop_Data, "m_vecVelocity", vel); GetClientEyeAngles(Boss, rot); vel[2]=750.0+500.0*charge/70+2000; vel[0]+=Cosine(DegToRad(rot[0]))*Cosine(DegToRad(rot[1]))*500; vel[1]+=Cosine(DegToRad(rot[0]))*Sine(DegToRad(rot[1]))*500; bEnableSuperDuperJump[index]=false; TeleportEntity(Boss, NULL_VECTOR, NULL_VECTOR, vel); } else { if(var3!=0) { EmitSoundToAll(ZEPH_SND); EmitSoundToAll(ZEPH_SND); } new ii; for (new i=0; i<var4; i++) { ii = GetRandomDeadPlayer(); if(ii != -1) { bSalmon = true; FF2_SetFF2flags(ii,FF2_GetFF2flags(ii)|FF2FLAG_ALLOWSPAWNINBOSSTEAM); ChangeClientTeam(ii,BossTeam); TF2_RespawnPlayer(ii); TF2_AddCondition(ii, TFCond_Ubercharged, duration); } } } } } }
stock GetRandomDeadPlayer() { new clients[MaxClients+1], clientCount; for(new i=1;i<=MaxClients;i++) { if (IsValidEdict(i) && IsClientConnected(i) && IsClientInGame(i) && !IsPlayerAlive(i) && (GetClientTeam(i) > 1)) { clients[clientCount++] = i; } } return (clientCount == 0) ? -1 : clients[GetRandomInt(0, clientCount-1)]; }
public Action:event_player_death(Handle:event, const String:name[], bool:dontBroadcast) { if (bSalmon) { new client=GetClientOfUserId(GetEventInt(event, "userid")); new isBoss=FF2_GetBossIndex(client); if (isBoss!=-1) { for(new ii=1; ii<=MaxClients; ii++) { if(IsClientInGame(ii) && IsClientConnected(ii) && IsPlayerAlive(ii) && (GetClientTeam(ii)==BossTeam)) { ChangeClientTeam(ii,2); } } bSalmon = false; } } }
After modifying it to use as a rage:
PHP Code:
// Blutarch Mann's Team Spawn, based on Otokiru's Charge_Salmon Code Blutarch_TeamSpawn(const String:ability_name[],index) { new Boss=GetClientOfUserId(FF2_GetBossUserId(index)); new var1=FF2_GetAbilityArgument(index,this_plugin_name,ability_name, 1); //sound new var2=FF2_GetAbilityArgument(index,this_plugin_name,ability_name, 2); //summon_per_rage new Float:duration=FF2_GetAbilityArgumentFloat(index,this_plugin_name,ability_name,3,3.0); //uber_protection new notify=FF2_GetAbilityArgument(index,this_plugin_name,ability_name, 4); //notification alert if(var1!=0) { EmitSoundToAll(MANN_SND); EmitSoundToAll(MANN_SND); } new ii; for (new i=0; i<var2; i++) { ii = GetRandomDeadPlayer(); if(ii != -1) { FF2_SetFF2flags(ii,FF2_GetFF2flags(ii)|FF2FLAG_ALLOWSPAWNINBOSSTEAM); ChangeClientTeam(ii,BossTeam); TF2_RespawnPlayer(ii); TF2_AddCondition(ii, TFCond_Ubercharged, duration); } } if(notify!=0) { PrintCenterText(Boss,"Your team has spawned, they will assist you"); } } stock GetRandomDeadPlayer() { new clients[MaxClients+1], clientCount; for(new i=1;i<=MaxClients;i++) { if (IsValidEdict(i) && IsClientConnected(i) && IsClientInGame(i) && !IsPlayerAlive(i) && (GetClientTeam(i) > 1)) { clients[clientCount++] = i; } } return (clientCount == 0) ? -1 : clients[GetRandomInt(0, clientCount-1)]; } public Action:event_player_death(Handle:event, const String:name[], bool:dontBroadcast) { if(GetEventInt(event, "death_flags") & TF_DEATHFLAG_DEADRINGER) { return Plugin_Continue; } new client=GetClientOfUserId(GetEventInt(event, "userid")); new isBoss=FF2_GetBossIndex(client); if (isBoss!=-1) { for(new ii=1; ii<=MaxClients; ii++) { if(IsClientInGame(ii) && IsClientConnected(ii) && IsPlayerAlive(ii) && (GetClientTeam(ii)==BossTeam)) { ChangeClientTeam(ii,2); } } } return Plugin_Continue; }
__________________
Last edited by 93SHADoW; 10-31-2014 at 15:13.
Reason: FURTHER CHANGES WILL BE POSTED ON MY BOSSES THREAD.
|
|