I need some advice I started with a complicated idea which no surprise didn`t work first time and cut it back to basics .The mod premise was to add a dog that could be used to hunt rabbits so foraging find a stray works make stray your dog works play with dog works hunt with dog does not work. I cut the item to be hunted in this instance a hare to a minimum have working textures but all starts to go wrong here:
recipe Hunt with Your Dog
{
keep MSYourdog,
Twigs=4,
Result:Twigs,
Time:2000.0,
Category:Survivalist,
OnCreate:getHuntMSHare,
}
in game timer works but does keep the dog and get a twig but it will not kick into the server lua here:
--- HUNTING MOD LUAS ---
--Small Dog--
function getHuntMSHare (items, result, player)
local skill1 = player:getPerkLevel(Perks.Aiming);
local skill2 = player:getPerkLevel(Perks.Sneak);
local skill3 = skill1+skill2;
local hunt = skill3+ZombRand(40);
if hunt >= 38 then
player:getInventory():AddItem("MedievalSmithing.MSHare");
elseif hunt < 38 then
player:Say("Oh only a stick");
end
end
I have obviously missed something really simple but 12 hours of looking at this and still can not see it any help much appreciated