All pastes #392407 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-12 20:47 UTC
rendered paste body
open "NPC", "L2NPC.exe";
open "NPCOUT", ">NPC.txt";
binmode NPC;
$cnt=0;
$str = '';
while (<NPC>)
{
	$str .= $_;
}

@strings = split m{\x00\x00}, $str;
for $string (@strings)
{
	$string =~ s{[\x00-\x1f\x7f-\xff]}{}g;
	if ($string)
	{
		print NPCOUT "$string\n";
	}
}