Quests /Python Event Calendar and Automatic event quest

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Vanilla

Elite
Elite
Joined
Jan 28, 2019
Messages
839
Credits
1,190
A quest that can be very useful in labor servers. Each player can see when the events will take place. Also, when the system day and time comes, it automatically starts the event.

  • We enter our file / / usr / game / share / locale / turkey / quest , we throw our lua file. We come to Puttye.
  • cd /usr/game/share/locale/turkey/quest [ENTER]
  • ./qc oto_event.lua [ENTER]
  • We write / reload q with our gm char from the game . Those who want can throw a reboot.


Lua Home:

C++:
Expand Collapse Copy
quest event begin
    state start begin
        when letter begin
            send_letter ("Event Calendar")
        end
        when info or button begin
            say_title ("Event Calendar:")
            count ( "")
            say ("Monday: Moonlight 21.00 - 23.00")
            say ("Tuesday: Football Ball 21.00 - 23.00")
            say ("Wednesday: Pet Chest 21.00 - 23.00")
            say ("Thursday: Costume Chest 21.00 - 23.00")
            say ("Friday: Puzzle Box 21.00 - 23.00")
            say_reward ("Special Events;")
            say ("Saturday: VS-Tournament 21.00 KING Tag")
            say ("Sunday: OX-Event - 21.00 (10 SpiritStone, 1 Claw, 1 Stamp)")
            count ( "")
            wait ()
            send_letter ("Event Calendar")
        end
        when login begin
            local time = tonumber (os.date ("% H"))
            local gun = tostring (os.date ("% A"))
            if gun == "Monday" then
                if hour == 21 then
                    if game.get_event_flag ("ay_ac") == 0 then
                        game.set_event_flag ( "ay_ac", 1)
                        game.set_event_flag ( "ay_kap A", 0)
                        game.set_event_flag ( "AYISIGI", 1)
                        notice_all ("The moonlight event started for 2 hours.")
                    end
                elseif hour == 23 then
                    if game.get_event_flag ("ay_kapa") == 0 then
                        game.set_event_flag ( "ay_ac", 0)
                        game.set_event_flag ( "ay_kap A", 1)
                        game.set_event_flag ( "AYISIGI", 0)
                        notice_all ("The moonlight event has ended.")
                    end
                end
            elseif gun == "Tuesday" then
                if hour == 21 then
                    if game.get_event_flag ("top_ac") == 0 then
                        game.set_event_flag ( "top_ac", 1)
                        game.set_event_flag ( "top_kap A", 0)
                        game.set_event_flag ( "futboltop" is 1)
                        notice_all ("Soccer Ball event started for 2 hours.")
                    end
                elseif hour == 23 then
                    if game.get_event_flag ("top_kapa") == 0 then
                        game.set_event_flag ( "top_ac", 0)
                        game.set_event_flag ( "top_kap A", 1)
                        game.set_event_flag ( "futboltop" is 0)
                        notice_all ("Football Ball event is over.")
                    end
                end
            elseif gun == "Wednesday" then
                if hour == 21 then
                    if game.get_event_flag ("pet_ac") == 0 then
                        game.set_event_flag ( "pet_ac", 1)
                        game.set_event_flag ( "pet_kap A", 0)
                        game.set_event_flag ( "pet_event", 1)
                        notice_all ("Pet Chest event started for 2 hours.")
                    end
                elseif hour == 23 then
                    if game.get_event_flag ("pet_kapa") == 0 then
                        game.set_event_flag ( "pet_ac", 0)
                        game.set_event_flag ( "pet_kap A", 1)
                        game.set_event_flag ( "pet_event", 0)
                        notice_all ("Pet Chest event is over.")
                    end
                end
            elseif gun == "Thursday" then
                if hour == 21 then
                    if game.get_event_flag ("kostum_ac") == 0 then
                        game.set_event_flag ( "kostum_ac", 1)
                        game.set_event_flag ( "kostum_kap A", 0)
                        game.set_event_flag ( "dressup", 1)
                        notice_all ("The Costume Event started for 2 hours.")
                    end
                elseif hour == 23 then
                    if game.get_event_flag ("kostum_kapa") == 0 then
                        game.set_event_flag ( "kostum_ac", 0)
                        game.set_event_flag ( "kostum_kap A", 1)
                        game.set_event_flag ( "dressup", 0)
                        notice_all ("The Costume Event is over.")
                    end
                end
            elseif gun == "Friday" then
                if hour == 21 then
                    if game.get_event_flag ("info_ac") == 0 then
                        game.set_event_flag ( "bilgi_ac", 1)
                        game.set_event_flag ( "bilgi_kap A", 0)
                        game.set_event_flag ( "kids_day_quiz", 1)
                        notice_all ("The Puzzle Box Event started for 2 hours.")
                    end
                elseif hour == 23 then
                    if game.get_event_flag ("info_kapa") == 0 then
                        game.set_event_flag ( "bilgi_ac", 0)
                        game.set_event_flag ( "bilgi_kap A", 1)
                        game.set_event_flag ( "kids_day_quiz", 0)
                        notice_all ("The Puzzle Box Event is over.")
                    end
                end
            end
        end
    end
end
 
Back
Top