From 069afd480c9335f76dc96cecf54b86907c2b35ae Mon Sep 17 00:00:00 2001 From: lBaah <40009702+lBaah@users.noreply.github.com> Date: Mon, 1 Mar 2021 03:54:18 -0300 Subject: [PATCH] Merge house infos merge house info from https://github.com/SaiyansKing/optimized_forgottenserver/blob/master/data/for-future/staticdata.txt --- houses.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 houses.py diff --git a/houses.py b/houses.py new file mode 100644 index 0000000..c4dbdca --- /dev/null +++ b/houses.py @@ -0,0 +1,17 @@ +import xml.etree.ElementTree as ET +hfrom = ET.parse('houses_from.xml') +hTo = ET.parse('houses_to.xml') +houses_from = hfrom.getroot() +houses_to = hTo.getroot() + +#cuscus houseificado para senhor fake +for house_from in houses_from: + for house_to in houses_to: + if house_to.get('name') == house_from.get('name'): + house_to.set('clientid', house_from.get('id')) + house_to.set('rent', house_from.get('rent')) + house_to.set('beds', house_from.get('beds')) + house_to.set('guildHall', house_from.get('guildHall')) + house_to.set('shop', house_from.get('shop')) + +hTo.write('output.xml') \ No newline at end of file