[ create a new paste ] login | about

Link: http://codepad.org/V8sZFrt6    [ raw code | fork ]

Perl, pasted on Feb 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

# convert hmod warps.txt to Bukkit Essentials warp format

open FP,"warps.txt" or die;
while (<FP>) {
    chomp;
    my @a = split(':');
    $name = shift @a;
    open OUT,"> plugins/Essentials/warps/$name.dat" or die;
    print OUT join("\n",@a);
    close OUT;
}

#hmod format - "warps.txt":
# murder:34.50087286234928:64.0:-271.7976912052464:-2611.204:0.4504166:

#bukkit essentials format - "plugins/Essentials/warps/<name>.dat":
# (same numbers separated by newlines)


Create a new paste based on this one


Comments: