[ESX/QB/OX] Moonshine - Start your adventure now!

:orange_book: About script

This script puts you in the role of a moonshine maker.
It offers a wide range of possibilities in the search for a recipe, but at the same time also production, which may not be easy at all.
This script has a little story that you can relate to.

:arrow_forward: Preview

I recommend watching the full video to understand how everything works.

Youtube preview

:question:You want to know more about the script?

How does it work?

First, you need to purchase or find a recipe - It’s up to you how you choose to do it. Of course, you can cook without a recipe, but there’s a high chance you won’t cook it correctly. So, when you find a clue that you can adjust in config.lua, you will then find a buried recipe and cook according to it.

If you cook it correctly, you can sell moonshine to NPCs.

Cooking itself Cooking works simply.

You gradually add ingredients, and the production process increases accordingly. When you add wood, a fire is created, and the fire increases the temperature. If there is already a fire and you add water, steam begins to form, which you must release. If you don’t release the steam, the cooker will start to break, and you’ll have to repair it.

There are 2 types of selling

Small shops, where you can sell for smaller amounts, or a big deal, which has a server-side limitation, but you can also be abushed.

If you want
Also, you can only create static brewhouses and players can’t place them.

:gear: Configuration of absolutely everything.

config.lua
Config  = {}


Config.AllowPlayersPlaceBrewlery = true
Config.StaticBrewleryPoints = {
    -- vector3(x, y, z),
    vector3(1451.0593, 3754.3269, 31.9342),
}

Config.BrewlerySpawnStats = {
    temp = 0, -- Temperature is important to maintain quality and warmth. I recommend keeping it between 70-90 or Config.Recepie
    water = 0, -- Water must be greater than 50 or Config.Recepie
    herbs = 0, --Herbs for proper production must number between 7-9 or Config.Recepie
    steam = 0, -- If the steam/pressure is greater than 80 then the steam must be dropped or it will reduce in condition and may break.
    corn = 0, -- For proper cooking, you need 10-12 corn or Config.Recepie
    spice = 0, -- Spices need 2-3 or Config.Recepie
    moonshine = 0, -- Moonshine will only start to rise if progress is greater than 50 or Config.Recepie
    litres = 0,  -- Number of litres
    condition = 60, -- Condition determines condition. If you don't relieve the pressure, it drops.
    fire = 0, -- Check if there is a fire, min 5
    broken = false, -- Guess lol
    progress = 0, -- This is important! Please do not change as it will reset and clean the contents of the distillery.
}

-- How much litres you need for one bottle?
Config.LitresNeeded = 0.5

-- Ideal numbers for the recipe.
Config.Recepie = {
    temp  = {
        min = 70,
        max = 90
    },
    herbs = {
        min = 7,
        max = 9
    },
    corn = {
        min = 10,
        max = 12,
    },
    spice = {
        min = 2,
        max = 4,
    },
    moonshine_producition_start = 50,
    progress_production_start = 50,
    steam_destroying_effect = 80,
}

Config.ProgressUpdateTime = 60000
-- The values below are always once per progress, which means that according to Config.ProgressUpdateTime
Config.Progress = {
    fire_minus = 0.5, -- The fire is diminishing by
    temp_less_than_70_plus = 10, -- If the temperature is less than 70, the temperature rises
    temp_more_than_70_plus = 0.5, -- If temp more than 70 add to temp 
    remove_water = 0.5, -- Remove water every progress run
    add_stream = 3, -- Add steam every progress run
    remove_condition = 10, -- This if steam more than Config.Recepie.steam_destroying_effect
    add_litres = 0.2, -- If all the conditions of correct production.
    add_progress = 2,  -- If all the conditions of correct production.
    -- If progress == 100 removes all the herbs, corns and spices
    remove_temp_if_not_fire = 10, -- Remove the fire if there is no wood.
    quality = 0, -- Bad < 0 > Good -- THIS IS INVISIBLE VALUE FOR PLAYER
} 


Config.RiddleToFindRecepie = "Where the Alamo sea touches land between the two roads by the stone the waves made sounds."

Config.RecepieChest = vector3(1059.2573, 4374.6162, 31.8563)
Config.RecepieFakeLocations = {
    vector3(0,0,0)
}
Config.RecepieFakeItem = "garbage"

Config.BrewleryPlaceEverywhere = false -- If false line down
Config.BrewleryAllowCollision = true -- If someone place on road
-- or 
Config.BrewleryLocationsWhereCanBePlace = { -- This is good if the players on your server are idiots.
    {coords = vector3(1412.8130, 3813.5234, 32.3411), radius = 150.0},
    {coords = vector3(2206.9404, 5603.0254, 53.6828), radius = 150.0},
    {coords = vector3(1450.9263, 6349.4512, 23.7800), radius = 100.0},
    {coords = vector3(-815.0569, 5753.5576, 6.2454), radius = 150.0},
    {coords = vector3(56.7009, 3705.1948, 39.7550), radius = 200.0},
    {coords = vector3(1873.7515, -1950.3777, 169.8864), radius = 500.0},
    {coords = vector3(-205.1444, -2571.3630, 6.0141), radius = 500.0},
    {coords = vector3(2711.0500, -721.3223, 17.6227), radius = 500.0},
    {coords = vector3(-288.4639, 1652.3051, 299.9447), radius = 500.0},
    {coords = vector3(1900.2440, 102.3601, 146.7260), radius = 800.0},
    {coords = vector3(-1956.7241, 3868.1040, 230.5955), radius = 700.0},
    {coords = vector3(487.6240, 5511.5605, 774.1483), radius = 700.0},
}

Config.Items = {
    water = "water",
    moonshine = "moonshine",
    badmoonshine = "badmoonshine",
    brewlery = "moonshine_brewlery",
    wood = "wood",
    corn = "moonshine_corn",
    herb = "moonshine_herb",
    spice = "moonshine_spice",
    recepie = "moonshine_recepie",
    help = "moonshine_help",
    repair = "moonshine_repair_kit",
    empty_bottle = "bottle",
}

Config.ProgressBarTime = 10000 -- This is for long actions
Config.ProgressBarTimeShort = 3000 -- This is for short actions / Add ingredience

-- Shop

Config.ShopCoords = vector4(2253.3806, 5601.7988, 54.6757, 262.8599)
Config.Shop = {
    {
        label = "Spice",
        itemName = "moonshine_spice",
        count = 5,
        price = 500
    },
    {
        label = "Shovel",
        itemName = "shovel",
        count = 1,
        price = 1000
    },
    {
        label = "Hint",
        itemName = "moonshine_recepie_help",
        count = 1,
        price = 5000
    },
    {
        label = "Moonshine brewlery",
        itemName = "moonshine_brewlery",
        count = 1,
        price = 20000
    },
    {
        label = "Wood",
        itemName = "wood",
        count = 1,
        price = 100
    },
    -- Uncomment this unless you want to use other things to get wood.
    --[[
    {
        label = "Wood",
        itemName = "wood",
        count = 1,
        price = 100
    },
    ]]--
}

--- Fields

Config.FieldsLoadTime = 5000
Config.FieldsDistanceLoad = 50.0


Config.Fields = {
    {
        label="Corn field",
        pos = vector3(2596.4617, 4884.4619, 34.7651),
        spawnModel = "prop_veg_corn_01",
        spawnRadius = 40.0,
        spawnLimit = 3,
        recivieItem = Config.Items.corn,
        count = {
            min = 1,
            max = 2,
        }
    },
    {
        label="Herb field",
        pos = vector3(3675.0547, 4941.0396, 16.7652),
        spawnModel = "prop_plant_fern_01b",
        spawnRadius = 40.0,
        spawnLimit = 3,
        recivieItem = Config.Items.herb,
        count = {
            min = 1,
            max = 2,
        }
    },

}


Config.MissionBigSell = {
    mission_start_ped = vector4(2942.1707, 4634.0073, 48.7199, 359.8587),
    mission_land_pos = vector3(3320.2676, 5145.8306, 18.2824),
    change_for_bandits = 100, -- Bandits + trap so deal is ruined
    bandits_spawn_cords = vector4(3261.9492, 5197.4531, 19.8662, 177.2272),
    big_deal_moonshine_count_needeed = 30,
    big_deal_price_for_one = 500,
    server_side_allow_again = 180, -- Minutes
} 


Config.SmallSellCountLimit = 3
Config.SmallSells = {
	{
		target = vec3(1967.0925, 4634.1919, 41.1017),
		price = 200,
		chanceForPD = 40,
	},

	{
		target = vec3(1701.1957, 4865.4331, 42.0198),
		price = 250,
		chanceForPD = 10,
	},

}


Config.UseClientEvents = false

if not IsDuplicityVersion() then
    function DispatchCall(type, coords)
        -- Types: smalldeal/bigdeal
        -- coords: Player coords
        if type == "smalldeal" then
            print("Small deal dispatch")
        elseif type == "bigdeal" then
            print("Big deal dispatch")
        end
    end
end

:shopping_cart: Store

Escrow: https://store.polisek.io/package/6185319
Source: https://store.polisek.io/package/6185333

:heart: Check my other resources

Mower job
Job system
Weed growing

Code is accessible No
Subscription-based No
Lines (approximately) 1000+
Requirements ox_lib
Support Yes
4 Likes

Another great release :goat:

1 Like