If it's just checking whether or not they intersect, then this might do the trick:
function LineIntersect(x1, y1, x2, y2, x3, y3, x4, y4)
`Vectors
a as double integer
b as double integer
c as double integer : `Usually produces large numbers
x = x1 - x3
y = y3 - y1
x1 = x2 - x1
y1 = y1 - y2
x2 = x4 - x3
y2 = y3 - y4
`Calculate coefficients
a = (x2 * y) - (x * y2)
b = (x1 * y) - (x * y1)
c = (x2 * y1) - (x1 * y2)
`Checks
if a * (a + c) >= 0 then exitfunction 0
if b * (b + c) >= 0 then exitfunction 0
endfunction 1
I wrote it long ago though. I'm not sure how well it works... If you wish to find the intersection point, then you have to parametrize the line, like in these codes:
http://forum.thegamecreators.com/?m=forum_view&t=99986&b=6
Cheers!
Sven B