I think he means with spells, not staff attacks. Do ranged staff attacks have a to hit chance?
Well, I do not think, there is something like ranged staff attacks

If he means spells, then the chance for the spell to be successfull is calculated as follows:
Each spell (afaik) has a priori a 100% chance to work. Then you get a bonus from your intelligence value - so it is possible to have a chance of say 135%. And then, the chance is reduced by the willpower of the opponent.
So, it is:
100% + x * Intelligence - y * Willpower.