Jump to content

Quest python comunication


Recommended Posts

Hello guys.

 

What I wanted was that when you arrive at 00:00 the server sent a variable to the client that would be a open window (sorry i use google translate)

In Server i have something like this:

        function settings()
            local time = os.date ("%H")
            local number = 1
            if time >= "21" then
                cmdchat("command_name "..number)
                notice_all("Can open python window")
            elseif time >= "23" then
                notice_all("Dont Start")
            elseif time >= "24" then
                notice_all("Dont Start 1")
            end
        end

------------------------------------------------------------------

In Client i have something like this:

In game:

 

"command_name"            : self.command_name_python,

 

    def command_name_python(self, number):
        if not self.teste:
            import uitestewindow
            self.teste = uitestewindow.moon()
        self.teste.BuildWindow(number)

----------------------------------------------------------------------

in uitestewindow i have:

    def BuildWindow(self, number):
        self.number = number
        if self.number == 1:
            self.Board = ui.BoardWithTitleBar()
            self.Board.SetSize(80, 66)
            self.Board.SetPosition(1143,70)
            self.Board.SetTitleName('Bónus')
            self.Board.AddFlag('float')
            self.Board.Show()
            self.Button1 = ui.Button()
            self.Button1 .SetParent(self.Board)
            self.Button1 .SetPosition(19, 31)
            self.Button1 .SetUpVisual("d:/ymir work/ui/bonus_noturno/lua1.tga")
            self.Button1 .SetOverVisual("d:/ymir work/ui/bonus_noturno/lua2.tga")
            self.Button1 .SetDownVisual("d:/ymir work/ui/bonus_noturno/lua3.tga")
            self.Button1 .SetText("")
            self.Button1 .SetEvent(self.moon_func)
            self.Button1 .Show()

 

what i am doing wrong?

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 2

      Stripe payments

    2. 2

      Stripe payments

    3. 144

      Shop Ex Renewal

    4. 0

      Sort By Last Play Time problem

    5. 0

      QuickSell in SpecialInventory Problem

    6. 12

      Legendary items effect

    7. 0

      M2Project Research | Teamler - Beta Tester

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.