View Single Post
  #12  
Old July 1st, 2011, 04:03 PM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: Mods fixed for Dominions v3.27

This is the perl script I used to fix the mods:


#!/usr/bin/perl

use strict;

my $inMonster;
my $alreadySeenWeapon;
my $alreadySeenArmor;
while (<>) {
if (/#selectmonster/) {
$inMonster = 1;
}
if (/#end/) {
$inMonster = 0;
$alreadySeenWeapon = 0;
$alreadySeenArmor = 0;
}
if (/#weapon/) {
if (($inMonster) and not ($alreadySeenWeapon)) {
$alreadySeenWeapon = 1;
print "#clearweapons\n";
}
}
if (/#armor/) {
if (($inMonster) and not ($alreadySeenArmor)) {
$alreadySeenArmor = 1;
print "#cleararmor\n";
}
}
print;
}
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
The Following 2 Users Say Thank You to llamabeast For This Useful Post: