Jump to content
Zita

Need a script for contentbrowerhack

Recommended Posts

require "base/internal/ui/reflexcore"
-- we need to require this file, because there is some basic functionality
-- like shouldShowHUD(), Color() and NVG_* constants

--Materials with grids
local contentlistMaterialsWithGrids =
{
    "dev_aqua",
    "dev_aquadark",
    "dev_black",
    "dev_blue",
    "dev_bluedark",
    "dev_bluelight",
    "dev_green",
    "dev_greendark",
    "dev_greenlight",
    "dev_grey128",
    "dev_grey192",
    "dev_grey64",
    "dev_lime",
    "dev_magenta",
    "dev_magentadark",
    "dev_orange",
    "dev_orangedark",
    "dev_pink",
    "dev_pinkdark",
    "dev_purple",
    "dev_purpledark",
    "dev_red",
    "dev_reddark",
    "dev_white",
    "dev_yellow",
    "dev_yellowdark"
}

--Materials without grids
local contentlistMaterialsWithoutGrids =
{
    "dev_nogrid_aqua",
    "dev_nogrid_aquadark",
    "dev_nogrid_black",
    "dev_nogrid_bluedark",
    "dev_nogrid_bluelight",
    "dev_nogrid_green",
    "dev_nogrid_greendark",
    "dev_nogrid_greenlight",
    "dev_nogrid_grey128",
    "dev_nogrid_grey192",
    "dev_nogrid_grey64",
    "dev_nogrid_lime",
    "dev_nogrid_limedark",
    "dev_nogrid_magenta",
    "dev_nogrid_magentadark",
    "dev_nogrid_orange",
    "dev_nogrid_orangedark",
    "dev_nogrid_pink",
    "dev_nogrid_pinkdark",
    "dev_nogrid_purple",
    "dev_nogrid_purpledark",
    "dev_nogrid_red",
    "dev_nogrid_reddark",
    "dev_nogrid_white",
    "dev_nogrid_yellow",
    "dev_nogrid_yellowdark"
}

--Materials trims
local contentlistMaterialsTrims =
{
    "dev_bluelight_trim",
    "dev_blue_trim",
    "dev_greenlight_trim",
    "dev_green_trim",
    "dev_grey192_trim",
    "dev_orange_trim",
    "dev_purple_trim",
    "dev_red_trim",
    "dev_yellow_trim"
}

--Materials liquids
local contentlistMaterialsLiquids =
{
	"lava/lava",
	"slime/slime",
	"water/water"
}

--Materials light
local contentlistMaterialsLight =
{
	"dev_light_blue",
	"dev_light_green",
	"dev_light_magenta",
	"dev_light_orange",
	"dev_light_pink",
	"dev_light_purple",
	"dev_light_red",
	"dev_light_white",
	"dev_light_yellow"
}

local contentlistMaterialsIndustrial =
{
	"brick/brick_small",
	"concrete/concrete_01",
	"concrete/concrete_bunker_01",
	"fence/chainlink",
	"tiles/tiles",
	"wood/planks"
}

local comboWidth = 275;
local comboBoxMaterialsLiquids_Value = "lava/lava";
local comboBoxMaterialsTrims_Value = "dev_bluelight_trim";
local comboBoxMaterialsWithOutGrids_Value = "dev_nogrid_aqua";
local comboBoxMaterialsWithGrids_Value = "dev_aqua";
local comboBoxMaterialsLight_Value = "dev_light_blue";
local comboBoxMaterialsIndustrial_Value = "brick/brick_small";

PestilenceMaterialsHack =
{
	comboBoxDataMaterialsWithGrids = {},
	comboBoxDataMaterialsWithOutGrids = {},
	comboBoxDataMaterialsTrims = {},
	comboBoxDataMaterialsLiquids = {},
	comboBoxDataMaterialsLight = {},
	comboBoxDataMaterialsIndustrial = {},
	canPosition = true
	--canHide = false,
	--isMenu = true
};
registerWidget("PestilenceMaterialsHack");

function PestilenceMaterialsHack:draw()
        if shouldShowHUD() then return end;

        nvgBeginPath();
        nvgRect(-120,-30,540,480);
        nvgFillColor(Color(20,20,20,128));
        nvgFill();
 
        nvgFontSize(45);
		nvgFillColor(Color(255,255,255));
        nvgTextAlign(NVG_ALIGN_LEFT, NVG_ALIGN_MIDDLE);
        nvgText(0, 0, "Pestilence's Materials Hack");
		
		nvgFontSize(35);
		nvgTextAlign(NVG_ALIGN_RIGHT, NVG_ALIGN_MIDDLE);
		
		if uiButton("NoLight", nil, comboWidth + 25, 400, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial " .. "internal/editor/textures/editor_nolight");
		end
		
		nvgText(0, 360, "Industrial");
	    comboBoxMaterialsIndustrial_ui = uiComboBox(contentlistMaterialsIndustrial, comboBoxMaterialsIndustrial_Value, 15, 340, comboWidth, self.comboBoxDataMaterialsIndustrial);
		comboBoxMaterialsIndustrial_Value = comboBoxMaterialsIndustrial_ui;
		if uiButton("Set", nil, comboWidth + 25, 340, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial structural/industrial/materials/" .. comboBoxMaterialsIndustrial_ui);
		end
		
		nvgText(0, 300, "Light");
	    comboBoxMaterialsLight_ui = uiComboBox(contentlistMaterialsLight, comboBoxMaterialsLight_Value, 15, 280, comboWidth, self.comboBoxDataMaterialsLight);
		comboBoxMaterialsLight_Value = comboBoxMaterialsLight_ui;
		if uiButton("Set", nil, comboWidth + 25, 280, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsLight_ui);
		end
		
		nvgText(0, 240, "Liquid");
	    comboBoxMaterialsLiquids_ui = uiComboBox(contentlistMaterialsLiquids, comboBoxMaterialsLiquids_Value, 15, 220, comboWidth, self.comboBoxDataMaterialsLiquids);
		comboBoxMaterialsLiquids_Value = comboBoxMaterialsLiquids_ui;
		if uiButton("Set", nil, comboWidth + 25, 220, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial environment/liquids/" .. comboBoxMaterialsLiquids_ui);
		end
		
		nvgText(0, 180, "Trim");
	    comboBoxMaterialsTrims_ui = uiComboBox(contentlistMaterialsTrims, comboBoxMaterialsTrims_Value, 15, 160, comboWidth, self.comboBoxDataMaterialsTrims);
		comboBoxMaterialsTrims_Value = comboBoxMaterialsTrims_ui;
		if uiButton("Set", nil, comboWidth + 25, 160, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsTrims_ui);
		end
		
		nvgText(0, 120, "NoGrid");
	    comboBoxMaterialsWithOutGrids_ui = uiComboBox(contentlistMaterialsWithoutGrids, comboBoxMaterialsWithOutGrids_Value, 15, 100, comboWidth, self.comboBoxDataMaterialsWithOutGrids);
		comboBoxMaterialsWithOutGrids_Value = comboBoxMaterialsWithOutGrids_ui;
		if uiButton("Set", nil, comboWidth + 25, 100, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsWithOutGrids_ui);
		end
		
		nvgText(0, 60, "Grid");
	    comboBoxMaterialsWithGrids_ui = uiComboBox(contentlistMaterialsWithGrids, comboBoxMaterialsWithGrids_Value, 15, 45, comboWidth, self.comboBoxDataMaterialsWithGrids);
		comboBoxMaterialsWithGrids_Value = comboBoxMaterialsWithGrids_ui;
		if uiButton("Set", nil, comboWidth + 25, 45, 100, 35, UI_COLOR_RED) then
		consolePerformCommand("me_activematerial structural/dev/" .. comboBoxMaterialsWithGrids_ui);
		end
		
    end

77e47bd7ff.jpg

 

http://puu.sh/i7wdm/152b4bee1d.lua

 

Im no lua coder!.. and im not good at sizing stuff this will most likey have bad coding

hope this helps someone other then me though

you can change it as you see fit

enjoy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×