Henrybk

Athena -> kore portals converter

Jul 14th, 2015
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.53 KB | None | 0 0
  1. ############################
  2. # eAthena/Cronus to portals table converter by Henrybk
  3. ############################
  4. use utf8;
  5. use strict;
  6. use warnings;
  7.  
  8. open OLD, "<:utf8", "PrePortals.txt" or die "Are you sure that PrePortals.txt exists? Internal error: ".$!;
  9. open NEW, ">:utf8", "NewPortals.txt" or die $!;
  10.  
  11. while (<OLD>) {
  12.         if ($_ =~ /^(.+),(\d+),(\d+),0  warp    .+  1,1,(.+),(\d+),(\d+)/i) {
  13.                 print NEW "$1 $2 $3 $4 $5 $6\n";
  14.         }
  15. }
  16.  
  17. close(OLD);
  18. close(NEW);
  19.  
  20. print "Finished !\n";
  21.  
  22. system("pause");
Advertisement
Add Comment
Please, Sign In to add comment