Prima oara va duceti in uiinventory.py si cautati:
self.wndMoneySlot = self.GetChild("Money_Slot")
Dupa care adaugati:
self.wndMds = self.GetChild("Mds")
self.wndMdsSlot = self.GetChild("Mds_Slot")
Acum cautati:
def Destroy(self):
self.ClearDictionary()
....
....
self.wndMoney = 0
self.wndMoneySlot = 0
Si dedesubt puneti:
self.wndMds = 0
self.wndMdsSlot = 0
Acum cautati:
def RefreshStatus(self):
Si schimbati cu:
def RefreshStatus(self):
money = player.GetElk()
self.wndMoney.SetText(localeInfo.NumberToMoneyString(money))
import constInfo
self.wndMds.SetText(str(constInfo.mds) + " Md's")
Mai jos puneti:
def OnUpdate(self):
import constInfo
self.wndMds.SetText(str(constInfo.mds) + " Md's")
Am terminat cu uiinventory.py ii dam SAVE si acum mergem in locale/xx/ui/inventorywindow.py
Cautam in inventorywindow.py:
## Print
{
"name":"Money_Slot",
"type":"button",
"x":-68,
"y":28,
"horizontal_align":"center",
"vertical_align":"bottom",
"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"children" :
(
{
"name":"Money_Icon",
"type":"image",
"x":-21,
"y":2,
"image":"d:/ymir work/ui/game/windows/money_icon.sub",
},
{
"name" : "Money",
"type" : "text",
"x" : 5,
"y" : 3,
"horizontal_align" : "right",
"text_horizontal_align" : "right",
"text" : "123456789",
},
),
},
Si dedesubt punem:
{
"name":"Mds_Slot",
"type":"button",
"x":-68,
"y":48,
"horizontal_align":"center",
"vertical_align":"bottom",
"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"children" :
(
{
"name":"Mds_Icon",
"type":"image",
"x":-21,
"y":2,
"image":"d:/ymir work/ui/game/windows/money_icon.sub",
},
{
"name" : "Mds",
"type" : "text",
"x" : 5,
"y" : 3,
"horizontal_align" : "right",
"text_horizontal_align" : "right",
"text" : "123456789 Md's",
},
),
},
Amintiti-va sa schimbati "x" si "y"
Acum mergem in root in game.py
Cautam:
def __ServerCommand_Build(self):
serverCommandList={
Si dedesubt punem:
#Carga Mds Start
"Mds" : self.__Mds,
#Carga Mds End
Acum mergem la sfarsit si punem:
def __Mds(self, coins):
import constInfo
constInfo.mds = int(coins)
Salvam si inchidem.
Mergem in constinfo.py si punem:
mds = 0
Acesta este si questul:
quest mds begin
state start begin
when login begin
loop_timer("carga_mds", 10)
end
when carga_mds.timer begin
local coins = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1]
cmdchat("Mds "..coins)
end
end
end
self.wndMoneySlot = self.GetChild("Money_Slot")
Dupa care adaugati:
self.wndMds = self.GetChild("Mds")
self.wndMdsSlot = self.GetChild("Mds_Slot")
Acum cautati:
def Destroy(self):
self.ClearDictionary()
....
....
self.wndMoney = 0
self.wndMoneySlot = 0
Si dedesubt puneti:
self.wndMds = 0
self.wndMdsSlot = 0
Acum cautati:
def RefreshStatus(self):
Si schimbati cu:
def RefreshStatus(self):
money = player.GetElk()
self.wndMoney.SetText(localeInfo.NumberToMoneyString(money))
import constInfo
self.wndMds.SetText(str(constInfo.mds) + " Md's")
Mai jos puneti:
def OnUpdate(self):
import constInfo
self.wndMds.SetText(str(constInfo.mds) + " Md's")
Am terminat cu uiinventory.py ii dam SAVE si acum mergem in locale/xx/ui/inventorywindow.py
Cautam in inventorywindow.py:
{
"name":"Money_Slot",
"type":"button",
"x":-68,
"y":28,
"horizontal_align":"center",
"vertical_align":"bottom",
"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"children" :
(
{
"name":"Money_Icon",
"type":"image",
"x":-21,
"y":2,
"image":"d:/ymir work/ui/game/windows/money_icon.sub",
},
{
"name" : "Money",
"type" : "text",
"x" : 5,
"y" : 3,
"horizontal_align" : "right",
"text_horizontal_align" : "right",
"text" : "123456789",
},
),
},
Si dedesubt punem:
{
"name":"Mds_Slot",
"type":"button",
"x":-68,
"y":48,
"horizontal_align":"center",
"vertical_align":"bottom",
"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
"children" :
(
{
"name":"Mds_Icon",
"type":"image",
"x":-21,
"y":2,
"image":"d:/ymir work/ui/game/windows/money_icon.sub",
},
{
"name" : "Mds",
"type" : "text",
"x" : 5,
"y" : 3,
"horizontal_align" : "right",
"text_horizontal_align" : "right",
"text" : "123456789 Md's",
},
),
},
Amintiti-va sa schimbati "x" si "y"
Acum mergem in root in game.py
Cautam:
def __ServerCommand_Build(self):
serverCommandList={
Si dedesubt punem:
#Carga Mds Start
"Mds" : self.__Mds,
#Carga Mds End
Acum mergem la sfarsit si punem:
def __Mds(self, coins):
import constInfo
constInfo.mds = int(coins)
Salvam si inchidem.
Mergem in constinfo.py si punem:
mds = 0
Acesta este si questul:
quest mds begin
state start begin
when login begin
loop_timer("carga_mds", 10)
end
when carga_mds.timer begin
local coins = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1]
cmdchat("Mds "..coins)
end
end
end