summaryrefslogtreecommitdiff
path: root/client/aurora.py
blob: 38ed174066be01721592c1cf842f31849f24b1b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/python2.7

# Setup
events=["Expo", "Fishing", "Kamelot", "Regnum", "Raid", "Tower", "Mining",
        "Anniversary", "Christmas", "Easter", "Patrick", "Thanksgiving", "Valentine",
        "Olympics", "Candor", "Worker"]

# Functions
def headers(val):
    return '\n\t<dialog name="aurora_%s" hideText="true">\n\t\t<menu>\n' % val

def navigation():
    nav=""
    nav+='\t\t\t<button x="300" y="20" name="Next" value="Ok" />\n'
    return nav

def tail():
    return '\t\t</menu>\n\t</dialog>\n'

def data(val):
    bf='\t\t\t<image x="0" y="0" image="graphics/images/aurora/%s.png" />\n' % val
    return bf

# Begin
f=open("aurora.tmp", "w")

f.write('<?xml version="1.0" encoding="utf-8"?>\n<!-- This file is generated automatically, editing it will have no effect.\n     Aurora Event Framework\n     (C) Jesusalva, 2020 -->\n<dialogs>')

for evtc in sorted(events):
    f.write(headers(evtc))
    f.write(data(evtc))
    f.write(navigation())
    f.write(tail())

f.write('\n</dialogs>')
f.close()