Ok. Being unable to get a handle on writing game logic, I found i still manage to write engine logic. The mind is a mysterious thing.
So I just added the possibility to use states in script for random ranges and target range, so now I can increase a value in script and increase the chance of something happening.
I also add something I wanted for a while the "call" cmd, that allows me to call a specific file and validate, then execute all commands in it.
That makes it possible to make some shared logic for things that might happen in different locations.