Jump to content

Checkpoint reorderererer


Recommended Posts

Did you ever create this Aeron? I asked if you could/would some time back but forgot all about it until wanting to reverse the checkpoints on a couple of races earlier tonight.

To jog your memory it was a script/app to take the checkpoints in a particular race and reverse thier order entirely.

Link to comment

Bump's memory has holes:

alias invert {
 var %a = 1,%b = $lines($1-),%c,%d = 0,%e,%f = $remove($1-,.map) $+ _inv.map
 while (%a <= %b) {
   %c = $read($1-,nt,%a)
   if (      if (%d == 0) %d = $lines(%f)
     %e = 0
     !write -il $+ %d $+(",%f,") %c
     !inc %a
     while (%c != ) {
       !inc %e
       %c = $read($1-,nt,%a)
       !write -il $+ $calc(%d + %e) $+(",%f,") %c
       !inc %a
     }
   }
   else {
     !write $+(",%f,") %c
   }
   !inc %a
 }
}

Usage:

/bumpy 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...