I think you should inject into stop() event in reading time action.
But personally I don't like this idea. If you want it to be more rare you may just make it more rare. Or you could add it to recipe in your mods like I did in mods "Cure Zombie Virus" and "Nocturnal Zombies Fixed".

For example:
local bd;
local function fnEveryTenMinutes()
if not bd then
bd = getPlayer():getBodyDamage();
end
.....
end
Events.EveryTenMinutes.Add(fnEveryTenMinutes);
I think it should reduce overhead on api calls.

My character have no sleep traits but he sleeps 12-15 hours (in multiplayer) if I don't interrupt him.
And it does not matter if I am surrounded by zombies or in moving car. I sleep a lot in any situation.
Sometimes I even feel a strong panic during sleep.
Is it OK?

You should find group of people who will start simultaneously.
Joining old world without loot is not fun, but playing in new world with high loot is not fun too. So only one option is struggle for resources from the start of the server.
P.S. I would join but I have high ping.

-- wash the clothing!
function WashMyClothing_OnCreate(items, result, player, selectedItem)
for i=0,items:size() - 1 do
local item = items:get(i);
if instanceof (item, "Clothing") then
local name = item:getType();
if DIRTY_TO_NORMAL[name] then
print("New item:",DIRTY_TO_NORMAL[name]);
local new_item = player:getInventory():AddItems(DIRTY_TO_NORMAL[name], 1);
if new_item then
print("new_item",tostring(new_item));
local color = item:getColor()
print("color",tostring(color));
new_item:setColor(color); -----> ERROR HERE?!
end
return;
end
end
end
end
Crash log:
I can't understand what's wrong. "new_item" is valid and "color" is valid too. So why item:setColor(color) causes an error?

The character must learn only ONE of the recipes with the same name.
Now I have:
recipe My Recipe 1
{
Apple,
....
Result: myItem,
...
}
recipe My Recipe 2
{
Banana,
...
Result: myItem,
...
}
As a result I have TWO recipes with different names "My Recipe 1" and "My Recipe 2" with numbers in its names.
But these recipes must have the same name, because they produce the same item. For example, "My Recipe".
And if I do so, I will have an issue. For example:
item myMagazine
{
Type = Literature,
TeachedRecipes = My Recipe,
...
}
This magazine will teach all recipes with equal name.
How I can make two magazines with different recipes but with the same name?

You can't set fire to a car.
But if you are in a car, you may still get a burn.
1) Drive so you (while driving) are over campfire.
or
2) Drive so you (while driving) are over burning zombie or another burning item.
Looks weird.

I know that there is OnTest function.
But it takes only item as argument. It doesn't access to the character who is trying to use the recipe.
My recipe is for making a book. And I want to disable it if a character (in multiplayer) has "Illiterate" trait. Because it means that character can't write (not only read).