nunja es liegt ja im map ordner die find_map.py und eine find_map.sh ich kann sie ja mal posten aber keiner der beiden funktioniert...
SH
#!/bin/bash
printf "%-32s %8s %8s %8s %8s\n" Map X Y Width Height
echo "---------------------------------------------------------------------"
for map in $(cat index|sort|awk '{print $2}')
do
while read line
do
data=(${line})
case ${data[0]} in
BasePosition )
x=$(bc <<< "${data[1]}/100")
y=$(bc <<< "${data[2]}/100")
;;
MapSize )
w=$(bc <<< "${data[1]}*256")
h=$(bc <<< "${data[2]}*256")
;;
esac
done<<_EOD_
$(egrep "(BasePosition|MapSize)" ${map}/Setting.txt)
_EOD_
printf "%-32s: %8d %8d %8d %8d\n" ${map} ${x} ${y} ${w} ${h}
if [[ ${1} != "" && ${2} != "" ]]; then
searchmap=1
if [[ ${1} -ge ${x} && ${1} -le $(bc <<< "${x}+${w}") && ${2} -ge ${y} && ${2} -le $(bc <<< "${y}+${h}") ]]; then
foundmap="${map}"
fi
fi
done
if [[ ${searchmap} == 1 ]]; then
if [[ ${foundmap} != "" ]]; then
echo -e "\n\n# Coordinates are in the map ${foundmap}\n"
else
echo -e "\n\n# Coordinates are not on any map\n"
fi
fi
PY
import os
rectList = []
for path in open("list.txt"):
if path[-1] == os.linesep:
path = path[:-1]
for line in open(path + "/" + "Setting.txt"):
tokens = line.split()
if not tokens:
continue
if tokens[0] == "BasePosition":
x, y = [int(item)/100 for item in tokens[1:3]]
elif tokens[0] == "MapSize":
w, h = [int(item) * 256 for item in tokens[1:3]]
rectList.append((path, x, y, x+w, y+h))
x = 4693
y = 9642
for rect in rectList:
if x >= rect[1] and y >= rect[2] and x <= rect[3] and y<= rect[4]:
print rect[0]
€: hab mal die map (1) aus der config gelöscht fehler bleibt komischerweiße
mfg