Convert UDP packet script to TCP packet

Malibux:
... when i send a tcp packet to the arduino i cant get it to do anything..

This is because you need to establish a tcp connection before sending any packet.
Look at the EthernetServer class, there are useful examples of how you can have the Arduino wait for a connection request, get the client data, send a reply, close the connection.