Creating a custom transaction? I am trying to create a custom transaction. I am using c# and I will code the signature code myself since no library currently allows this. The transaction involves 3 players; a buyer, a seller and an escrow. The transaction must do the following.

Transaction skeleton:

1. The buyer will send 2BTC to the escrow.

2. The seller will sends 2BTC to the escrow.

3. At a later point in time, the buyer may choose to 
        send 1BTC to the seller, or not.

4. If he does, the BTC placed in the escrow are 
        returned (2BTC are kept by the escrow 
        as commission).

5. If he does not, the BTC in the escrow are lost.


To implement this, it gets complicated. The escrow would need to run a daemon in a loop that would check to see which transaction are been placed in order to return the BTCs correctly. 

Is there a way to use the advanced scripting and contract capabilities of bit coin to make it so the escrow doesn't have to run a daemon, and to simply the process as much as possible?
The prices you present are pretty steep, but hopefully this is just for clarity;).

If you don't want to run a daemon yourself in a loop, you can always try using Strongcoin's API:

https://strongcoin.com/blog/bitcoin_micropayments_with_strongcoin

It sends notification to your website when a transaction that you are interested in appears (whether it is to one of your addresses or anyone else's). It might not necessarily be exactly what you want (say, if you require 6 confirmations), but it definitely is a good place to start if you just want some notifications.