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 ]============\\

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)...

    EntFireByHandle(self,"RunScriptCode"," AntiExploitTriggers(false); ",10.00,null,null);

    EntFire("break_voodo1zcage","AddOutput","OnBreak luffarenmapsplugin_manager:RunScriptCode:AntiZcageCheeseBoost();:0:1",4.50,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;

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

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

}

::TriggerCreate<-function(pos,rot=Vector(),mins=Vector(-32,-32,-32),maxs=Vector(32,32,32),targetname="i_trigger",flags=1)

{

    local e = Entities.CreateByClassname("trigger_multiple");

    e.SetOrigin(pos);

    e.SetAngles(rot.x,rot.y,rot.z);

    e.SetSize(mins,maxs);

    e.__KeyValueFromString("targetname",targetname);

    e.__KeyValueFromInt("spawnflags",flags);

    e.__KeyValueFromInt("solid",3);

    e.__KeyValueFromInt("startdisabled",1);

    e.__KeyValueFromInt("collisiongroup",10);

    return e;

}

//---->        Sets up a set of triggers along the tower for T's, checking Z-velocity to prevent boosting upwards (they get TP'd back)

//---->        Sets up a few triggers for CT's to prevent delaying in the area next to the entrance-lever-area

//---->        Freedom to do funky stuff is nice, but a few bad apples can easily ruin things for the rest of the players, and that won't hold

//---->        More triggers to come perhaps, depends on what's being found out...    

function AntiExploitTriggers(logic=false)

{

    if(!logic)

    {

        EntFireByHandle(self,"RunScriptCode"," AntiExploitTriggers(true); ",1.00,null,null);

        ::TriggerCreate(Vector(-8448,1024,-3776),Vector(),Vector(-7424,-5120,-64),Vector(7424,5120,64),"trigfix_antiboost");

        ::TriggerCreate(Vector(-8448,1024,-960),Vector(),Vector(-7424,-5120,-64),Vector(7424,5120,64),"trigfix_antiboost");

        ::TriggerCreate(Vector(-8448,1024,6208),Vector(),Vector(-7424,-5120,-64),Vector(7424,5120,64),"trigfix_antiboost");

        ::TriggerCreate(Vector(-8448,1024,11328),Vector(),Vector(-7424,-5120,-64),Vector(7424,5120,64),"trigfix_antiboost");

        ::TriggerCreate(Vector(-12768,3056,-5568),Vector(),Vector(-512,-496,-1600),Vector(512,496,1600),"trigfix_antidelay_1");

        ::TriggerCreate(Vector(-13152,1056,-5568),Vector(),Vector(-352,-1504,-1600),Vector(352,1504,1600),"trigfix_antidelay_2");

        ::TriggerCreate(Vector(-13152,-608,-5568),Vector(),Vector(-352,-160,-1600),Vector(352,160,1600),"trigfix_antidelay_3");

        ::TriggerCreate(Vector(-12300,2015,-2623),Vector(),Vector(-350,-10,-30),Vector(150,20,30),"trigfix_antidelay_4");

        return;

    }

    for(local h;h=Entities.FindByName(h,"trigfix_antiboost");)

    {

        h.ValidateScriptScope();

        h.GetScriptScope().TouchedTrig<-function()

        {

            if(activator==null||!activator.IsValid()||activator.GetTeam()!=2||activator.GetHealth()<=0)return;

                //printl(activator.GetVelocity().z);    //debug print

            if(activator.GetVelocity().z > 600)            //ladder climb speed is 307, jump is ~270, 600 should be very safe

            {

                activator.SetOrigin(Vector(10700,-1842,-7329));

                activator.SetVelocity(Vector());

            }

        }

        EntFireByHandle(h,"AddOutput","OnStartTouch !self:RunScriptCode:TouchedTrig();:0:-1",0.00,null,null);

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

    }

    for(local i=1;i<=4;i++)

    {

        local h = Entities.FindByName(null,"trigfix_antidelay_"+i.tostring());

            if(h==null||!h.IsValid()){}else{h.ValidateScriptScope();h.GetScriptScope().i<-i;h.GetScriptScope().TouchedTrig<-function()

            {

                if(activator==null||!activator.IsValid()||activator.GetTeam()!=3||activator.GetHealth()<=0)return;

                if(i==4)EntFireByHandle(activator,"AddOutput","origin -12400 1881 -2832",0.00,null,null);

                else EntFireByHandle(activator,"SetHealth","-1",0.00,null,null);

            }

            EntFireByHandle(h,"AddOutput","OnStartTouch !self:RunScriptCode:TouchedTrig();:0:-1",0.00,null,null);

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

            if(i==3||i==4)EntFireByHandle(h,"Enable","",3.00,null,null);

        }

    }

    EntFire("lever_button12","AddOutput","OnPressed trigfix_antidelay_2:Enable::20:1",0.00,null);

    EntFire("lever_button12","AddOutput","OnPressed trigfix_antidelay_1:Enable::30:1",0.00,null);

}

//---->        prevents cheese-overdefending the Z-cage here:        setpos -9500 825 -2800;setang 25 0 0

function AntiZcageCheeseBoost()

{

    local cageboost_trig = ::TriggerCreate(Vector(-8960,837,-2923),Vector(),Vector(-10,-150,-50),Vector(10,150,50));

    cageboost_trig.ValidateScriptScope();

    cageboost_trig.GetScriptScope().Touch <- function()

    {

        if(activator==null||!activator.IsValid()||activator.GetHealth()<=0||activator.GetTeam()!=2)return;

        activator.SetOrigin(Vector(-9357,834,-2924));

        activator.SetVelocity(Vector(-1200,0,800));

        EntFireByHandle(activator,"RunScriptCode","if(self.GetOrigin().z > -2358)self.SetOrigin(Vector(-10325,834,-2924));",1.00,null,null);

        EntFireByHandle(activator,"RunScriptCode","if(self.GetOrigin().z > -2358)self.SetOrigin(Vector(-10325,834,-2924));",2.00,null,null);

        EntFireByHandle(activator,"RunScriptCode","if(self.GetOrigin().z > -2358)self.SetOrigin(Vector(-10325,834,-2924));",3.00,null,null);

    }

    cageboost_trig.GetScriptScope().Warning <- function()

    {

        local emsg = Entities.CreateByClassname("point_worldtext");

            emsg.SetOrigin(Vector(-9362,986,-2660));

            emsg.SetForwardVector(Vector(1,0,0));

            emsg.__KeyValueFromString("message","DEFENDERS WILL DIE - RUN AWAY");

            emsg.__KeyValueFromInt("textsize",17);

            emsg.__KeyValueFromVector("color",Vector(255,50,50));

        local emsg2 = Entities.CreateByClassname("point_worldtext");

            emsg2.SetOrigin(Vector(-9362,980,-2680));

            emsg2.SetForwardVector(Vector(1,0,0));

            emsg2.__KeyValueFromString("message","why? - because it's a snorefest, no more cheese!");

            emsg2.__KeyValueFromInt("textsize",10);

            emsg2.__KeyValueFromVector("color",Vector(150,150,150));

    }

    cageboost_trig.GetScriptScope().Warning2 <- function()

    {

        local emsg2 = Entities.CreateByClassname("point_worldtext");

            emsg2.SetOrigin(Vector(-8962,930,-2910));

            emsg2.SetForwardVector(Vector(1,0,0));

            emsg2.__KeyValueFromString("message","ZOMBIES - HUG THIS WALL TO BOOST!");

            emsg2.__KeyValueFromInt("textsize",10);

            emsg2.__KeyValueFromVector("color",Vector(255,0,0));

    }

    EntFireByHandle(cageboost_trig,"AddOutput","OnStartTouch !self:RunScriptCode:Touch();:0:-1",0.10,null,null);

    EntFireByHandle(cageboost_trig,"RunScriptCode","Warning();",0.20,null,null);

    EntFireByHandle(cageboost_trig,"RunScriptCode","Warning2();",20.20,null,null);

    EntFireByHandle(cageboost_trig,"Enable","",20.20,null,null);

}

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([""]);

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