08 And now – how do I obfuscate the final zone?

Best by not mentioning the coordinates in either pictures, descriptions, or text. What is a problem, however, for the final zone. It should exist.

Hiding the Final-Zone

Yes – this is also possible – with LUA. But to be honest, if you take the trouble and read the LUA source code carefully, you will find it here too.

The effort is limited and should be comprehensible even for inexperienced users. The following example uses Urwigo. But it can also be applied to others.

  • First you need the coordinates of the final – in decimal format: DEC: DD.DDDDDD°
  • Now you define the zone for the final. You can choose the coordinates of the zone on the map – because they will be overwritten at runtime of the cartridge!
    I assume that the zone of the final is both inactive and invisible – after all, it should not be found by chance.
  • Next you display it via “View:Lua User Functions“.
  • In this tab you define two functions
  • One function calculates an octagonal zone around a center point.
function GetZonePoints(refPt)
  local dist = Wherigo.Distance(2, 'm')
   local pts = {
    Wherigo.TranslatePoint(refPt, dist, 0),
    Wherigo.TranslatePoint(refPt, dist, 45),
    Wherigo.TranslatePoint(refPt, dist, 90),
    Wherigo.TranslatePoint(refPt, dist, 135),
    Wherigo.TranslatePoint(refPt, dist, 180),
    Wherigo.TranslatePoint(refPt, dist, 225),
    Wherigo.TranslatePoint(refPt, dist, 270),
    Wherigo.TranslatePoint(refPt, dist, 315),
  }
  return pts
end
  • A second function calculates the zone for the final.
function calculateFinal()
  p = ZonePoint(52.471333, 13.119283, 0) 
  zFC.active = false
  zFC.OriginalPoint = p
  zFC.Points = GetZonePoints(p)
end

  • Finally, this function calculateFinal() is called and executed when the cartridge is started. For this purpose Urwigo provides the graphical command Lua User Code