Welcome to the work f o r c e !

This is where i keep some of my stuff. It will be expanded upon over time.

More, fancier prefabs should be set up eventually.

Hang around, you may find something special.

 

   LINKS:

       Steam

       Gamebanana

       Patreon

       Discord: luffaren

       Youtube

       Email

       Bodygroup Calculator

       ze_collective

================================================================

    CSGO hammer prefabs:

        AutoRatioSlay

              a .nut script which auto-slays CT's when a specific ct/t player ratio is met

              read the included .nut file for more information

 

        NutEnt

              A script+prefab package allowing you to hot-spawn ents via a global vscript function

              You can easily add/remove the entity-classes available for spawning in the prefab .vmf

              It also includes some extra general-purpose helper functions

 

        PackBSP

              A simple .bat-file .bsp packer, you simply drag+drop a .bsp into it.

              It packs everything within the 'csgo' folder that's next to the .bsp file.

 

        VtfOptimizer

              An app that handles mass-resizing .vtf files with a max-size-cap and a DXT1/DXT5 toggle.

              Can be used to reduce filesize on maps, just read the included instructions and save backups/be careful.

 

        levelsystem

              A copy+paste prefab for an easy-to-use level system, also including an example .vmf to help you understand it.

              It supports up to 16 stages as it uses a logic_case.

 

        moving_npc

              A barebones physbox+thruster npc base that picks a random CT-target every X seconds and then moves towards the target.

              This is by no means a complete system, but rather a base to start working your own NPC from.

 

        weapon_handler

              A standalone script to handle keeping the targetname of weapons + detecting when a weapon has been dropped.

              Just add the .nut to the "Entity Scripts" property of any weapon-entity and it'll work automatically.

 

================================================================

    CSGO plugins:

        luffarenmaps_v1_8

              This plugin allows for instant Vscript-based hotfixes, QoL-tweaks, special events and VIP/patron-updates for Luffaren-maps.

              The Vscripts are set up/managed by Luffaren centrally, and can be previewed below (in "CSGO Vscript configs").

              If a Vscript config exists for the current map on the server, it will load in once as the map starts.

 

================================================================

    CSGO Vscript configs:

        ze_best_korea_v1

        ze_castlevania_p1_7

        ze_collective_v1_9

        ze_crazykart_v4

        ze_diddle_v3

        ze_eternal_grove_v3

        ze_frostdrake_tower_v1

        ze_magmadrake_b5

        ze_pizzatime_v9

        ze_predator_ultimate_p7

        ze_santassination_v3

        ze_toaster_p3

     These Vscript configs gets loaded in through the LuffarenMaps plugin as the map starts. Click on them to view a preview of the code below.

================================================================

--------------------------------------------------------------------------------------------------------

//============[ NOTE: permanent script scope > "luffarenmapsplugin_manager" ]============\\

scinit<-false;CDATA<-[];function InitializeScriptValidate(){if(!scinit)//Safety wrapper to retry loading the Vscript

{printl("[LuffarenMaps] Vscript ERROR - script not initialized!");if(Entities.FindByName(null,"luffarenmapsplugin_reload")==null)

{local e=Entities.CreateByClassname("info_target");e.__KeyValueFromString("targetname","luffarenmapsplugin_reload");}}}

EntFireByHandle(self,"RunScriptCode"," InitializeScriptValidate(); ",5.00,null,null);

//Called once when the script is initialized/reloaded

function Initialize()

{

    if(scinit)return;scinit=true;printl("[LuffarenMaps] Vscript initialized!");

    local h = null;while(null!=(h=Entities.FindByName(h,"luffarenmapsplugin_reload")))

    {EntFireByHandle(h,"Kill","",0.00,null,null);}if(Entities.FindByName(null,"luffarenmapsplugin_success")==null)

    {local e = Entities.CreateByClassname("info_target");e.__KeyValueFromString("targetname","luffarenmapsplugin_success");}

    EntFireByHandle(self,"RunScriptCode"," InitializeCDATA(); ",0.01,null,null);

    EntFireByHandle(self,"RunScriptCode"," RoundStart(true); ",0.02,null,null);

    //XXXXXXXXXXXXXXX>   init code goes here...

}

//Called once every round start (also just after 'Initialize' has been called)

function RoundStart(justinitalized=false)

{

    printl("[LuffarenMaps] Vscript RoundStart() called!");

    //XXXXXXXXXXXXXXX>   roundstart code goes here (bool:justinitalized)...

    EntFire("s_alucard_buttonfilter","AddOutput","OnUser4 luffarenmapsplugin_manager:RunScriptCode:TickAlucardModelStart();:0.5:1",0.20,null);

    EntFire("s_alucard_buttonfilter","AddOutput","OnUser4 alucard_model:ClearParent::0.4:1",0.20,null);

    EntFireByHandle(self,"RunScriptCode"," Stage5_Boss_Torch_Tick(); ",100.00,null,null);

    EntFire("event_case_s5","AddOutput","OnCase10 luffarenmapsplugin_manager:RunScriptCode:Stage5_End_TimeOutSlay();:50:1",30.00,null);

    EntFireByHandle(self,"RunScriptCode","s6cheese_ticking <- true;",38.00,null,null);

    EntFireByHandle(self,"RunScriptCode","TickS6Cheese();",40.00,null,null);

    

        //spooks

    EntFire("s_ghost","AddOutput","origin 3806 4115 12995",11.00,null);            EntFire("s_ghost","ForceSpawn","",12.00,null);

    EntFire("s_ghost","AddOutput","origin -441 2774 5400",14.00,null);            EntFire("s_ghost","ForceSpawn","",15.00,null);

    EntFire("s_ghost","AddOutput","origin 1137 10358 12496",17.00,null);        EntFire("s_ghost","ForceSpawn","",18.00,null);

}

//Called once when the script is initialized/validated

function DateTimeReceived(datetime)

{

    printl("[LuffarenMaps] Vscript Datetime received! ("+datetime+")");

    //XXXXXXXXXXXXXXX>   DateTime code goes here (string:datetime "YYYY-MM-DD-MM-SS")...

}

//Called once when the script is initialized/validated

function ServerInfoReceived(info)

{

    printl("[LuffarenMaps] Vscript ServerInfo received! ("+info+")");

    //XXXXXXXXXXXXXXX>   ServerInfo code goes here (string:info "serverIP-serverNAME")...

}

//Called once when the script is initialized/validated

function InitializeCDATA()

{

    foreach(data in CDATA)

    {

        if(data.len()<=0)continue;local dds="";foreach(dd in data){dds=dds+"|"+dd;}dds=dds+"|";

        printl("[LuffarenMaps] Vscript CustomData loaded! ("+dds+")");

        //XXXXXXXXXXXXXXX>   CustomData code goes here (data:[["IDENTIFIER","data..."]])...

    }

}

//Called every time a client is validated/connected with name, userid and steamid

function ClientValidated(userid,steamid,name)

{

    userid = userid.tointeger();

    local s = [];for(local i=0;i<steamid.len();i++)

    {

        local ceil = 1+i;if(ceil>steamid.len())break;

        local c = steamid.slice(i,ceil);if(c=="c")c=":";s.push(c);

    }

    steamid = "";foreach(ss in s)steamid = steamid+ss;

    if(("PLAYERS" in this)&&("GetPlayerClass" in this))

    {local pc = ::GetPlayerClass(steamid);if(pc==null)pc=::GetPlayerClass(userid);

    if(pc==null)pc=::PlayerClass();pc.userid=userid;pc.steamid=steamid;pc.name=name;}

    printl("[LuffarenMaps] Vscript client validated! ("+userid.tostring()+"|"+steamid+"|"+name+")");

    //XXXXXXXXXXXXXXX>   Client data connecting code goes here (int:userid, string:steamid, string:name)...

}

//----------------------------------------------------------------------------------------------------------

//    this scans for glocks (item-pistol) that aren't held by anyone within the center of the s5-boss-arena and kills them

//    this is an attempt to prevent the cheese-strat of making the boss get stuck

//----------------------------------------------------------------------------------------------------------

Stage5_Boss_Torch_pos <- Vector(5161,8718,14464);

Stage5_Boss_Torch_range <- 500;

Stage5_Boss_Torch_rate <- 2.00;

Stage5_Boss_Torch_weapon <- "weapon_glock";

function Stage5_Boss_Torch_Tick()

{

    EntFireByHandle(self,"RunScriptCode"," Stage5_Boss_Torch_Tick(); ",Stage5_Boss_Torch_rate,null,null);

    for(local h;h=Entities.FindByClassnameWithin(h,Stage5_Boss_Torch_weapon,Stage5_Boss_Torch_pos,Stage5_Boss_Torch_range);)

    {

        if(h==null||!h.IsValid())continue;

        if(h.GetMoveParent()!=null)continue;

        EntFireByHandle(h,"Kill","",0.00,null,null);

    }

}

//----------------------------------------------------------------------------------------------------------

//    this slays all CT's, used at the end of stage 5, as some human(s) might be able to hide/delay in the endless fade

//----------------------------------------------------------------------------------------------------------

function Stage5_End_TimeOutSlay()

{

    for(local h;h=Entities.FindByClassname(h,"player");)

    {

        if(h==null||!h.IsValid()||h.GetTeam()!=3||h.GetHealth()<=0)continue;

        EntFireByHandle(h,"SetHealth","-69",0.00,null,null);

    }

}

//----------------------------------------------------------------------------------------------------------

//    no more hiding/skin/low-pop/solo-cheese on stage 6 (<=3 normal-humans && >0 skin-humans : SLAY)

//----------------------------------------------------------------------------------------------------------

s6cheese_ticking <- true;

s6cheese_delay_skincheck <- 30.00;

function TickS6Cheese()

{

    if(!s6cheese_ticking)return;

    EntFireByHandle(self,"RunScriptCode","TickS6Cheese();",1.00,null,null);

    for(local h;h=Entities.FindByClassnameWithin(h,"player",Vector(-11971,11198,14875),1000);)

    {

        if(h==null||!h.IsValid()||h.GetTeam()!=3||h.GetHealth()<=0||h.GetOrigin().z<14785)continue;

        s6cheese_ticking = false;

        EntFireByHandle(self,"RunScriptCode","TickS6CheeseActPostSkins();",s6cheese_delay_skincheck,null,null);

        return;

    }

}

function TickS6CheeseActPostSkins()

{

    local total_player_count = 0;

    local normal_player_count = 0;

    local character_count = 0;

    local players = [];

    for(local h;h=Entities.FindByClassname(h,"player");)

    {

        if(h==null||!h.IsValid())continue;

        total_player_count++;

        if(h.GetTeam()!=3||h.GetHealth()<=0)continue;

        players.push(h);

        local is_character = false;

        local c = h.FirstMoveChild();

        while(c!=null)

        {

            if(c.GetClassname()=="weapon_knife")

            {

                local charidx = 0;

                local cc = c.FirstMoveChild();

                while(cc!=null)

                {

                    if(    cc.GetClassname()=="prop_dynamic"    ||

                        cc.GetClassname()=="func_button"    ||

                        cc.GetClassname()=="trigger_hurt"    )

                            charidx++;

                    cc = cc.NextMovePeer();

                }

                if(charidx >= 2)is_character = true;

                break;

            }

            c = c.NextMovePeer();

        }

        if(is_character)character_count++;

        else normal_player_count++;

    }

    printl("[s6cheese]" + "    " + total_player_count + "    " + character_count + "    " + normal_player_count);

    if(total_player_count >= 15 && character_count > 0 && normal_player_count <= 3)

    {

        foreach(p in players)

        {

            EntFireByHandle(p,"SetDamageFilter","",0.00,null,null);

            EntFireByHandle(p,"SetHealth","-1",0.00,null,null);

            EntFireByHandle(p,"SetDamageFilter","",0.04,null,null);

            EntFireByHandle(p,"SetHealth","-1",0.06,null,null);

            local ii = 0.00;

            for(local i=0;i<30;i++)

            {

                EntFire("game_server","Command","say GO FOR A REAL TEAM WIN YOU EGO CUCKS",ii,null);

                ii += 0.10;

            }

        }

    }

}

//----------------------------------------------------------------------------------------------------------

//fix alucard rendering by unparenting + script-ticking its position

//----------------------------------------------------------------------------------------------------------

alucardmodel <- null;

alucardowner <- null;

function TickAlucardModelStart()

{

    alucardowner = activator;

    alucardmodel = Entities.FindByName(null,"alucard_model");

    EntFireByHandle(alucardmodel,"ClearParent","",0.00,null,null);

    EntFireByHandle(alucardmodel,"ClearParent","",0.02,null,null);

    EntFireByHandle(alucardmodel,"ClearParent","",0.05,null,null);

    EntFireByHandle(alucardmodel,"ClearParent","",0.08,null,null);

    EntFireByHandle(self,"RunScriptCode"," TickAlucardModelFix(); ",0.10,null,null);

}

function TickAlucardModelFix()

{

    if(alucardmodel==null||!alucardmodel.IsValid())return;

    if(alucardowner==null||!alucardowner.IsValid()||alucardowner.GetHealth()<=0||alucardowner.GetTeam()!=3)

    {

        EntFire("alucard_model*","Kill","",0.00,null);

        if(alucardowner==null||!alucardowner.IsValid())return;

        EntFireByHandle(alucardowner,"SetDamageFilter","",0.00,null,null);

        EntFireByHandle(alucardowner,"SetDamageFilter","",0.01,null,null);

        EntFireByHandle(alucardowner,"SetDamageFilter","",0.02,null,null);

        EntFireByHandle(alucardowner,"SetHealth","-1",0.00,null,null);

        EntFireByHandle(alucardowner,"SetHealth","-1",0.01,null,null);

        EntFireByHandle(alucardowner,"SetHealth","-1",0.02,null,null);

        EntFireByHandle(alucardowner,"SetHealth","-1",0.03,null,null);

        alucardowner = null;

        return;

    }

    EntFireByHandle(self,"RunScriptCode"," TickAlucardModelFix(); ",0.01,null,null);

    alucardmodel.SetOrigin(alucardowner.GetOrigin()-(alucardowner.GetForwardVector()*20));

    alucardmodel.SetAngles(0,alucardowner.GetAngles().y-90,0);

}

Initialize();//=============[RESERVED_CUSTOMDATA_BELOW]=============\\

CDATA.push(["VIP","STEAM_1:1:22521282","STEAM_1:0:5225233","STEAM_1:0:45564798","STEAM_1:1:73344846","STEAM_1:1:11715703","STEAM_1:1:31574014","STEAM_1:1:523970","STEAM_1:1:44083262","STEAM_1:0:481397

71","STEAM_1:1:437584735","STEAM_1:0:23006811","STEAM_1:1:92712277","STEAM_1:0:5680239","STEAM_1:0:82660003","STEAM_1:0:82581980","STEAM_1:1:76518687","STEAM_1:0:123998228","STEAM_1:0:1726051","STEAM_

1:1:57774125","STEAM_1:0:145949752","STEAM_1:1:19059031","STEAM_1:0:87605592","STEAM_1:1:53399461","STEAM_1:1:90927558","STEAM_1:1:146402862","STEAM_1:1:161646505","STEAM_1:1:2359822","STEAM_1:1:36935

027","STEAM_1:0:40225637","STEAM_1:0:73964697","STEAM_1:1:420487994","STEAM_1:1:224693752","STEAM_1:0:166202549","STEAM_1:1:187387685","STEAM_1:1:431361032","STEAM_1:1:530769946","STEAM_1:1:421423581"

,"STEAM_1:0:589738117","STEAM_1:1:68906947","STEAM_1:1:209579010","STEAM_1:0:172104190","STEAM_1:0:82257199","STEAM_1:0:110034693","STEAM_1:1:32256533","STEAM_1:1:103714298","STEAM_1:1:194987240","STE

AM_1:1:232637165","STEAM_1:1:20450857","STEAM_1:1:94436119","STEAM_1:0:513101242","STEAM_1:1:450658765","STEAM_1:0:446526162","STEAM_1:0:534443260","STEAM_1:0:737862615","STEAM_1:0:225146037","STEAM_1

:1:435443801","STEAM_1:0:80773872","STEAM_1:0:142970189","STEAM_1:0:186122076"]);

CDATA.push(["IDENTIFIER","data1","data2","data3"]);

CDATA.push([""]);

-------------------------------------------------------------------------------------------------------------