Code: Select all
#eAthena db : http://svn.brathena.org/versoes/renovacao/db/
#Renewal mon_db: https://cronusemulator.svn.sourceforge.net/svnroot/cronusemulator/Server/branches/Renewal/db/mob_db.txt
#Pre-renewal mon_db: https://cronusemulator.svn.sourceforge.net/svnroot/cronusemulator/Server/trunk/db/mob_db.txt
#
#
#Function : Extract the iRO monster names of mon_db.txt
#
#Instructions :
#
#With cursor on mob_db.txt, click with right button and "Save link as" and save in any place, of your prefer.
#This form is to prevent the browser to recognize the letters as : ã, õ, í.
#
#Execute the script and a new archive will created : monsters.txt
#
#By : SkylorD or Unknown6996 (Same people ¬¬) - Openkore Brasil.
#!/usr/bin/perl
use strict;
use warnings;
open (DB, "<mob_db.txt");
open MST, ">monsters.txt";
while (<DB>) {
my $lines = $_;
$lines =~ s/\/\///g; #Erase lines that start with //
$lines =~ s/,(\d+)//g; #Erase 0 of this ',0x81' on the lines
$lines =~ s/\w(\d+)$//g; #Erase the x81 of this '0x81' on the lines
$lines =~ s/(\d+),(.*),(.*),(.*)/$1 $3/g; #Register the ID and Monster names
$lines =~ s/^\s(.*)//g; #Erase lines that start wish spaces consecutive, example : | Nome do Database: mob_db.txt | and other lines that start with |
$lines =~ s/^[-=]*//g; #Erase lines that start with -consecutive of =, example : -=====
$lines =~ s/^\n//g; #Erase lines that start with 'blank lines'
$lines =~ s/(\d+),(.*),(.*)/$1 $3/g; #E_KTULANUX_Ktulanux
$lines =~ s/^(\D+)//g;
$lines =~ s/^1'(.*)//g;
print MST $lines;
}
close (DB);
close (MST);
print "Finished! =D\n";
<>;
# Renewal mon_db: https://cronusemulator.svn.sourceforge. ... mob_db.txt
# Pre-renewal mon_db: https://cronusemulator.svn.sourceforge. ... mob_db.txt
Same steps taught here.
Hm, my script have an error that i don't can see.