Well, I don't know much about I.A., inferences, heuristics and so on and I don't know if CEL is offering something to help (depending the complexity you can search for algorithms on the net, like pathfinding and so on).
I find simple to use a states logic with "PcProperties".http://crystalspace3d.org/cel/docs/online/api-1.2/structiPcProperties.html
You can store the actual state of the entity, like "walking", "waiting", "pissing" and program the actions for the times you set a new state:
// after telling an entity to walk
if npc1.oldstate="pissing" do
Nothing, wait a moment just in case
else if npc1.oldstate=waiting do
If you are doing something simple I think that the idea works.