Bvural41 1
Bvural41
mavzermete 1
mavzermete
Fethi Polat 1
Fethi Polat
xranzei 1
xranzei
BlackFullMoon 1
BlackFullMoon
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Hikaye Ekle

System tombola

  • Konuyu başlatan Konuyu başlatan RID8R
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 16
  • Görüntüleme Görüntüleme 3K
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Konu tekrar aktif, Yönlendirme içeren linkler kaldırıldı.
@RID8R add virus-total ;)
 

1. Add uitombola.py in root
2. Add click4metin in locale
3. In locale_game.txt add:
TITLE_TOMBOLA→Tombola
In constinfo.py add:
wndTombola = None
TOMBOLA = 0
In game.py add:
import uiTombola
Search:
self.interface.ShowDefaultWindows()
Add:
constInfo.wndTombola = uiTombola.TombolaWindow()
Search:
guild.Destroy()
Add:
constInfo.wndTombola.Close()
After:
→def OnPressEscapeKey(self):
→→if app.TARGET == app.GetCursor():
→→→app.SetCursor(app.NORMAL)
Add:
→→if constInfo.wndTombola.IsShow():
→→→constInfo.wndTombola.Close()
Search:
"PlayMusic" : self.__PlayMusic,
Add:
#Tombola System
"OnPrepare" : self.__PrepareTombola,
"OnRun" : self.__RunTombola,
"openTombola" : self.__OpenTombola,
"closeTombola" : self.__CloseTombola,
"tombola" : self.SetTombola,
"get_input_value" : self.GetInputValue,
"get_input_start" : self.GetInputOn,
"get_input_end" : self.GetInputOff,
#End Tombala System
After:
def BINARY_ServerCommand_Run(self, line):
Add:
→def __OpenTombola(self):
→→→constInfo.wndTombola.Open()

→def __PrepareTombola(self, data):
→→constInfo.wndTombola.OnPrepare(str(data))

→def __RunTombola(self, number):
→→constInfo.wndTombola.OnRun(str(number))

→def SetTombola(self, qid):
→→constInfo.TOMBOLA = int(qid)

→def __CloseTombola(self):
→→constInfo.wndTombola.Close()

[glow=red]Error resolution[/glow]
syerr: Unknown Server Command get_input_start | get_input_start
In game.py Search:
def OpenQuestWindow(self, skin, idx):
Add:
→→if constInfo.INPUT_IGNORE == 1:
→→→return
Syserr1.jpg

Search:
def __ServerCommand_Build(self):
Add:
→→→"getinputbegin"→→→→: self.__Inputget1,
→→→"getinputend"→→→→: self.__Inputget2,
Add to the end:
→def __Inputget1(self):
→→constInfo.INPUT_IGNORE = 1
→ def __Inputget2(self):
→→constInfo.INPUT_IGNORE = 0

Open constinfo.py
Add:
INPUT_IGNORE = 0

Open uiquest.py
Search:
def __init__(self,skin,idx):
Add:
→→import constInfo
→→if constInfo.INPUT_IGNORE == 1:
→→→return
Syserr3.jpg


Quest:
Kod:
quest tombola begin
    state start begin
        function tablica(vnum, pozitie, pozitie2)
            local itemy = {
                            {
                                {25041, 1},
                                {27991, 1},
                                {31022, 1},
                                {31024, 1},
                                {31026, 1},
                                {71015, 1},
                                {27987, 30},
                                {85000, 1},
                                {72703, 1},
                                {72704, 1},
                                {30204, 1},
                                {50512, 1},
                                {81001, 1},
                                {30179, 3},
                                {71123, 1},
                                {71129, 1},
                                {25041, 1},
                            },
                            {
                                {25041, 1},
                                {27991, 1},
                                {31022, 1},
                                {31024, 1},
                                {31026, 1},
                                {71015, 1},
                                {27987, 30},
                                {85000, 1},
                                {72703, 1},
                                {72704, 1},
                                {30204, 1},
                                {50512, 1},
                                {81001, 1},
                                {30179, 3},
                                {71123, 1},
                                {71129, 1},
                                {25041, 1},
                            },
                        }
                return itemy[vnum][pozitie][pozitie2]
            end
          
      
      
        when login begin
            cmdchat("tombola "..q.getcurrentquestindex())
        end
      
        when 33008.chat."Tombola" begin
            say_title("Tombola")
            say("")
            say("Every spin is a winning, so you wont lose in any case.")
            say("You need:")
            say_item("Golden Ticket", 31012, "")
            wait()
            local vegas = number(1,2)
            local str = " "
            for i = 1,16 do
                if i == 16 then
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2)
                else
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2).."|"
                end
            end
            cmdchat("OnPrepare"..str)
            cmdchat("openTombola")
            setskin(NOWINDOW)
        end
  
        when info or button begin
            local vegas = number(1,2)
            local str = " "
            for i = 1,16 do
                if i == 16 then
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2)
                else
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2).."|"
                end
            end
            cmdchat("OnPrepare"..str)
            if pc.count_item(31012) < 10 then
                syschat("You don't have enough golden tickets!")
                return
            end
          
            cmdchat("get_input_start")
            local intrare = input(cmdchat("get_input_value"))
            cmdchat("get_input_end")
            if intrare == "tombola|begin" then
                pc.setqf("slot", number(1, 16))
                cmdchat("OnRun "..number(2,3)*16+pc.getqf("slot").."|5")
            elseif intrare == "tombola|end" then
                pc.give_item2(tombola.tablica(vegas, pc.getqf("slot")+1, 1), tombola.tablica(vegas, pc.getqf("slot")+1, 2))
                pc.remove_item(31012, 10)
            end
        end
    end
end

Paylaşım için teşekkürler.
 

1. Add uitombola.py in root
2. Add click4metin in locale
3. In locale_game.txt add:
TITLE_TOMBOLA→Tombola
In constinfo.py add:
wndTombola = None
TOMBOLA = 0
In game.py add:
import uiTombola
Search:
self.interface.ShowDefaultWindows()
Add:
constInfo.wndTombola = uiTombola.TombolaWindow()
Search:
guild.Destroy()
Add:
constInfo.wndTombola.Close()
After:
→def OnPressEscapeKey(self):
→→if app.TARGET == app.GetCursor():
→→→app.SetCursor(app.NORMAL)
Add:
→→if constInfo.wndTombola.IsShow():
→→→constInfo.wndTombola.Close()
Search:
"PlayMusic" : self.__PlayMusic,
Add:
#Tombola System
"OnPrepare" : self.__PrepareTombola,
"OnRun" : self.__RunTombola,
"openTombola" : self.__OpenTombola,
"closeTombola" : self.__CloseTombola,
"tombola" : self.SetTombola,
"get_input_value" : self.GetInputValue,
"get_input_start" : self.GetInputOn,
"get_input_end" : self.GetInputOff,
#End Tombala System
After:
def BINARY_ServerCommand_Run(self, line):
Add:
→def __OpenTombola(self):
→→→constInfo.wndTombola.Open()

→def __PrepareTombola(self, data):
→→constInfo.wndTombola.OnPrepare(str(data))

→def __RunTombola(self, number):
→→constInfo.wndTombola.OnRun(str(number))

→def SetTombola(self, qid):
→→constInfo.TOMBOLA = int(qid)

→def __CloseTombola(self):
→→constInfo.wndTombola.Close()

[glow=red]Error resolution[/glow]
syerr: Unknown Server Command get_input_start | get_input_start
In game.py Search:
def OpenQuestWindow(self, skin, idx):
Add:
→→if constInfo.INPUT_IGNORE == 1:
→→→return
Syserr1.jpg

Search:
def __ServerCommand_Build(self):
Add:
→→→"getinputbegin"→→→→: self.__Inputget1,
→→→"getinputend"→→→→: self.__Inputget2,
Add to the end:
→def __Inputget1(self):
→→constInfo.INPUT_IGNORE = 1
→ def __Inputget2(self):
→→constInfo.INPUT_IGNORE = 0

Open constinfo.py
Add:
INPUT_IGNORE = 0

Open uiquest.py
Search:
def __init__(self,skin,idx):
Add:
→→import constInfo
→→if constInfo.INPUT_IGNORE == 1:
→→→return
Syserr3.jpg


Quest:
Kod:
quest tombola begin
    state start begin
        function tablica(vnum, pozitie, pozitie2)
            local itemy = {
                            {
                                {25041, 1},
                                {27991, 1},
                                {31022, 1},
                                {31024, 1},
                                {31026, 1},
                                {71015, 1},
                                {27987, 30},
                                {85000, 1},
                                {72703, 1},
                                {72704, 1},
                                {30204, 1},
                                {50512, 1},
                                {81001, 1},
                                {30179, 3},
                                {71123, 1},
                                {71129, 1},
                                {25041, 1},
                            },
                            {
                                {25041, 1},
                                {27991, 1},
                                {31022, 1},
                                {31024, 1},
                                {31026, 1},
                                {71015, 1},
                                {27987, 30},
                                {85000, 1},
                                {72703, 1},
                                {72704, 1},
                                {30204, 1},
                                {50512, 1},
                                {81001, 1},
                                {30179, 3},
                                {71123, 1},
                                {71129, 1},
                                {25041, 1},
                            },
                        }
                return itemy[vnum][pozitie][pozitie2]
            end
          
      
      
        when login begin
            cmdchat("tombola "..q.getcurrentquestindex())
        end
      
        when 33008.chat."Tombola" begin
            say_title("Tombola")
            say("")
            say("Every spin is a winning, so you wont lose in any case.")
            say("You need:")
            say_item("Golden Ticket", 31012, "")
            wait()
            local vegas = number(1,2)
            local str = " "
            for i = 1,16 do
                if i == 16 then
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2)
                else
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2).."|"
                end
            end
            cmdchat("OnPrepare"..str)
            cmdchat("openTombola")
            setskin(NOWINDOW)
        end
  
        when info or button begin
            local vegas = number(1,2)
            local str = " "
            for i = 1,16 do
                if i == 16 then
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2)
                else
                    str = str..tombola.tablica(vegas, i, 1).."|"..tombola.tablica(vegas, i, 2).."|"
                end
            end
            cmdchat("OnPrepare"..str)
            if pc.count_item(31012) < 10 then
                syschat("You don't have enough golden tickets!")
                return
            end
          
            cmdchat("get_input_start")
            local intrare = input(cmdchat("get_input_value"))
            cmdchat("get_input_end")
            if intrare == "tombola|begin" then
                pc.setqf("slot", number(1, 16))
                cmdchat("OnRun "..number(2,3)*16+pc.getqf("slot").."|5")
            elseif intrare == "tombola|end" then
                pc.give_item2(tombola.tablica(vegas, pc.getqf("slot")+1, 1), tombola.tablica(vegas, pc.getqf("slot")+1, 2))
                pc.remove_item(31012, 10)
            end
        end
    end
end

thanks bro
 
@RID8R

get_input_value" : self.GetInputValue,
"get_input_start" : self.GetInputOn,
"get_input_end" : self.GetInputOff,

Def blokları eksik,

Problem, GetInputValue, GetInputOn, GetInputOff eksik starta basınca çalışmıyor
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst