# -*- coding: utf8 -*- # # Copyright (C) 2014 Evol Online # Author: Andrei Karas (4144) import re from code.fileutils import * from code.stringutils import * mapsConfFile = "newserverdata/conf/maps.conf" mapsIndexFile = "newserverdata/db/map_index.txt" npcMainScript = "newserverdata/npc/re/scripts_main.conf" mapsIndex = 1 scriptRe = re.compile("^(((?P[^/](.+))([.]gat|),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+))|(?Pfunction)|-)" + "[|](?Pscript)[|](?P[^|]+)([|]" "(?P[\d-]+)((,((?P[\d]+),(?P[\d]+)))|)|)$") shopRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)(|,(?P[\d]+))" + "[|](?Pshop)[|](?P[\w#' ]+)[|]" "(?P[\d]+),(?P(.+))$") mapFlagRe = re.compile("^(?P[^/](.+))[.]gat" + "[|](?Pmapflag)[|](?P[\w#']+)(|[|](?P.*))$") warpRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)[|]" "(?Pwarp)[|](?P[^|]+)[|](?P[\d-]+),(?P[\d-]+),(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+)$") monsterRe = re.compile("^(?P[^/](.+))[.]gat,([ ]*)(?P[\d]+),([ ]*)(?P[\d]+),([ ]*)(?P[\d-]+),(?P[\d-]+)[|]" "(?Pmonster)[|](?P[\w#' ]+)[|]" "(?P[\d]+),(?P[\d]+),(?P[\d]+)ms,(?P[\d]+)ms(|,(?P