Forged Alliance Forever Forums
Moderator: Morax
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
import re
unranked = False
fopen = open(r"DeltaSiegeDry V7_script.lua")
temp = []
for line in fopen:
temp.append(line.rstrip())
text = " ".join(temp)
pattern = re.compile("function OnPopulate\(\)(.*?)end")
match = re.search(pattern, text)
if match:
script = match.group(1).replace("ScenarioUtils.InitializeArmies()", "").replace(" ","").strip()
if len(script) > 0:
if len(script.lower().replace(" ","").replace("scenarioframework.setplayablearea('area_1',false)", "").strip()) > 0:
unranked = True
if unranked:
print "this map is unranked"
else :
print "this map is ranked"
fopen.close()
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
Users browsing this forum: No registered users and 1 guest