Create an List Object containing all the elements so you dont have to hide and show every element manually
ex:
Code:
coverImages = []
coverImages.append((self.GetChild("engel_01_open"), self.GetChild("engel_01_close")))
....
for i, coverImage in enumerate(coverImages):
(openImage, closeImage) = coverImage
....
#or
for coverImage in coverImages:
(openImage, closeImage) = coverImage
self.closeImage.Show()
for i in xrange(player.GetEnvanter()):
(openImage, closeImage) = coverImages[i]
openImage.Show()
something more like that would be nice,
in programing there are always better ways to achieve your goals
and you well used the knowledge you had and it works its ok i guess
its just not very well written
Create an List Object containing all the elements so you dont have to hide and show every element manually
ex:
Code:
coverImages = []
coverImages.append((self.GetChild("engel_01_open"), self.GetChild("engel_01_close")))
....
for i, coverImage in enumerate(coverImages):
(openImage, closeImage) = coverImage
....
#or
for coverImage in coverImages:
(openImage, closeImage) = coverImage
self.closeImage.Show()
for i in xrange(player.GetEnvanter()):
(openImage, closeImage) = coverImages[i]
openImage.Show()
something more like that would be nice,
in programing there are always better ways to achieve your goals
and you well used the knowledge you had and it works its ok i guess
its just not very well written
Thanks for the release, i know some people that will use this for sure.
sema1995, i dont know what the problem.
Since when on programming you must do things on just one way?
Of course his way is longer to write then how .Alpha. showed, but so what?
At the end of the day what matters is if it works or not.
if self.engelblack:
self.engelblack.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack2:
self.engelblack2.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack3:
self.engelblack3.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack4:
self.engelblack4.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack5:
self.engelblack5.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack6:
self.engelblack6.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack7:
self.engelblack7.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack8:
self.engelblack8.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack9:
self.engelblack9.SetEvent(ui.__mem_func__(self.en_ac))
Code:
for key in listOfImages:
if key and "active" in key:
key.SetEvent(ui.__mem_func__(self.en_ac))
It can be done much simpler. I've wrote for only a example.
if self.engelblack:
self.engelblack.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack2:
self.engelblack2.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack3:
self.engelblack3.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack4:
self.engelblack4.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack5:
self.engelblack5.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack6:
self.engelblack6.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack7:
self.engelblack7.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack8:
self.engelblack8.SetEvent(ui.__mem_func__(self.en_ac))
if self.engelblack9:
self.engelblack9.SetEvent(ui.__mem_func__(self.en_ac))
Code:
for key in listOfImages:
if key and "active" in key:
key.SetEvent(ui.__mem_func__(self.en_ac))
It can be done much simpler. I've wrote for only a example.
These criticisms are constructive, you would need to be glad that some people are trying to give you a few tricks of their knowledge for you to be better in the future.
Every day we learn new things, you should gather all the comments that were obtained each time with different parts and to collect them, and then next time you'll have a much better structured code compared to last time.
No one insulted you personally, they just insulted code.
The structure of the system itself is 0.1% compared to the official structure.
But here is a big part of uiInventory rewritten in some lines. (I have not tested, i just give you some points, also and my points is ugly, all time can be better, but if they works good, doesn't importantly.)
English isn’t my first language, so please excuse any mistakes.
Code:
def get(key):
inventoryDict = {
2: [0, 1, 2, 3],
3: [4, 5],
4: [6, 7, 8],
5: [9, 10, 11],
6: [12, 13, 14],
7: [15, 16, 17]
}
for k, v in inventoryDict.iteritems():
if key in v:
return k
Code:
self.main = {
"elements" : {
"open" : [GetObject("inventory_0%d_open" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)],
"close" : [GetObject("inventory_0%d_close" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)]
}
}
for wnd in [self.main["elements"]["open"], self.main["elements"]["close"]]:
wnd.Hide()
for tabButton in self.main["elements"]["open"]:
self.tabButton.SetEvent(ui.__mem_func__(self.OpenInventoryDialog))
These criticisms are constructive, you would need to be glad that some people are trying to give you a few tricks of their knowledge for you to be better in the future.
Every day we learn new things, you should gather all the comments that were obtained each time with different parts and to collect them, and then next time you'll have a much better structured code compared to last time.
No one insulted you personally, they just insulted code.
The structure of the system itself is 0.1% compared to the official structure.
But here is a big part of uiInventory rewritten in some lines. (I have not tested, i just give you some points, also and my points is ugly, all time can be better, but if they works good, doesn't importantly.)
English isn’t my first language, so please excuse any mistakes.
Code:
def get(key):
inventoryDict = {
2: [0, 1, 2, 3],
3: [4, 5],
4: [6, 7, 8],
5: [9, 10, 11],
6: [12, 13, 14],
7: [15, 16, 17]
}
for k, v in inventoryDict.iteritems():
if key in v:
return k
Code:
self.main = {
"elements" : {
"open" : [GetObject("inventory_0%d_open" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)],
"close" : [GetObject("inventory_0%d_close" % (i+1)) for i in xrange(player.INVENTORY_MAX_LINE)]
}
}
for wnd in [self.main["elements"]["open"], self.main["elements"]["close"]]:
wnd.Hide()
for tabButton in self.main["elements"]["open"]:
self.tabButton.SetEvent(ui.__mem_func__(self.OpenInventoryDialog))
MMO Paradox Expansion Episode VIII Official Server 08/26/2014 - Cabal Private Server - 137 Replies http://imageshack.com/a/img661/8023/3d453f.png
Official Website: MMOParadox Cabal - HekateWebToolz v0.1
Official Forum: MMOParadox Community
Official Facebook: MMOParadox Expansion
Download Links:
[Release]MMOParadox Expansion - Episode VIII Official ! 12/25/2013 - Cabal Private Server - 20 Replies https://imagizer.imageshack.us/v2/745x250q50/20/6x zc.png
http://imageshack.com/a/img62/363/bnas.jpg
http://imageshack.com/a/img545/4118/qm44.jpg
http://imageshack.com/a/img191/6348/j11l.jpg
http://imageshack.com/a/img96/6483/gxvw.jpg
http://imageshack.com/a/img822/5191/aa4l.jpg
http://imageshack.com/a/img841/9066/ixxh.jpg
http://imageshack.com/a/img853/3413/pdbw.jpg
http://imageshack.com/a/img24/3731/5n8v.jpg
Inventory Expansion 07/10/2012 - C9 - Continent of the Ninth - 4 Replies Moin moin,
weiß einer woher ich diesen inventory expansions scroll herbekomme?
mein erster char. hat den irgendwann bekommen
(hab erst viel später gesehen, dass ich voll viele items geschenk bekommen habe, wegen event oderso)
dann hab ich einen 2. char erstellt und der hätte bis zu meinem level schon eine bekommen müssen... ist nur nix da... ^^
also weiß einer woher man den bekommt?
SWSRO 2 Inventory Expansion(s) 10/03/2010 - SRO Private Server - 6 Replies Hi guys,
i am wondering because i made the 1st and 2nd invent expansion but i cant get the quest for the 3rd at the Hotans "Mamoje". there is no quest for me???
is this a bug or something?!
greets