It's close, but still not quite right. Using the mouse polygon "line" and testing some edge cases it misses completely, and now lineseg-to-lineseg doesn't work around the edges, none highlight red if the mouse is "line".

Rather than posting more images illustrating the failures, here's my current purely mSL implementation of $onpoly() and $inpoly().

If you're using "/onpolytest" you must rename any traces of $onpoly and $inpoly to $mslonpoly and $mslinpoly to see the differences between your native identifiers and the mSL ones.

These are coded to behave like the old $onpoly and $inpoly and assumes you only pass the points that make up the polygon (repeating NONE) in a clockwise or counter-clockwise fashion. In order to step around the polygon, it makes a wrap-around by appending the 1st point to the end of the polygon definition.

Picture a square/rectangle. You have 4 points that make up the shape (the corners) we'll call them a, b, c and d.
Code:
a-----b
|     |
|     |
d-----c

In order to step around this shape, we need to trace the points. a-b, b-c, c-d, and lastly d-a. This is why the 1st point is appended to the end.

Code:
alias MslInPoly {
  ;=== setup variables and complete polygon
  var %cn = 0 , %x = $1 , %y = $2 , %size = $0 , %poly = $3- $3-4

  if (%size > 2) { 
    var %i = 0 , %j = %size - 2
    while (%i < %j) {
      var %ax = $gettok(%poly,$calc(%i + 1),32) , %ay = $gettok(%poly,$calc(%i + 2),32) , %bx = $gettok(%poly,$calc(%i + 3),32) , %by = $gettok(%poly,$calc(%i + 4),32)

      ;=== Condition1 = Upward Crossing, Condition2 = downward crossing
      if (%ay <= %y && %by > %y) || (%ay > %y && %by <= %y) { 

        ;=== Compute the actual edge-ray intersect x-coordinage
        var %vt = $calc((%y - %ay) / (%by - %ay))

        ;=== Test for valid crossing
        if (%x < $calc(%ax + %vt * (%bx - %ax))) { inc %cn } 

      }
      inc %i 2
    }
  }
  var %cn = $and(%cn,1)
  if (%cn > 0) { return $true }
}

alias MslOnPoly {
  ;=== Setup variables
  var %s1 = $1 , %s2 = $2 , %p1e = $1 * 2 , %p1 = $gettok($3-,$+(1-,%p1e),32) , %p2 = $gettok($3-,$+($calc(%p1e + 1),-),32)

  ;=== Early escape test, if either polygon is fully contained in the other, any and every point will be inside the other. Knowing this, we don't need to test them all, just one.
  var %p1x = $gettok(%p1,1,32) , %p1y = $gettok(%p1,2,32) , %p2x = $gettok(%p2,1,32) , %p2y = $gettok(%p2,2,32)
  if ($mslInPoly(%p1x,%p1y, [ $regsubex(%p2,/ /g,$chr(44)) ] ) || $mSLInPoly(%p2x,%p2y, [ $regsubex(%p1,/ /g,$chr(44)) ] )) { return $true }

  ;=== Complete the polygons
  var %p1 = %p1 $gettok(%p1,1-2,32) , %p2 = %p2 $gettok(%p2,1-2,32)

  ;=== Else: Iterate line segments and check for intersection
  var %i = 0
  while ($calc(%i / 2) < %s1) {
    var %p1ax = $gettok(%p1,$calc(%i + 1),32) , %p1ay = $gettok(%p1,$calc(%i + 2),32)
    var %p1bx = $gettok(%p1,$calc(%i + 3),32) , %p1by = $gettok(%p1,$calc(%i + 4),32)
    var %j = 0
    while ($calc(%j / 2) < %s2) {
      var %p2ax = $gettok(%p2,$calc(%j + 1),32) , %p2ay = $gettok(%p2,$calc(%j + 2),32)
      var %p2bx = $gettok(%p2,$calc(%j + 3),32) , %p2by = $gettok(%p2,$calc(%j + 4),32)

      ;=== LineSeg to LineSeg intersection test
      if ($intersect(%p1ax,%p1ay,%p1bx,%p1by,%p2ax,%p2ay,%p2bx,%p2by,ll)) { return $true }
      inc %j 2
    }
    inc %i 2
  }
}