Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PlVers:__version =
- {
- version = 5,
- filevers = "1.10.0.6474",
- date = "06/26/2021",
- time = "19:09:27"
- };
- new Float:NULL_VECTOR[3];
- new String:NULL_STRING[16];
- public Extension:__ext_core =
- {
- name = "Core",
- file = "core",
- autoload = 0,
- required = 0,
- };
- new MaxClients;
- public Extension:__ext_sdktools =
- {
- name = "SDKTools",
- file = "sdktools.ext",
- autoload = 1,
- required = 1,
- };
- public Extension:__ext_sdkhooks =
- {
- name = "SDKHooks",
- file = "sdkhooks.ext",
- autoload = 1,
- required = 1,
- };
- public Extension:__ext_regex =
- {
- name = "Regex Extension",
- file = "regex.ext",
- autoload = 1,
- required = 1,
- };
- new bool:CSkipList[66];
- new Handle:CTrie;
- new CTeamColors[3][1];
- new TFHoliday:TFHoliday_Birthday;
- new TFHoliday:TFHoliday_Halloween;
- new TFHoliday:TFHoliday_Christmas;
- new TFHoliday:TFHoliday_EndOfTheLine;
- new TFHoliday:TFHoliday_CommunityUpdate;
- new TFHoliday:TFHoliday_ValentinesDay;
- new TFHoliday:TFHoliday_MeetThePyro;
- new TFHoliday:TFHoliday_FullMoon;
- new TFHoliday:TFHoliday_HalloweenOrFullMoon;
- new TFHoliday:TFHoliday_HalloweenOrFullMoonOrValentines;
- new TFHoliday:TFHoliday_AprilFools;
- public Extension:__ext_tf2 =
- {
- name = "TF2 Tools",
- file = "game.tf2.ext",
- autoload = 0,
- required = 1,
- };
- public Extension:__ext_tf2items =
- {
- name = "TF2Items",
- file = "tf2items.ext.2.ep2v",
- autoload = 0,
- required = 1,
- };
- public SharedPlugin:__pl_FF2 =
- {
- name = "freak_fortress_2",
- file = "freak_fortress_2.smx",
- required = 1,
- };
- new String:TFResourceNames[][72];
- public SharedPlugin:__pl_tf2attributes =
- {
- name = "tf2attributes",
- file = "tf2attributes.smx",
- required = 1,
- };
- new bool:KeyDown[66];
- new playerParticle[66];
- new SPRITE_INT;
- public Plugin:myinfo =
- {
- name = "ssb_raidpack",
- description = "An ability pack for Supreme Spookmaster Bones, designed with raid boss support in mind.",
- author = "Spookmaster",
- version = "1.0",
- url = ""
- };
- new mortis_Type[66];
- new mortis_SmashCount[66];
- new mortis_BlockType[66];
- new mortis_RemainingSmashes[66];
- new numTimers_Mortis[66];
- new Float:mortis_Percent[66];
- new Float:mortis_Time[66];
- new Float:mortis_DMG[66];
- new Float:mortis_Radius[66];
- new Float:mortis_WarningTime[66];
- new Float:mortis_KB[66];
- new bool:mortis_FriendlyFire[66];
- new bool:mortis_Active[66][66];
- new rip_MaxHitsPerTarget[66];
- new rip_BlockType[66];
- new numTimers_Rip[66];
- new rip_ClassAnims[66];
- new rip_HitCounter[66][66];
- new Float:rip_Duration[66];
- new Float:rip_RemainingTime[66];
- new Float:rip_DMG[66];
- new Float:rip_ContactDMGCD[66];
- new Float:rip_KB[66];
- new Float:rip_MaxSpeed[66];
- new Float:rip_Radius[66];
- new bool:rip_IgnoreUber[66];
- new bool:rip_CanBeHitByPlayer[66][66];
- new String:rip_Model[256][264];
- new String:rip_NormalModel[256][264];
- new repo_MinionMode[66] =
- {
- -1, ...
- };
- new repo_BossIDX[66] =
- {
- -1, ...
- };
- new repo_WeaponIndex[66];
- new repo_MaxHits[66];
- new repo_HitCounter[66];
- new repo_BlockType[66];
- new numTimers_Repo[66];
- new repo_Class[66];
- new Float:repo_Duration[66];
- new Float:repo_RemainingTime[66];
- new Float:repo_HitDMG[66];
- new Float:repo_BombTimer[66];
- new Float:repo_BombDMG[66];
- new Float:repo_BombRadius[66];
- new Float:repo_MinionInvuln[66];
- new Float:repo_SummonerRadius[66];
- new bool:repo_RemoveWearables[66];
- new bool:repo_AboutToExplode[66];
- new bool:repo_AlreadyHit[66][66];
- new String:repo_WeaponName[64][264];
- new String:repo_WeaponStats[256][264];
- new String:repo_MinionModel[256][264];
- new String:repo_HitSound[256][264];
- new String:repo_GibSound[256][264];
- new chaos_SpamType[66];
- new chaos_BlockType[66];
- new numTimers_Chaos[66];
- new Float:chaos_StunTime[66];
- new Float:chaos_InvTime[66];
- new Float:chaos_Duration[66];
- new Float:chaos_SpellCD[66];
- new Float:chaos_DMGMultiplier[66];
- new Float:chaos_RemainingTime[66];
- new Float:chaos_RemainingUber[66];
- new bool:chaos_Active[66];
- new bool:chaos_Fireball[66];
- new bool:chaos_Orb[66];
- new bool:chaos_MIRV[66];
- new bool:chaos_Pumpkin[66];
- new bool:chaos_Bats[66];
- new bool:chaos_Meteor[66];
- new bool:chaos_Teleport[66];
- new bool:chaos_Monoculus[66];
- new bool:chaos_OnCooldown[66];
- new String:chaos_HUD[256][264];
- new String:chaos_Particle[256][264];
- new String:chaos_ParticlePoint[256][264];
- new classic_SpamType[66];
- new classic_MinionMode[66];
- new classic_BossIDX[66];
- new classic_WeaponIDX[66];
- new classic_BlockType[66];
- new numTimers_Classic[66];
- new classic_MinionClass[66];
- new Float:classic_StunTime[66];
- new Float:classic_InvTime[66];
- new Float:classic_RemainingUber[66];
- new Float:classic_Duration[66];
- new Float:classic_RemainingTime[66];
- new Float:classic_SpellCD[66];
- new Float:classic_MannpowerTime[66];
- new Float:classic_MinionInvTime[66];
- new Float:classic_DMGMultiplier[66];
- new bool:classic_RemoveWearables[66];
- new bool:classic_OnCooldown[66];
- new bool:classic_Active[66];
- new String:classic_MinionModel[256][264];
- new String:classic_WeaponName[256][264];
- new String:classic_WeaponStats[256][264];
- new String:classic_HUD[256][264];
- new String:classic_Particle[256][264];
- new String:classic_ParticlePoint[256][264];
- new ride_MinionCount[66];
- new ride_MinionMode[66];
- new ride_BossIDX[66];
- new ride_WeaponIDX[66];
- new ride_BlockType[66];
- new ride_Summoner[66];
- new ride_MinionClass[66];
- new numTimers_Ride[66];
- new Float:ride_DMGReduction[66];
- new Float:ride_MinionInvTime[66];
- new bool:ride_RemoveWearables[66];
- new String:ride_MinionModel[256][264];
- new String:ride_WeaponName[256][264];
- new String:ride_WeaponStats[256][264];
- new drain_BlockType[66];
- new numTimers_Drain[66];
- new Float:drain_Radius[66];
- new Float:drain_DMG[66];
- new Float:drain_Heal[66];
- new Float:drain_Duration[66];
- new Float:drain_RemainingTime[66];
- new bool:drain_CanOverheal[66];
- new String:drain_HUD[256][264];
- GetNumTargets(bool:checkAlive, bool:isAlive, bool:checkBoss, bool:isBoss, bool:checkTeam, TFTeam:team, bool:send)
- {
- new targs;
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidMulti(i, checkAlive, isAlive, checkBoss, isBoss, checkTeam, team, false))
- {
- targs++;
- }
- i++;
- }
- return targs;
- }
- TFTeam:grabEnemyTeam(client)
- {
- new TFTeam:targTeam = 2;
- if (IsValidClient(client, true, true))
- {
- new TFTeam:userTeam = TF2_GetClientTeam(client);
- if (userTeam == 2)
- {
- targTeam = 3;
- }
- }
- return targTeam;
- }
- bool:IsValidMulti(client, bool:checkAlive, bool:isAlive, bool:checkBoss, bool:isBoss, bool:checkTeam, TFTeam:team, bool:send)
- {
- if (IsValidClient(client, true, true))
- {
- if (checkAlive)
- {
- new var1;
- if (isAlive && IsPlayerAlive(client))
- {
- if (send)
- {
- CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to be alive, but they are not.", client);
- }
- return 0;
- }
- new var2;
- if (isAlive && IsPlayerAlive(client))
- {
- if (send)
- {
- CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to be dead, but they are not.", client);
- }
- return 0;
- }
- }
- if (checkBoss)
- {
- new var3;
- if (isBoss && FF2_GetBossIndex(client) == -1)
- {
- if (send)
- {
- CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to be a boss, but they are not.", client);
- }
- return 0;
- }
- new var4;
- if (isBoss && FF2_GetBossIndex(client) != -1)
- {
- if (send)
- {
- CPrintToChatAll("{red}%N failed the IVM test. Reason: we need them to not be a boss, but they are.", client);
- }
- return 0;
- }
- }
- if (checkTeam)
- {
- if (team != TF2_GetClientTeam(client))
- {
- if (send)
- {
- CPrintToChatAll("{red}%N failed the IVM test. Reason: wrong team.", client);
- }
- return 0;
- }
- }
- if (send)
- {
- CPrintToChatAll("{green}%N passed the IVM test!", client);
- }
- return 1;
- }
- return 0;
- }
- bool:IsValidClient(client, bool:replaycheck, bool:onlyrealclients)
- {
- new var1;
- if (client <= 0 || client > MaxClients)
- {
- return 0;
- }
- if (IsClientInGame(client))
- {
- if (GetEntProp(client, 0, "m_bIsCoaching", 4, 0))
- {
- return 0;
- }
- if (replaycheck)
- {
- new var2;
- if (IsClientSourceTV(client) || IsClientReplay(client))
- {
- return 0;
- }
- }
- return 1;
- }
- return 0;
- }
- bool:IsInvuln(client)
- {
- if (IsValidClient(client, true, true))
- {
- new var1;
- return TF2_IsPlayerInCondition(client, 5) || TF2_IsPlayerInCondition(client, 52) || TF2_IsPlayerInCondition(client, 51) || TF2_IsPlayerInCondition(client, 57) || TF2_IsPlayerInCondition(client, 14) || TF2_IsPlayerInCondition(client, 77) || GetEntProp(client, 1, "m_takedamage", 4, 0);
- }
- return 1;
- }
- bool:checkFile(fileType, String:file[1024], bool:debug_message)
- {
- new bool:exists;
- new String:path[1024];
- switch (fileType)
- {
- case 0:
- {
- Format(path, 256, "sound/%s", file[0]);
- }
- case 1:
- {
- Format(path, 256, "models/%s", file[0]);
- }
- case 2:
- {
- Format(path, 256, "materials/%s", file[0]);
- }
- default:
- {
- LogError("Invalid file type (%i) passed to checkFile, returning false.", fileType);
- return 0;
- }
- }
- if (FileExists(path, false, "GAME"))
- {
- exists = true;
- }
- if (debug_message)
- {
- if (exists)
- {
- CPrintToChatAll("{green}%s exists!", path);
- }
- CPrintToChatAll("{red}%s does not exist.", path);
- }
- return exists;
- }
- void:RemoveAttachable(client, String:itemName[])
- {
- new entity;
- while ((entity = FindEntityByClassname(entity, itemName[0])) != -1)
- {
- if (client == GetEntPropEnt(entity, 0, "m_hOwnerEntity", 0))
- {
- TF2_RemoveWearable(client, entity);
- }
- }
- return 0;
- }
- TF2_GetPlayerMaxHealth(client)
- {
- return GetEntProp(GetPlayerResourceEntity(), 0, "m_iMaxHealth", 4, client);
- }
- CStrToLower(String:buffer[])
- {
- new len = strlen(buffer[0]);
- new i;
- while (i < len)
- {
- buffer[0][i] = CharToLower(buffer[0][i]);
- i++;
- }
- return 0;
- }
- Handle:InitColorTrie()
- {
- new Handle:hTrie = CreateTrie();
- SetTrieValue(hTrie, "aliceblue", 15792383, true);
- SetTrieValue(hTrie, "allies", 5077314, true);
- SetTrieValue(hTrie, "ancient", 15420235, true);
- SetTrieValue(hTrie, "antiquewhite", 16444375, true);
- SetTrieValue(hTrie, "aqua", 65535, true);
- SetTrieValue(hTrie, "aquamarine", 8388564, true);
- SetTrieValue(hTrie, "arcana", 11396444, true);
- SetTrieValue(hTrie, "axis", 16728128, true);
- SetTrieValue(hTrie, "azure", 32767, true);
- SetTrieValue(hTrie, "beige", 16119260, true);
- SetTrieValue(hTrie, "bisque", 16770244, true);
- SetTrieValue(hTrie, "black", 0, true);
- SetTrieValue(hTrie, "blanchedalmond", 16772045, true);
- SetTrieValue(hTrie, "blue", 10079487, true);
- SetTrieValue(hTrie, "blueviolet", 9055202, true);
- SetTrieValue(hTrie, "brown", 10824234, true);
- SetTrieValue(hTrie, "burlywood", 14596231, true);
- SetTrieValue(hTrie, "cadetblue", 6266528, true);
- SetTrieValue(hTrie, "chartreuse", 8388352, true);
- SetTrieValue(hTrie, "chocolate", 13789470, true);
- SetTrieValue(hTrie, "collectors", 11141120, true);
- SetTrieValue(hTrie, "common", 11584473, true);
- SetTrieValue(hTrie, "community", 7385162, true);
- SetTrieValue(hTrie, "coral", 16744272, true);
- SetTrieValue(hTrie, "cornflowerblue", 6591981, true);
- SetTrieValue(hTrie, "cornsilk", 16775388, true);
- SetTrieValue(hTrie, "corrupted", 10693678, true);
- SetTrieValue(hTrie, "crimson", 14423100, true);
- SetTrieValue(hTrie, "cyan", 65535, true);
- SetTrieValue(hTrie, "darkblue", 139, true);
- SetTrieValue(hTrie, "darkcyan", 35723, true);
- SetTrieValue(hTrie, "darkgoldenrod", 12092939, true);
- SetTrieValue(hTrie, "darkgray", 11119017, true);
- SetTrieValue(hTrie, "darkgrey", 11119017, true);
- SetTrieValue(hTrie, "darkgreen", 25600, true);
- SetTrieValue(hTrie, "darkkhaki", 12433259, true);
- SetTrieValue(hTrie, "darkmagenta", 9109643, true);
- SetTrieValue(hTrie, "darkolivegreen", 5597999, true);
- SetTrieValue(hTrie, "darkorange", 16747520, true);
- SetTrieValue(hTrie, "darkorchid", 10040012, true);
- SetTrieValue(hTrie, "darkred", 9109504, true);
- SetTrieValue(hTrie, "darksalmon", 15308410, true);
- SetTrieValue(hTrie, "darkseagreen", 9419919, true);
- SetTrieValue(hTrie, "darkslateblue", 4734347, true);
- SetTrieValue(hTrie, "darkslategray", 3100495, true);
- SetTrieValue(hTrie, "darkslategrey", 3100495, true);
- SetTrieValue(hTrie, "darkturquoise", 52945, true);
- SetTrieValue(hTrie, "darkviolet", 9699539, true);
- SetTrieValue(hTrie, "deeppink", 16716947, true);
- SetTrieValue(hTrie, "deepskyblue", 49151, true);
- SetTrieValue(hTrie, "dimgray", 6908265, true);
- SetTrieValue(hTrie, "dimgrey", 6908265, true);
- SetTrieValue(hTrie, "dodgerblue", 2003199, true);
- SetTrieValue(hTrie, "exalted", 13421773, true);
- SetTrieValue(hTrie, "firebrick", 11674146, true);
- SetTrieValue(hTrie, "floralwhite", 16775920, true);
- SetTrieValue(hTrie, "forestgreen", 2263842, true);
- SetTrieValue(hTrie, "frozen", 4817843, true);
- SetTrieValue(hTrie, "fuchsia", 16711935, true);
- SetTrieValue(hTrie, "fullblue", 255, true);
- SetTrieValue(hTrie, "fullred", 16711680, true);
- SetTrieValue(hTrie, "gainsboro", 14474460, true);
- SetTrieValue(hTrie, "genuine", 5076053, true);
- SetTrieValue(hTrie, "ghostwhite", 16316671, true);
- SetTrieValue(hTrie, "gold", 16766720, true);
- SetTrieValue(hTrie, "goldenrod", 14329120, true);
- SetTrieValue(hTrie, "gray", 13421772, true);
- SetTrieValue(hTrie, "grey", 13421772, true);
- SetTrieValue(hTrie, "green", 4128574, true);
- SetTrieValue(hTrie, "greenyellow", 11403055, true);
- SetTrieValue(hTrie, "haunted", 3732395, true);
- SetTrieValue(hTrie, "honeydew", 15794160, true);
- SetTrieValue(hTrie, "hotpink", 16738740, true);
- SetTrieValue(hTrie, "immortal", 14986803, true);
- SetTrieValue(hTrie, "indianred", 13458524, true);
- SetTrieValue(hTrie, "indigo", 4915330, true);
- SetTrieValue(hTrie, "ivory", 16777200, true);
- SetTrieValue(hTrie, "khaki", 15787660, true);
- SetTrieValue(hTrie, "lavender", 15132410, true);
- SetTrieValue(hTrie, "lavenderblush", 16773365, true);
- SetTrieValue(hTrie, "lawngreen", 8190976, true);
- SetTrieValue(hTrie, "legendary", 13839590, true);
- SetTrieValue(hTrie, "lemonchiffon", 16775885, true);
- SetTrieValue(hTrie, "lightblue", 11393254, true);
- SetTrieValue(hTrie, "lightcoral", 15761536, true);
- SetTrieValue(hTrie, "lightcyan", 14745599, true);
- SetTrieValue(hTrie, "lightgoldenrodyellow", 16448210, true);
- SetTrieValue(hTrie, "lightgray", 13882323, true);
- SetTrieValue(hTrie, "lightgrey", 13882323, true);
- SetTrieValue(hTrie, "lightgreen", 10092441, true);
- SetTrieValue(hTrie, "lightpink", 16758465, true);
- SetTrieValue(hTrie, "lightsalmon", 16752762, true);
- SetTrieValue(hTrie, "lightseagreen", 2142890, true);
- SetTrieValue(hTrie, "lightskyblue", 8900346, true);
- SetTrieValue(hTrie, "lightslategray", 7833753, true);
- SetTrieValue(hTrie, "lightslategrey", 7833753, true);
- SetTrieValue(hTrie, "lightsteelblue", 11584734, true);
- SetTrieValue(hTrie, "lightyellow", 16777184, true);
- SetTrieValue(hTrie, "lime", 65280, true);
- SetTrieValue(hTrie, "limegreen", 3329330, true);
- SetTrieValue(hTrie, "linen", 16445670, true);
- SetTrieValue(hTrie, "magenta", 16711935, true);
- SetTrieValue(hTrie, "maroon", 8388608, true);
- SetTrieValue(hTrie, "mediumaquamarine", 6737322, true);
- SetTrieValue(hTrie, "mediumblue", 205, true);
- SetTrieValue(hTrie, "mediumorchid", 12211667, true);
- SetTrieValue(hTrie, "mediumpurple", 9662680, true);
- SetTrieValue(hTrie, "mediumseagreen", 3978097, true);
- SetTrieValue(hTrie, "mediumslateblue", 8087790, true);
- SetTrieValue(hTrie, "mediumspringgreen", 64154, true);
- SetTrieValue(hTrie, "mediumturquoise", 4772300, true);
- SetTrieValue(hTrie, "mediumvioletred", 13047173, true);
- SetTrieValue(hTrie, "midnightblue", 1644912, true);
- SetTrieValue(hTrie, "mintcream", 16121850, true);
- SetTrieValue(hTrie, "mistyrose", 16770273, true);
- SetTrieValue(hTrie, "moccasin", 16770229, true);
- SetTrieValue(hTrie, "mythical", 8931327, true);
- SetTrieValue(hTrie, "navajowhite", 16768685, true);
- SetTrieValue(hTrie, "navy", 128, true);
- SetTrieValue(hTrie, "normal", 11711154, true);
- SetTrieValue(hTrie, "oldlace", 16643558, true);
- SetTrieValue(hTrie, "olive", 10404687, true);
- SetTrieValue(hTrie, "olivedrab", 7048739, true);
- SetTrieValue(hTrie, "orange", 16753920, true);
- SetTrieValue(hTrie, "orangered", 16729344, true);
- SetTrieValue(hTrie, "orchid", 14315734, true);
- SetTrieValue(hTrie, "palegoldenrod", 15657130, true);
- SetTrieValue(hTrie, "palegreen", 10025880, true);
- SetTrieValue(hTrie, "paleturquoise", 11529966, true);
- SetTrieValue(hTrie, "palevioletred", 14184595, true);
- SetTrieValue(hTrie, "papayawhip", 16773077, true);
- SetTrieValue(hTrie, "peachpuff", 16767673, true);
- SetTrieValue(hTrie, "peru", 13468991, true);
- SetTrieValue(hTrie, "pink", 16761035, true);
- SetTrieValue(hTrie, "plum", 14524637, true);
- SetTrieValue(hTrie, "powderblue", 11591910, true);
- SetTrieValue(hTrie, "purple", 8388736, true);
- SetTrieValue(hTrie, "rare", 4942335, true);
- SetTrieValue(hTrie, "red", 16728128, true);
- SetTrieValue(hTrie, "rosybrown", 12357519, true);
- SetTrieValue(hTrie, "royalblue", 4286945, true);
- SetTrieValue(hTrie, "saddlebrown", 9127187, true);
- SetTrieValue(hTrie, "salmon", 16416882, true);
- SetTrieValue(hTrie, "sandybrown", 16032864, true);
- SetTrieValue(hTrie, "seagreen", 3050327, true);
- SetTrieValue(hTrie, "seashell", 16774638, true);
- SetTrieValue(hTrie, "selfmade", 7385162, true);
- SetTrieValue(hTrie, "sienna", 10506797, true);
- SetTrieValue(hTrie, "silver", 12632256, true);
- SetTrieValue(hTrie, "skyblue", 8900331, true);
- SetTrieValue(hTrie, "slateblue", 6970061, true);
- SetTrieValue(hTrie, "slategray", 7372944, true);
- SetTrieValue(hTrie, "slategrey", 7372944, true);
- SetTrieValue(hTrie, "snow", 16775930, true);
- SetTrieValue(hTrie, "springgreen", 65407, true);
- SetTrieValue(hTrie, "steelblue", 4620980, true);
- SetTrieValue(hTrie, "strange", 13593138, true);
- SetTrieValue(hTrie, "tan", 13808780, true);
- SetTrieValue(hTrie, "teal", 32896, true);
- SetTrieValue(hTrie, "thistle", 14204888, true);
- SetTrieValue(hTrie, "tomato", 16737095, true);
- SetTrieValue(hTrie, "turquoise", 4251856, true);
- SetTrieValue(hTrie, "uncommon", 11584473, true);
- SetTrieValue(hTrie, "unique", 16766720, true);
- SetTrieValue(hTrie, "unusual", 8802476, true);
- SetTrieValue(hTrie, "valve", 10817401, true);
- SetTrieValue(hTrie, "vintage", 4678289, true);
- SetTrieValue(hTrie, "violet", 15631086, true);
- SetTrieValue(hTrie, "wheat", 16113331, true);
- SetTrieValue(hTrie, "white", 16777215, true);
- SetTrieValue(hTrie, "whitesmoke", 16119285, true);
- SetTrieValue(hTrie, "yellow", 16776960, true);
- SetTrieValue(hTrie, "yellowgreen", 10145074, true);
- return hTrie;
- }
- FF2_SpawnWeapon(client, String:name[], index, level, qual, String:att[], bool:visible)
- {
- if (StrEqual(name[0], "saxxy", false))
- {
- switch (TF2_GetPlayerClass(client))
- {
- case 1:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_bat", false);
- }
- case 2:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_club", false);
- }
- case 4:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_bottle", false);
- }
- case 5:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_bonesaw", false);
- }
- case 6:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_fists", false);
- }
- case 7:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_fireaxe", false);
- }
- case 8:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_knife", false);
- }
- case 9:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_wrench", false);
- }
- default:
- {
- ReplaceString(name[0], 64, "saxxy", "tf_weapon_shovel", false);
- }
- }
- }
- else
- {
- if (StrEqual(name[0], "tf_weapon_shotgun", false))
- {
- switch (TF2_GetPlayerClass(client))
- {
- case 6:
- {
- ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_hwg", false);
- }
- case 7:
- {
- ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_pyro", false);
- }
- case 9:
- {
- ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_primary", false);
- }
- default:
- {
- ReplaceString(name[0], 64, "tf_weapon_shotgun", "tf_weapon_shotgun_soldier", false);
- }
- }
- }
- }
- new Handle:hWeapon = TF2Items_CreateItem(95);
- if (hWeapon)
- {
- TF2Items_SetClassname(hWeapon, name[0]);
- TF2Items_SetItemIndex(hWeapon, index);
- TF2Items_SetLevel(hWeapon, level);
- TF2Items_SetQuality(hWeapon, qual);
- new String:atts[32][128] = {
- {
- 59, 543449410, 1885431159, 1629515375, 1769108596, 1702131042, 1935765536, 979658099, 544417056, 1931812923, 0, 1449287533, 1684630625, 1684370529, 1635021889, 1684367459, 1769238085, 31092, 1466523501, 1684828783, 1701080909, 1684949356, 30821, 1818648429, 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0
- },
- {
- 544417056, 1931812923, 0, 1449287533, 1684630625, 1684370529, 1635021889, 1684367459, 1769238085, 31092, 1466523501, 1684828783, 1701080909, 1684949356, 30821, 1818648429, 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242
- },
- {
- 1769238085, 31092, 1466523501, 1684828783, 1701080909, 1684949356, 30821, 1818648429, 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374
- },
- {
- 1701080909, 1633899372, 25964, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374, 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1
- },
- {
- 1597130310, 1098147143, 1632528242, 1231316333, 0, 1597130310, 1098147143, 1632528242, 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374, 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1, 72, 76, 84, 92, 104, 112, 120, 132
- },
- {
- 1231316333, 0, 1634038374, 1868980075, 1701999730, 845116275, 0, 1634038374, 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1, 72, 76, 84, 92, 104, 112, 120, 132, 140, 160, 172, 184, 196, 204, 216, 232
- },
- {
- 1868980075, 1701999730, 845116275, 2020438830, 0, 6576, 6596, 1, 72, 76, 84, 92, 104, 112, 120, 132, 140, 160, 172, 184, 196, 204, 216, 232, 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397
- },
- {
- 72, 76, 84, 92, 104, 112, 120, 132, 140, 160, 172, 184, 196, 204, 216, 232, 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397, 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217
- },
- {
- 140, 160, 172, 184, 196, 204, 216, 232, 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397, 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217, 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550
- },
- {
- 244, 256, 1349082989, 6778473, 1399414637, 1701998435, 0, 1147756397, 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217, 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550, 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202
- },
- {
- 1752457573, 115, 1416191853, 1818326127, 1919902547, 101, 1130979181, 1970565217, 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550, 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202, 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316
- },
- {
- 7562610, 1147756397, 1852139109, 7562611, 1147756397, 1852403055, 1869182049, 29550, 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202, 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316, 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550
- },
- {
- 1382637421, 1852143205, 25959, 1114201965, 1684826485, 1936158313, 1953719620, 1702457202, 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316, 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550, 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007
- },
- {
- 100, 1214865261, 1935958373, 1937010536, 0, 1114201965, 1936417633, 1935827316, 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550, 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007, 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385
- },
- {
- 0, 1214865261, 1349280101, 1953393007, 115, 1231642477, 1819637358, 29550, 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007, 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385, 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0
- },
- {
- 1416191853, 1885695077, 1937011311, 0, 1382637421, 1886745445, 1350134896, 1953393007, 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385, 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0, 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547
- },
- {
- 115, 1265196909, 1097624681, 1936290675, 29556, 1298751341, 1699248225, 1752460385, 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0, 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547, 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872
- },
- {
- 0, 1349082989, 1702453612, 1634485106, 29555, 1130979181, 1936941420, 0, 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547, 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872, 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669
- },
- {
- 1130979181, 1936941420, 0, 1147756397, 1919513445, 1817207909, 1919252833, 1935764547, 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872, 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669, 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669
- },
- {
- 115, 1164468077, 1634890872, 1918985559, 1701601889, 0, 1164468077, 1634890872, 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669, 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669, 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0
- },
- {
- 1918985559, 1701601889, 2003134806, 1701080909, 108, 1819044171, 0, 1349410669, 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669, 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0, 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522
- },
- {
- 1702453612, 1852785522, 100, 1852793695, 1769236836, 1650421359, 7566441, 1349410669, 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0, 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522, 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104
- },
- {
- 1702453612, 1852785522, 7882084, 1349410669, 1702453612, 1852785522, 846742884, 0, 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522, 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104, 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075
- },
- {
- 1349410669, 1702453612, 1852785522, 863520100, 0, 1349410669, 1702453612, 1852785522, 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104, 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075, 120, 7208, 7224, 1, 0, 0, 0, 0
- },
- {
- 880297316, 0, 1635151433, 543451500, 1866679892, 1981834350, 1702194273, 6563104, 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075, 120, 7208, 7224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- },
- {
- 1630692980, 1769108596, 1702131042, 115, 1630692980, 1769108596, 1702131042, 1836265075, 120, 7208, 7224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- },
- {
- 120, 7208, 7224, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- },
- {
- 0, ...
- },
- {
- 0, ...
- },
- {
- 0, ...
- },
- {
- 0, ...
- },
- {
- 0, ...
- }
- };
- new count = ExplodeString(att[0], ";", atts, 32, 32, false);
- if (count % 2)
- {
- count--;
- }
- if (0 < count)
- {
- TF2Items_SetNumAttributes(hWeapon, count / 2);
- new i2;
- new i;
- while (i < count)
- {
- new attrib = StringToInt(atts[i], 10);
- if (attrib)
- {
- TF2Items_SetAttribute(hWeapon, i2, attrib, StringToFloat(atts[i + 1]));
- i2++;
- i += 2;
- }
- LogError("Bad weapon attribute passed: %s ; %s", atts[i], atts[i + 1]);
- CloseHandle(hWeapon);
- hWeapon = 0;
- return -1;
- }
- }
- else
- {
- TF2Items_SetNumAttributes(hWeapon, 0);
- }
- new entity = TF2Items_GiveNamedItem(client, hWeapon);
- CloseHandle(hWeapon);
- hWeapon = 0;
- if (entity == -1)
- {
- return -1;
- }
- EquipPlayerWeapon(client, entity);
- if (visible)
- {
- SetEntProp(entity, 0, "m_bValidatedAttachedEntity", 1, 4, 0);
- }
- else
- {
- SetEntProp(entity, 0, "m_iWorldModelIndex", -1, 4, 0);
- SetEntPropFloat(entity, 0, "m_flModelScale", 0.001, 0);
- }
- return entity;
- }
- return -1;
- }
- FF2_GetArgI(boss, String:plugin_name[], String:ability_name[], String:argument[], index, defValue)
- {
- new var1;
- if (GetFeatureStatus(0, "FF2_GetArgNamedI"))
- {
- var1 = FF2_GetAbilityArgument(boss, plugin_name[0], ability_name[0], index, defValue);
- }
- else
- {
- var1 = FF2_GetArgNamedI(boss, plugin_name[0], ability_name[0], argument[0], FF2_GetAbilityArgument(boss, plugin_name[0], ability_name[0], index, defValue));
- }
- return var1;
- }
- Float:FF2_GetArgF(boss, String:plugin_name[], String:ability_name[], String:argument[], index, Float:defValue)
- {
- new var1;
- if (GetFeatureStatus(0, "FF2_GetArgNamedI"))
- {
- var1 = FF2_GetAbilityArgumentFloat(boss, plugin_name[0], ability_name[0], index, defValue);
- }
- else
- {
- var1 = FF2_GetArgNamedF(boss, plugin_name[0], ability_name[0], argument[0], FF2_GetAbilityArgumentFloat(boss, plugin_name[0], ability_name[0], index, defValue));
- }
- return var1;
- }
- FF2_GetArgS(boss, String:plugin_name[], String:ability_name[], String:argument[], index, String:buffer[], bufferLength)
- {
- if (GetFeatureStatus(0, "FF2_GetArgNamedI"))
- {
- FF2_GetAbilityArgumentString(boss, plugin_name[0], ability_name[0], index, buffer[0], bufferLength);
- }
- else
- {
- FF2_GetArgNamedS(boss, plugin_name[0], ability_name[0], argument[0], buffer[0], bufferLength);
- if (strlen(buffer[0]))
- {
- }
- else
- {
- FF2_GetAbilityArgumentString(boss, plugin_name[0], ability_name[0], index, buffer[0], bufferLength);
- }
- }
- return strlen(buffer[0]);
- }
- TFTeam:TF2_GetClientTeam(client)
- {
- return GetClientTeam(client);
- }
- void:TF2_ChangeClientTeam(client, TFTeam:team)
- {
- ChangeClientTeam(client, team);
- return 0;
- }
- TFClassType:TF2_GetPlayerClass(client)
- {
- return GetEntProp(client, 0, "m_iClass", 4, 0);
- }
- void:TF2_SetPlayerClass(client, TFClassType:classType, bool:weapons, bool:persistent)
- {
- SetEntProp(client, 0, "m_iClass", classType, 4, 0);
- if (persistent)
- {
- SetEntProp(client, 0, "m_iDesiredPlayerClass", classType, 4, 0);
- }
- return 0;
- }
- void:TF2_RemoveWeaponSlot(client, slot)
- {
- new weaponIndex;
- while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
- {
- new extraWearable = GetEntPropEnt(weaponIndex, 0, "m_hExtraWearable", 0);
- if (extraWearable != -1)
- {
- TF2_RemoveWearable(client, extraWearable);
- }
- extraWearable = GetEntPropEnt(weaponIndex, 0, "m_hExtraWearableViewModel", 0);
- if (extraWearable != -1)
- {
- TF2_RemoveWearable(client, extraWearable);
- }
- RemovePlayerItem(client, weaponIndex);
- AcceptEntityInput(weaponIndex, "Kill", -1, -1, 0);
- }
- return 0;
- }
- void:TF2_RemoveAllWeapons(client)
- {
- new i;
- while (i <= 5)
- {
- TF2_RemoveWeaponSlot(client, i);
- i++;
- }
- return 0;
- }
- bool:TF2_IsPlayerInCondition(client, TFCond:cond)
- {
- new iCond = cond;
- switch (iCond / 32)
- {
- case 0:
- {
- new bit = 1 << iCond;
- if (bit == bit & GetEntProp(client, 0, "m_nPlayerCond", 4, 0))
- {
- return 1;
- }
- if (bit == bit & GetEntProp(client, 0, "_condition_bits", 4, 0))
- {
- return 1;
- }
- }
- case 1:
- {
- new bit = 1 << iCond + -32;
- if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx", 4, 0))
- {
- return 1;
- }
- }
- case 2:
- {
- new bit = 1 << iCond + -64;
- if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx2", 4, 0))
- {
- return 1;
- }
- }
- case 3:
- {
- new bit = 1 << iCond + -96;
- if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx3", 4, 0))
- {
- return 1;
- }
- }
- case 4:
- {
- new bit = 1 << iCond + -128;
- if (bit == bit & GetEntProp(client, 0, "m_nPlayerCondEx4", 4, 0))
- {
- return 1;
- }
- }
- default:
- {
- ThrowError("Invalid TFCond value %d", iCond);
- }
- }
- return 0;
- }
- RoundFloat(Float:value)
- {
- return RoundToNearest(value);
- }
- Float:-5(Float:oper)
- {
- return oper ^ -2147483648;
- }
- void:NecroMash_SmashClient(client, attacker)
- {
- new Float:flPos[3] = 0.0;
- new Float:flPpos[3] = 0.0;
- new Float:flAngles[3] = 0.0;
- if (mortis_Type[attacker] == 2)
- {
- GetClientEyePosition(attacker, flPos);
- GetClientEyeAngles(attacker, flAngles);
- new Handle:trace = TR_TraceRayFilterEx(flPos, flAngles, 1174421507, 1, 117, 0);
- if (TR_DidHit(trace))
- {
- TR_GetEndPosition(flPos, trace);
- TR_GetEndPosition(flPpos, trace);
- CloseHandle(trace);
- }
- }
- else
- {
- GetClientAbsOrigin(client, flPos);
- GetClientAbsOrigin(client, flPpos);
- GetClientEyeAngles(client, flAngles);
- }
- flAngles[0] = 0.0;
- new Float:vForward[3] = 0.0;
- GetAngleVectors(flAngles, vForward, NULL_VECTOR, NULL_VECTOR);
- flPos[0] = flPos[0] - 5*0(vForward[0], 750);
- flPos[1] -= 5*0(vForward[1], 750);
- flPos[2] -= 5*0(vForward[2], 750);
- flPos[2] += 350.0;
- new gears = CreateEntityByName("prop_dynamic", -1);
- if (IsValidEntity(gears))
- {
- DispatchKeyValueVector(gears, "origin", flPos);
- DispatchKeyValueVector(gears, "angles", flAngles);
- DispatchKeyValue(gears, "model", "models/props_halloween/hammer_gears_mechanism.mdl");
- DispatchSpawn(gears);
- }
- new hammer = CreateEntityByName("prop_dynamic", -1);
- if (IsValidEntity(hammer))
- {
- DispatchKeyValueVector(hammer, "origin", flPos);
- DispatchKeyValueVector(hammer, "angles", flAngles);
- DispatchKeyValue(hammer, "model", "models/props_halloween/hammer_mechanism.mdl");
- DispatchSpawn(hammer);
- }
- new button = CreateEntityByName("prop_dynamic", -1);
- if (IsValidEntity(button))
- {
- flPos[0] = flPos[0] + 5*0(vForward[0], 600);
- flPos[1] += 5*0(vForward[1], 600);
- flPos[2] += 5*0(vForward[2], 600);
- flPos[2] -= 100.0;
- flAngles[1] += 180.0;
- DispatchKeyValueVector(button, "origin", flPos);
- DispatchKeyValueVector(button, "angles", flAngles);
- DispatchKeyValue(button, "model", "models/props_halloween/bell_button.mdl");
- DispatchSpawn(button);
- new Handle:pack;
- CreateDataTimer(1.3, 113, pack, 0);
- WritePackFloat(pack, flPpos[0]);
- WritePackFloat(pack, flPpos[1]);
- WritePackFloat(pack, flPpos[2]);
- WritePackCell(pack, attacker);
- new Handle:pack2;
- CreateDataTimer(1.0, 115, pack2, 0);
- WritePackFloat(pack2, flPpos[0]);
- WritePackFloat(pack2, flPpos[1]);
- WritePackFloat(pack2, flPpos[2]);
- EmitSoundToAll("misc/halloween/strongman_fast_swing_01.wav", -2, 0, 75, 0, 0.25, 100, -1, flPpos, NULL_VECTOR, true, 0.0);
- spawnRing(button, mortis_Radius[attacker] * 2.0, 0.0, 20.0, -230.0, "materials/particle/bendibeam.vmt", 255, 0, 0, 200, 10, 1.3, 30.0, 6.0, 10);
- }
- SetVariantString("OnUser2 !self:SetAnimation:smash:0:1");
- AcceptEntityInput(gears, "AddOutput", -1, -1, 0);
- AcceptEntityInput(gears, "FireUser2", -1, -1, 0);
- SetVariantString("OnUser2 !self:SetAnimation:smash:0:1");
- AcceptEntityInput(hammer, "AddOutput", -1, -1, 0);
- AcceptEntityInput(hammer, "FireUser2", -1, -1, 0);
- SetVariantString("OnUser2 !self:SetAnimation:hit:1.3:1");
- AcceptEntityInput(button, "AddOutput", -1, -1, 0);
- AcceptEntityInput(button, "FireUser2", -1, -1, 0);
- CreateTimer(3.0, 171, gears, 2);
- CreateTimer(3.0, 171, hammer, 2);
- CreateTimer(3.0, 171, button, 2);
- return 0;
- }
- Float:5*0(Float:oper1, oper2)
- {
- return oper1 * float(oper2);
- }
- void:ScaleVector(Float:vec[3], Float:scale)
- {
- vec[0] *= scale;
- vec[0] + 4/* ERROR unknown load Binary */ *= scale;
- vec[0] + 8/* ERROR unknown load Binary */ *= scale;
- return 0;
- }
- void:MakeVectorFromPoints(Float:pt1[3], Float:pt2[3], Float:output[3])
- {
- output[0] = pt2[0] - pt1[0];
- output[0] + 4/* ERROR unknown load Binary */ = pt2[0] + 4/* ERROR unknown load Binary */ - pt1[0] + 4/* ERROR unknown load Binary */;
- output[0] + 8/* ERROR unknown load Binary */ = pt2[0] + 8/* ERROR unknown load Binary */ - pt1[0] + 8/* ERROR unknown load Binary */;
- return 0;
- }
- void:NecroMash_CreateParticle(String:particle[], Float:pos[3])
- {
- new tblidx = FindStringTable("ParticleEffectNames");
- new String:tmp[1024];
- new count = GetStringTableNumStrings(tblidx);
- new stridx = -1;
- new i;
- while (i < count)
- {
- ReadStringTable(tblidx, i, tmp, 256);
- if (StrEqual(tmp, particle[0], false))
- {
- stridx = i;
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidEntity(i))
- {
- if (IsClientInGame(i))
- {
- TE_Start("TFParticleEffect");
- TE_WriteFloat("m_vecOrigin[0]", pos[0]);
- TE_WriteFloat("m_vecOrigin[1]", pos[0] + 4/* ERROR unknown load Binary */);
- TE_WriteFloat("m_vecOrigin[2]", pos[0] + 8/* ERROR unknown load Binary */);
- TE_WriteNum("m_iParticleSystemIndex", stridx);
- TE_WriteNum("entindex", -1);
- TE_WriteNum("m_iAttachType", 2);
- TE_SendToClient(i, 0.0);
- }
- }
- i++;
- }
- return 0;
- }
- i++;
- }
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidEntity(i))
- {
- if (IsClientInGame(i))
- {
- TE_Start("TFParticleEffect");
- TE_WriteFloat("m_vecOrigin[0]", pos[0]);
- TE_WriteFloat("m_vecOrigin[1]", pos[0] + 4/* ERROR unknown load Binary */);
- TE_WriteFloat("m_vecOrigin[2]", pos[0] + 8/* ERROR unknown load Binary */);
- TE_WriteNum("m_iParticleSystemIndex", stridx);
- TE_WriteNum("entindex", -1);
- TE_WriteNum("m_iAttachType", 2);
- TE_SendToClient(i, 0.0);
- }
- }
- i++;
- }
- return 0;
- }
- bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
- {
- return strcmp(str1[0], str2[0], caseSensitive) == 0;
- }
- CharToLower(chr)
- {
- if (IsCharUpper(chr))
- {
- return chr | 32;
- }
- return chr;
- }
- ExplodeString(String:text[], String:split[], String:buffers[][], maxStrings, maxStringLength, bool:copyRemainder)
- {
- new reloc_idx;
- new idx;
- new total;
- new var1;
- if (maxStrings < 1 || split[0])
- {
- return 0;
- }
- while ((idx = SplitString(reloc_idx + text[0], split[0], buffers[0][total], maxStringLength)) != -1)
- {
- reloc_idx = idx + reloc_idx;
- total++;
- if (maxStrings == total)
- {
- if (copyRemainder)
- {
- strcopy(buffers[0][total + -1], maxStringLength, reloc_idx - idx + text[0]);
- }
- return total;
- }
- }
- total++;
- strcopy(buffers[0][total], maxStringLength, reloc_idx + text[0]);
- return total;
- }
- Handle:CreateDataTimer(Float:interval, <typeset 0>:func, &Handle:datapack, flags)
- {
- datapack = DataPack.DataPack();
- flags |= 512;
- return CreateTimer(interval, func, datapack, flags);
- }
- Handle:StartMessageOne(String:msgname[], client, flags)
- {
- new players[1];
- players[0] = client;
- return StartMessage(msgname[0], players, 1, flags);
- }
- bool:HasEntProp(entity, PropType:type, String:prop[])
- {
- if (type == 1)
- {
- return FindDataMapInfo(entity, prop[0], 0, 0, 0) != -1;
- }
- if (type)
- {
- return 0;
- }
- new String:cls[256];
- if (GetEntityNetClass(entity, cls, 64))
- {
- return FindSendPropInfo(cls, prop[0], 0, 0, 0) != -1;
- }
- return 0;
- }
- bool:GetEntityClassname(entity, String:clsname[], maxlength)
- {
- return !!GetEntPropString(entity, 1, "m_iClassname", clsname[0], maxlength, 0);
- }
- void:SetEntityHealth(entity, amount)
- {
- static bool:gotconfig;
- static String:prop[128];
- if (!gotconfig)
- {
- new GameData:gc = GameData.GameData("core.games");
- new bool:exists = GameData.GetKeyValue(gc, "m_iHealth", prop, 32);
- CloseHandle(gc);
- gc = 0;
- if (!exists)
- {
- strcopy(prop, 32, "m_iHealth");
- }
- gotconfig = true;
- }
- new String:cls[256];
- new PropFieldType:type;
- new offset;
- if (GetEntityNetClass(entity, cls, 64))
- {
- offset = FindSendPropInfo(cls, prop, type, 0, 0);
- if (0 >= offset)
- {
- ThrowError("SetEntityHealth not supported by this mod");
- return 0;
- }
- if (type == 2)
- {
- SetEntDataFloat(entity, offset, float(amount), false);
- }
- else
- {
- SetEntProp(entity, 0, prop, amount, 4, 0);
- }
- return 0;
- }
- ThrowError("SetEntityHealth not supported by this mod: Could not get serverclass name");
- return 0;
- }
- GetClientButtons(client)
- {
- static bool:gotconfig;
- static String:datamap[128];
- if (!gotconfig)
- {
- new GameData:gc = GameData.GameData("core.games");
- new bool:exists = GameData.GetKeyValue(gc, "m_nButtons", datamap, 32);
- CloseHandle(gc);
- gc = 0;
- if (!exists)
- {
- strcopy(datamap, 32, "m_nButtons");
- }
- gotconfig = true;
- }
- return GetEntProp(client, 1, datamap, 4, 0);
- }
- void:EmitSoundToAll(String:sample[], entity, channel, level, flags, Float:volume, pitch, speakerentity, Float:origin[3], Float:dir[3], bool:updatePos, Float:soundtime)
- {
- new clients[MaxClients];
- new total;
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsClientInGame(i))
- {
- total++;
- clients[0][total] = i;
- }
- i++;
- }
- if (total)
- {
- EmitSound(clients[0], total, sample[0], entity, channel, level, flags, volume, pitch, speakerentity, origin[0], dir[0], updatePos, soundtime);
- }
- return 0;
- }
- void:TE_SendToAll(Float:delay)
- {
- new total;
- new clients[MaxClients];
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsClientInGame(i))
- {
- total++;
- clients[0][total] = i;
- }
- i++;
- }
- TE_Send(clients[0], total, delay);
- return 0;
- }
- void:TE_SendToClient(client, Float:delay)
- {
- new players[1];
- players[0] = client;
- TE_Send(players, 1, delay);
- return 0;
- }
- void:TE_SetupBeamRingPoint(Float:center[3], Float:Start_Radius, Float:End_Radius, ModelIndex, HaloIndex, StartFrame, FrameRate, Float:Life, Float:Width, Float:Amplitude, Color[4], Speed, Flags)
- {
- TE_Start("BeamRingPoint");
- TE_WriteVector("m_vecCenter", center[0]);
- TE_WriteFloat("m_flStartRadius", Start_Radius);
- TE_WriteFloat("m_flEndRadius", End_Radius);
- TE_WriteNum("m_nModelIndex", ModelIndex);
- TE_WriteNum("m_nHaloIndex", HaloIndex);
- TE_WriteNum("m_nStartFrame", StartFrame);
- TE_WriteNum("m_nFrameRate", FrameRate);
- TE_WriteFloat("m_fLife", Life);
- TE_WriteFloat("m_fWidth", Width);
- TE_WriteFloat("m_fEndWidth", Width);
- TE_WriteFloat("m_fAmplitude", Amplitude);
- TE_WriteNum("r", Color[0]);
- TE_WriteNum("g", Color[0] + 4/* ERROR unknown load Binary */);
- TE_WriteNum("b", Color[0] + 8/* ERROR unknown load Binary */);
- TE_WriteNum("a", Color[0] + 12/* ERROR unknown load Binary */);
- TE_WriteNum("m_nSpeed", Speed);
- TE_WriteNum("m_nFlags", Flags);
- TE_WriteNum("m_nFadeLength", 0);
- return 0;
- }
- void:TE_SetupBeamPoints(Float:start[3], Float:end[3], ModelIndex, HaloIndex, StartFrame, FrameRate, Float:Life, Float:Width, Float:EndWidth, FadeLength, Float:Amplitude, Color[4], Speed)
- {
- TE_Start("BeamPoints");
- TE_WriteVector("m_vecStartPoint", start[0]);
- TE_WriteVector("m_vecEndPoint", end[0]);
- TE_WriteNum("m_nModelIndex", ModelIndex);
- TE_WriteNum("m_nHaloIndex", HaloIndex);
- TE_WriteNum("m_nStartFrame", StartFrame);
- TE_WriteNum("m_nFrameRate", FrameRate);
- TE_WriteFloat("m_fLife", Life);
- TE_WriteFloat("m_fWidth", Width);
- TE_WriteFloat("m_fEndWidth", EndWidth);
- TE_WriteFloat("m_fAmplitude", Amplitude);
- TE_WriteNum("r", Color[0]);
- TE_WriteNum("g", Color[0] + 4/* ERROR unknown load Binary */);
- TE_WriteNum("b", Color[0] + 8/* ERROR unknown load Binary */);
- TE_WriteNum("a", Color[0] + 12/* ERROR unknown load Binary */);
- TE_WriteNum("m_nSpeed", Speed);
- TE_WriteNum("m_nFadeLength", FadeLength);
- return 0;
- }
- CPrintToChatAll(String:message[], any:_arg1)
- {
- CCheckTrie();
- decl String:buffer[4096];
- decl String:buffer2[4096];
- new i = 1;
- while (i <= MaxClients)
- {
- new var1;
- if (IsClientInGame(i) && CSkipList[i])
- {
- CSkipList[i] = 0;
- }
- else
- {
- SetGlobalTransTarget(i);
- Format(buffer, 1024, "\x01%s", message[0]);
- VFormat(buffer2, 1024, buffer, 2);
- CReplaceColorCodes(buffer2, 0, false, 1024);
- CSendMessage(i, buffer2, 0);
- }
- i++;
- }
- return 0;
- }
- CSendMessage(client, String:message[], author)
- {
- if (!author)
- {
- author = client;
- }
- decl String:buffer[1024];
- decl String:game[64];
- GetGameFolderName(game, 16);
- strcopy(buffer, 256, message[0]);
- new UserMsg:index = GetUserMessageId("SayText2");
- if (index == -1)
- {
- if (StrEqual(game, "dod", true))
- {
- new team = GetClientTeam(author);
- if (team)
- {
- decl String:temp[64];
- new var2 = CTeamColors;
- Format(temp, 16, "\x07%06X", var2[0][var2][team + -1]);
- ReplaceString(buffer, 256, "\x03", temp, false);
- }
- else
- {
- ReplaceString(buffer, 256, "\x03", "\x04", false);
- }
- }
- PrintToChat(client, "%s", buffer);
- return 0;
- }
- new Handle:buf = StartMessageOne("SayText2", client, 132);
- new var1;
- if (GetFeatureStatus(0, "GetUserMessageType") && GetUserMessageType() == 1)
- {
- PbSetInt(buf, "ent_idx", author, -1);
- PbSetBool(buf, "chat", true, -1);
- PbSetString(buf, "msg_name", buffer, -1);
- PbAddString(buf, "params", "");
- PbAddString(buf, "params", "");
- PbAddString(buf, "params", "");
- PbAddString(buf, "params", "");
- }
- else
- {
- BfWriteByte(buf, author);
- BfWriteByte(buf, 1);
- BfWriteString(buf, buffer);
- }
- EndMessage();
- return 0;
- }
- Handle:AttachParticle(client, String:type[1024], String:point[1024])
- {
- if (IsValidClient(client, true, true))
- {
- playerParticle[client] = CreateEntityByName("info_particle_system", -1);
- if (IsValidEdict(playerParticle[client]))
- {
- decl Float:pos[3];
- GetClientAbsOrigin(client, pos);
- TeleportEntity(playerParticle[client], pos, NULL_VECTOR, NULL_VECTOR);
- DispatchKeyValue(playerParticle[client], "effect_name", type[0]);
- SetVariantString("!activator");
- AcceptEntityInput(playerParticle[client], "SetParent", client, playerParticle[client], 0);
- SetVariantString(point[0]);
- AcceptEntityInput(playerParticle[client], "SetParentAttachmentMaintainOffset", playerParticle[client], playerParticle[client], 0);
- DispatchKeyValue(playerParticle[client], "targetname", "present");
- DispatchSpawn(playerParticle[client]);
- ActivateEntity(playerParticle[client]);
- AcceptEntityInput(playerParticle[client], "Start", -1, -1, 0);
- }
- LogError("(CreateParticle): Could not create info_particle_system");
- }
- return 0;
- }
- CCheckTrie()
- {
- if (!CTrie)
- {
- CTrie = InitColorTrie();
- }
- return 0;
- }
- CReplaceColorCodes(String:buffer[], author, bool:removeTags, maxlen)
- {
- CCheckTrie();
- if (removeTags)
- {
- ReplaceString(buffer[0], maxlen, "{default}", "", false);
- ReplaceString(buffer[0], maxlen, "{teamcolor}", "", false);
- }
- else
- {
- ReplaceString(buffer[0], maxlen, "{default}", "\x01", false);
- }
- new var1;
- if (author && removeTags)
- {
- new var2;
- if (author < 0 || author > MaxClients)
- {
- ThrowError("Invalid client index %i", author);
- }
- if (!(IsClientInGame(author)))
- {
- ThrowError("Client %i is not in game", author);
- }
- ReplaceString(buffer[0], maxlen, "{teamcolor}", "\x03", false);
- }
- new cursor;
- new value;
- decl String:tag[128];
- decl String:buff[128];
- decl output[maxlen];
- strcopy(output[0], maxlen, buffer[0]);
- new Handle:regex = CompileRegex("{[a-zA-Z0-9]+}", 0, "", 0, 0);
- new i;
- while (i < 1000)
- {
- if (MatchRegex(regex, cursor + buffer[0], 0) < 1)
- {
- CloseHandle(regex);
- strcopy(buffer[0], maxlen, output[0]);
- return 0;
- }
- GetRegexSubString(regex, 0, tag, 32);
- CStrToLower(tag);
- cursor = StrContains(cursor + buffer[0], tag, false) + cursor + 1;
- strcopy(buff, 32, tag);
- ReplaceString(buff, 32, "{", "", true);
- ReplaceString(buff, 32, "}", "", true);
- if (GetTrieValue(CTrie, buff, value))
- {
- if (removeTags)
- {
- ReplaceString(output[0], maxlen, tag, "", false);
- }
- else
- {
- Format(buff, 32, "\x07%06X", value);
- ReplaceString(output[0], maxlen, tag, buff, false);
- }
- }
- i++;
- }
- LogError("[MORE COLORS] Infinite loop broken.");
- return 0;
- }
- public void:CreateBoner(summoner, minion, mode, bool:isBoneZone, Float:invTime, bossIDX, TFClassType:class, bool:noWearables, String:wepName[1024], String:wepAtts[1024], wepIDX, String:model[1024], Float:loc[3])
- {
- new var1;
- if (IsValidMulti(summoner, true, true, true, true, false, 2, false) && IsValidClient(minion, true, true))
- {
- FF2_SetFF2flags(minion, FF2_GetFF2flags(minion) | 128);
- TF2_ChangeClientTeam(minion, TF2_GetClientTeam(summoner));
- TF2_RespawnPlayer(minion);
- switch (mode)
- {
- case 0:
- {
- TF2_SetPlayerClass(minion, class, true, false);
- if (noWearables)
- {
- RemoveAttachable(minion, "tf_wear*");
- RemoveAttachable(minion, "tf_powerup_bottle");
- }
- TF2_RemoveAllWeapons(minion);
- FF2_SpawnWeapon(minion, wepName[0], wepIDX, 77, 4, wepAtts[0], true);
- if (FileExists(model[0], false, "GAME"))
- {
- SetVariantString(model[0]);
- AcceptEntityInput(minion, "SetCustomModel", -1, -1, 0);
- SetEntProp(minion, 0, "m_bUseClassAnimations", 1, 4, 0);
- }
- CreateTimer(0.1, 169, GetClientUserId(minion), 2);
- }
- case 1:
- {
- new numHales;
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidMulti(i, true, true, true, true, false, 2, false))
- {
- numHales++;
- }
- i++;
- }
- if (TF2_GetClientTeam(summoner) == FF2_GetBossTeam())
- {
- FF2_MakeBoss(minion, numHales + 1, bossIDX, false);
- }
- else
- {
- FF2_MakeBoss(minion, numHales + 1, bossIDX, true);
- }
- }
- default:
- {
- }
- }
- if (invTime > 0.0)
- {
- TF2_AddCondition(minion, 52, invTime, 0);
- TF2_AddCondition(minion, 59, invTime, 0);
- }
- if (isBoneZone)
- {
- ride_Summoner[minion] = summoner;
- }
- TeleportEntity(minion, loc[0], NULL_VECTOR, NULL_VECTOR);
- }
- return 0;
- }
- public Action:DeleteParticle(client)
- {
- if (IsValidEdict(playerParticle[client]))
- {
- new String:classname[256];
- GetEdictClassname(playerParticle[client], classname, 64);
- if (StrEqual(classname, "info_particle_system", false))
- {
- AcceptEntityInput(playerParticle[client], "Stop", -1, -1, 0);
- AcceptEntityInput(playerParticle[client], "Kill", -1, -1, 0);
- }
- }
- return 0;
- }
- public Action:FF2_OnAbility(boss, String:pluginName[], String:abilityName[], slot, status)
- {
- FF2_OnAbility2(boss, pluginName[0], abilityName[0], slot);
- return 0;
- }
- public Action:FF2_OnAbility2(index, String:plugin_name[], String:ability_name[], action)
- {
- new client = GetClientOfUserId(FF2_GetBossUserId(index));
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- if (!(strcmp(ability_name[0], "ssb_mortis", true)))
- {
- if (mortis_WarningTime[client] >= 0.1)
- {
- CreateTimer(mortis_WarningTime[client], 163, GetClientUserId(client), 2);
- }
- activateMortis(client);
- }
- if (!(strcmp(ability_name[0], "ssb_rip", true)))
- {
- if (0.0 == rip_RemainingTime[client])
- {
- TF2_AddCondition(client, 28, -1.0, 0);
- }
- new var3 = rip_RemainingTime[client];
- var3 = var3[rip_Duration[client]];
- if (numTimers_Rip[client] < 1)
- {
- SDKHook(client, 4, 187);
- CreateTimer(0.1, 159, GetClientUserId(client), 3);
- numTimers_Rip[client]++;
- new String:path[1024];
- Format(path, 256, "models/%s", rip_Model[client]);
- if (FileExists(path, false, "GAME"))
- {
- new String:modelTest[1024];
- GetClientModel(client, modelTest, 256);
- if (!(StrEqual(rip_Model[client], modelTest, true)))
- {
- strcopy(rip_NormalModel[client], 256, modelTest);
- }
- SetVariantString(path);
- AcceptEntityInput(client, "SetCustomModel", -1, -1, 0);
- SetEntProp(client, 0, "m_bUseClassAnimations", rip_ClassAnims[client], 4, 0);
- }
- }
- }
- if (!(strcmp(ability_name[0], "ssb_calciumrepo", true)))
- {
- new var4 = repo_RemainingTime[client];
- var4 = var4[repo_Duration[client]];
- if (numTimers_Repo[client] < 1)
- {
- TF2_AddCondition(client, 36, -1.0, 0);
- CreateTimer(0.1, 173, GetClientUserId(client), 3);
- numTimers_Repo[client]++;
- }
- }
- if (!(strcmp(ability_name[0], "ssb_purechaos", true)))
- {
- if (0.0 == chaos_RemainingTime[client])
- {
- new var1;
- if (StrEqual(chaos_Particle[client], "", true) && StrEqual(chaos_ParticlePoint[client], "", true))
- {
- AttachParticle(client, chaos_Particle[client], chaos_ParticlePoint[client]);
- }
- if (chaos_InvTime[client] > 0.0)
- {
- TF2_AddCondition(client, 59, -1.0, 0);
- TF2_AddCondition(client, 52, -1.0, 0);
- new var5 = chaos_RemainingUber[client];
- var5 = var5[chaos_InvTime[client]];
- }
- if (chaos_StunTime[client] > 0.0)
- {
- TF2_StunPlayer(client, chaos_StunTime[client], 1.0, 2, 0);
- CreateTimer(chaos_StunTime[client][0.1], 127, GetClientUserId(client), 2);
- return 0;
- }
- }
- enableChaos(client);
- }
- if (!(strcmp(ability_name[0], "ssb_bonezone_classic", true)))
- {
- if (0.0 == classic_RemainingTime[client])
- {
- new var2;
- if (StrEqual(classic_Particle[client], "", true) && StrEqual(classic_ParticlePoint[client], "", true))
- {
- AttachParticle(client, classic_Particle[client], classic_ParticlePoint[client]);
- }
- if (classic_InvTime[client] > 0.0)
- {
- TF2_AddCondition(client, 59, -1.0, 0);
- TF2_AddCondition(client, 52, -1.0, 0);
- new var6 = classic_RemainingUber[client];
- var6 = var6[classic_InvTime[client]];
- }
- if (classic_StunTime[client] > 0.0)
- {
- TF2_StunPlayer(client, classic_StunTime[client], 1.0, 2, 0);
- CreateTimer(classic_StunTime[client][0.1], 137, GetClientUserId(client), 2);
- return 0;
- }
- }
- enableClassic(client);
- }
- if (!(strcmp(ability_name[0], "ssb_bonezone_raid", true)))
- {
- new maxTargets = ride_MinionCount[client];
- if (GetNumTargets(true, false, false, true, false, 2, false) < maxTargets)
- {
- maxTargets = GetNumTargets(true, false, false, true, false, 2, false);
- }
- if (maxTargets < 1)
- {
- return 0;
- }
- new Float:userPos[3] = 0.0;
- GetClientAbsOrigin(client, userPos);
- new num;
- while (num < maxTargets)
- {
- new target = GetRandomInt(1, MaxClients);
- if (IsValidMulti(target, true, false, false, true, false, 2, false))
- {
- CreateBoner(client, target, ride_MinionMode[client], true, ride_MinionInvTime[client], ride_BossIDX[client], ride_MinionClass[client], ride_RemoveWearables[client], ride_WeaponName[client], ride_WeaponStats[client], ride_WeaponIDX[client], ride_MinionModel[client], userPos);
- num++;
- }
- }
- CreateTimer(0.1, 183, GetClientUserId(client), 3);
- numTimers_Ride[client]++;
- }
- if (!(strcmp(ability_name[0], "ssb_soulsteal", true)))
- {
- new var7 = drain_RemainingTime[client];
- var7 = var7[drain_Duration[client]];
- if (numTimers_Drain[client] < 1)
- {
- CreateTimer(0.1, 149, GetClientUserId(client), 3);
- numTimers_Drain[client]++;
- }
- }
- }
- return 0;
- }
- public void:GiveRandomMannpower(client, Float:duration)
- {
- if (IsValidClient(client, true, true))
- {
- switch (GetRandomInt(1, 9))
- {
- case 1:
- {
- TF2_AddCondition(client, 90, duration, 0);
- }
- case 2:
- {
- TF2_AddCondition(client, 91, duration, 0);
- }
- case 3:
- {
- TF2_AddCondition(client, 92, duration, 0);
- }
- case 4:
- {
- TF2_AddCondition(client, 93, duration, 0);
- }
- case 5:
- {
- TF2_AddCondition(client, 94, duration, 0);
- }
- case 6:
- {
- GiveRandomMannpower(client, duration);
- }
- case 7:
- {
- TF2_AddCondition(client, 96, duration, 0);
- }
- case 8:
- {
- TF2_AddCondition(client, 97, duration, 0);
- }
- case 9:
- {
- TF2_AddCondition(client, 103, duration, 0);
- }
- default:
- {
- }
- }
- }
- return 0;
- }
- public Action:OnPlayerRunCmd(client, &buttons, &_arg2, Float:_arg3[3], Float:_arg4[3], &_arg5, &_arg6, &_arg7, &_arg8, &_arg9, _arg10[2])
- {
- new bool:keyDown = buttons & 1 != 0;
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_GetRoundState() == 1)
- {
- new var2;
- if (keyDown && KeyDown[client])
- {
- new var3;
- if (chaos_Active[client] && chaos_SpamType[client] && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_purechaos") && chaos_OnCooldown[client])
- {
- ShootSpell(client, 0);
- chaos_OnCooldown[client] = 1;
- CreateTimer(chaos_SpellCD[client], 133, GetClientUserId(client), 2);
- }
- new var4;
- if (classic_Active[client] && classic_SpamType[client] && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_classic") && classic_OnCooldown[client])
- {
- ShootSpell(client, 1);
- classic_OnCooldown[client] = 1;
- CreateTimer(classic_SpellCD[client], 143, GetClientUserId(client), 2);
- }
- }
- }
- return 0;
- }
- public void:OnPluginStart()
- {
- HookEvent("arena_round_start", 125, 1);
- HookEvent("teamplay_round_win", 123, 1);
- HookEvent("player_death", 167, 1);
- HookEvent("post_inventory_application", 165, 1);
- return 0;
- }
- public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3], damagecustom)
- {
- new var1;
- if (IsValidMulti(victim, true, true, false, true, false, 2, false) && IsValidMulti(attacker, true, true, false, true, false, 2, false))
- {
- new var2;
- if (TF2_IsPlayerInCondition(attacker, 36) && repo_HitDMG[attacker] > 0.0 && IsInvuln(victim))
- {
- if (repo_AlreadyHit[attacker][victim])
- {
- damage = 0;
- return 1;
- }
- new dmg = RoundFloat(repo_HitDMG[attacker]);
- new vicIDX = FF2_GetBossIndex(victim);
- if (FF2_GetBossIndex(victim) != -1)
- {
- if (FF2_GetBossMaxHealth(vicIDX) * FF2_GetBossMaxLives(vicIDX) < dmg)
- {
- triggerRepo(attacker, victim);
- damage = 0;
- return 1;
- }
- }
- else
- {
- if (GetClientHealth(victim) < dmg)
- {
- triggerRepo(attacker, victim);
- damage = 0;
- return 1;
- }
- }
- damage = repo_HitDMG[attacker];
- return 1;
- }
- if (chaos_Active[attacker])
- {
- new String:inf[1024];
- GetEntityClassname(inflictor, inf, 255);
- if (StrContains(inf, "tf_projectile_spell", true) != -1)
- {
- damage = damage * chaos_DMGMultiplier[attacker];
- return 1;
- }
- }
- if (classic_Active[attacker])
- {
- new String:inf[1024];
- GetEntityClassname(inflictor, inf, 255);
- if (StrContains(inf, "zombie", true))
- {
- damage = damage * classic_DMGMultiplier[attacker];
- return 1;
- }
- }
- if (FF2_HasAbility(FF2_GetBossIndex(victim), "ssb_raidpack", "ssb_bonezone_raid"))
- {
- new Float:mult = ride_GetMultiplier(victim);
- if (1.0 != mult)
- {
- damage = damage * mult;
- return 1;
- }
- }
- }
- return 0;
- }
- public Action:ShootSpell(client, mode)
- {
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- new Float:vAngles[3] = 0.0;
- new Float:vPosition[3] = 0.0;
- GetClientEyeAngles(client, vAngles);
- GetClientEyePosition(client, vPosition);
- new String:strEntname[192];
- if (mode == 1)
- {
- strEntname = "tf_projectile_spellspawnzombie";
- }
- else
- {
- new bool:spellSelected;
- while (spellSelected)
- {
- switch (GetRandomInt(1, 8))
- {
- case 1:
- {
- if (chaos_Fireball[client])
- {
- strEntname = "tf_projectile_spellfireball";
- spellSelected = true;
- }
- }
- case 2:
- {
- if (chaos_Orb[client])
- {
- strEntname = "tf_projectile_lightningorb";
- spellSelected = true;
- }
- }
- case 3:
- {
- if (chaos_MIRV[client])
- {
- strEntname = "tf_projectile_spellmirv";
- spellSelected = true;
- }
- }
- case 4:
- {
- if (chaos_Pumpkin[client])
- {
- strEntname = "tf_projectile_spellpumpkin";
- spellSelected = true;
- }
- }
- case 5:
- {
- if (chaos_Bats[client])
- {
- strEntname = "tf_projectile_spellbats";
- spellSelected = true;
- }
- }
- case 6:
- {
- if (chaos_Meteor[client])
- {
- strEntname = "tf_projectile_spellmeteorshower";
- spellSelected = true;
- }
- }
- case 7:
- {
- if (chaos_Teleport[client])
- {
- strEntname = "tf_projectile_spelltransposeteleport";
- spellSelected = true;
- }
- }
- case 8:
- {
- if (chaos_Monoculus[client])
- {
- strEntname = "tf_projectile_spellspawnboss";
- spellSelected = true;
- }
- }
- default:
- {
- }
- }
- }
- }
- new iTeam = GetClientTeam(client);
- new iSpell = CreateEntityByName(strEntname, -1);
- if (IsValidEntity(iSpell))
- {
- decl Float:vVelocity[3];
- decl Float:vBuffer[3];
- GetAngleVectors(vAngles, vBuffer, NULL_VECTOR, NULL_VECTOR);
- vVelocity[0] = vBuffer[0] * 1100.0;
- vVelocity[1] = vBuffer[1] * 1100.0;
- vVelocity[2] = vBuffer[2] * 1100.0;
- SetEntPropEnt(iSpell, 0, "m_hOwnerEntity", client, 0);
- new var1;
- if (GetRandomInt(0, 100) <= 5)
- {
- var1 = 1;
- }
- else
- {
- var1 = 0;
- }
- SetEntProp(iSpell, 0, "m_bCritical", var1, 1, 0);
- SetEntProp(iSpell, 0, "m_iTeamNum", iTeam, 1, 0);
- SetEntProp(iSpell, 0, "m_nSkin", iTeam + -2, 4, 0);
- TeleportEntity(iSpell, vPosition, vAngles, NULL_VECTOR);
- SetVariantInt(iTeam);
- AcceptEntityInput(iSpell, "TeamNum", -1, -1, 0);
- SetVariantInt(iTeam);
- AcceptEntityInput(iSpell, "SetTeam", -1, -1, 0);
- DispatchSpawn(iSpell);
- TeleportEntity(iSpell, NULL_VECTOR, NULL_VECTOR, vVelocity);
- }
- return 0;
- }
- return 0;
- }
- public Action:Timer_NecroMash_Hit(Handle:timer, any:pack)
- {
- ResetPack(pack, false);
- new Float:pos[3] = 0.0;
- pos[0] = ReadPackFloat(pack);
- pos[1] = ReadPackFloat(pack);
- pos[2] = ReadPackFloat(pack);
- new attacker = ReadPackCell(pack);
- new shaker = CreateEntityByName("env_shake", -1);
- if (shaker != -1)
- {
- DispatchKeyValue(shaker, "amplitude", "10");
- DispatchKeyValue(shaker, "radius", "1500");
- DispatchKeyValue(shaker, "duration", "1");
- DispatchKeyValue(shaker, "frequency", "2.5");
- DispatchKeyValue(shaker, "spawnflags", "4");
- DispatchKeyValueVector(shaker, "origin", pos);
- DispatchSpawn(shaker);
- AcceptEntityInput(shaker, "StartShake", -1, -1, 0);
- CreateTimer(1.0, 171, shaker, 2);
- }
- EmitSoundToAll("ambient/explosions/explode_1.wav", -2, 0, 75, 0, 0.2, 100, -1, pos, NULL_VECTOR, true, 0.0);
- EmitSoundToAll("misc/halloween/strongman_fast_impact_01.wav", -2, 0, 75, 0, 0.2, 100, -1, pos, NULL_VECTOR, true, 0.0);
- new Float:pos2[3] = 0.0;
- new Float:Vec[3] = 0.0;
- new Float:AngBuff[3] = 0.0;
- new i = 1;
- while (i <= MaxClients)
- {
- new var1;
- if (IsValidMulti(i, true, true, false, true, false, 2, false) && IsValidMulti(attacker, true, true, false, true, false, 2, false))
- {
- new var2;
- if (TF2_GetClientTeam(attacker) == TF2_GetClientTeam(i) && mortis_FriendlyFire[attacker])
- {
- GetClientAbsOrigin(i, pos2);
- if (GetVectorDistance(pos, pos2, false) <= mortis_Radius[attacker])
- {
- SDKHooks_TakeDamage(i, attacker, attacker, mortis_DMG[attacker], 8384, -1, NULL_VECTOR, NULL_VECTOR);
- }
- if (GetVectorDistance(pos2, pos, false) <= mortis_KB[attacker])
- {
- MakeVectorFromPoints(pos, pos2, Vec);
- GetVectorAngles(Vec, AngBuff);
- AngBuff[0] = AngBuff[0] - 30.0;
- GetAngleVectors(AngBuff, Vec, NULL_VECTOR, NULL_VECTOR);
- NormalizeVector(Vec, Vec);
- ScaleVector(Vec, mortis_KB[attacker]);
- Vec[2] += mortis_KB[attacker] * 0.5;
- TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, Vec);
- }
- }
- }
- i++;
- }
- pos[2] += 10.0;
- NecroMash_CreateParticle("hammer_impact_button", pos);
- NecroMash_CreateParticle("hammer_bones_kickup", pos);
- return 0;
- }
- public Action:Timer_NecroMash_Whoosh(Handle:timer, any:pack)
- {
- ResetPack(pack, false);
- new Float:pos[3] = 0.0;
- pos[0] = ReadPackFloat(pack);
- pos[1] = ReadPackFloat(pack);
- pos[2] = ReadPackFloat(pack);
- EmitSoundToAll("misc/halloween/strongman_fast_whoosh_01.wav", -2, 0, 75, 0, 0.25, 100, -1, pos, NULL_VECTOR, true, 0.0);
- return 0;
- }
- public bool:TraceEntityFilterPlayer(entity, contentsMask)
- {
- return entity > MaxClients;
- }
- public void:__ext_core_SetNTVOptional()
- {
- MarkNativeAsOptional("GetFeatureStatus");
- MarkNativeAsOptional("RequireFeature");
- MarkNativeAsOptional("AddCommandListener");
- MarkNativeAsOptional("RemoveCommandListener");
- MarkNativeAsOptional("BfWriteBool");
- MarkNativeAsOptional("BfWriteByte");
- MarkNativeAsOptional("BfWriteChar");
- MarkNativeAsOptional("BfWriteShort");
- MarkNativeAsOptional("BfWriteWord");
- MarkNativeAsOptional("BfWriteNum");
- MarkNativeAsOptional("BfWriteFloat");
- MarkNativeAsOptional("BfWriteString");
- MarkNativeAsOptional("BfWriteEntity");
- MarkNativeAsOptional("BfWriteAngle");
- MarkNativeAsOptional("BfWriteCoord");
- MarkNativeAsOptional("BfWriteVecCoord");
- MarkNativeAsOptional("BfWriteVecNormal");
- MarkNativeAsOptional("BfWriteAngles");
- MarkNativeAsOptional("BfReadBool");
- MarkNativeAsOptional("BfReadByte");
- MarkNativeAsOptional("BfReadChar");
- MarkNativeAsOptional("BfReadShort");
- MarkNativeAsOptional("BfReadWord");
- MarkNativeAsOptional("BfReadNum");
- MarkNativeAsOptional("BfReadFloat");
- MarkNativeAsOptional("BfReadString");
- MarkNativeAsOptional("BfReadEntity");
- MarkNativeAsOptional("BfReadAngle");
- MarkNativeAsOptional("BfReadCoord");
- MarkNativeAsOptional("BfReadVecCoord");
- MarkNativeAsOptional("BfReadVecNormal");
- MarkNativeAsOptional("BfReadAngles");
- MarkNativeAsOptional("BfGetNumBytesLeft");
- MarkNativeAsOptional("BfWrite.WriteBool");
- MarkNativeAsOptional("BfWrite.WriteByte");
- MarkNativeAsOptional("BfWrite.WriteChar");
- MarkNativeAsOptional("BfWrite.WriteShort");
- MarkNativeAsOptional("BfWrite.WriteWord");
- MarkNativeAsOptional("BfWrite.WriteNum");
- MarkNativeAsOptional("BfWrite.WriteFloat");
- MarkNativeAsOptional("BfWrite.WriteString");
- MarkNativeAsOptional("BfWrite.WriteEntity");
- MarkNativeAsOptional("BfWrite.WriteAngle");
- MarkNativeAsOptional("BfWrite.WriteCoord");
- MarkNativeAsOptional("BfWrite.WriteVecCoord");
- MarkNativeAsOptional("BfWrite.WriteVecNormal");
- MarkNativeAsOptional("BfWrite.WriteAngles");
- MarkNativeAsOptional("BfRead.ReadBool");
- MarkNativeAsOptional("BfRead.ReadByte");
- MarkNativeAsOptional("BfRead.ReadChar");
- MarkNativeAsOptional("BfRead.ReadShort");
- MarkNativeAsOptional("BfRead.ReadWord");
- MarkNativeAsOptional("BfRead.ReadNum");
- MarkNativeAsOptional("BfRead.ReadFloat");
- MarkNativeAsOptional("BfRead.ReadString");
- MarkNativeAsOptional("BfRead.ReadEntity");
- MarkNativeAsOptional("BfRead.ReadAngle");
- MarkNativeAsOptional("BfRead.ReadCoord");
- MarkNativeAsOptional("BfRead.ReadVecCoord");
- MarkNativeAsOptional("BfRead.ReadVecNormal");
- MarkNativeAsOptional("BfRead.ReadAngles");
- MarkNativeAsOptional("BfRead.BytesLeft.get");
- MarkNativeAsOptional("PbReadInt");
- MarkNativeAsOptional("PbReadFloat");
- MarkNativeAsOptional("PbReadBool");
- MarkNativeAsOptional("PbReadString");
- MarkNativeAsOptional("PbReadColor");
- MarkNativeAsOptional("PbReadAngle");
- MarkNativeAsOptional("PbReadVector");
- MarkNativeAsOptional("PbReadVector2D");
- MarkNativeAsOptional("PbGetRepeatedFieldCount");
- MarkNativeAsOptional("PbSetInt");
- MarkNativeAsOptional("PbSetFloat");
- MarkNativeAsOptional("PbSetBool");
- MarkNativeAsOptional("PbSetString");
- MarkNativeAsOptional("PbSetColor");
- MarkNativeAsOptional("PbSetAngle");
- MarkNativeAsOptional("PbSetVector");
- MarkNativeAsOptional("PbSetVector2D");
- MarkNativeAsOptional("PbAddInt");
- MarkNativeAsOptional("PbAddFloat");
- MarkNativeAsOptional("PbAddBool");
- MarkNativeAsOptional("PbAddString");
- MarkNativeAsOptional("PbAddColor");
- MarkNativeAsOptional("PbAddAngle");
- MarkNativeAsOptional("PbAddVector");
- MarkNativeAsOptional("PbAddVector2D");
- MarkNativeAsOptional("PbRemoveRepeatedFieldValue");
- MarkNativeAsOptional("PbReadMessage");
- MarkNativeAsOptional("PbReadRepeatedMessage");
- MarkNativeAsOptional("PbAddMessage");
- MarkNativeAsOptional("Protobuf.ReadInt");
- MarkNativeAsOptional("Protobuf.ReadInt64");
- MarkNativeAsOptional("Protobuf.ReadFloat");
- MarkNativeAsOptional("Protobuf.ReadBool");
- MarkNativeAsOptional("Protobuf.ReadString");
- MarkNativeAsOptional("Protobuf.ReadColor");
- MarkNativeAsOptional("Protobuf.ReadAngle");
- MarkNativeAsOptional("Protobuf.ReadVector");
- MarkNativeAsOptional("Protobuf.ReadVector2D");
- MarkNativeAsOptional("Protobuf.GetRepeatedFieldCount");
- MarkNativeAsOptional("Protobuf.SetInt");
- MarkNativeAsOptional("Protobuf.SetInt64");
- MarkNativeAsOptional("Protobuf.SetFloat");
- MarkNativeAsOptional("Protobuf.SetBool");
- MarkNativeAsOptional("Protobuf.SetString");
- MarkNativeAsOptional("Protobuf.SetColor");
- MarkNativeAsOptional("Protobuf.SetAngle");
- MarkNativeAsOptional("Protobuf.SetVector");
- MarkNativeAsOptional("Protobuf.SetVector2D");
- MarkNativeAsOptional("Protobuf.AddInt");
- MarkNativeAsOptional("Protobuf.AddInt64");
- MarkNativeAsOptional("Protobuf.AddFloat");
- MarkNativeAsOptional("Protobuf.AddBool");
- MarkNativeAsOptional("Protobuf.AddString");
- MarkNativeAsOptional("Protobuf.AddColor");
- MarkNativeAsOptional("Protobuf.AddAngle");
- MarkNativeAsOptional("Protobuf.AddVector");
- MarkNativeAsOptional("Protobuf.AddVector2D");
- MarkNativeAsOptional("Protobuf.RemoveRepeatedFieldValue");
- MarkNativeAsOptional("Protobuf.ReadMessage");
- MarkNativeAsOptional("Protobuf.ReadRepeatedMessage");
- MarkNativeAsOptional("Protobuf.AddMessage");
- VerifyCoreVersion();
- return 0;
- }
- public void:activateMortis(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis"))
- {
- if (mortis_Type[client] != 2)
- {
- new numTargs;
- if (mortis_FriendlyFire[client])
- {
- numTargs = RoundFloat(5*0(mortis_Percent[client], GetNumTargets(true, true, false, true, false, 2, false)));
- }
- else
- {
- new TFTeam:targTeam = grabEnemyTeam(client);
- numTargs = RoundFloat(5*0(mortis_Percent[client], GetNumTargets(true, true, false, true, true, targTeam, false)));
- }
- new smashTarget = GetRandomInt(1, MaxClients);
- new numSmashed;
- while (numSmashed <= numTargs)
- {
- new var2;
- if (IsValidMulti(smashTarget, true, true, false, true, false, 2, false) && mortis_Active[client][smashTarget])
- {
- new var3;
- if (mortis_FriendlyFire[client] || TF2_GetClientTeam(client) == TF2_GetClientTeam(smashTarget))
- {
- if (mortis_Type[client])
- {
- mortis_Active[client][smashTarget] = true;
- }
- else
- {
- TF2_StunPlayer(smashTarget, 5.0, 1.0, 2, client);
- NecroMash_SmashClient(smashTarget, client);
- }
- numSmashed++;
- }
- }
- smashTarget = GetRandomInt(1, MaxClients);
- }
- }
- if (mortis_Type[client])
- {
- new var4 = mortis_RemainingSmashes[client];
- var4 = mortis_SmashCount[client][var4];
- if (numTimers_Mortis[client] < 1)
- {
- CreateTimer(mortis_Time[client], 161, GetClientUserId(client), 3);
- numTimers_Mortis[client]++;
- }
- }
- }
- return 0;
- }
- public void:bonerEnd(Event:hEvent, String:sEvName[], bool:bDontBroadcast)
- {
- new client = 1;
- while (client <= MaxClients)
- {
- if (IsValidClient(client, true, true))
- {
- destroyEverything(client);
- }
- client++;
- }
- return 0;
- }
- public void:bonerStart(Event:hEvent, String:sEvName[], bool:bDontBroadcast)
- {
- new client = 1;
- while (client <= MaxClients)
- {
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- checkArgs(client);
- }
- client++;
- }
- return 0;
- }
- public Action:chaosStun(Handle:chaosStun, id)
- {
- new client = GetClientOfUserId(id);
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- if (chaos_RemainingUber[client] > 0.0)
- {
- new var1 = chaos_RemainingUber[client];
- var1 = var1[-5(chaos_StunTime[client])];
- if (chaos_RemainingUber[client] < 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- chaos_RemainingUber[client] = 0;
- }
- }
- enableChaos(client);
- }
- return 0;
- }
- public Action:chaosTimer(Handle:chaosTimer, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_purechaos") && chaos_RemainingTime[client] >= 0.1 && numTimers_Chaos[client] <= 1)
- {
- if (!(StrEqual(chaos_HUD[client], "", true)))
- {
- SetHudTextParams(-1.0, 0.7, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(client, -1, chaos_HUD[client]);
- }
- if (chaos_RemainingUber[client] > 0.0)
- {
- new var2 = chaos_RemainingUber[client];
- var2 = var2[-0.1];
- if (chaos_RemainingUber[client] < 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- chaos_RemainingUber[client] = 0;
- }
- }
- new var3 = chaos_RemainingTime[client];
- var3 = var3[-0.1];
- if (chaos_RemainingTime[client] < 0.1)
- {
- chaos_Active[client] = 0;
- chaos_RemainingTime[client] = 0;
- DeleteParticle(client);
- if (chaos_RemainingUber[client] > 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- TF2_AddCondition(client, 59, chaos_RemainingUber[client], 0);
- TF2_AddCondition(client, 52, chaos_RemainingUber[client], 0);
- chaos_RemainingUber[client] = 0;
- }
- }
- return 0;
- }
- numTimers_Chaos[client] += -1;
- KillTimer(chaosTimer, false);
- return 0;
- }
- public Action:chaos_AutoFire(Handle:chaos_AutoFire, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_purechaos") && chaos_RemainingTime[client] >= 0.1 && numTimers_Chaos[client] <= 1)
- {
- if (!(StrEqual(chaos_HUD[client], "", true)))
- {
- SetHudTextParams(-1.0, 0.75, chaos_SpellCD[client], 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(client, -1, chaos_HUD[client]);
- }
- if (chaos_RemainingUber[client] > 0.0)
- {
- new var2 = chaos_RemainingUber[client];
- var2 = var2[-5(chaos_SpellCD[client])];
- if (chaos_RemainingUber[client] < 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- chaos_RemainingUber[client] = 0;
- }
- }
- new var3 = chaos_RemainingTime[client];
- var3 = var3[-5(chaos_SpellCD[client])];
- if (chaos_RemainingTime[client] < 0.1)
- {
- chaos_Active[client] = 0;
- chaos_RemainingTime[client] = 0;
- DeleteParticle(client);
- if (chaos_RemainingUber[client] > 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- TF2_AddCondition(client, 59, chaos_RemainingUber[client], 0);
- TF2_AddCondition(client, 52, chaos_RemainingUber[client], 0);
- chaos_RemainingUber[client] = 0;
- }
- }
- ShootSpell(client, 0);
- return 0;
- }
- numTimers_Chaos[client] += -1;
- KillTimer(chaos_AutoFire, false);
- return 0;
- }
- public Action:chaos_RemoveCooldown(Handle:chaos_RemoveCooldown, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_purechaos"))
- {
- chaos_OnCooldown[client] = 0;
- }
- return 0;
- }
- public void:checkArgs(client)
- {
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- new idx = FF2_GetBossIndex(client);
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_mortis"))
- {
- setMortisArgs(client);
- }
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_rip"))
- {
- setRipArgs(client);
- }
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_calciumrepo"))
- {
- setRepoArgs(client);
- }
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_purechaos"))
- {
- setChaosArgs(client);
- }
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_bonezone_classic"))
- {
- setClassicArgs(client);
- }
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_bonezone_raid"))
- {
- setRideArgs(client);
- }
- if (FF2_HasAbility(idx, "ssb_raidpack", "ssb_soulsteal"))
- {
- setDrainArgs(client);
- }
- }
- return 0;
- }
- public Action:classicStun(Handle:chaosStun, id)
- {
- new client = GetClientOfUserId(id);
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- if (classic_RemainingUber[client] > 0.0)
- {
- new var1 = classic_RemainingUber[client];
- var1 = var1[-5(classic_StunTime[client])];
- if (classic_RemainingUber[client] < 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- classic_RemainingUber[client] = 0;
- }
- }
- enableClassic(client);
- }
- return 0;
- }
- public Action:classicTimer(Handle:classicTimer, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_bonezone_classic") && classic_RemainingTime[client] >= 0.1 && numTimers_Classic[client] <= 1)
- {
- if (!(StrEqual(classic_HUD[client], "", true)))
- {
- SetHudTextParams(-1.0, 0.7, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(client, -1, classic_HUD[client]);
- }
- if (classic_RemainingUber[client] > 0.0)
- {
- new var2 = classic_RemainingUber[client];
- var2 = var2[-0.1];
- if (classic_RemainingUber[client] < 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- classic_RemainingUber[client] = 0;
- }
- }
- new var3 = classic_RemainingTime[client];
- var3 = var3[-0.1];
- if (classic_RemainingTime[client] < 0.1)
- {
- classic_Active[client] = 0;
- classic_RemainingTime[client] = 0;
- DeleteParticle(client);
- if (classic_RemainingUber[client] > 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- TF2_AddCondition(client, 59, classic_RemainingUber[client], 0);
- TF2_AddCondition(client, 52, classic_RemainingUber[client], 0);
- classic_RemainingUber[client] = 0;
- }
- }
- return 0;
- }
- numTimers_Classic[client] += -1;
- KillTimer(classicTimer, false);
- return 0;
- }
- public Action:classic_AutoFire(Handle:classic_AutoFire, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_bonezone_classic") && classic_RemainingTime[client] >= 0.1 && numTimers_Classic[client] <= 1)
- {
- if (!(StrEqual(classic_HUD[client], "", true)))
- {
- SetHudTextParams(-1.0, 0.75, classic_SpellCD[client], 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(client, -1, classic_HUD[client]);
- }
- if (classic_RemainingUber[client] > 0.0)
- {
- new var2 = classic_RemainingUber[client];
- var2 = var2[-5(classic_SpellCD[client])];
- if (classic_RemainingUber[client] < 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- classic_RemainingUber[client] = 0;
- }
- }
- new var3 = classic_RemainingTime[client];
- var3 = var3[-5(classic_SpellCD[client])];
- if (classic_RemainingTime[client] < 0.1)
- {
- classic_Active[client] = 0;
- classic_RemainingTime[client] = 0;
- DeleteParticle(client);
- if (classic_RemainingUber[client] > 0.1)
- {
- TF2_RemoveCondition(client, 59);
- TF2_RemoveCondition(client, 52);
- TF2_AddCondition(client, 59, classic_RemainingUber[client], 0);
- TF2_AddCondition(client, 52, classic_RemainingUber[client], 0);
- classic_RemainingUber[client] = 0;
- }
- }
- ShootSpell(client, 1);
- return 0;
- }
- numTimers_Classic[client] += -1;
- KillTimer(classic_AutoFire, false);
- return 0;
- }
- public Action:classic_RemoveCooldown(Handle:classic_RemoveCooldown, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_classic"))
- {
- classic_OnCooldown[client] = 0;
- }
- return 0;
- }
- public Action:classic_Summon(Handle:classic_Summon, any:pack)
- {
- ResetPack(pack, false);
- new attacker = GetClientOfUserId(ReadPackCell(pack));
- new victim = GetClientOfUserId(ReadPackCell(pack));
- new var1;
- if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_bonezone_classic") && IsValidClient(victim, true, true))
- {
- new Float:vicLoc[3] = 0.0;
- GetClientAbsOrigin(victim, vicLoc);
- CreateBoner(attacker, victim, classic_MinionMode[attacker], false, classic_MinionInvTime[attacker], classic_BossIDX[attacker], classic_MinionClass[attacker], classic_RemoveWearables[attacker], classic_WeaponName[attacker], classic_WeaponStats[attacker], classic_WeaponIDX[attacker], classic_MinionModel[attacker], vicLoc);
- }
- return 0;
- }
- public void:destroyEverything(client)
- {
- if (IsValidClient(client, true, true))
- {
- mortis_Type[client] = 0;
- mortis_SmashCount[client] = 0;
- mortis_BlockType[client] = 0;
- mortis_RemainingSmashes[client] = 0;
- mortis_Percent[client] = 0;
- mortis_Time[client] = 0;
- mortis_DMG[client] = 0;
- mortis_Radius[client] = 0;
- mortis_WarningTime[client] = 0;
- mortis_KB[client] = 0;
- mortis_FriendlyFire[client] = 0;
- rip_MaxHitsPerTarget[client] = 0;
- rip_BlockType[client] = 0;
- rip_ClassAnims[client] = 0;
- rip_Duration[client] = 0;
- rip_RemainingTime[client] = 0;
- rip_DMG[client] = 0;
- rip_ContactDMGCD[client] = 0;
- rip_KB[client] = 0;
- rip_MaxSpeed[client] = 0;
- rip_Radius[client] = 0;
- rip_IgnoreUber[client] = 0;
- repo_MinionMode[client] = -1;
- repo_WeaponIndex[client] = 0;
- repo_MaxHits[client] = 0;
- repo_HitCounter[client] = 0;
- repo_BlockType[client] = 0;
- repo_Class[client] = 0;
- repo_Duration[client] = 0;
- repo_RemainingTime[client] = 0;
- repo_HitDMG[client] = 0;
- repo_BombTimer[client] = 0;
- repo_BombDMG[client] = 0;
- repo_BombRadius[client] = 0;
- repo_MinionInvuln[client] = 0;
- repo_RemoveWearables[client] = 0;
- repo_AboutToExplode[client] = 0;
- repo_SummonerRadius[client] = 0;
- chaos_SpamType[client] = 0;
- chaos_BlockType[client] = 0;
- chaos_StunTime[client] = 0;
- chaos_InvTime[client] = 0;
- chaos_Duration[client] = 0;
- chaos_SpellCD[client] = 0;
- chaos_DMGMultiplier[client] = 0;
- chaos_RemainingTime[client] = 0;
- chaos_RemainingUber[client] = 0;
- chaos_Active[client] = 0;
- chaos_Fireball[client] = 0;
- chaos_Orb[client] = 0;
- chaos_MIRV[client] = 0;
- chaos_Pumpkin[client] = 0;
- chaos_Bats[client] = 0;
- chaos_Meteor[client] = 0;
- chaos_Teleport[client] = 0;
- chaos_Monoculus[client] = 0;
- chaos_OnCooldown[client] = 0;
- classic_SpamType[client] = 0;
- classic_MinionMode[client] = 0;
- classic_BossIDX[client] = 0;
- classic_WeaponIDX[client] = 0;
- classic_BlockType[client] = 0;
- classic_MinionClass[client] = 0;
- classic_StunTime[client] = 0;
- classic_InvTime[client] = 0;
- classic_RemainingUber[client] = 0;
- classic_Duration[client] = 0;
- classic_RemainingTime[client] = 0;
- classic_SpellCD[client] = 0;
- classic_MannpowerTime[client] = 0;
- classic_MinionInvTime[client] = 0;
- classic_DMGMultiplier[client] = 0;
- classic_RemoveWearables[client] = 0;
- classic_OnCooldown[client] = 0;
- ride_MinionCount[client] = 0;
- ride_MinionMode[client] = 0;
- ride_BossIDX[client] = 0;
- ride_WeaponIDX[client] = 0;
- ride_BlockType[client] = 0;
- ride_Summoner[client] = 0;
- ride_MinionClass[client] = 0;
- ride_DMGReduction[client] = 0;
- ride_MinionInvTime[client] = 0;
- ride_RemoveWearables[client] = 0;
- drain_BlockType[client] = 0;
- drain_Radius[client] = 0;
- drain_DMG[client] = 0;
- drain_Heal[client] = 0;
- drain_Duration[client] = 0;
- drain_RemainingTime[client] = 0;
- drain_CanOverheal[client] = 0;
- strcopy(rip_Model[client], 256, "");
- strcopy(rip_NormalModel[client], 256, "");
- strcopy(repo_MinionModel[client], 256, "");
- strcopy(repo_HitSound[client], 256, "");
- strcopy(repo_GibSound[client], 256, "");
- strcopy(repo_WeaponName[client], 64, "");
- strcopy(repo_WeaponStats[client], 255, "");
- strcopy(chaos_HUD[client], 255, "");
- strcopy(chaos_Particle[client], 255, "");
- strcopy(chaos_ParticlePoint[client], 255, "");
- strcopy(classic_MinionModel[client], 256, "");
- strcopy(classic_WeaponName[client], 255, "");
- strcopy(classic_WeaponStats[client], 255, "");
- strcopy(classic_HUD[client], 255, "");
- strcopy(classic_Particle[client], 255, "");
- strcopy(classic_ParticlePoint[client], 255, "");
- strcopy(ride_MinionModel[client], 256, "");
- strcopy(ride_WeaponName[client], 255, "");
- strcopy(ride_WeaponStats[client], 255, "");
- strcopy(drain_HUD[client], 255, "");
- new i = 1;
- while (i <= MaxClients)
- {
- mortis_Active[client][i] = false;
- mortis_Active[i][client] = false;
- rip_CanBeHitByPlayer[client][i] = true;
- rip_CanBeHitByPlayer[i][client] = true;
- repo_AlreadyHit[client][i] = false;
- repo_AlreadyHit[i][client] = false;
- rip_HitCounter[client][i] = 0;
- rip_HitCounter[i][client] = 0;
- i++;
- }
- SDKUnhook(client, 2, 109);
- SDKUnhook(client, 4, 187);
- DeleteParticle(client);
- }
- return 0;
- }
- public Action:drainTimer(Handle:drainTimer, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_soulsteal") && drain_RemainingTime[client] >= 0.1 && numTimers_Drain[client] <= 1)
- {
- if (!(StrEqual(drain_HUD[client], "", true)))
- {
- SetHudTextParams(-1.0, 0.7, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(client, -1, drain_HUD[client]);
- }
- if (GetClientButtons(client) & 1)
- {
- new TFTeam:targTeam = grabEnemyTeam(client);
- new Float:userPos[3] = 0.0;
- GetClientAbsOrigin(client, userPos);
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
- {
- new Float:vicPos[3] = 0.0;
- GetClientAbsOrigin(i, vicPos);
- if (GetVectorDistance(userPos, vicPos, false) <= drain_Radius[client])
- {
- drain_DealDamage(client, i);
- }
- }
- i++;
- }
- }
- else
- {
- CPrintToChatAll("{red}%N is not holding m1 allegedly", client);
- }
- new var2 = drain_RemainingTime[client];
- var2 = var2[-0.1];
- if (drain_RemainingTime[client] < 0.1)
- {
- drain_RemainingTime[client] = 0;
- }
- return 0;
- }
- numTimers_Drain[client] += -1;
- KillTimer(drainTimer, false);
- return 0;
- }
- public void:drain_DealDamage(attacker, victim)
- {
- new var1;
- if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_soulsteal") && IsValidMulti(victim, true, true, false, true, false, 2, false) && IsInvuln(victim))
- {
- new Float:dmg = drain_DMG[attacker];
- SDKHooks_TakeDamage(victim, attacker, attacker, dmg, 16777216, -1, NULL_VECTOR, NULL_VECTOR);
- spawnBeam(attacker, victim, 0.1, 0, 255, 120, 255, "materials/particle/bendibeam.vmt");
- new heal = RoundFloat(drain_Heal[attacker] * dmg);
- if (0 < heal)
- {
- new idx = FF2_GetBossIndex(attacker);
- new hp = FF2_GetBossHealth(idx);
- new var2;
- if (heal + hp >= FF2_GetBossMaxHealth(idx) && drain_CanOverheal[attacker])
- {
- FF2_SetBossHealth(idx, FF2_GetBossMaxHealth(idx));
- }
- else
- {
- FF2_SetBossHealth(idx, heal + hp);
- }
- }
- }
- return 0;
- }
- public void:enableChaos(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_purechaos"))
- {
- new var2;
- if (chaos_Fireball[client] && chaos_Orb[client] && chaos_MIRV[client] && chaos_Pumpkin[client] && chaos_Bats[client] && chaos_Meteor[client] && chaos_Teleport[client] && chaos_Monoculus[client])
- {
- FF2_LogError("[Supreme Spookmaster Pack] Error: a player has Pure Chaos enabled, but their config has blocked all spells. Aborting skill...");
- return 0;
- }
- chaos_Active[client] = 1;
- new var3 = chaos_RemainingTime[client];
- var3 = var3[chaos_Duration[client]];
- if (numTimers_Chaos[client] < 1)
- {
- if (chaos_SpamType[client])
- {
- CreateTimer(chaos_SpellCD[client], 131, GetClientUserId(client), 3);
- }
- else
- {
- CreateTimer(0.1, 129, GetClientUserId(client), 3);
- }
- numTimers_Chaos[client]++;
- }
- }
- return 0;
- }
- public void:enableClassic(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(client, "ssb_raidpack", "ssb_bonezone_classic"))
- {
- classic_Active[client] = 1;
- new var2 = classic_RemainingTime[client];
- var2 = var2[classic_Duration[client]];
- if (numTimers_Classic[client] < 1)
- {
- if (classic_SpamType[client])
- {
- CreateTimer(classic_SpellCD[client], 141, GetClientUserId(client), 3);
- }
- else
- {
- CreateTimer(0.1, 139, GetClientUserId(client), 3);
- }
- numTimers_Classic[client]++;
- }
- }
- return 0;
- }
- public void:endRIP(client)
- {
- if (IsValidMulti(client, true, true, true, true, false, 2, false))
- {
- new i = 1;
- while (i <= MaxClients)
- {
- rip_CanBeHitByPlayer[client][i] = true;
- rip_HitCounter[client][i] = 0;
- i++;
- }
- new String:testModel[1024];
- new String:path[1024];
- GetClientModel(client, testModel, 256);
- Format(path, 256, "models/%s", rip_Model[client]);
- new var1;
- if (StrEqual(path, testModel, true) && FileExists(rip_NormalModel[client], false, "GAME"))
- {
- SetVariantString(rip_NormalModel[client]);
- AcceptEntityInput(client, "SetCustomModel", -1, -1, 0);
- SetEntProp(client, 0, "m_bUseClassAnimations", 1, 4, 0);
- }
- TF2_RemoveCondition(client, 28);
- SDKUnhook(client, 4, 187);
- }
- return 0;
- }
- public Action:letItRip(Handle:letItRip, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_rip") && numTimers_Rip[client] <= 1 && rip_RemainingTime[client] >= 0.1)
- {
- new Float:userPos[3] = 0.0;
- GetClientAbsOrigin(client, userPos);
- new TFTeam:targTeam = grabEnemyTeam(client);
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
- {
- new Float:targPos[3] = 0.0;
- GetClientAbsOrigin(i, targPos);
- if (GetVectorDistance(userPos, targPos, false) <= rip_Radius[client])
- {
- rip_DealDMG(i, client);
- }
- }
- i++;
- }
- new var2 = rip_RemainingTime[client];
- var2 = var2[-0.1];
- if (rip_RemainingTime[client] < 0.1)
- {
- rip_RemainingTime[client] = 0;
- endRIP(client);
- }
- return 0;
- }
- numTimers_Rip[client] += -1;
- KillTimer(letItRip, false);
- return 0;
- }
- public Action:mortis(Handle:mortis, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis") && mortis_RemainingSmashes[client] > 0 && numTimers_Mortis[client] <= 1)
- {
- if (mortis_Type[client] == 2)
- {
- NecroMash_SmashClient(client, client);
- }
- else
- {
- new i = 1;
- while (i <= MaxClients)
- {
- new var2;
- if (IsValidMulti(i, true, true, false, true, false, 2, false) && mortis_Active[client][i])
- {
- NecroMash_SmashClient(i, client);
- }
- i++;
- }
- }
- mortis_RemainingSmashes[client] += -1;
- return 0;
- }
- if (numTimers_Mortis[client] <= 1)
- {
- new i = 1;
- while (i <= MaxClients)
- {
- mortis_Active[client][i] = false;
- i++;
- }
- }
- numTimers_Mortis[client] += -1;
- KillTimer(mortis, false);
- return 0;
- }
- public Action:mortis_Warning(Handle:mortis_Warning, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis"))
- {
- activateMortis(client);
- }
- return 0;
- }
- public void:playerReset(Event:gEvent, String:sEvName[], bool:bDontBroadcast)
- {
- new client = GetClientOfUserId(Event.GetInt(gEvent, "userid", 0));
- if (IsValidClient(client, true, true))
- {
- destroyEverything(client);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_GetRoundState() == 1)
- {
- checkArgs(client);
- }
- if (IsPlayerAlive(client))
- {
- SDKHook(client, 2, 109);
- }
- }
- return 0;
- }
- public Action:player_killed(Event:hEvent, String:sEvName[], bool:bDontBroadcast)
- {
- new victim = GetClientOfUserId(Event.GetInt(hEvent, "userid", 0));
- new attacker = GetClientOfUserId(Event.GetInt(hEvent, "attacker", 0));
- if (GetEventInt(hEvent, "death_flags", 0) & 32)
- {
- return 0;
- }
- if (IsValidClient(victim, true, true))
- {
- destroyEverything(victim);
- new var1;
- if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_bonezone_classic") && classic_Active[attacker])
- {
- if (classic_MinionMode[attacker] != -1)
- {
- new Handle:pack;
- CreateDataTimer(0.1, 145, pack, 2);
- WritePackCell(pack, GetClientUserId(attacker));
- WritePackCell(pack, GetClientUserId(victim));
- }
- if (classic_MannpowerTime[attacker] > 0.0)
- {
- new i = 1;
- while (i <= MaxClients)
- {
- new TFTeam:targTeam = TF2_GetClientTeam(attacker);
- if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
- {
- GiveRandomMannpower(i, classic_MannpowerTime[attacker]);
- }
- i++;
- }
- }
- }
- }
- return 0;
- }
- public Action:regenToFull(Handle:minGen, id)
- {
- new client = GetClientOfUserId(id);
- if (IsValidMulti(client, true, true, false, true, false, 2, false))
- {
- if (TF2_GetPlayerMaxHealth(client) > GetClientHealth(client))
- {
- SetEntityHealth(client, TF2_GetPlayerMaxHealth(client));
- }
- }
- return 0;
- }
- public Action:removeMasher(Handle:remover, removeTarget)
- {
- RemoveEntity(removeTarget);
- return 0;
- }
- public Action:repoTimer(Handle:repoTimer, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_calciumrepo") && repo_RemainingTime[client] >= 0.1 && numTimers_Repo[client] <= 1)
- {
- if (0 < repo_MaxHits[client])
- {
- if (repo_MaxHits[client] <= repo_HitCounter[client])
- {
- repo_RemainingTime[client] = 0;
- }
- }
- new var2 = repo_RemainingTime[client];
- var2 = var2[-0.1];
- if (repo_RemainingTime[client] < 0.1)
- {
- repo_RemainingTime[client] = 0;
- TF2_RemoveCondition(client, 36);
- repo_HitCounter[client] = 0;
- new i = 1;
- while (i <= MaxClients)
- {
- repo_AlreadyHit[client][i] = false;
- i++;
- }
- }
- return 0;
- }
- numTimers_Repo[client] += -1;
- KillTimer(repoTimer, false);
- return 0;
- }
- public Action:repo_DelayedExplosion(Handle:repo_DelayedExplosion, any:pack)
- {
- ResetPack(pack, false);
- new attacker = GetClientOfUserId(ReadPackCell(pack));
- new victim = GetClientOfUserId(ReadPackCell(pack));
- new var1;
- if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && IsValidMulti(victim, true, true, false, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_calciumrepo"))
- {
- repo_Explosion(attacker, victim);
- }
- return 0;
- }
- public void:repo_Explosion(attacker, victim)
- {
- new var1;
- if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && IsValidMulti(victim, true, true, false, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_calciumrepo"))
- {
- repo_AboutToExplode[victim] = 0;
- repo_SummonerRadius[victim] = 0;
- if (checkFile(0, repo_GibSound[attacker], false))
- {
- EmitSoundToAll(repo_GibSound[attacker], victim, 0, 140, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
- }
- new Float:groundZero[3] = 0.0;
- GetClientAbsOrigin(victim, groundZero);
- if (repo_BombDMG[attacker] > 0.0)
- {
- repo_GibParticles(groundZero);
- new TFTeam:targTeam = grabEnemyTeam(attacker);
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidMulti(i, true, true, false, true, true, targTeam, false))
- {
- new Float:vicLoc[3] = 0.0;
- GetClientAbsOrigin(i, vicLoc);
- new var2;
- if (GetVectorDistance(groundZero, vicLoc, false) <= repo_BombRadius[attacker] && IsInvuln(i))
- {
- SDKHooks_TakeDamage(i, attacker, attacker, repo_BombDMG[attacker], 8384, -1, NULL_VECTOR, NULL_VECTOR);
- }
- }
- i++;
- }
- }
- SDKHooks_TakeDamage(victim, attacker, attacker, 1.0E10, 8384, -1, NULL_VECTOR, NULL_VECTOR);
- if (repo_MinionMode[attacker] != -1)
- {
- new String:path[1024];
- Format(path, 256, "models/%s", repo_MinionModel[attacker]);
- new String:wepName[1024];
- strcopy(wepName, 255, repo_WeaponName[attacker]);
- new String:wepAtts[1024];
- strcopy(wepAtts, 255, repo_WeaponStats[attacker]);
- CreateBoner(attacker, victim, repo_MinionMode[attacker], false, repo_MinionInvuln[attacker], repo_BossIDX[attacker], repo_Class[attacker], repo_RemoveWearables[attacker], wepName, wepAtts, repo_WeaponIndex[attacker], path, groundZero);
- }
- }
- return 0;
- }
- public void:repo_GibParticles(Float:vecLoc[3])
- {
- new bigBoom = CreateEntityByName("info_particle_system", -1);
- if (IsValidEdict(bigBoom))
- {
- TeleportEntity(bigBoom, vecLoc[0], NULL_VECTOR, NULL_VECTOR);
- DispatchKeyValue(bigBoom, "effect_name", "hammer_bones_kickup");
- SetVariantString("!activator");
- DispatchKeyValue(bigBoom, "targetname", "present");
- DispatchSpawn(bigBoom);
- ActivateEntity(bigBoom);
- AcceptEntityInput(bigBoom, "Start", -1, -1, 0);
- }
- new bigBoom2 = CreateEntityByName("info_particle_system", -1);
- if (IsValidEdict(bigBoom2))
- {
- TeleportEntity(bigBoom2, vecLoc[0], NULL_VECTOR, NULL_VECTOR);
- DispatchKeyValue(bigBoom2, "effect_name", "hammer_bell_ring_shockwave");
- SetVariantString("!activator");
- DispatchKeyValue(bigBoom2, "targetname", "present");
- DispatchSpawn(bigBoom2);
- ActivateEntity(bigBoom2);
- AcceptEntityInput(bigBoom2, "Start", -1, -1, 0);
- }
- return 0;
- }
- public Float:ride_GetMultiplier(client)
- {
- new Float:multiplier = 1.0;
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_raid"))
- {
- new i = 1;
- while (i <= MaxClients)
- {
- new var2;
- if (IsValidMulti(i, true, true, false, true, false, 2, false) && client == ride_Summoner[i])
- {
- multiplier += -5(ride_DMGReduction[client]);
- }
- i++;
- }
- }
- if (multiplier < 0.0)
- {
- multiplier = 0.0;
- }
- return multiplier;
- }
- public Action:ride_HUD(Handle:ride_HUD, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_raid") && 1.0 != ride_GetMultiplier(client) && numTimers_Ride[client] <= 1)
- {
- new String:bossName[1024];
- FF2_GetBossName(FF2_GetBossIndex(client), bossName, 255, 0, 0);
- new Float:mult = ride_GetMultiplier(client);
- new i = 1;
- while (i <= MaxClients)
- {
- if (IsValidClient(i, true, true))
- {
- if (IsPlayerAlive(i))
- {
- if (TF2_GetClientTeam(client) != TF2_GetClientTeam(i))
- {
- SetHudTextParams(-1.0, 0.75, 0.1, 255, 120, 0, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(i, -1, "%s will now take %i-percent less damage.\nKill the minions to deal full damage!", bossName, RoundFloat(5*0(1.0 - mult, 100)));
- }
- if (client == i)
- {
- SetHudTextParams(-1.0, 0.75, 0.1, 0, 255, 120, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(i, -1, "Your minions are providing you with a defensive buff!\nYou will take %i-percent less damage from most sources.", RoundFloat(5*0(1.0 - mult, 100)));
- }
- }
- SetHudTextParams(-1.0, 0.75, 0.1, 255, 255, 255, 255, 0, 6.0, 0.1, 0.2);
- ShowHudText(i, -1, "[%s]\nDamage Resistance: %i-percent", bossName, RoundFloat(5*0(1.0 - mult, 100)));
- }
- i++;
- }
- return 0;
- }
- numTimers_Ride[client] += -1;
- KillTimer(ride_HUD, false);
- return 0;
- }
- public Action:ringTracker(Handle:ringTracker, id)
- {
- new client = GetClientOfUserId(id);
- new var1;
- if (IsValidMulti(client, true, true, false, true, false, 2, false) && repo_AboutToExplode[client])
- {
- spawnRing(client, repo_SummonerRadius[client] * 2.0, 0.0, 20.0, 0.0, "materials/particle/bendibeam.vmt", 0, 255, 160, 200, 10, 0.1, 30.0, 6.0, 10);
- return 0;
- }
- KillTimer(ringTracker, false);
- return 0;
- }
- public Action:ripThink(client)
- {
- if (IsValidMulti(client, true, true, false, true, false, 2, false))
- {
- if (HasEntProp(client, 0, "m_flMaxspeed"))
- {
- SetEntPropFloat(client, 0, "m_flMaxspeed", rip_MaxSpeed[client], 0);
- }
- }
- return 0;
- }
- public Action:rip_DamageCD(Handle:rip_DamageCD, any:pack)
- {
- ResetPack(pack, false);
- new attacker = GetClientOfUserId(ReadPackCell(pack));
- new victim = GetClientOfUserId(ReadPackCell(pack));
- new var1;
- if (IsValidMulti(attacker, true, true, false, true, false, 2, false) && IsValidMulti(victim, true, true, false, true, false, 2, false))
- {
- rip_CanBeHitByPlayer[attacker][victim] = true;
- }
- return 0;
- }
- public void:rip_DealDMG(victim, attacker)
- {
- new var1;
- if (IsValidMulti(victim, true, true, false, true, false, 2, false) && IsValidClient(attacker, true, true))
- {
- if (rip_CanBeHitByPlayer[attacker][victim])
- {
- if (0 < rip_MaxHitsPerTarget[attacker])
- {
- if (rip_MaxHitsPerTarget[attacker] <= rip_HitCounter[attacker][victim])
- {
- return 0;
- }
- }
- new bool:damageDealt;
- if (IsInvuln(victim))
- {
- if (rip_IgnoreUber[attacker])
- {
- new targIDX = FF2_GetBossIndex(victim);
- if (targIDX != -1)
- {
- FF2_SetBossHealth(targIDX, FF2_GetBossHealth(targIDX) - RoundFloat(rip_DMG[attacker]));
- damageDealt = true;
- }
- else
- {
- if (GetClientHealth(victim) < RoundFloat(rip_DMG[attacker]))
- {
- FakeClientCommand(victim, "explode");
- }
- else
- {
- SetEntityHealth(victim, GetClientHealth(victim) - RoundFloat(rip_DMG[attacker]));
- }
- damageDealt = true;
- }
- }
- }
- else
- {
- SDKHooks_TakeDamage(victim, attacker, attacker, rip_DMG[attacker], 8384, -1, NULL_VECTOR, NULL_VECTOR);
- damageDealt = true;
- }
- new var2;
- if (damageDealt && IsPlayerAlive(victim))
- {
- if (rip_KB[attacker] > 0.0)
- {
- new Float:atkPos[3] = 0.0;
- GetClientAbsOrigin(attacker, atkPos);
- new Float:vicPos[3] = 0.0;
- GetClientAbsOrigin(victim, vicPos);
- new Float:Vector[3] = 0.0;
- MakeVectorFromPoints(atkPos, vicPos, Vector);
- new Float:Angles[3] = 0.0;
- GetVectorAngles(Vector, Angles);
- Angles[0] = Angles[0] - 30.0;
- GetAngleVectors(Angles, Vector, NULL_VECTOR, NULL_VECTOR);
- NormalizeVector(Vector, Vector);
- ScaleVector(Vector, rip_KB[attacker]);
- new var3 = Vector[2];
- var3 = rip_KB[attacker][var3];
- TeleportEntity(victim, NULL_VECTOR, NULL_VECTOR, Vector);
- }
- rip_HitCounter[attacker][victim]++;
- if (rip_ContactDMGCD[attacker] > 0.0)
- {
- rip_CanBeHitByPlayer[attacker][victim] = false;
- new Handle:pack;
- CreateDataTimer(rip_ContactDMGCD[attacker], 189, pack, 0);
- WritePackCell(pack, GetClientUserId(attacker));
- WritePackCell(pack, GetClientUserId(victim));
- }
- }
- }
- return 0;
- }
- return 0;
- }
- public void:setChaosArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_purechaos"))
- {
- new idx = FF2_GetBossIndex(client);
- chaos_StunTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg1", 1, 4.0);
- chaos_InvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg2", 2, 4.0);
- chaos_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg3", 3, 30.0);
- chaos_SpamType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg4", 4, 0);
- chaos_SpellCD[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg5", 5, 0.2);
- chaos_DMGMultiplier[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_purechaos", "arg6", 6, 1.0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_purechaos", "arg15", 15, chaos_HUD[client], 255);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_purechaos", "arg16", 16, chaos_Particle[client], 255);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_purechaos", "arg17", 17, chaos_ParticlePoint[client], 255);
- chaos_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg18", 18, 0);
- KeyDown[client] = GetClientButtons(client) & 1 != 0;
- if (chaos_Duration[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_purechaos''; defaulting to 30.0.", chaos_Duration[client]);
- chaos_Duration[client] = 1106247680;
- }
- new var2;
- if (chaos_SpamType[client] > 1 || chaos_SpamType[client] < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 4 under ability ''ssb_purechaos''; defaulting to 0.", chaos_SpamType[client]);
- chaos_SpamType[client] = 0;
- }
- new var3;
- if (chaos_SpellCD[client] < 0.1 && chaos_SpamType[client] == 1)
- {
- chaos_SpellCD[client] = 0;
- }
- if (chaos_DMGMultiplier[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 6 under ability ''ssb_purechaos''; defaulting to 1.0.", chaos_DMGMultiplier[client]);
- chaos_DMGMultiplier[client] = 1065353216;
- }
- new var4;
- if (chaos_BlockType[client] < 0 || chaos_BlockType[client] > 2)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 18 under ability ''ssb_purechaos''; defaulting to 0.", chaos_BlockType[client]);
- chaos_BlockType[client] = 0;
- }
- new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg7", 7, 1);
- new var5;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Fireball[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg7", 7, 1);
- new var6;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Fireball[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg8", 8, 1);
- new var7;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 8 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Orb[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg9", 9, 1);
- new var8;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 9 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_MIRV[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg10", 10, 1);
- new var9;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 10 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Pumpkin[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg11", 11, 1);
- new var10;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 11 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Bats[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg12", 12, 1);
- new var11;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 12 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Meteor[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg13", 13, 1);
- new var12;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 13 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Teleport[client] = booly;
- booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_purechaos", "arg14", 14, 1);
- new var13;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 14 under ability ''ssb_purechaos''; defaulting to 1.", booly);
- booly = 1;
- }
- chaos_Monoculus[client] = booly;
- }
- return 0;
- }
- public void:setClassicArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_classic"))
- {
- new idx = FF2_GetBossIndex(client);
- classic_StunTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg1", 1, 4.0);
- classic_InvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg2", 2, 30.0);
- classic_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg3", 3, 30.0);
- classic_SpamType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg4", 4, 0);
- classic_SpellCD[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg5", 5, 0.1);
- classic_DMGMultiplier[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg6", 6, 1.0);
- classic_MannpowerTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg7", 7, 15.0);
- classic_MinionMode[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg8", 8, 0);
- classic_BossIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg9", 9, 0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg10", 10, classic_MinionModel[client], 256);
- classic_WeaponIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg11", 11, 0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg12", 12, classic_WeaponName[client], 255);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg13", 13, classic_WeaponStats[client], 255);
- new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg14", 14, 0);
- classic_MinionInvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg15", 15, 3.0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg16", 16, classic_HUD[client], 255);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg17", 17, classic_Particle[client], 255);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg18", 18, classic_ParticlePoint[client], 255);
- classic_MinionClass[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg19", 19, 0);
- classic_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_classic", "arg20", 20, 0);
- if (classic_Duration[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_bonezone_classic''; defaulting to 30.0.", classic_Duration[client]);
- classic_Duration[client] = 1106247680;
- }
- new var2;
- if (classic_SpamType[client] < 0 || classic_SpamType[client] > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 4 under ability ''ssb_bonezone_classic''; defaulting to 0.", classic_SpamType[client]);
- classic_SpamType[client] = 0;
- }
- new var3;
- if (classic_SpellCD[client] < 0.1 && classic_SpamType[client] == 1)
- {
- classic_SpellCD[client] = 1036831949;
- }
- if (classic_DMGMultiplier[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 6 under ability ''ssb_bonezone_classic''; defaulting to 1.0.", classic_DMGMultiplier[client]);
- classic_DMGMultiplier[client] = 1065353216;
- }
- new var4;
- if (classic_MinionMode[client] < -1 || classic_MinionMode[client] > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 8 under ability ''ssb_bonezone_classic''; defaulting to 0.", classic_MinionMode[client]);
- classic_MinionMode[client] = 0;
- }
- new var5;
- if (classic_MinionClass[client] < 1 || classic_MinionClass[client] > 9)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 19 under ability ''ssb_bonezone_classic''; defaulting to 2.", classic_MinionClass[client]);
- classic_MinionClass[client] = 2;
- }
- new var6;
- if (classic_BlockType[client] < 0 || classic_BlockType[client] > 2)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 20 under ability ''ssb_bonezone_classic''; defaulting to 0.", classic_BlockType[client]);
- classic_BlockType[client] = 0;
- }
- new var7;
- if (booly < 0 || booly > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 14 under ability ''ssb_bonezone_classic''; defaulting to 1.", booly);
- booly = 1;
- }
- classic_RemoveWearables[client] = booly;
- if (checkFile(1, classic_MinionModel[client], false))
- {
- PrecacheModel(classic_MinionModel[client], false);
- }
- }
- return 0;
- }
- public void:setDrainArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_soulsteal"))
- {
- new idx = FF2_GetBossIndex(client);
- drain_Radius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg1", 1, 500.0);
- drain_DMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg2", 2, 5.0);
- drain_Heal[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg3", 3, 0.5);
- new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_soulsteal", "arg4", 4, 0);
- drain_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_soulsteal", "arg5", 5, 15.0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_soulsteal", "arg6", 6, drain_HUD[client], 255);
- drain_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_soulsteal", "arg7", 7, 0);
- if (drain_Radius[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 1 under ability ''ssb_soulsteal''; defaulting to 500.0.", drain_Radius[client]);
- drain_Radius[client] = 1140457472;
- }
- if (drain_Duration[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 5 under ability ''ssb_soulsteal''; defaulting to 15.0.", drain_Duration[client]);
- drain_Duration[client] = 1097859072;
- }
- new var2;
- if (drain_BlockType[client] > 2 || drain_BlockType[client] < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_soulsteal''; defaulting to 0.", drain_BlockType[client]);
- drain_BlockType[client] = 0;
- }
- new var3;
- if (booly > 1 || booly < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 4 under ability ''ssb_soulsteal''; defaulting to 0.", booly);
- booly = 0;
- }
- drain_CanOverheal[client] = booly;
- }
- return 0;
- }
- public void:setMortisArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_mortis"))
- {
- new idx = FF2_GetBossIndex(client);
- mortis_Type[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg1", 1, 1);
- new ff = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg2", 2, 0);
- mortis_Percent[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg3", 3, 0.2);
- mortis_SmashCount[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg4", 4, 0);
- mortis_Time[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg5", 5, 0.15);
- mortis_DMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg6", 6, 5000.0);
- mortis_Radius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg7", 7, 100.0);
- mortis_WarningTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg8", 8, 2.0);
- mortis_KB[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_mortis", "arg9", 9, 0.0);
- mortis_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_mortis", "arg10", 10, 0);
- new i = 1;
- while (i <= MaxClients)
- {
- mortis_Active[client][i] = false;
- i++;
- }
- new var2;
- if (mortis_Type[client] < 0 || mortis_Type[client] > 2)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 1 under ability ''ssb_mortis''; defaulting to 1.", mortis_Type[client]);
- mortis_Type[client] = 1;
- }
- new var3;
- if (ff < 0 || ff > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 2 under ability ''ssb_mortis''; defaulting to 0.", ff);
- ff = 0;
- }
- new var4;
- if (mortis_Percent[client] < 0.0 || mortis_Percent[client] > 1.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_mortis''; defaulting to 0.2.", mortis_Percent[client]);
- mortis_Percent[client] = 1045220557;
- }
- if (mortis_Radius[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 7 under ability ''ssb_mortis''; defaulting to 100.0.", mortis_Radius[client]);
- mortis_Radius[client] = 1120403456;
- }
- new var5;
- if (mortis_BlockType[client] > 2 || mortis_BlockType[client] < 0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 10 under ability ''ssb_mortis''; defaulting to 0.", mortis_BlockType[client]);
- mortis_BlockType[client] = 0;
- }
- mortis_FriendlyFire[client] = ff;
- }
- return 0;
- }
- public void:setRepoArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_calciumrepo"))
- {
- new idx = FF2_GetBossIndex(client);
- repo_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg1", 1, 12.0);
- repo_HitDMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg2", 2, 99999.0);
- repo_BombTimer[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg3", 3, 3.0);
- repo_BombDMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg4", 4, 5000.0);
- repo_BombRadius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg5", 5, 500.0);
- repo_MinionMode[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg6", 6, 0);
- repo_BossIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg7", 7, 0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg8", 8, repo_MinionModel[client], 256);
- repo_WeaponIndex[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg9", 9, 0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg10", 10, repo_WeaponName[client], 256);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg11", 11, repo_WeaponStats[client], 255);
- new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg12", 12, 0);
- repo_MinionInvuln[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_calciumrepo", "arg13", 13, 3.5);
- repo_MaxHits[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg14", 14, 0);
- repo_Class[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg15", 15, 2);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg16", 16, repo_HitSound[client], 256);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_calciumrepo", "arg17", 17, repo_GibSound[client], 256);
- repo_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_calciumrepo", "arg18", 18, 0);
- if (repo_Duration[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 1 under ability ''ssb_calciumrepo''; defaulting to 12.0.", repo_Duration[client]);
- repo_Duration[client] = 1094713344;
- }
- if (repo_BombTimer[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 3 under ability ''ssb_calciumrepo''; defaulting to 3.0.", repo_BombTimer[client]);
- repo_BombTimer[client] = 1077936128;
- }
- if (repo_BombRadius[client] < 300.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 5 under ability ''ssb_calciumrepo''; defaulting to 300.0.", repo_BombRadius[client]);
- repo_BombRadius[client] = 1094713344;
- }
- new var2;
- if (repo_MinionMode[client] < -1 || repo_MinionMode[client] > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 6 under ability ''ssb_calciumrepo''; defaulting to -1.", repo_MinionMode[client]);
- repo_MinionMode[client] = -1;
- }
- new var3;
- if (booly < 0 || booly > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 12 under ability ''ssb_calciumrepo''; defaulting to 0.", booly);
- booly = 0;
- }
- repo_RemoveWearables[client] = booly;
- if (0 > repo_MaxHits[client])
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 14 under ability ''ssb_calciumrepo''; defaulting to 0.", repo_MaxHits[client]);
- repo_MaxHits[client] = 0;
- }
- new var4;
- if (repo_Class[client] < 1 || repo_Class[client] > 9)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 15 under ability ''ssb_calciumrepo''; defaulting to 2.", repo_Class[client]);
- repo_Class[client] = 2;
- }
- new var5;
- if (repo_BlockType[client] < 0 || repo_BlockType[client] > 2)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 18 under ability ''ssb_calciumrepo''; defaulting to 0.", repo_BlockType[client]);
- repo_BlockType[client] = 0;
- }
- if (checkFile(1, repo_MinionModel[client], false))
- {
- PrecacheModel(repo_MinionModel[client], false);
- }
- if (checkFile(0, repo_HitSound[client], false))
- {
- PrecacheSound(repo_HitSound[client], false);
- }
- if (checkFile(0, repo_GibSound[client], false))
- {
- PrecacheSound(repo_GibSound[client], false);
- }
- }
- return 0;
- }
- public void:setRideArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_bonezone_raid"))
- {
- new idx = FF2_GetBossIndex(client);
- ride_MinionCount[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg1", 1, 6);
- ride_DMGReduction[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg2", 2, 0.2);
- ride_MinionMode[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg3", 3, 1);
- ride_BossIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg4", 4, 0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg5", 5, ride_MinionModel[client], 256);
- ride_WeaponIDX[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg6", 6, 0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg7", 7, ride_WeaponName[client], 255);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg8", 8, ride_WeaponStats[client], 255);
- new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg9", 9, 1);
- ride_MinionInvTime[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg10", 10, 3.0);
- ride_MinionClass[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg11", 11, 2);
- ride_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_bonezone_raid", "arg12", 12, 0);
- if (ride_MinionCount[client] < 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 1 under ability ''ssb_bonezone_raid'' (must summon at least one minion); defaulting to 1.", ride_MinionCount[client]);
- ride_MinionCount[client] = 1;
- }
- new var2;
- if (ride_MinionMode[client] < 0 || ride_MinionMode[client] > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 3 under ability ''ssb_bonezone_raid''; defaulting to 0.", ride_MinionMode[client]);
- ride_MinionMode[client] = 0;
- }
- new var3;
- if (ride_MinionClass[client] < 1 || ride_MinionClass[client] > 9)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 11 under ability ''ssb_bonezone_raid''; defaulting to 2.", ride_MinionClass[client]);
- ride_MinionClass[client] = 2;
- }
- new var4;
- if (ride_BlockType[client] < 0 || ride_BlockType[client] > 2)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 12 under ability ''ssb_bonezone_raid''; defaulting to 0.", ride_BlockType[client]);
- ride_BlockType[client] = 0;
- }
- new var5;
- if (booly < 0 || booly > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 9 under ability ''ssb_bonezone_raid''; defaulting to 1.", booly);
- booly = 1;
- }
- ride_RemoveWearables[client] = booly;
- if (checkFile(1, ride_MinionModel[client], false))
- {
- PrecacheModel(ride_MinionModel[client], false);
- }
- }
- return 0;
- }
- public void:setRipArgs(client)
- {
- new var1;
- if (IsValidMulti(client, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(client), "ssb_raidpack", "ssb_rip"))
- {
- new idx = FF2_GetBossIndex(client);
- rip_Duration[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg1", 1, 12.0);
- rip_DMG[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg2", 2, 500.0);
- rip_ContactDMGCD[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg3", 3, 0.0);
- rip_MaxHitsPerTarget[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg4", 4, 0);
- rip_KB[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg5", 5, 0.0);
- FF2_GetArgS(idx, "ssb_raidpack", "ssb_rip", "arg6", 6, rip_Model[client], 256);
- new booly = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg7", 7, 0);
- rip_MaxSpeed[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg8", 8, 520.0);
- rip_Radius[client] = FF2_GetArgF(idx, "ssb_raidpack", "ssb_rip", "arg9", 9, 120.0);
- rip_ClassAnims[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg10", 10, 1);
- rip_BlockType[client] = FF2_GetArgI(idx, "ssb_raidpack", "ssb_rip", "arg11", 11, 0);
- new i = 1;
- while (i <= MaxClients)
- {
- rip_HitCounter[client][i] = 0;
- rip_CanBeHitByPlayer[client][i] = true;
- i++;
- }
- if (rip_Duration[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 1 under ability ''ssb_rip''; defaulting to 12.0.", rip_Duration[client]);
- rip_Duration[client] = 1094713344;
- }
- if (rip_DMG[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 2 under ability ''ssb_rip''; defaulting to 500.0.", rip_DMG[client]);
- rip_DMG[client] = 1140457472;
- }
- if (rip_KB[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 5 under ability ''ssb_rip''; defaulting to 0.0.", rip_KB[client]);
- rip_KB[client] = 0;
- }
- if (rip_MaxSpeed[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 8 under ability ''ssb_rip''; defaulting to 520.0.", rip_MaxSpeed[client]);
- rip_MaxSpeed[client] = 1140981760;
- }
- if (rip_Radius[client] < 0.0)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%f) entered for arg 9 under ability ''ssb_rip''; defaulting to 120.0.", rip_Radius[client]);
- rip_Radius[client] = 1123024896;
- }
- new var2;
- if (rip_BlockType[client] < 0 || rip_BlockType[client] > 2)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 10 under ability ''ssb_rip''; defaulting to 0.", rip_BlockType[client]);
- rip_BlockType[client] = 0;
- }
- new var3;
- if (booly < 0 || booly > 1)
- {
- FF2_LogError("[Supreme Spookmaster Pack] Invalid value (%i) entered for arg 7 under ability ''ssb_rip''; defaulting to 0.", booly);
- booly = 0;
- }
- rip_IgnoreUber[client] = booly;
- if (checkFile(1, rip_Model[client], false))
- {
- PrecacheModel(rip_Model[client], false);
- }
- }
- return 0;
- }
- public void:spawnBeam(client, buddy, Float:beamTiming, r, g, b, a, String:sprite[1024])
- {
- new var1;
- if (IsValidMulti(client, true, true, false, true, false, 2, false) && IsValidEntity(buddy))
- {
- new Float:mainEyes[3] = 0.0;
- GetClientEyePosition(client, mainEyes);
- new Float:budEyes[3] = 0.0;
- if (IsValidMulti(buddy, true, true, false, true, false, 2, false))
- {
- GetClientEyePosition(buddy, budEyes);
- }
- else
- {
- if (buddy > MaxClients)
- {
- if (HasEntProp(buddy, 0, "m_vecOrigin"))
- {
- GetEntPropVector(buddy, 0, "m_vecOrigin", budEyes, 0);
- }
- }
- }
- if (IsValidMulti(buddy, true, false, false, true, false, 2, false))
- {
- return 0;
- }
- new color[4];
- color[0] = r;
- color[1] = g;
- color[2] = b;
- color[3] = a;
- SPRITE_INT = PrecacheModel(sprite[0], false);
- TE_SetupBeamPoints(budEyes, mainEyes, SPRITE_INT, 0, 0, 0, beamTiming, 5.0, 5.0, 1, 15.0, color, 0);
- TE_SendToAll(0.0);
- }
- return 0;
- }
- public void:spawnRing(client, Float:range, Float:modif_X, Float:modif_Y, Float:modif_Z, String:sprite[1024], r, g, b, alpha, fps, Float:life, Float:width, Float:amp, speed)
- {
- if (IsValidEntity(client))
- {
- new Float:center[3] = 0.0;
- if (IsValidMulti(client, true, true, false, true, false, 2, false))
- {
- GetClientAbsOrigin(client, center);
- }
- else
- {
- if (client > MaxClients)
- {
- if (HasEntProp(client, 0, "m_vecOrigin"))
- {
- GetEntPropVector(client, 0, "m_vecOrigin", center, 0);
- }
- }
- }
- if (IsValidMulti(client, true, false, false, true, false, 2, false))
- {
- return 0;
- }
- center[0] = center[0] + modif_X;
- center[1] += modif_Y;
- center[2] += modif_Z;
- SPRITE_INT = PrecacheModel(sprite[0], false);
- new color[4];
- color[0] = r;
- color[1] = g;
- color[2] = b;
- color[3] = alpha;
- TE_SetupBeamRingPoint(center, range, range + 0.5, SPRITE_INT, SPRITE_INT, 0, fps, life, width, amp, color, speed, 0);
- TE_SendToAll(0.0);
- }
- return 0;
- }
- public void:triggerRepo(attacker, victim)
- {
- new var1;
- if (IsValidMulti(attacker, true, true, true, true, false, 2, false) && FF2_HasAbility(FF2_GetBossIndex(attacker), "ssb_raidpack", "ssb_calciumrepo") && IsValidMulti(victim, true, true, false, true, false, 2, false))
- {
- if (repo_BombTimer[attacker] > 0.0)
- {
- repo_AboutToExplode[victim] = 1;
- repo_SummonerRadius[victim] = repo_BombRadius[attacker];
- CreateTimer(0.1, 185, GetClientUserId(victim), 3);
- TF2_StunPlayer(victim, repo_BombTimer[attacker][0.1], 1.0, 2, attacker);
- if (checkFile(0, repo_HitSound[attacker], false))
- {
- EmitSoundToAll(repo_HitSound[attacker], victim, 0, 140, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
- }
- new Handle:pack;
- CreateDataTimer(repo_BombTimer[attacker], 175, pack, 2);
- WritePackCell(pack, GetClientUserId(attacker));
- WritePackCell(pack, GetClientUserId(victim));
- }
- else
- {
- repo_Explosion(attacker, victim);
- }
- if (0 < repo_MaxHits[attacker])
- {
- repo_HitCounter[attacker]++;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement