Mark is correct. When shipping gets complicated it is usually best resolved by doing tables and looking up rates from the database.
Then you store the shipping amount in the Session and just use that session variable in the eCart shipping rule as the amount when it exists.
If weights aren't enough you could store the item type in the database and have different shipping charges based on both type and weight when necessary.
This is something we could help with in a premier support ticket.