๐ด Horse breeding โ
Documentation relating to the jo_stable_breeding add-on for Stable script.
1. Installation โ
WARNING
Stable script is required to use this add-on
To install jo_stable_breeding:
- Drag and drop the resource into your resources folder
- jo_stable_breeding
- Add this ensure in your server.cfg after
ensure kd_stableensure jo_stable_breeding
Congratulation, the Horse breeding add-on is ready to be used!
2. Usage โ
Go in the stable to start the breeding. You can select parents between your own horses.
3. Config.lua file โ
Loading configuration...
4. For developers โ
Filters are the new way to modify data used by the script. These filters are fired at a specific point in time during the execution of the script. But contrary to events, filters are synchronous.
- Syntax:
lua
-- @param <actionName> - name of the action
-- @param <argumentList> - list of arguments which are passed
exports.jo_stable_breeding:registerFilter(<actionName>, function(variable)
-- Add your new data here
return variable -- Don't forget to return the value
end)Client Restrict the breeding โ
Use it to restrict who can see the "Breeding" button in the stable menu
lua
-- @param canBreed - boolean
exports.jo_stable_breeding:registerFilter('canOpenBreedingMenu', function(canBreed)
return canBreed
end)Example of job lock for VORP
lua
AllowedJobs = {
rhdHorsetrainer = true,
blwHorsetrainer = true,
valHorsetrainer = true,
}
exports.jo_stable_breeding:registerFilter('canOpenBreedingMenu', function(canBreed)
local job = LocalPlayer.state.Character.Job
if AllowedJobs[job] then
return canBreed
else
jo.notif.rightError("You don't have the right job to tame wild horses")
return false
end
end)