From d3b013cfd2b4fd28e4ee7ebcb9e8c4493edce587 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 10 Jun 2018 00:07:49 -0300 Subject: MAKE CLIENT will make weapons.xml --- Makefile | 6 ++++++ clientdata.py | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100755 clientdata.py diff --git a/Makefile b/Makefile index 5bbb98b..103af6b 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ all: @echo "update - makes update and propagate web information (untested)" @echo "news - propagate web information" @echo "translation - fetches Transifex translations for server, and updates both." + @echo "client - generate weapons.xml" contrib: cd contrib_xsl ; make @@ -49,3 +50,8 @@ news: @cd ../web ; echo "Checking for web/ folder..." # check if web directory exists cd web ; ./deploy.sh @echo "News updated, please commit result on web." + +.PHONY: client +client: + ./clientdata.py + diff --git a/clientdata.py b/clientdata.py new file mode 100755 index 0000000..532f914 --- /dev/null +++ b/clientdata.py @@ -0,0 +1,62 @@ +#!/usr/bin/python2.7 + +a=open("../client-data/items.xml", "r") + +swords=[] +bows=[] +shields=[] + +gid="0" +rid=0 +for l in a: + if " 2700 and rid < 2899: + shields.append(rid) + elif rid > 3500 and rid < 3999: + swords.append(rid) + elif rid > 6000 and rid < 6499: + bows.append(rid) + +a.close() + +shields=sorted(shields, reverse=True) +bows=sorted(bows, reverse=True) +swords=sorted(swords, reverse=True) + +b=open("../client-data/weapons.xml", "w") + +b.write('\n\ +\n\ +\n\ +\n') + +b.write(' \n') + +for i in swords: + b.write(' \n' % i) + +b.write(' \n \n') + +for i in bows: + b.write(' \n' % i) + +b.write(' \n \n') + +for i in shields: + b.write(' \n' % i) + +b.write(' \n') + +b.close() -- cgit v1.2.3-70-g09d2