Am vazut pe mai multe forumuri sistemul meu
Inainte de toate adaugam un folder nou in /share/locale/romania/quest numit "securitate"
Pasul 1
Despachetam rootsi adaugam la inceput in constinfo.py
Pasul 2
Intram in uiinventory.py si cautam functia :
Sub ea adaugam asta pentru cei FARA COSTUME :
Iar functia :
o inlocuim cu :
Acum pentru cei cu costume
Iar functia :
O inlocuim cu :
Pasul 3
Adaugam la inceput in uiinventory.py
Apoi cautam :
sub el adaugam :
Cautam :
Adaugam sub el :
Cautam :
Adaugam sub asta :
Pasul 4
intram in Game.py si cautam functia :
si o inlocuiti cu aceasta :
Cautati in Game.py :
Sub asta adaugam :
tot aici cautam :
si adaugam sub :
Pasul 5
Intram in locale/Inventorywindow.py si cautam :
si adaugam sub el :
extragem arhiva : http://www.girlshare.ro/3490002096.9 in pack si adaugam in Index :
Parola arhivei :
Despachetam rootsi adaugam la inceput in constinfo.py
Cod: Selectaţi tot
#Louie Work
SECURIATE_QUESTINDEX = 0
SECURIATE_CONT = 1
INPUT_IGNORE = 0
mallkeyqin = 0
LouieWork = 0
#End Luu work
Intram in uiinventory.py si cautam functia :
Cod: Selectaţi tot
def __init__(self):
ui.ScriptWindow.__init__(self)
self.OpenBoniSwitcherEvent = lambda : None
self.__LoadWindow()
Cod: Selectaţi tot
#Louie Work
def ParolaInventarWnd(self):
self.ParolaInventar = ui.BoardWithTitleBar()
self.ParolaInventar.SetSize(180, 100)
self.ParolaInventar.SetCenterPosition()
self.ParolaInventar.AddFlag('movable')
self.ParolaInventar.AddFlag('float')
self.ParolaInventar.SetTitleName('Inventar')
self.ParolaInventar.SetCloseEvent(self.InchidereParolaInventar)
self.ParolaInventar.Show()
self.TextParola = ui.TextLine()
self.TextParola.SetParent(self.ParolaInventar)
self.TextParola.SetDefaultFontName()
self.TextParola.SetPosition(15, 35)
self.TextParola.SetFeather()
self.TextParola.SetText("Parola inventar:")
self.TextParola.SetOutline()
self.TextParola.Show()
self.SlotParola = ui.SlotBar()
self.SlotParola.SetParent(self.ParolaInventar)
self.SlotParola.SetSize(60, 15)
self.SlotParola.SetPosition(30, 35)
self.SlotParola.SetWindowHorizontalAlignCenter()
self.SlotParola.Show()
self.CampParola = ui.EditLine()
self.CampParola.SetParent(self.SlotParola)
self.CampParola.SetSize(60, 15)
self.CampParola.SetPosition(4, 1)
self.CampParola.SetMax(4)
self.CampParola.SetNumberMode()
self.CampParola.SetFocus()
self.CampParola.Show()
self.ButonParolaOK = ui.Button()
self.ButonParolaOK.SetParent(self.ParolaInventar)
self.ButonParolaOK.SetEvent(self.VerificareParola)
self.ButonParolaOK.SetPosition(46, 67)
self.ButonParolaOK.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
self.ButonParolaOK.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
self.ButonParolaOK.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
self.ButonParolaOK.SetText("Deblocare")
self.ButonParolaOK.Show()
self.CampParola.SetReturnEvent(ui.__mem_func__(self.VerificareParola))
def VerificareParola(self):
self.ParolaInventar.Hide()
activare_skill2 = constInfo.SECURIATE_QUESTINDEX
constInfo.NegotFereastraNume = self.CampParola.GetText()
event.QuestButtonClick(activare_skill2)
def InchidereParolaInventar(self):
self.ParolaInventar.Hide()
#End WorkCod: Selectaţi tot
def Show(self):
self.__LoadWindow()Cod: Selectaţi tot
#Louie work
def Show(self):
if constInfo.SECURIATE_CONT == 0:
self.__LoadWindow()
ui.ScriptWindow.Show(self)
else:
self.ParolaInventarWnd()
#End Work Cod: Selectaţi tot
#Luu work
def ParolaInventarWnd(self):
self.ParolaInventar = ui.BoardWithTitleBar()
self.ParolaInventar.SetSize(180, 100)
self.ParolaInventar.SetCenterPosition()
self.ParolaInventar.AddFlag('movable')
self.ParolaInventar.AddFlag('float')
self.ParolaInventar.SetTitleName('Inventar')
self.ParolaInventar.SetCloseEvent(self.InchidereParolaInventar)
self.ParolaInventar.Show()
self.TextParola = ui.TextLine()
self.TextParola.SetParent(self.ParolaInventar)
self.TextParola.SetDefaultFontName()
self.TextParola.SetPosition(15, 35)
self.TextParola.SetFeather()
self.TextParola.SetText("Parola inventar:")
self.TextParola.SetOutline()
self.TextParola.Show()
self.SlotParola = ui.SlotBar()
self.SlotParola.SetParent(self.ParolaInventar)
self.SlotParola.SetSize(60, 15)
self.SlotParola.SetPosition(30, 35)
self.SlotParola.SetWindowHorizontalAlignCenter()
self.SlotParola.Show()
self.CampParola = ui.EditLine()
self.CampParola.SetParent(self.SlotParola)
self.CampParola.SetSize(60, 15)
self.CampParola.SetPosition(4, 1)
self.CampParola.SetMax(6)
self.CampParola.SetFocus()
self.CampParola.Show()
self.ButonParolaOK = ui.Button()
self.ButonParolaOK.SetParent(self.ParolaInventar)
self.ButonParolaOK.SetEvent(self.VerificareParola)
self.ButonParolaOK.SetPosition(46, 67)
self.ButonParolaOK.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
self.ButonParolaOK.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
self.ButonParolaOK.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
self.ButonParolaOK.SetText("Deblocare")
self.ButonParolaOK.Show()
self.CampParola.SetReturnEvent(ui.__mem_func__(self.VerificareParola))
def VerificareParola(self):
self.ParolaInventar.Hide()
activare_skill2 = constInfo.SECURIATE_QUESTINDEX
constInfo.NegotFereastraNume = self.CampParola.GetText()
event.QuestButtonClick(activare_skill2)
def InchidereParolaInventar(self):
self.ParolaInventar.Hide()
#End workCod: Selectaţi tot
def Show(self):
self.__LoadWindow()
ui.ScriptWindow.Show(self)
if self.isOpenedCostumeWindowWhenClosingInventory and self.wndCostume:
self.wndCostume.Show()
if self.wndBelt:
self.wndBelt.Show(self.isOpenedBeltWindowWhenClosingInventory)
Cod: Selectaţi tot
##Louie work
def Show(self):
if constInfo.SECURIATE_CONT == 0:
self.__LoadWindow()
ui.ScriptWindow.Show(self)
if self.isOpenedCostumeWindowWhenClosingInventory and self.wndCostume:
self.wndCostume.Show()
if self.wndBelt:
self.wndBelt.Show(self.isOpenedBeltWindowWhenClosingInventory)
else:
self.ParolaInventarWnd()
#End work
Cod: Selectaţi tot
Intram in ROOT-->##Game.py si cautam :
"mall" : self.__InGameShop_Show,
##Iar dupa adaugam :
#Louie work
"key" : self.__def_key,
#Louie work
"getinputbegin" : self.__Input_Get_Dash_1,
"getinputend" : self.__Input_Get_Dash_2,
"getinput" : self.__Input_Get_Dash_3,
"securitate_index" : self.SecuriateQuestIndex,
"sistem_negot_verificare_nume" : self.__Sistem_negot_verificare_nume,
"securiate_cont" : self.SecuriateCont,
"activareinv" : self.ActivareInv,
#END
Acum la final in game.py adaugam :
#Louie work
def __Input_Get_Dash_1(self):
constInfo.INPUT_IGNORE = 1
def __Input_Get_Dash_2(self):
constInfo.INPUT_IGNORE = 0
def __Input_Get_Dash_3(self):
net.SendQuestInputStringPacket("1")
def SecuriateQuestIndex(self, value):
#chat.AppendChat(chat.CHAT_TYPE_INFO, "index %d" % int(value))
constInfo.SECURIATE_QUESTINDEX = int(value)
def __Sistem_negot_verificare_nume(self):
net.SendQuestInputStringPacket(str(constInfo.LouieWork))
def SecuriateCont(self):
constInfo.SECURIATE_CONT = 0
def ActivareInv(self):
constInfo.SECURIATE_CONT = 1
#END
Adaugam la inceput in uiinventory.py
Cod: Selectaţi tot
import event Cod: Selectaţi tot
self.costumeButton = self.GetChild2("CostumeButton") Cod: Selectaţi tot
#Louie work
self.Key = self.GetChild2("Key")
#Louie work
Cod: Selectaţi tot
self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton)) Cod: Selectaţi tot
#Louie Work
if self.Key:
self.Key.SetEvent(ui.__mem_func__(self.ClickKey))
#Louie Work
Cod: Selectaţi tot
def ClickDSSButton(self): Cod: Selectaţi tot
self.interface.ToggleDragonSoulWindow() Cod: Selectaţi tot
#Louie Work
def ClickKey(self):
import event
qid = constInfo.mallkeyqin
event.QuestButtonClick(qid)
#Louie
intram in Game.py si cautam functia :
Cod: Selectaţi tot
def OpenQuestWindow(self, skin, idx): Cod: Selectaţi tot
def OpenQuestWindow(self, skin, idx):
if constInfo.INPUT_IGNORE == 1:
return
else:
self.interface.OpenQuestWindow(skin, idx)
Cod: Selectaţi tot
#Louie work Cod: Selectaţi tot
"key" : self.__def_key, Cod: Selectaţi tot
serverCommandItem[0], serverCommandItem[1]
) Cod: Selectaţi tot
#Louie work
def __def_key(self, qid):
constInfo.mallkeyqin = int(qid)
#End
Intram in locale/Inventorywindow.py si cautam :
Cod: Selectaţi tot
"down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
}, Cod: Selectaţi tot
#Lui Work
{
"name" : "Key",
"type" : "button",
"x" : 120,
"y" : 68,
"tooltip_text" : "Key",
"default_image" : "d:/ymir work/Louie/key.tga",
"over_image" : "d:/ymir work/Louie/key1.tga",
"down_image" : "d:/ymir work/Louie/key1.tga",
},
#End work
Cod: Selectaţi tot
*
Louie
*
Cod: Selectaţi tot
Louie Pasul 1
Intram in questfunctions si adaugam :
Pasul 2
Adaugam in questlib.lua :
Pasul 3
Adaugam cele 2 questuri :
Intram in questfunctions si adaugam :
Cod: Selectaţi tot
citire_parola
file_exists
resetare_parola
setare_parola
Adaugam in questlib.lua :
Cod: Selectaţi tot
DirectorSecuritate = get_locale_base_path().."/quest/securitate/"
function citire_parola()
local FisierPassword = DirectorSecuritate..pc.get_name().."_securitate.txt"
local parola
if io.open(FisierPassword, "r") != nil then
io.input(FisierPassword)
parola = tonumber(io.read())
io.input():close()
else
parola = 0
end
return parola
end
function file_exists()
local name = DirectorSecuritate..pc.get_name().."_securitate.txt"
local f=io.open(name,"r")
if f!=nil then
io.close(f)
return true
else
return false
end
end
function setare_parola(nr_buton)
local name = DirectorSecuritate..pc.get_name().."_securitate.txt"
io.output(name)
io.write(tostring(nr_buton))
io.flush()
io.close()
end
function resetare_parola()
local name = DirectorSecuritate..pc.get_name().."_securitate.txt"
os.remove(name)
end Adaugam cele 2 questuri :
Cod: Selectaţi tot
--------Louie Work----------------------------------------
quest securitate_inv begin
state start begin
function GetPassword()
cmdchat("getinputbegin")
password = input(cmdchat("sistem_negot_verificare_nume"))
cmdchat("getinputend")
return password
end
when login begin
cmdchat("securitate_index "..q.getcurrentquestindex())
if file_exists() != true then
cmdchat("securiate_cont")
else
cmdchat("activareinv")
end
end
when button or info begin
local password = securitate_inv.GetPassword()
if tonumber(password) == tonumber(citire_parola()) then
cmdchat("securiate_cont")
end
end
end
end
Cod: Selectaţi tot
---------Luu work --------
quest securitate_opt begin
state start begin
when login begin
cmdchat("key " .. q . getcurrentquestindex ())
end
when button or info begin
say_title("Securitate Inventar.")
say("Acesta este un sistem foarte bun")
say("care va protejaza de persoanele")
say("care intr-un fel sau altul va intra")
say("pe cont.Puteti sa setati parola la inventar")
say("pe care sa o cunoasteti decat Dumneavoastra.")
local s = select("Setare/Dezactivare parola.","Reseteaza parola.", "Poate mai tarziu")
if s == 1 then
local p = select("Setare parola.","Dezactivare parola.")
if p == 1 then
if file_exists() != true then
say("Setati parola.")
local item_vnum = input()
setare_parola(item_vnum)
cmdchat("activareinv")
else
say("In cazul in care va uitati parola de la inventar")
say("luati legatura cu un Administrator !")
end
elseif p == 2 then
if file_exists() != true then
say("Nu ati setat nici o parola pana acum.")
else
say("Introduceti parola")
local item_vnum = input()
if tonumber(item_vnum) == tonumber(citire_parola()) then
resetare_parola()
else
say("Parola este gresita!!")
end
end
end
elseif s == 2 then
if file_exists() != true then
say("Nu ati setat nici o parola pana acum.")
else
say("Introduceti parola veche")
local item_vnum = input()
if tonumber(item_vnum) == tonumber(citire_parola()) then
say("introduceti parola noua")
local item_vnum1 = input()
resetare_parola()
setare_parola(item_vnum1)
else
say("Parola este gresita!!")
end
end
if s == 3 then
end
end
end
end
end

Edit: Tutorial cu tab-uri :








de