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:
Discord: luffaren
================================================================
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
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
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.
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.
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.
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.
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.
================================================================
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.
================================================================
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)...
EntFireByHandle(self,"RunScriptCode","SoloFagsBegone_Init();",2.00,null,null);
EntFire("server","Command","say BOOBIES",10.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)...
}
::GetDistance<-function(v1,v2){return sqrt((v1.x-v2.x)*(v1.x-v2.x)+(v1.y-v2.y)*(v1.y-v2.y)+(v1.z-v2.z)*(v1.z-v2.z));}
//---------------------> S.F.B = SOLO FAGS BEGONE
sfb_tickrate <- 0.50;
sfb_fag_threshold <- 10;
sfb_teamwin_count <- 15;
sfb_zombies_top_height <- 2750; //og:2850
sfb_hide_height <- 2600; //og:2500
sfb_started <- false;
sfb_zombies_top <- false;
sfb_enough_survivors <- false;
sfb_enough_survivors_calculated <- false;
function SoloFagsBegone_Init(){newthread(_SoloFagsBegone_Init.bindenv(this)).call();}
function _SoloFagsBegone_Init()
{
sfb_started = false;
sfb_zombies_top = false;
sfb_enough_survivors = false;
sfb_enough_survivors_calculated = false;
EntFire("break_mideneding","AddOutput","OnBreak luffarenmapsplugin_manager:RunScriptCode:SoloFagsBegone_Start();:0:-1",0.00,null);
}
function SoloFagsBegone_Start(){newthread(_SoloFagsBegone_Start.bindenv(this)).call();}
function _SoloFagsBegone_Start()
{
if(sfb_started)
return;
sfb_started = true;
EntFire("trigger_teleport","AddOutput","OnStartTouch luffarenmapsplugin_manager:RunScriptCode:SoloFagsBegone_Teleported();:0:-1",0.00,null);
EntFireByHandle(self,"RunScriptCode","SoloFagsBegone_Tick();",sfb_tickrate,null,null);
for(local h;h=Entities.FindByClassname(h,"player");)
{
if(h==null||!h.IsValid()||h.GetTeam()!=3||h.GetHealth()<=0)
continue;
h.ValidateScriptScope();
h.GetScriptScope().sfb_solofag <- 0;
}
}
function SoloFagsBegone_Tick(){newthread(_SoloFagsBegone_Tick.bindenv(this)).call();}
function _SoloFagsBegone_Tick()
{
EntFireByHandle(self,"RunScriptCode","SoloFagsBegone_Tick();",sfb_tickrate,null,null);
for(local h;h=Entities.FindByClassname(h,"player");)
{
if(h==null||!h.IsValid()||h.GetHealth()<=0)
continue;
if(h.GetTeam()==2 && !sfb_zombies_top)
{
if(h.GetOrigin().z > sfb_zombies_top_height)
sfb_zombies_top = true;
continue;
}
if(h.GetTeam()!=3)
continue;
if(h.GetOrigin().z > 12000)
continue;
h.ValidateScriptScope();
if(!("sfb_solofag" in h.GetScriptScope()))
h.GetScriptScope().sfb_solofag <- 0;
if(sfb_zombies_top)
{
if(h.GetOrigin().z <= sfb_hide_height)
h.GetScriptScope().sfb_solofag++;
else if(::GetDistance(h.GetOrigin(),Vector(-2023,1607,3008)) < 300 &&
h.GetOrigin().z > 2940 && h.GetOrigin().z < 3000
&& h.GetOrigin().y < 1650 && h.GetOrigin().y > 1530)
h.GetScriptScope().sfb_solofag++;
else if(h.GetOrigin().z > 2490 && h.GetOrigin().z < 3150
&& h.GetOrigin().y < 1830)
h.GetScriptScope().sfb_solofag++;
else if(h.GetOrigin().z >= 2500 && h.GetOrigin().z < 2620
&& h.GetOrigin().x > -920)
h.GetScriptScope().sfb_solofag++;
else if(h.GetOrigin().z >= 2000 && h.GetOrigin().z < 3000
&& h.GetOrigin().x < -2250)
h.GetScriptScope().sfb_solofag++;
else if(h.GetOrigin().z >= 2000 && h.GetOrigin().z < 3000
&& h.GetOrigin().y > 3465)
h.GetScriptScope().sfb_solofag++;
}
if(!sfb_enough_survivors && h.GetOrigin().z >= 5000 && h.GetScriptScope().sfb_solofag >= sfb_fag_threshold)
{
if(!sfb_enough_survivors_calculated)
{
sfb_enough_survivors_calculated = true;
local survivor_count = 0;
for(local hh;hh=Entities.FindByClassname(hh,"player");)
{
if(hh==null||!hh.IsValid()||hh.GetTeam()!=3||hh.GetHealth()<=0||hh.GetOrigin().z < 4600)
continue;
survivor_count++;
}
if(survivor_count >= sfb_teamwin_count)
sfb_enough_survivors = true;
if(sfb_enough_survivors)
continue;
}
local diddled = false;
if(h.GetOrigin().x < -905 && h.GetOrigin().x > -1138)
{h.SetOrigin(Vector(-1220,h.GetOrigin().y,4999));h.SetVelocity(Vector(0,0,-500));diddled=true;}
else if(h.GetOrigin().x > -2176 && h.GetOrigin().x < -1928)
{h.SetOrigin(Vector(-1875,h.GetOrigin().y,4999));h.SetVelocity(Vector(0,0,-500));diddled=true;}
if(diddled)
{
//local delay = 0.00 + sfb_tickrate;
//delay *= 3.10;
//EntFireByHandle(h,"RunScriptCode","sfb_solofag <- 0;",delay,null,null);
}
}
}
}
function SoloFagsBegone_Teleported()
{
if(caller.GetName()=="toastend_teleport")
return;
if(!sfb_started||activator==null||!activator.IsValid()||activator.GetTeam()!=3||activator.GetHealth()<=0)
return;
activator.ValidateScriptScope();
activator.GetScriptScope().sfb_solofag <- (10 + sfb_fag_threshold);
}
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: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:36935027","STEAM_1:0:40225637","STEAM_1:0:73964
697","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","STEAM_1:1:232637165","STEAM_1:1:20450857","ST
EAM_1:1:94436119","STEAM_1:0:513101242","STEAM_1:1:450658765","STEAM_1:0:534443260","STEAM_1:0:737862615","STEAM_1:0:225146037","STEAM_1:1:435443801","STEAM_1:0:80773872","STEAM_1:0:142970189"]);
CDATA.push(["IDENTIFIER","data1","data2","data3"]);
CDATA.push([""]);
-------------------------------------------------------------------------------------------------------------