Customize the skill check triggered when player is maintaining a still. Requires a boolean return (true/false)
-- This function is called when the player is maintaining the still
---@return boolean -- Return true if the player passed the skillcheck
function StillSkillcheck()
-- https://github.com/Legends-Rising/legends-keypress
return exports['legends-keypress']:startkp(math.random(8, 10), math.random(6, 8))
end
Customize the skill check triggered when player is stirring a mash. Requires a boolean return (true/false)
-- This function is called when the player is mixing the mash
---@return boolean -- Return true if the player passed the skillcheck
function MashSkillcheck()
-- https://github.com/Legends-Rising/legends-keypress
return exports['legends-keypress']:startkp(math.random(15, 20), math.random(12, 16))
end
Equipment Placement
This function is triggered when a player attempts to place equipment. It will pass a string 'Still' or 'Mash' and expects a boolean return. You can use this to prevent players from placing equipment for whatever reason that you decide.
-- This funnction is called before equipment is placed
---@param equipmentType string -- The type of equipment being placed ('Still' | 'Mash')
function CanPlaceEquipment(equipmentType)
if equipmentType == 'Still' then
return true
end
if equipmentType == 'Mash' then
return true
end
end
Can Interact
This function is triggered when someone completes a UIPrompt provided by equipment they're interacting with. Expects a boolean returned.
-- This function is called before equipment is interacted with (Only triggered when UIPrompt is completed)
---@return boolean -- Return true if the player can interact with the equipment
function CanInteractWithEquipmennt()
return true
end