[Python]How To BonusBoard + Minimierbar im Inventar

10/13/2016 19:22 q.@quaresma741#1
Hallöchen poste mal heute den Bonusboard im Inventar mit Minimieren
so sieht das ganze aus <33

[Only registered and activated users can see links. Click Here To Register...]

Abspeichern und locale_de packen und in den client schmeissen


als nächstes entpacken wir root und öffnen

uiinventory.py



das ist alles :D

Danke an [Only registered and activated users can see links. Click Here To Register...] für das Bonus Board
10/15/2016 12:58 thespeedyy#2
woher ließt du das aus?
Code:
		self.GetChild("bonus_1").SetText(str(player.GetStatus(69)))
		self.GetChild("bonus_2").SetText(str(player.GetStatus(70)))
		self.GetChild("bonus_3").SetText(str(player.GetStatus(71)))
		self.GetChild("bonus_4").SetText(str(player.GetStatus(74)))
		self.GetChild("bonus_5").SetText(str(player.GetStatus(72)))
		self.GetChild("bonus_6").SetText(str(player.GetStatus(73)))
		self.GetChild("bonus_7").SetText(str(player.GetStatus(77)))
		self.GetChild("bonus_8").SetText(str(player.GetStatus(81)))
		self.GetChild("bonus_9").SetText(str(player.GetStatus(59)))
		self.GetChild("bonus_10").SetText(str(player.GetStatus(60)))
		self.GetChild("bonus_11").SetText(str(player.GetStatus(61)))
		self.GetChild("bonus_12").SetText(str(player.GetStatus(62)))
		self.GetChild("bonus_13").SetText(str(player.GetStatus(40)))
		self.GetChild("bonus_14").SetText(str(player.GetStatus(41)))
		self.GetChild("bonus_15").SetText(str(player.GetStatus(122)))
		self.GetChild("bonus_16").SetText(str(player.GetStatus(121)))
		self.GetChild("bonus_17").SetText(str(player.GetStatus(43)))
		self.GetChild("bonus_18").SetText(str(player.GetStatus(47)))
		self.GetChild("bonus_19").SetText(str(player.GetStatus(48)))
		self.GetChild("bonus_20").SetText(str(player.GetStatus(54)))
		self.GetChild("bonus_21").SetText(str(player.GetStatus(55)))
		self.GetChild("bonus_22").SetText(str(player.GetStatus(56)))
		self.GetChild("bonus_23").SetText(str(player.GetStatus(57)))
10/15/2016 14:50 VegaS ♆#3
I think this it looks ok.
(Not tested, and maybe looks like shit)

Code:
MAX_LEN_BONUS = 23
LIST_VALUE_BONUS = {
	0	: 69,   1	: 70,
	2	: 71,   3	: 74,
	4	: 72,   5	: 73,
	6	: 77,   7	: 81,
	8	: 59,   9	: 60,
	10	: 61,   11	: 62,
	12	: 40,   13	: 41,
	14	: 122,  15	: 121,
	16	: 43,   17	: 47,
	18	: 48,   19	: 54,
	20	: 55,   21	: 56,
	22	: 57
}

for tmp in xrange(1, MAX_LEN_BONUS + 1):
	self.GetChild("bonus_%d" % (tmp)).SetText(str(player.GetStatus(LIST_VALUE_BONUS[tmp-1])))
Debug mode:

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]


Thank u for release ^
10/15/2016 15:40 thespeedyy#4
mhh :/ this cant help me^^
10/15/2016 17:13 悪地城#5
Sieht Fresh aus und definitiv hilfreich, danke für den RLS
10/15/2016 18:44 mq1n4#6
*

Code:
BONUS_LIST = [ 69, 70, 71, 74, 72, 73, 77, 81, 59, 60, 61, 62, 40, 41, 122, 121, 43, 47, 48, 54, 55, 56, 57 ]
for i in range(1, 23+1):
	self.GetChild("bonus_%d" % i).SetText(str(player.GetStatus(BONUS_LIST[i-1])))
10/16/2016 11:15 thespeedyy#7
Ok und wie ändern ich dann welche Bonis anzeigt werden wenn GetStartus so komisch berechnet wird?
10/16/2016 18:53 worldend#8
Work but after teleport :

Code:
1016 17:49:13822 :: Traceback (most recent call last):

1016 17:49:13823 ::   File "uiInventory.py", line 1503, in OnUpdate

1016 17:49:13823 ::   File "uiInventory.py", line 865, in ReloadBonus

1016 17:49:13823 ::   File "ui.py", line 2835, in GetChild

1016 17:49:13823 :: KeyError
1016 17:49:13823 :: : 
1016 17:49:13823 :: 'bonus_1'
1016 17:49:13823 ::
You can easy fix this one :)
10/16/2016 19:32 xRed™#9
Eine nettes Feature!
10/19/2016 22:28 Cyber36#10
Quote:
Originally Posted by worldend View Post
Work but after teleport :

Code:
1016 17:49:13822 :: Traceback (most recent call last):

1016 17:49:13823 ::   File "uiInventory.py", line 1503, in OnUpdate

1016 17:49:13823 ::   File "uiInventory.py", line 865, in ReloadBonus

1016 17:49:13823 ::   File "ui.py", line 2835, in GetChild

1016 17:49:13823 :: KeyError
1016 17:49:13823 :: : 
1016 17:49:13823 :: 'bonus_1'
1016 17:49:13823 ::
You can easy fix this one :)
Okay... how? ;D

MfG
Cyber
10/19/2016 23:53 ..ѕιяιυѕѕ¢нωєят#11
[Only registered and activated users can see links. Click Here To Register...]

( woran liegt das ? )
10/20/2016 21:32 q.@quaresma741#12
Quote:
Originally Posted by ..ѕιяιυѕѕ¢нωєят View Post
[Only registered and activated users can see links. Click Here To Register...]

( woran liegt das ? )
inventorywindow.py mach den schritt nochmal wenns geht :D
SPACE_BONUS_INVENTORY wie im spoiler bzw im bild einfügen

Quote:
Originally Posted by worldend View Post
Work but after teleport :

Code:
1016 17:49:13822 :: Traceback (most recent call last):

1016 17:49:13823 ::   File "uiInventory.py", line 1503, in OnUpdate

1016 17:49:13823 ::   File "uiInventory.py", line 865, in ReloadBonus

1016 17:49:13823 ::   File "ui.py", line 2835, in GetChild

1016 17:49:13823 :: KeyError
1016 17:49:13823 :: : 
1016 17:49:13823 :: 'bonus_1'
1016 17:49:13823 ::
You can easy fix this one :)
Muss ich mir die tage ansehen hab grad viel Uni Kram um die ohren
10/20/2016 21:52 Poccix#13
Quote:
Originally Posted by [SGA]Vegas View Post
I think this it looks ok.
(Not tested, and maybe looks like shit)

Code:
MAX_LEN_BONUS = 23
LIST_VALUE_BONUS = {
	0	: 69,   1	: 70,
	2	: 71,   3	: 74,
	4	: 72,   5	: 73,
	6	: 77,   7	: 81,
	8	: 59,   9	: 60,
	10	: 61,   11	: 62,
	12	: 40,   13	: 41,
	14	: 122,  15	: 121,
	16	: 43,   17	: 47,
	18	: 48,   19	: 54,
	20	: 55,   21	: 56,
	22	: 57
}

for tmp in xrange(1, MAX_LEN_BONUS + 1):
	self.GetChild("bonus_%d" % (str(tmp))).SetText(str(player.GetStatus(LIST_VALUE_BONUS[tmp-1])))
Quote:
Originally Posted by mq1n4 View Post
*

Code:
BONUS_LIST = [ 69, 70, 71, 74, 72, 73, 77, 81, 59, 60, 61, 62, 40, 41, 122, 121, 43, 47, 48, 54, 55, 56, 57 ]
for i in range(1, 23+1):
	self.GetChild("bonus_%d" % i).SetText(str(player.GetStatus(BONUS_LIST[i-1])))

Wieso, wenn ihr es schon dynamischer machen wollt, die Anzahl statisch setzen ?

Entweder:

Quote:
for i in range(1, len(LIST_VALUE_BONUS)+1):
Oder:

Quote:
for i in range(1, len(BONUS_LIST)+1):
??? :o
10/21/2016 00:20 mq1n4#14
Quote:
Originally Posted by Poccix View Post
Wieso, wenn ihr es schon dynamischer machen wollt, die Anzahl statisch setzen ?

Entweder:



Oder:



??? :o
If you want 2x memory usage with len, no problem you can use what do you want.
10/21/2016 12:41 BizepsSupportAccount#15
[Only registered and activated users can see links. Click Here To Register...]

Jemand so freundlich und hilft mir? Hab nicht wirklich Ahnung von Python :x