diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_00.vmt b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_00.vmt new file mode 100644 index 0000000..5976eef --- /dev/null +++ b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_00.vmt @@ -0,0 +1,5 @@ +"VertexLitGeneric" +{ + "$baseTexture" "3D/bossguard/diss_00" + "$model" "1" +} diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_00.vtf b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_00.vtf new file mode 100644 index 0000000..a0494f4 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_00.vtf differ diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_01.vmt b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_01.vmt new file mode 100644 index 0000000..63c6e80 --- /dev/null +++ b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_01.vmt @@ -0,0 +1,5 @@ +"VertexLitGeneric" +{ + "$baseTexture" "3D/bossguard/diss_01" + "$model" "1" +} diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_01.vtf b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_01.vtf new file mode 100644 index 0000000..2623f21 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/materials/3d/bossguard/diss_01.vtf differ diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser1.vmt b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser1.vmt new file mode 100644 index 0000000..2ffd272 --- /dev/null +++ b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser1.vmt @@ -0,0 +1,6 @@ +"vertexlitgeneric" +{ + "$basetexture" "zombieden/xmode/youmu/laser/laser1" + "$translucent" 1 + "nocull" 1 +} diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser1.vtf b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser1.vtf new file mode 100644 index 0000000..cc5fca7 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser1.vtf differ diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser2.vmt b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser2.vmt new file mode 100644 index 0000000..7c9e917 --- /dev/null +++ b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser2.vmt @@ -0,0 +1,6 @@ +"vertexlitgeneric" +{ + "$basetexture" "zombieden/xmode/youmu/laser/laser2" + "$translucent" 1 + "$nocull" 1 +} \ No newline at end of file diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser2.vtf b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser2.vtf new file mode 100644 index 0000000..973eb88 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/laser2.vtf differ diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/white.vmt b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/white.vmt new file mode 100644 index 0000000..fa9592e --- /dev/null +++ b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/white.vmt @@ -0,0 +1,5 @@ +"vertexlitgeneric" +{ + "$basetexture" "zombieden/xmode/youmu/laser/white" + "$nocull" 1 +} diff --git a/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/white.vtf b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/white.vtf new file mode 100644 index 0000000..4544db6 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/materials/3d/zombieden/xmode/youmu/laser/white.vtf differ diff --git a/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.dx80.vtx b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.dx80.vtx new file mode 100644 index 0000000..7d08707 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.dx80.vtx differ diff --git a/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.dx90.vtx b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.dx90.vtx new file mode 100644 index 0000000..907194d Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.dx90.vtx differ diff --git a/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.mdl b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.mdl new file mode 100644 index 0000000..d5ccfa2 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.mdl differ diff --git a/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.phy b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.phy new file mode 100644 index 0000000..9cd31eb Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.phy differ diff --git a/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.sw.vtx b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.sw.vtx new file mode 100644 index 0000000..5f298e3 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.sw.vtx differ diff --git a/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.vvd b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.vvd new file mode 100644 index 0000000..a35c2e9 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/3d/bossguard/bossguard.vvd differ diff --git a/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.dx80.vtx b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.dx80.vtx new file mode 100644 index 0000000..5d11e7e Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.dx80.vtx differ diff --git a/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.dx90.vtx b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.dx90.vtx new file mode 100644 index 0000000..1c5c6b5 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.dx90.vtx differ diff --git a/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.mdl b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.mdl new file mode 100644 index 0000000..9d81b4c Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.mdl differ diff --git a/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.phy b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.phy new file mode 100644 index 0000000..4089e27 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.phy differ diff --git a/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.sw.vtx b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.sw.vtx new file mode 100644 index 0000000..7e8e319 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.sw.vtx differ diff --git a/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.vvd b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.vvd new file mode 100644 index 0000000..b391c9e Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/models/zombieden/xmode/youmu/laser.vvd differ diff --git a/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/Brain Power V2.mp3 b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/Brain Power V2.mp3 new file mode 100644 index 0000000..1985b03 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/Brain Power V2.mp3 differ diff --git a/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/Isengard.mp3 b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/Isengard.mp3 new file mode 100644 index 0000000..0a293fa Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/Isengard.mp3 differ diff --git a/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/evil_laugh.wav b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/evil_laugh.wav new file mode 100644 index 0000000..3361054 Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/evil_laugh.wav differ diff --git a/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/starwars.wav b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/starwars.wav new file mode 100644 index 0000000..ec47f4a Binary files /dev/null and b/ze_boatescape6_remix_fix2/content/sound/unl1/boatescape/starwars.wav differ diff --git a/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp b/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp new file mode 100644 index 0000000..7adf165 --- /dev/null +++ b/ze_boatescape6_remix_fix2/scripting/ze_boatescape6_remix_fix2.sp @@ -0,0 +1,3246 @@ +#include +#include +#include + +public Plugin myinfo = +{ + name = "ze_boatescape6_remix_fix2 Secret", + author = "Neon", + description = "", + version = "2.0", + url = "https://steamcommunity.com/id/n3ontm" +} + +new float:g_fOrigin_Button5[3]; +new Handle:g_hSparkTimer = INVALID_HANDLE; + +public Action VerifyMap() +{ + new String:currentMap[64]; + GetCurrentMap(currentMap, sizeof(currentMap)); + if (!StrEqual(currentMap, "ze_boatescape6_remix_fix2")) + { + char sFilename[256]; + GetPluginFilename(INVALID_HANDLE, sFilename, sizeof(sFilename)); + ServerCommand("sm plugins unload %s", sFilename); + } +} + +public void OnPluginStart() +{ + VerifyMap(); + HookEvent("round_start", OnRoundStart, EventHookMode_Post); + HookEvent("round_end", OnRoundEnd, EventHookMode_Post); +} + +public void OnMapStart() +{ + VerifyMap(); + + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.dx80.vtx"); + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.dx90.vtx"); + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.mdl"); + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.phy"); + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.sw.vtx"); + AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.vvd"); + + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser1.vmt"); + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser1.vtf"); + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser2.vmt"); + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/laser2.vtf"); + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/white.vmt"); + AddFileToDownloadsTable("materials/zombieden/xmode/youmu/laser/white.vtf"); + + AddFileToDownloadsTable("models/3d/bossguard/bossguard.dx80.vtx"); + AddFileToDownloadsTable("models/3d/bossguard/bossguard.dx90.vtx"); + AddFileToDownloadsTable("models/3d/bossguard/bossguard.mdl"); + AddFileToDownloadsTable("models/3d/bossguard/bossguard.phy"); + AddFileToDownloadsTable("models/3d/bossguard/bossguard.sw.vtx"); + AddFileToDownloadsTable("models/3d/bossguard/bossguard.vvd"); + + AddFileToDownloadsTable("materials/3d/bossguard/diss_00.vmt"); + AddFileToDownloadsTable("materials/3d/bossguard/diss_00.vtf"); + AddFileToDownloadsTable("materials/3d/bossguard/diss_01.vmt"); + AddFileToDownloadsTable("materials/3d/bossguard/diss_01.vtf"); + + AddFileToDownloadsTable("sound/unl1/boatescape/starwars.wav"); + AddFileToDownloadsTable("sound/unl1/boatescape/evil_laugh.wav"); + AddFileToDownloadsTable("sound/unl1/boatescape/Brain Power V2.mp3"); + AddFileToDownloadsTable("sound/unl1/boatescape/Isengard.mp3"); + + PrecacheModel("models/seagull.mdl"); + PrecacheModel("models/props_lab/blastdoor001c.mdl"); + PrecacheModel("models/props_trainstation/trainstation_clock001.mdl"); + PrecacheModel("models/zombieden/xmode/youmu/laser.mdl"); + PrecacheModel("models/3d/bossguard/bossguard.mdl"); + PrecacheModel("models/props/de_inferno/brickpillara.mdl"); + PrecacheModel("models/props_combine/combine_teleportplatform.mdl"); + PrecacheModel("models/effects/vol_light64x256.mdl"); + PrecacheModel("models/props/cs_italy/bananna.mdl"); + PrecacheModel("models/props/cs_italy/orange.mdl"); + PrecacheModel("models/props_junk/watermelon01.mdl"); + +} + +public void OnRoundEnd(Event hEvent, const char[] sEvent, bool bDontBroadcast) +{ + ClearTimer(g_hSparkTimer); +} + +public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) +{ + + ClearTimer(g_hSparkTimer); + SpawnSparkTimer(); + SpawnSeagullRelay(); + SpawnMathCounter1(); + SpawnMathCounter2(); + + SpawnTriggerTeleport(); + SpawnTeleportDestination(); + + SpawnSeagull(); + SpawnAmbientSeagull(); + SpawnSeagullClock(); + SpawnSeagullMove(); + + SpawnPlatform1(); + SpawnPlatform2(); + SpawnPlatform3(); + SpawnPlatform4(); + SpawnPlatform5(); + SpawnPlatform6(); + SpawnPillar1(); + SpawnPillar2(); + SpawnPillar3(); + SpawnPillarLight1(); + SpawnPillarLight2(); + SpawnPillarLight3(); + SpawnPillarParticle1(); + SpawnPillarParticle2(); + SpawnPillarParticle3(); + SpawnOrangeFinal(); + SpawnBananaFinal(); + SpawnMelonFinal(); + SpawnExplosion1(); + SpawnExplosion2(); + SpawnExplosion3(); + SpawnAmbientGenericExplosion1(); + SpawnAmbientGenericExplosion2(); + SpawnAmbientGenericExplosion3(); + SpawnButtonFinal1(); + SpawnButtonFinal2(); + SpawnButtonFinal3(); + SpawnBeam1(); + SpawnBeam2(); + SpawnBeam3(); + SpawnBeam4(); + SpawnBeam5(); + SpawnBeam6(); + SpawnBeam7(); + SpawnTeleportFinal(); + SpawnTriggerTeleportFinal(); + SpawnTeleportDestinationFinal(); + + SpawnRotating(); + SpawnRotatingMelon(); + SpawnRotatingOrange(); + SpawnRotatingBanana(); + SpawnRotatingMelonBeam(); + + SpawnFilterEnding(); + SpawnBadEndingTrigger(); + + SpawnScore1(); + SpawnScore2(); + + SpawnBossProp(); + SpawnBossParticle(); + SpawnBossMove(); + SpawnLaserTimer(); + SpawnLaserSound(); + SpawnBossPhysbox(); + SpawnBossHP(); + SpawnAmbientBoss1(); + SpawnAmbientBoss2(); + + SpawnButton1(); + SpawnParticle1(); + SpawnFilter1(); + SpawnGameText1(); + + SpawnButton2(); + SpawnParticle2(); + SpawnFilter2(); + SpawnGameText2(); + + SpawnButton3(); + SpawnParticle3(); + SpawnFilter3(); + SpawnGameText3(); + + SpawnButton4(); + SpawnParticle4(); + SpawnFilter4(); + SpawnGameText4(); + + int random = GetRandomInt(1, 5); + + if (random == 1) + { + g_fOrigin_Button5 = {993.05, 3072.5, 208.55}; + } + else if (random == 2) + { + g_fOrigin_Button5 = {458.25, 3851.08, 227.18}; + } + else if (random == 3) + { + g_fOrigin_Button5 = {-634.68, 3072.5, 477.13}; + } + else if (random == 4) + { + g_fOrigin_Button5 = {-185.16, 1920.5, 977.74}; + } + else if (random == 5) + { + g_fOrigin_Button5 = {770.91, 2496.5, 647.08}; + } + + SpawnButton5(); + SpawnParticle5(); + SpawnFilter5(); + SpawnGameText5(); + + SpawnOrange(); + SpawnBanana(); + SpawnMelon(); + + SpawnFilterZM(); + SpawnNameResetZM1(); + SpawnNameResetZM2(); + SpawnItemFilter(); + SpawnItemTrigger1(); + SpawnItemTrigger2(); + SpawnNameReset(); + SpawnItemPlatform1(); + SpawnItemPlatform2(); + SpawnItemBeam(); + int iElite = SpawnItemElite(); + int iRotating = SpawnItemRotating(); + int iBanana = SpawnItemRotatingBanana(); + int iOrange = SpawnItemRotatingOrange(); + int iMelon = SpawnItemRotatingMelon(); + int iMelonBeam = SpawnItemRotatingMelonBeam(); + + SetVariantString("!activator"); + AcceptEntityInput(iRotating, "SetParent", iElite); + SetVariantString("!activator"); + AcceptEntityInput(iBanana, "SetParent", iRotating); + SetVariantString("!activator"); + AcceptEntityInput(iOrange, "SetParent", iRotating); + SetVariantString("!activator"); + AcceptEntityInput(iMelon, "SetParent", iRotating); + SetVariantString("!activator"); + AcceptEntityInput(iMelonBeam, "SetParent", iRotating); +} + + + +public Action SpawnScore1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_score")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_score_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_score_good"); + DispatchKeyValue(Entity, "points", "250"); + DispatchKeyValue(Entity, "spawnflags", "0") + + DispatchSpawn(Entity); + return Entity; +} + +public Action SpawnScore2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_score")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_score_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_score_bad"); + DispatchKeyValue(Entity, "points", "100"); + DispatchKeyValue(Entity, "spawnflags", "0") + + DispatchSpawn(Entity); + return Entity; +} + +public Action SpawnBadEndingTrigger() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_once")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_once_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_bad_ending_trigger"); + DispatchKeyValue(Entity, "angles", "90 270 0") + DispatchKeyValue(Entity, "spawnflags", "1") + DispatchKeyValue(Entity, "origin", "512 8700 950"); + DispatchKeyValue(Entity, "filtername", "secret_ending_filter"); + DispatchKeyValue(Entity, "model", "*1"); + DispatchKeyValue(Entity, "OnStartTouch", "point_servercommand,Command,say The God of the Fruits is not pleased with your sacrifice!,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "point_servercommand,Command,say He is sending is one of his loyal henchmen to kill you!,1,1"); + + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_particle,SetParent,secret_boss_movelinear,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_physbox,SetParent,secret_boss_movelinear,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,SetParent,secret_boss_movelinear,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_particle,Start,,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_movelinear,Open,,3,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,SetAnimation,entrance1,3,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_entrance_sound,PlaySound,,3,1"); + + DispatchKeyValue(Entity, "OnStartTouch", "secret_final_button*,Kill,,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion_1,Explode,,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_1,PlaySound,,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_banana_final,Kill,,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion_2,Explode,,2,1"); + DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_2,PlaySound,,2,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_orange_final,Kill,,2,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion_3,Explode,,3,1"); + DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_3,PlaySound,,3,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_melon_final,Kill,,3,1"); + + DispatchKeyValue(Entity, "OnStartTouch", "explosion_sound_3,PlaySound,,4,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_explosion*,Explode,,4,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_pillar*,Kill,,4.3,1"); + + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,Kill,,5,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnBossMove() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_movelinear")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_movelinear_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_movelinear"); + DispatchKeyValue(Entity, "movedir", "90 0 0"); + DispatchKeyValue(Entity, "origin", "512 9600 1500"); + DispatchKeyValue(Entity, "speed", "100"); + DispatchKeyValue(Entity, "movedistance", "564"); + DispatchKeyValue(Entity, "spawnflags", "8") + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_prop,SetAnimation,entrance2,0,1"); + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_particle,Stop,,0,-1"); + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_particle,Kill,,0,-1"); + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_laser_timer,Enable,,0,1"); + DispatchKeyValue(Entity, "OnFullyOpen", "secret_boss_hp,SetValue,150,0,1"); + + DispatchSpawn(Entity); + return Entity; +} + +public Action SpawnBossParticle() +{ + + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_particle"); + DispatchKeyValue(Entity, "effect_name", "fire_large_01"); + DispatchKeyValue(Entity, "origin", "512 9600 1350"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_particle"); + DispatchKeyValue(Entity, "effect_name", "fire_large_01"); + DispatchKeyValue(Entity, "origin", "512 9600 1500"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public Action SpawnBossProp() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_prop"); + DispatchKeyValue(Entity, "angles", "0 -90 0"); + DispatchKeyValue(Entity, "origin", "512 9600 1500"); // 512 9200 934 + DispatchKeyValue(Entity, "model", "models/3d/bossguard/bossguard.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "DisableBoneFollowers", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "DefaultAnim", "idle"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBossPhysbox() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_physbox")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_physbox_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_physbox"); + DispatchKeyValue(Entity, "spawnflags", "574464"); + DispatchKeyValue(Entity, "material", "2"); + DispatchKeyValue(Entity, "health", "99999999"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "origin", "512 9640 1500"); + DispatchKeyValue(Entity, "angles", "0 -53 90"); + DispatchKeyValue(Entity, "model", "*13"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "OnHealthChanged", "secret_boss_hp,Subtract,1,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; + +} + +public Action SpawnBossHP() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("math_counter")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "math_counter_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_hp"); + DispatchKeyValue(Entity, "startvalue", "100000"); + DispatchKeyValue(Entity, "min", "0"); + DispatchKeyValue(Entity, "max", "100000"); + DispatchKeyValue(Entity, "OnHitMin", "secret_boss_laser_timer,Kill,,0,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_boss_prop,SetAnimation,dead1,0,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_boss_prop,Kill,,3,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_boss_physbox,Kill,,0,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_boss_physbox,Kill,,0,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_teleport_prop,Enable,,2,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_teleport_final,AddOutput,OnStartTouch secret_score_bad:ApplyScore::0:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_teleport_final,Enable,,2,1"); + DispatchKeyValue(Entity, "OnHitMin", "secret_boss_laser_movelinear,KillHierarchy,,0,1"); + DispatchKeyValue(Entity, "OnHitMin", "point_servercommand,Command,say You killed the Henchman!,0,-1"); + DispatchKeyValue(Entity, "OnHitMin", "point_servercommand,Command,say Maybe try to not to anger the God of the Fruits next time...,1,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public Action SpawnLaserTimer() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("logic_timer")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "logic_timer_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_laser_timer"); + DispatchKeyValue(Entity, "UseRandomTime", "1"); + DispatchKeyValue(Entity, "spawnflags", "0"); + DispatchKeyValue(Entity, "LowerRandomBound", "1.2"); + DispatchKeyValue(Entity, "UpperRandomBound", "1.5"); + DispatchKeyValue(Entity, "RefireTime", "1.5"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchKeyValue(Entity, "OnTimer", "secret_boss_laser_sound,PlaySound,,0,-1"); + DispatchKeyValue(Entity, "OnTimer", "secret_boss_prop,SetAnimation,attack1,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + HookSingleEntityOutput(Entity, "OnTimer", BadEndingCallback, false); + + return Entity; + +} + +public Action SpawnAmbientBoss1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_entrance_sound"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "radius", "1250"); + DispatchKeyValue(Entity, "message", "unl1/boatescape/starwars.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnAmbientBoss2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_loss_sound"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "radius", "1250"); + DispatchKeyValue(Entity, "message", "unl1/boatescape/evil_laugh.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnLaserSound() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_laser_sound"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "radius", "1250"); + DispatchKeyValue(Entity, "message", "npc/roller/blade_out.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnBossLaserMove() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_movelinear")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_movelinear_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_laser_movelinear"); + DispatchKeyValue(Entity, "origin", "512 9600 934"); //512 9600 934 + DispatchKeyValue(Entity, "movedir", "0 -90 0"); + DispatchKeyValue(Entity, "speed", "900"); + DispatchKeyValue(Entity, "movedistance", "1000"); + DispatchKeyValue(Entity, "spawnflags", "8") + DispatchKeyValue(Entity, "OnFullyOpen", "!self,KillHierarchy,,0,1"); + + DispatchSpawn(Entity); + return Entity; +} + +public Action SpawnBossLaserProp(int random) +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_laser_prop"); + DispatchKeyValue(Entity, "angles", "0 -90 0"); + DispatchKeyValue(Entity, "model", "models/zombieden/xmode/youmu/laser.mdl"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "DisableBoneFollowers", "1"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "rendercolor", "0 255 0"); + DispatchKeyValue(Entity, "rendermode", "0"); + + if (random == 1) + { + DispatchKeyValue(Entity, "origin", "512 9600 900"); + } + else if (random == 2) + { + DispatchKeyValue(Entity, "origin", "512 9600 943"); + } + else if (random == 3) + { + DispatchKeyValue(Entity, "origin", "512 9600 928"); + } + + DispatchSpawn(Entity); + + return Entity; +} + +public Action SpawnTriggerHurt(int random) +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_hurt")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_hurt_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_boss_laser_hurt"); + DispatchKeyValue(Entity, "spawnflags", "1"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchKeyValue(Entity, "nodmgforce", "0"); + DispatchKeyValue(Entity, "damage", "999999"); + DispatchKeyValue(Entity, "damagecap", "20"); + DispatchKeyValue(Entity, "damagemodel", "0"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_laser_timer,Kill,,0,-1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_hp,Kill,,0,-1"); + DispatchKeyValue(Entity, "OnStartTouch", "point_servercommand,Command,say Maybe try to not to anger the God of the Fruits next time...,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_loss_sound,PlaySound,,1,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 255 0:4.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 0 255:5.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 70 0 130:6.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_boss_prop,FireUser1,,1,1"); + + if (random == 1) + { + DispatchKeyValue(Entity, "origin", "512 9600 898"); + } + else if (random == 2) + { + DispatchKeyValue(Entity, "origin", "512 9600 958"); + } + else if (random == 3) + { + DispatchKeyValue(Entity, "origin", "512 9600 928"); + } + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/zombieden/xmode/youmu/laser.mdl"); + + new Float:minbounds[3] = {-100.25, -100.25, -1.25}; + new Float:maxbounds[3] = {100.25, -10.00, 1.25}; + SetEntPropVector(Entity, Prop_Send, "m_vecMins", minbounds); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); + + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + + new enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); + enteffects |= 32; + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + + return Entity; +} + +public BadEndingCallback(const char[] output, int caller, int activator, float delay) +{ + int random = GetRandomInt(1, 3); + int move = SpawnBossLaserMove(); + int prop = SpawnBossLaserProp(random); + int hurt = SpawnTriggerHurt(random); + SetVariantString("!activator"); + AcceptEntityInput(prop, "SetParent", move); + SetVariantString("!activator"); + AcceptEntityInput(hurt, "SetParent", move); + AcceptEntityInput(move, "Open"); +} + +public GoodEndingCallback(const char[] output, int caller, int activator, float delay) +{ + g_hSparkTimer = CreateTimer(0.1, Sparks, INVALID_HANDLE, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); + + int autism1 = SpawnAmbientAutism1(); + int autism2 = SpawnAmbientAutism2(); + + int random = GetRandomInt(1, 2); + + if (random == 1) + { + AcceptEntityInput(autism1, "PlaySound"); + } + else if (random == 2) + { + AcceptEntityInput(autism2, "PlaySound"); + } +} + +public Action Sparks(Handle timer) +{ + new float:sparksOrigin[3]; + sparksOrigin[0] = GetRandomFloat(-1200.0, 2400.0); + sparksOrigin[1] = GetRandomFloat(11000.0, 13000.0); + sparksOrigin[2] = GetRandomFloat(270.0, 800.0); + + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "sparks"); + DispatchKeyValue(Entity, "effect_name", "achieved"); + DispatchKeyValueVector(Entity, "origin", sparksOrigin); + DispatchKeyValue(Entity, "OnUser1", "!self,Kill,,3,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + AcceptEntityInput(Entity, "start"); + AcceptEntityInput(Entity, "FireUser1"); + + if (Entity > 1800) + ClearTimer(g_hSparkTimer); + + return Plugin_Continue; +} + +stock ClearTimer(&Handle:timer) +{ + if (timer != INVALID_HANDLE) + { + CloseHandle(timer); + timer = INVALID_HANDLE; + } +} + +public Action SpawnSeagullRelay() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("logic_relay")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "logic_relay_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_logic_relay"); + //DispatchKeyValue(Entity, "spawnflags", "1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_button*,Kill,,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,Enable,,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_clock,Enable,,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_clock,SetParent,secret_seagull_movelinear,0.1,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_door*,Enable,,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_door*,SetParent,secret_seagull_movelinear,0.1,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_box,Enable,,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_box,SetParent,secret_seagull_movelinear,0.1,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,SetParent,secret_seagull_movelinear,0.1,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_winner,AddOutput,origin 2200 12865 927,0,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_winner,AddOutput,basevelocity 0 0 -200,0.1,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_movelinear,Open,,3,-1"); + DispatchKeyValue(Entity, "OnTrigger", "seagull_sound,PlaySound,,3,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,SetAnimation,Land,45,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull,SetAnimation,Idle01,46,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_movelinear,SetSpeed,0,46,-1"); + DispatchKeyValue(Entity, "OnTrigger", "secret_seagull_clock,Kill,,47,-1"); + DispatchKeyValue(Entity, "OnUser1", "secret_math_counter_1,Add,1,0,1"); + DispatchKeyValue(Entity, "OnUser2", "secret_math_counter_1,Add,1,0,1"); + DispatchKeyValue(Entity, "OnUser3", "secret_math_counter_1,Add,1,0,1"); + DispatchKeyValue(Entity, "OnUser1", "secret_pillar_light_1,Enable,,0,1"); + DispatchKeyValue(Entity, "OnUser1", "secret_banana_final,Enable,,0,1"); + DispatchKeyValue(Entity, "OnUser2", "secret_pillar_light_2,Enable,,0,1"); + DispatchKeyValue(Entity, "OnUser2", "secret_orange_final,Enable,,0,1"); + DispatchKeyValue(Entity, "OnUser3", "secret_pillar_light_3,Enable,,0,1"); + DispatchKeyValue(Entity, "OnUser3", "secret_melon_final,Enable,,0,1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnMathCounter1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("math_counter")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "math_counter_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_math_counter_1"); + DispatchKeyValue(Entity, "startvalue", "0"); + DispatchKeyValue(Entity, "min", "0"); + DispatchKeyValue(Entity, "max", "3"); + DispatchKeyValue(Entity, "OutValue", "point_servercommand,Command,say The God of the Fruits acknowledges your sacrifice...,0,-1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_final_button*,Unlock,,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_bad_ending_trigger,Kill,,0,1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public Action SpawnMathCounter2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("math_counter")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "math_counter_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_math_counter_2"); + DispatchKeyValue(Entity, "startvalue", "0"); + DispatchKeyValue(Entity, "min", "0"); + DispatchKeyValue(Entity, "max", "3"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + + DispatchKeyValue(Entity, "OnHitMax", "point_servercommand,Command,say The God of the Fruits is satisfied with your Sacrifice!,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "point_servercommand,Command,say He rewards you with some autism!,1,1"); + + + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating,Enable,,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_orange_rotating,Enable,,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_banana_rotating,Enable,,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating_beam,Enable,,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating,SetParent,secret_rotating,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_orange_rotating,SetParent,secret_rotating,2,1") + DispatchKeyValue(Entity, "OnHitMax", "secret_banana_rotating,SetParent,secret_rotating,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_rotating_beam,SetParent,secret_rotating,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam_4,TurnOn,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_pillar*,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam_1,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam_2,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam_3,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_orange_final,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_banana_final,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_melon_final,Kill,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_rotating,Open,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_prop,Enable,,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_final,AddOutput,OnStartTouch secret_score_good:ApplyScore::0:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_teleport_final,Enable,,2,1"); + + DispatchKeyValue(Entity, "OnHitMax", "secret_seagull,SetAnimation,TakeOff,2,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_seagull_movelinear,SetSpeed,150.0,2.1,1"); + + DispatchKeyValue(Entity, "OnHitMax", "secret_beam_*,TurnOn,,5,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 255 0:4.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 0 255:5.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 70 0 130:6.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "secret_beam*,FireUser1,,5,1"); + + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 255 0:4.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 0 255:5.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 70 0 130:6.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "chinook,FireUser1,,5,1"); + + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 255 0:4.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 0 255:5.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 70 0 130:6.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_3,FireUser1,,5,1"); + + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 000 0:1.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 165 0:2.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 255 255 0:3.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 255 0:4.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 0 0 255:5.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 70 0 130:6.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:AddOutput:rendercolor 128 0 128:7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,AddOutput,OnUser1 !self:FireUser1::7.00:-1,0,1"); + DispatchKeyValue(Entity, "OnHitMax", "boat_4,FireUser1,,5,1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + HookSingleEntityOutput(Entity, "OnHitMax", GoodEndingCallback, true); + + return Entity; +} + +public Action SpawnAmbientAutism1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_autism_sound_1"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "radius", "1250"); + DispatchKeyValue(Entity, "message", "unl1/boatescape/Brain Power V2.mp3"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnAmbientAutism2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_autism_sound_2"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "radius", "1250"); + DispatchKeyValue(Entity, "message", "unl1/boatescape/Isengard.mp3"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnSparkTimer() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("logic_timer")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "logic_timer_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_timer"); + DispatchKeyValue(Entity, "RefireTime", "3"); + DispatchKeyValue(Entity, "OnTimer", "secret_button_sparks_*,SparkOnce,,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnButton1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + new float:origin[3] = {-1367.45, -13184.5, 595.76}; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_1"); + DispatchKeyValue(Entity, "spawnflags", "1537");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_1,TestActivator,,0,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnFilter1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_team")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_team_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_filter_1"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filterteam", "3"); + DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_1,Display,,0,-1"); + DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_1,0,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnParticle1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_spark")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_spark_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_sparks_1"); + new float:origin[3] = {-1367.45, -13184.5, 595.76}; + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "spawnflags", "128"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnGameText1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_text")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_text_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_game_text_1"); + DispatchKeyValue(Entity, "channel", "3"); + DispatchKeyValue(Entity, "color", "0 255 255"); + DispatchKeyValue(Entity, "color2", "0 255 255"); + DispatchKeyValue(Entity, "holdtime", "4"); + DispatchKeyValue(Entity, "fadein", "0.1"); + DispatchKeyValue(Entity, "fadeout", "0.1"); + DispatchKeyValue(Entity, "x", "-1"); + DispatchKeyValue(Entity, "y", "0.6"); + DispatchKeyValue(Entity, "message", "Secret: 1 out of 5"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnButton2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + new float:origin[3] = {2164.52, -9216.5, 461.22}; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_2"); + DispatchKeyValue(Entity, "spawnflags", "1537");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_2,TestActivator,,0,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnFilter2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_name")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_name_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_filter_2"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filtername", "pressed_1"); + DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_2,Display,,0,-1"); + DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_2,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnParticle2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_spark")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_spark_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_sparks_2"); + new float:origin[3] = {2164.52, -9216.5, 461.22}; + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "spawnflags", "128"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnGameText2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_text")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_text_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_game_text_2"); + DispatchKeyValue(Entity, "channel", "3"); + DispatchKeyValue(Entity, "color", "0 255 255"); + DispatchKeyValue(Entity, "color2", "0 255 255"); + DispatchKeyValue(Entity, "holdtime", "4"); + DispatchKeyValue(Entity, "fadein", "0.1"); + DispatchKeyValue(Entity, "fadeout", "0.1"); + DispatchKeyValue(Entity, "x", "-1"); + DispatchKeyValue(Entity, "y", "0.6"); + DispatchKeyValue(Entity, "message", "Secret: 2 out of 5"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnButton3() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + new float:origin[3] = {550.45, 1023.5, 96.29}; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_3"); + DispatchKeyValue(Entity, "spawnflags", "1537");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_3,TestActivator,,0,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnFilter3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_name")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_name_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_filter_3"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filtername", "pressed_2"); + DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_3,Display,,0,-1"); + DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_3,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnParticle3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_spark")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_spark_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_sparks_3"); + new float:origin[3] = {550.45, 1023.5, 96.29}; + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "spawnflags", "128"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnGameText3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_text")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_text_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_game_text_3"); + DispatchKeyValue(Entity, "channel", "3"); + DispatchKeyValue(Entity, "color", "0 255 255"); + DispatchKeyValue(Entity, "color2", "0 255 255"); + DispatchKeyValue(Entity, "holdtime", "4"); + DispatchKeyValue(Entity, "fadein", "0.1"); + DispatchKeyValue(Entity, "fadeout", "0.1"); + DispatchKeyValue(Entity, "x", "-1"); + DispatchKeyValue(Entity, "y", "0.6"); + DispatchKeyValue(Entity, "message", "Secret: 3 out of 5"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnButton4() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + new float:origin[3] = {505.46, 1152.5, 473.15}; + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_4"); + DispatchKeyValue(Entity, "spawnflags", "1537");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_4,TestActivator,,0,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnFilter4() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_name")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_name_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_filter_4"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filtername", "pressed_3"); + DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_4,Display,,0,-1"); + DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname pressed_4,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnParticle4() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_spark")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_spark_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_sparks_4"); + new float:origin[3] = {505.46, 1152.5, 473.15}; + DispatchKeyValueVector(Entity, "origin", origin); + DispatchKeyValue(Entity, "spawnflags", "128"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnGameText4() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_text")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_text_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_game_text_4"); + DispatchKeyValue(Entity, "channel", "3"); + DispatchKeyValue(Entity, "color", "0 255 255"); + DispatchKeyValue(Entity, "color2", "0 255 255"); + DispatchKeyValue(Entity, "holdtime", "4"); + DispatchKeyValue(Entity, "fadein", "0.1"); + DispatchKeyValue(Entity, "fadeout", "0.1"); + DispatchKeyValue(Entity, "x", "-1"); + DispatchKeyValue(Entity, "y", "0.6"); + DispatchKeyValue(Entity, "message", "Secret: 4 out of 5 \n \nHint: Last One is random"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnButton5() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_5"); + DispatchKeyValue(Entity, "spawnflags", "1537");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValueVector(Entity, "origin", g_fOrigin_Button5); + DispatchKeyValue(Entity, "wait", "0.01"); + DispatchKeyValue(Entity, "OnPressed", "secret_button_filter_5,TestActivator,,0,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnFilter5() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_name")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_name_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_filter_5"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filtername", "pressed_4"); + DispatchKeyValue(Entity, "OnPass", "secret_button_game_text_5,Display,,0,-1"); + DispatchKeyValue(Entity, "OnPass", "!activator,AddOutput,targetname secret_winner,0,-1"); + DispatchKeyValue(Entity, "OnPass", "secret_logic_relay,Trigger,,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnParticle5() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_spark")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_spark_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_sparks_5"); + DispatchKeyValueVector(Entity, "origin", g_fOrigin_Button5); + DispatchKeyValue(Entity, "spawnflags", "128"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnGameText5() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("game_text")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "game_text_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_button_game_text_5"); + DispatchKeyValue(Entity, "channel", "3"); + DispatchKeyValue(Entity, "color", "0 255 255"); + DispatchKeyValue(Entity, "color2", "0 255 255"); + DispatchKeyValue(Entity, "holdtime", "4"); + DispatchKeyValue(Entity, "fadein", "0.1"); + DispatchKeyValue(Entity, "fadeout", "0.1"); + DispatchKeyValue(Entity, "x", "-1"); + DispatchKeyValue(Entity, "y", "0.6"); + DispatchKeyValue(Entity, "message", "Secret: 5 out of 5 \n \n........."); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnTriggerTeleport() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_teleport")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_teleport_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_teleport"); + DispatchKeyValue(Entity, "model", "*29"); + DispatchKeyValue(Entity, "origin", "2200 12865 927"); //2205 2672 -13 + DispatchKeyValue(Entity, "spawnflags", "1"); + DispatchKeyValue(Entity, "target", "secret_teleport_destination"); + DispatchKeyValue(Entity, "OnStartTouch", "!self,Kill,,5,-1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnTeleportDestination() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_teleport_destination")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_teleport_destination_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_teleport_destination"); + DispatchKeyValue(Entity, "angles", "0 90 0") + DispatchKeyValue(Entity, "origin", "512 2350 930"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnSeagull() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_seagull"); + DispatchKeyValue(Entity, "angles", "0 90 0"); + DispatchKeyValue(Entity, "origin", "512 2350 890"); + DispatchKeyValue(Entity, "model", "models/seagull.mdl"); + DispatchKeyValue(Entity, "modelscale", "4.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "DefaultAnim", "SOAR"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnAmbientSeagull() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "seagull_sound"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "message", "ambient/creatures/seagull_idle1.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "preset", "0"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnSeagullClock() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_seagull_clock"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "512 2350 910"); + DispatchKeyValue(Entity, "model", "models/props_trainstation/trainstation_clock001.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "disablebonefollowers", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnSeagullMove() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_movelinear")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_movelinear_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_seagull_movelinear"); + DispatchKeyValue(Entity, "movedir", "0 90 0"); + DispatchKeyValue(Entity, "origin", "512 2350 890"); + DispatchKeyValue(Entity, "speed", "150"); + DispatchKeyValue(Entity, "movedistance", "20000"); + DispatchKeyValue(Entity, "spawnflags", "8"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnFilterEnding() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_name")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_name_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_ending_filter"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filtername", "secret_winner"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public Action SpawnPlatform1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_platform_1"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "512 9000 886"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnPlatform2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_platform_2"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "512 9168 886"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnPlatform3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_platform_3"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "406 9000 886"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnPlatform4() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_platform_4"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "406 9168 886"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnPlatform5() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_platform_5"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "406 8832 886"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnPlatform6() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_platform_1"); + DispatchKeyValue(Entity, "angles", "90 0 0"); + DispatchKeyValue(Entity, "origin", "512 8832 886"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnPillar1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_1"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "603 8940 916"); + DispatchKeyValue(Entity, "model", "models/props/de_inferno/brickpillara.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.5"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); + return Entity; + +} + + +public Action SpawnPillarLight1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_light_1"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "603 8940 1150"); + DispatchKeyValue(Entity, "model", "models/effects/vol_light64x256.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); + return Entity; + +} + +public Action SpawnPillarParticle1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_particle_system_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_particle_1"); + DispatchKeyValue(Entity, "origin", "603 8940 930"); + DispatchKeyValue(Entity, "effect_name", "achieved"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnPillar2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_2"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "420 8940 916"); + DispatchKeyValue(Entity, "model", "models/props/de_inferno/brickpillara.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.5"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); + return Entity; + +} + +public Action SpawnPillarLight2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_light_2"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "420 8940 1150"); + DispatchKeyValue(Entity, "model", "models/effects/vol_light64x256.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); + return Entity; + +} + +public Action SpawnPillarParticle2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_particle_system_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_particle_2"); + DispatchKeyValue(Entity, "origin", "420 8940 930"); + DispatchKeyValue(Entity, "effect_name", "achieved"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnPillar3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_3"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "512 9032 916"); + DispatchKeyValue(Entity, "model", "models/props/de_inferno/brickpillara.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.5"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "0"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); + return Entity; + +} + +public Action SpawnPillarLight3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_light_3"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "512 9032 1150"); + DispatchKeyValue(Entity, "model", "models/effects/vol_light64x256.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_ALWAYS | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_ALWAYS); + return Entity; + +} + +public Action SpawnPillarParticle3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_particle_system")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_particle_system_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_pillar_particle_3"); + DispatchKeyValue(Entity, "origin", "512 9032 930"); + DispatchKeyValue(Entity, "effect_name", "achieved"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnExplosion1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_explosion")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_explosion_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_explosion_1"); + DispatchKeyValue(Entity, "origin", "603 8940 960"); + DispatchKeyValue(Entity, "fireballsprite", "sprites/zerogxplode.spr"); + DispatchKeyValue(Entity, "rendermode", "5"); + DispatchKeyValue(Entity, "iMagnitude", "300"); + DispatchKeyValue(Entity, "iRadiusOverride", "70"); + DispatchKeyValue(Entity, "spawnflags", "3"); + DispatchSpawn(Entity); + + return Entity; + +} + +public Action SpawnExplosion2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_explosion")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_explosion_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_explosion_2"); + DispatchKeyValue(Entity, "origin", "420 8940 960"); + DispatchKeyValue(Entity, "fireballsprite", "sprites/zerogxplode.spr"); + DispatchKeyValue(Entity, "rendermode", "5"); + DispatchKeyValue(Entity, "iMagnitude", "300"); + DispatchKeyValue(Entity, "iRadiusOverride", "70"); + DispatchKeyValue(Entity, "spawnflags", "3"); + DispatchSpawn(Entity); + + return Entity; + +} + +public Action SpawnExplosion3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_explosion")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_explosion_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_explosion_3"); + DispatchKeyValue(Entity, "origin", "512 9032 960"); + DispatchKeyValue(Entity, "fireballsprite", "sprites/zerogxplode.spr"); + DispatchKeyValue(Entity, "rendermode", "5"); + DispatchKeyValue(Entity, "iMagnitude", "300"); + DispatchKeyValue(Entity, "iRadiusOverride", "70"); + DispatchKeyValue(Entity, "spawnflags", "3"); + DispatchSpawn(Entity); + + return Entity; + +} + +public Action SpawnAmbientGenericExplosion1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "explosion_sound_1"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "SourceEntityName", "secret_banana_final"); + DispatchKeyValue(Entity, "radius", "3050"); + DispatchKeyValue(Entity, "message", "ambient/explosions/explode_9.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "preset", "0"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnAmbientGenericExplosion2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "explosion_sound_2"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "SourceEntityName", "secret_orange_final"); + DispatchKeyValue(Entity, "radius", "3050"); + DispatchKeyValue(Entity, "message", "ambient/explosions/explode_9.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "preset", "0"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnAmbientGenericExplosion3() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("ambient_generic")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "ambient_generic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "explosion_sound_3"); + DispatchKeyValue(Entity, "spawnflags", "49"); + DispatchKeyValue(Entity, "SourceEntityName", "secret_platform_4"); + DispatchKeyValue(Entity, "radius", "3050"); + DispatchKeyValue(Entity, "message", "ambient/explosions/explode_9.wav"); + DispatchKeyValue(Entity, "volume", "10"); + DispatchKeyValue(Entity, "health", "10"); + DispatchKeyValue(Entity, "preset", "0"); + DispatchKeyValue(Entity, "pitch", "100"); + DispatchKeyValue(Entity, "pitchstart", "100"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnOrangeFinal() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_orange_final"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "420 8940 960"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/orange.mdl"); + DispatchKeyValue(Entity, "modelscale", "2.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBananaFinal() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_banana_final"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "603 8940 960"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/bananna.mdl"); + DispatchKeyValue(Entity, "modelscale", "2.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnMelonFinal() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_melon_final"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "512 9032 960"); + DispatchKeyValue(Entity, "model", "models/props_junk/watermelon01.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.4"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnTeleportFinal() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_teleport_prop"); + DispatchKeyValue(Entity, "angles", "0 90 0"); + DispatchKeyValue(Entity, "origin", "512 9032 886"); + DispatchKeyValue(Entity, "model", "models/props_combine/combine_teleportplatform.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "0"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_1"); + DispatchKeyValue(Entity, "BoltWidth", "2"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "LightningStart", "secret_banana_final"); + DispatchKeyValue(Entity, "LightningEnd", "secret_orange_final"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_2"); + DispatchKeyValue(Entity, "BoltWidth", "2"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "LightningStart", "secret_orange_final"); + DispatchKeyValue(Entity, "LightningEnd", "secret_melon_final"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam3() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_3"); + DispatchKeyValue(Entity, "BoltWidth", "2"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "LightningStart", "secret_melon_final"); + DispatchKeyValue(Entity, "LightningEnd", "secret_banana_final"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam4() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_4"); + DispatchKeyValue(Entity, "BoltWidth", "25"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "spawnflags", "8"); + DispatchKeyValue(Entity, "LightningStart", "secret_melon_rotating"); + DispatchKeyValue(Entity, "LightningEnd", "secret_melon_rotating_beam"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam5() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_5"); + DispatchKeyValue(Entity, "BoltWidth", "10"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "spawnflags", "0"); + DispatchKeyValue(Entity, "LightningStart", "secret_banana_rotating"); + DispatchKeyValue(Entity, "LightningEnd", "chinookrotor1"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam6() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_6"); + DispatchKeyValue(Entity, "BoltWidth", "10"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "spawnflags", "0"); + DispatchKeyValue(Entity, "LightningStart", "secret_orange_rotating"); + DispatchKeyValue(Entity, "LightningEnd", "boat_3"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBeam7() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_beam_7"); + DispatchKeyValue(Entity, "BoltWidth", "10"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "spawnflags", "0"); + DispatchKeyValue(Entity, "LightningStart", "secret_melon_rotating"); + DispatchKeyValue(Entity, "LightningEnd", "boat_4"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnButtonFinal1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_final_button_1"); + DispatchKeyValue(Entity, "spawnflags", "3073");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValue(Entity, "origin", "603 8940 960"); + DispatchKeyValue(Entity, "OnPressed", "secret_beam_1,TurnOn,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_light_1,Kill,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_math_counter_2,Add,1,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_1,Start,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnButtonFinal2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_final_button_2"); + DispatchKeyValue(Entity, "spawnflags", "3073");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValue(Entity, "origin", "420 8940 960"); + DispatchKeyValue(Entity, "OnPressed", "secret_beam_2,TurnOn,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_light_2,Kill,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_math_counter_2,Add,1,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_2,Start,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnButtonFinal3() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_button")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_button_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_final_button_3"); + DispatchKeyValue(Entity, "spawnflags", "3073");//1025 + DispatchKeyValue(Entity, "model", "*65"); + DispatchKeyValue(Entity, "origin", "512 9032 960"); + DispatchKeyValue(Entity, "OnPressed", "secret_beam_3,TurnOn,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_light_3,Kill,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_math_counter_2,Add,1,0,1"); + DispatchKeyValue(Entity, "OnPressed", "secret_pillar_particle_3,Start,,0,1"); + DispatchKeyValue(Entity, "OnPressed", "!self,Kill,,0.1,1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnOrange() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_physics")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_physics_multiplayer_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "orange"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "-3606.24 -14206 481.63"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/orange.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "spawnflags", "289"); + DispatchKeyValue(Entity, "damagetoenablemotion", "10"); + DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser2,,0,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser2,,0,-1"); + DispatchKeyValue(Entity, "OnTakeDamage", "!self,Kill,,0.1,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "!self,Kill,,0.1,-1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnBanana() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_physics")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_physics_multiplayer_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "banana"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "899 -9355.63 513.77"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/bananna.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "spawnflags", "289"); + DispatchKeyValue(Entity, "damagetoenablemotion", "10"); + DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser1,,0,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser1,,0,-1"); + DispatchKeyValue(Entity, "OnTakeDamage", "!self,Kill,,0.1,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "!self,Kill,,0.1,-1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnMelon() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_physics")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_physics_multiplayer_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "melon"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "1023.6 -5583.5 631.48"); + DispatchKeyValue(Entity, "model", "models/props_junk/watermelon01.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "spawnflags", "289"); + DispatchKeyValue(Entity, "damagetoenablemotion", "10"); + DispatchKeyValue(Entity, "OnTakeDamage", "secret_logic_relay,FireUser3,,0,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "secret_logic_relay,FireUser3,,0,-1"); + DispatchKeyValue(Entity, "OnTakeDamage", "!self,Kill,,0.1,-1"); + DispatchKeyValue(Entity, "OnPlayerUse", "!self,Kill,,0.1,-1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnRotating() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_rotating")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_rotating_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_rotating"); + DispatchKeyValue(Entity, "origin", "512 9032 100"); + DispatchKeyValue(Entity, "maxspeed", "10"); + DispatchKeyValue(Entity, "spawnflags", "65"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/effects/vol_light64x256.mdl"); + new Float:minbounds[3] = {-100.25, -100.25, -10.0}; + new Float:maxbounds[3] = {100.25, 100.25, 10.0}; + SetEntPropVector(Entity, Prop_Send, "m_vecMins", minbounds); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + new enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); + enteffects |= 32; + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + return Entity; +} + +public Action SpawnRotatingOrange() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_orange_rotating"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "-354 9532 1000"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/orange.mdl"); + DispatchKeyValue(Entity, "modelscale", "35.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnRotatingBanana() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_banana_rotating"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "1378 9532 1000"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/bananna.mdl"); + DispatchKeyValue(Entity, "modelscale", "35.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnRotatingMelon() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_melon_rotating"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "512 8032 1000"); + DispatchKeyValue(Entity, "model", "models/props_junk/watermelon01.mdl"); + DispatchKeyValue(Entity, "modelscale", "25"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnRotatingMelonBeam() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_melon_rotating_beam"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "512 10032 1000"); + DispatchKeyValue(Entity, "model", "models/props_junk/watermelon01.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.2"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnTriggerTeleportFinal() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_teleport")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_teleport_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_teleport_final"); + DispatchKeyValue(Entity, "origin", "512 9032 950"); + DispatchKeyValue(Entity, "model", "*26"); + DispatchKeyValue(Entity, "spawnflags", "1"); + DispatchKeyValue(Entity, "StartDisabled", "1"); + DispatchKeyValue(Entity, "target", "secret_teleport_destination_final"); + DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname carrier,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_teleport_prop,Kill,,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "!self,Kill,,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnTeleportDestinationFinal() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("info_teleport_destination")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "info_teleport_destination_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_teleport_destination_final"); + DispatchKeyValue(Entity, "angles", "0 90 0") + DispatchKeyValue(Entity, "origin", "634.9 11304.2 436.72"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnItemTrigger1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_once")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_once_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_trigger1"); + DispatchKeyValue(Entity, "spawnflags", "1") + DispatchKeyValue(Entity, "origin", "-6980.97 -13196 928"); + DispatchKeyValue(Entity, "filtername", "secret_item_filter"); + DispatchKeyValue(Entity, "model", "*49"); + DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,origin -7820 -14000 860,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_item_deagle,AddOutput,OnPlayerPickUp !activator:AddOutput:origin -6856.84 -13314.8 576:0:1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_item_trigger*,Kill,,0,1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnItemTrigger2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_once")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_once_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_trigger2"); + DispatchKeyValue(Entity, "spawnflags", "1") + DispatchKeyValue(Entity, "origin", "-4875.64 -14402.8 928"); + DispatchKeyValue(Entity, "filtername", "secret_item_filter"); + DispatchKeyValue(Entity, "model", "*49"); + DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,origin -7820 -14000 860,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_item_deagle,AddOutput,OnPlayerPickUp !activator:AddOutput:origin -4750.68 -14327.8 576:0:1,0,1"); + DispatchKeyValue(Entity, "OnStartTouch", "secret_item_trigger*,Kill,,0,1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + + +public Action SpawnNameReset() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_name_reset"); + DispatchKeyValue(Entity, "spawnflags", "1") + DispatchKeyValue(Entity, "origin", "-2168 -13824 608"); + DispatchKeyValue(Entity, "model", "*49"); + DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname plebnemesisfag,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnNameResetZM1() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_name_reset_zm"); + DispatchKeyValue(Entity, "spawnflags", "1") + DispatchKeyValue(Entity, "origin", "-5285.69 -14386.9 928"); + DispatchKeyValue(Entity, "model", "*49"); + DispatchKeyValue(Entity, "filtername", "secret_filter_zm"); + DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname plebnemesisfag,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnNameResetZM2() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("trigger_multiple")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "trigger_multiple_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_name_reset_zm"); + DispatchKeyValue(Entity, "spawnflags", "1") + DispatchKeyValue(Entity, "origin", "-7335.97 -13298.3 928"); + DispatchKeyValue(Entity, "model", "*49"); + DispatchKeyValue(Entity, "filtername", "secret_filter_zm"); + DispatchKeyValue(Entity, "OnStartTouch", "!activator,AddOutput,targetname plebnemesisfag,0,-1"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + return Entity; +} + +public Action SpawnFilterZM() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_team")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_team_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_filter_zm"); + DispatchKeyValue(Entity, "Negated", "1"); + DispatchKeyValue(Entity, "filterteam", "3"); + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; + +} + +public Action SpawnItemFilter() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("filter_activator_name")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "filter_activator_name_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_filter"); + DispatchKeyValue(Entity, "Negated", "0"); + DispatchKeyValue(Entity, "filtername", "carrier"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + return Entity; +} + +public Action SpawnItemPlatform1() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "item_platform_1"); + DispatchKeyValue(Entity, "angles", "90 0 90"); + DispatchKeyValue(Entity, "origin", "-7726 -13944 830"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnItemPlatform2() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "item_platform_2"); + DispatchKeyValue(Entity, "angles", "90 0 90"); + DispatchKeyValue(Entity, "origin", "-7557 -13944 830"); + DispatchKeyValue(Entity, "model", "models/props_lab/blastdoor001c.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.0"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "6"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnItemElite() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("weapon_deagle")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "weapon_deagle_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_deagle"); + DispatchKeyValue(Entity, "hammerid", "11051995"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "ammo", "1337"); + DispatchKeyValue(Entity, "origin", "-7600 -13990 872.46"); + DispatchKeyValue(Entity, "spawnflags", "1"); + DispatchKeyValue(Entity, "OnPlayerPickUp", "!activator,AddOutput,targetname plebnemesisfag,0,1"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnItemRotating() +{ + new Entity; + + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("func_rotating")) == INVALID_ENT_REFERENCE) + return -1; + + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "func_rotating_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_rotating"); + DispatchKeyValue(Entity, "origin", "-7600 -13990 872.46"); + DispatchKeyValue(Entity, "maxspeed", "40"); + DispatchKeyValue(Entity, "spawnflags", "65"); + DispatchKeyValue(Entity, "parentname", "secret_item_deagle"); + + DispatchSpawn(Entity); + ActivateEntity(Entity); + + SetEntityModel(Entity, "models/effects/vol_light64x256.mdl"); + new Float:minbounds[3] = {-100.25, -100.25, -10.0}; + new Float:maxbounds[3] = {100.25, 100.25, 10.0}; + SetEntPropVector(Entity, Prop_Send, "m_vecMins", minbounds); + SetEntPropVector(Entity, Prop_Send, "m_vecMaxs", maxbounds); + SetEntProp(Entity, Prop_Send, "m_nSolidType", 2); + new enteffects = GetEntProp(Entity, Prop_Send, "m_fEffects"); + enteffects |= 32; + SetEntProp(Entity, Prop_Send, "m_fEffects", enteffects); + return Entity; +} + +public Action SpawnItemRotatingOrange() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_orange_rotating"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin","-7582.5 -13959.7 875"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/orange.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.5"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnItemRotatingBanana() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_banana_rotating"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "-7582.5 -14020.3 875"); + DispatchKeyValue(Entity, "model", "models/props/cs_italy/bananna.mdl"); + DispatchKeyValue(Entity, "modelscale", "1.5"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnItemRotatingMelon() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_melon_rotating"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "-7635 -13990 875"); + DispatchKeyValue(Entity, "model", "models/props_junk/watermelon01.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.8"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "1"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + + DispatchSpawn(Entity); + return Entity; + +} + +public Action SpawnItemRotatingMelonBeam() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("prop_dynamic_override")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "prop_dynamic_override_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_melon_rotating_beam"); + DispatchKeyValue(Entity, "angles", "0 0 0"); + DispatchKeyValue(Entity, "origin", "-7565 -13990 875"); + DispatchKeyValue(Entity, "model", "models/props_junk/watermelon01.mdl"); + DispatchKeyValue(Entity, "modelscale", "0.1"); + DispatchKeyValue(Entity, "disablereceiveshadows", "1"); + DispatchKeyValue(Entity, "disableshadows", "1"); + DispatchKeyValue(Entity, "solid", "0"); + DispatchKeyValue(Entity, "rendermode", "10"); + DispatchKeyValue(Entity, "StartDisabled", "0"); + DispatchSpawn(Entity); + //SetEdictFlags(Entity, FL_EDICT_DONTSEND | FL_EDICT_FULL); + SetEdictFlags(Entity, GetEdictFlags(Entity) | FL_EDICT_DONTSEND); + return Entity; + +} + +public Action SpawnItemBeam() +{ + new Entity; + // Spawn dynamic prop entity + if ((Entity = CreateEntityByName("env_beam")) == INVALID_ENT_REFERENCE) + return -1; + // Generate unique id for the entity + new String:StrEntityName[64]; Format(StrEntityName, sizeof(StrEntityName), "env_beam_%i", Entity); + + // Setup entity + DispatchKeyValue(Entity, "targetname", "secret_item_beam"); + DispatchKeyValue(Entity, "BoltWidth", "1"); + DispatchKeyValue(Entity, "decalname", "Bigshot"); + DispatchKeyValue(Entity, "framerate", "0"); + DispatchKeyValue(Entity, "framestart", "0"); + DispatchKeyValue(Entity, "life", "1"); + DispatchKeyValue(Entity, "spawnflags", "9"); + DispatchKeyValue(Entity, "LightningStart", "secret_item_melon_rotating"); + DispatchKeyValue(Entity, "LightningEnd", "secret_item_melon_rotating_beam"); + DispatchKeyValue(Entity, "texture", "sprites/laserbeam.spr"); + + DispatchSpawn(Entity); + return Entity; + +} \ No newline at end of file