|
You last visited: Today at 14:41
Advertisement
[Python]How To BonusBoard + Minimierbar im Inventar
Discussion on [Python]How To BonusBoard + Minimierbar im Inventar within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
10/13/2016, 19:22
|
#1
|
elite*gold: 0
Join Date: Jul 2015
Posts: 25
Received Thanks: 66
|
[Python]How To BonusBoard + Minimierbar im Inventar
Hallöchen poste mal heute den Bonusboard im Inventar mit Minimieren
so sieht das ganze aus <33
als erstes entpackt ihr euren locale_de und geht in den folgendenverzeichnis
locale_de\locale\de\ui
und öffnet dort
inventorywindow.py
Als erstes dies hier suchen:
Code:
EQUIPMENT_START_INDEX
fügt darunter das hier ein
Code:
SPACE_BONUS_INVENTORY = 130
IMAGE_QUARESMA = "d:/ymir work/ui/public/Parameter_Slot_01.sub"
so muss das dann aussehen
Als nächstes das abschreiben wo ich immer einen SPACE_BONUS_INVENTORY stehen habe
nun fügt unter das hier
Code:
## Title
{
"name" : "TitleBar",
"type" : "titlebar",
"style" : ("attach",),
"x" : 8,
"y" : 7,
"width" : 161 + SPACE_BONUS_INVENTORY,
"color" : "yellow",
"children" :
(
{
"name":"TitleName",
"type":"text",
"x":(161 + SPACE_BONUS_INVENTORY) / 2,
"y":3,
"text":uiScriptLocale.INVENTORY_TITLE,
"text_horizontal_align":"center"
},
),
},
dies hier ein oder hier
Code:
https://paste2.org/GGUnf8f4
Abspeichern und locale_de packen und in den client schmeissen
als nächstes entpacken wir root und öffnen
uiinventory.py
Als erstes suchen wir nach
Code:
questionDialog = None
und fügen drunter
Code:
INVENTAR_BONUS_PAGE = False
Als nächstes suchen wir
Code:
wndEquip = self.GetChild("EquipmentSlot")
und fügen drunter
Code:
self.ButonMinimize = self.GetChild2("MinimierenButton")
self.ButonMinimize.SetEvent(ui.__mem_func__(self.MinimiereBonus))
suchen:
Code:
self.RefreshStatus()
drunter einfügen
unter
fügen wir das ein
Code:
https://paste2.org/UEsgNaEa
ganz unten bzw am ende dies hier einfügen
Code:
def OnUpdate(self):
self.ReloadBonus()
das ist alles
Danke an für das Bonus Board
|
|
|
10/15/2016, 12:58
|
#2
|
elite*gold: 0
Join Date: Aug 2012
Posts: 974
Received Thanks: 89
|
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
|
#3
|
elite*gold: 10
Join Date: Jul 2013
Posts: 93
Received Thanks: 416
|
I think this it looks ok.
(Not tested, and maybe looks like ****)
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:
Thank u for release ^
|
|
|
10/15/2016, 15:40
|
#4
|
elite*gold: 0
Join Date: Aug 2012
Posts: 974
Received Thanks: 89
|
mhh :/ this cant help me^^
|
|
|
10/15/2016, 17:13
|
#5
|
elite*gold: 0
Join Date: May 2016
Posts: 8,679
Received Thanks: 1,638
|
Sieht Fresh aus und definitiv hilfreich, danke für den RLS
|
|
|
10/15/2016, 18:44
|
#6
|
elite*gold: 0
Join Date: Feb 2016
Posts: 11
Received Thanks: 8
|
*
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
|
#7
|
elite*gold: 0
Join Date: Aug 2012
Posts: 974
Received Thanks: 89
|
Ok und wie ändern ich dann welche Bonis anzeigt werden wenn GetStartus so komisch berechnet wird?
|
|
|
10/16/2016, 18:53
|
#8
|
elite*gold: 0
Join Date: Jan 2011
Posts: 54
Received Thanks: 2
|
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
|
#9
|
elite*gold: 0
Join Date: Sep 2016
Posts: 13
Received Thanks: 13
|
Eine nettes Feature!
|
|
|
10/19/2016, 22:28
|
#10
|
elite*gold: 150
Join Date: Feb 2009
Posts: 643
Received Thanks: 613
|
Quote:
Originally Posted by worldend
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
|
elite*gold: 0
Join Date: Dec 2014
Posts: 33
Received Thanks: 22
|
( woran liegt das ? )
|
|
|
10/20/2016, 21:32
|
#12
|
elite*gold: 0
Join Date: Jul 2015
Posts: 25
Received Thanks: 66
|
Quote:
Originally Posted by ..ѕιяιυѕѕ¢нωєят
( woran liegt das ? )
|
inventorywindow.py mach den schritt nochmal wenns geht
SPACE_BONUS_INVENTORY wie im spoiler bzw im bild einfügen
Quote:
Originally Posted by worldend
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
|
#13
|
elite*gold: 44
Join Date: Dec 2009
Posts: 1,696
Received Thanks: 3,835
|
Quote:
Originally Posted by [SGA]Vegas
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
*
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):
|
???
|
|
|
10/21/2016, 00:20
|
#14
|
elite*gold: 0
Join Date: Feb 2016
Posts: 11
Received Thanks: 8
|
Quote:
Originally Posted by Poccix
Wieso, wenn ihr es schon dynamischer machen wollt, die Anzahl statisch setzen ?
Entweder:
Oder:
???
|
If you want 2x memory usage with len, no problem you can use what do you want.
|
|
|
10/21/2016, 12:41
|
#15
|
elite*gold: 0
Join Date: Dec 2014
Posts: 1,015
Received Thanks: 498
|
Jemand so freundlich und hilft mir? Hab nicht wirklich Ahnung von Python :x
|
|
|
|
|
Similar Threads
|
[C++/Python]12 Inventar Seiten
09/08/2015 - Metin2 PServer Guides & Strategies - 40 Replies
Hey.
Hiermit könnt ihr 12 Inventar Seiten benutzten könnt ihr nach belieben verändern. Es können maximal 65k Slot's verwendet werden.
- steht für suchen und muss durch das + ersetzt werden
Game Source:
common/length.h
|
[C++/Python]12 Inventar Seiten FEHLER :(
08/30/2015 - Metin2 Private Server - 1 Replies
habe diesen fehler:
compile char_item.cpp
compile char_manager.cpp
In file included from char_item.cpp:47:
belt_inventory_helper.h: In static member function 'static BYTE CBeltInventoryHelper::GetBeltGradeByRefineLevel(in t)':
belt_inventory_helper.h:28: warning: comparison between signed and unsigned integer expressions
char_item.cpp: At global scope:
char_item.cpp:455: error: prototype for 'CItem* CHARACTER::GetWear(BYTE) const' does not match any in class 'CHARACTER'
char.h:1062:...
|
[Python]Bonusboard Fehler
04/30/2015 - Metin2 Private Server - 4 Replies
Guten Abend,
Ich habe auf meinem Server ein Bonusboard eingefügt und bekomme nachdem
Telepotieren einen Fehler.
InventoryWindow.RefreshBonus.BindObject - <type 'exceptions.KeyError'>:'Schwert_vert_Value'
Die Scripts liegen im Anhang
Mfg.Mindfreak
#Virustotal
https://www.virustotal.com/de/file/10c3f521699a89 902e3ae155f45219eb44857f9b9370868a12c06fafd008dbb1 /analysis/
|
Python BonusBoard
02/10/2014 - Metin2 Private Server - 5 Replies
Guten Mittag,
Mein Problem ich drücke Ingame F7 doch das Bonusboard erscheint nicht.
Syser
0210 16:40:53019 :: NameError
0210 16:40:53019 :: :
0210 16:40:53019 :: global name 'BPisLoaded' is not defined
0210 16:40:53019 ::
0210 16:40:53019 :: Traceback (most recent call last):
|
Bonusboard Python
12/31/2013 - Metin2 Private Server - 2 Replies
Hey ich wollte ein Bonusboard einfügen der fehler
1231 00:55:55681 :: Traceback (most recent call last):
1231 00:55:55682 :: File "game.py", line 1179, in OnKeyDown
1231 00:55:55682 :: File "game.py", line 328, in <lambda>
1231 00:55:55682 :: File "game.py", line 1899, in __BonusPage
|
All times are GMT +1. The time now is 14:41.
|
|