DONE!!!! Interesting enough, both: "return Math.floor(p/s);" and "return Math.floor(p * n)" yielded the same outcome... I stuck to second one, in order to get rid of "s" calculation!!!
1M Thanks you guys!!! Uffff... after all this mindblowing math I hadn't touched since high-school I can move on to further customization... You can see the final demo at: http://ivanicus.com/moo/ The script still needs some more optimization I guess, but at least its a proof of concept already and not just a dream.... :-) ps. I dont know why there are still people whining about not getting any help from this "l33tist" community <pun intended> ps2. Guillermo and Nathan, how do you call in english this kind of calculation??? I spent hours in internet finding everthing but what I needed... :-( [wrong search terms I guess!!!!]
