Onforum.net - Web and gaming resource community

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members .

Quests /Python Event Calendar and Automatic event quest

Vanilla

Elite
Elite
Credits
1,188
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++:
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
 

Similar threads


Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

If you don't want to see those ads just buy an upgrade.

Thank you for understanding!

RomanP

RomanP Purchase

User upgrade! at

🔥 Upgrade Now
Kevin22547

Kevin22547 Purchase

User upgrade! at

🔥 Upgrade Now

abysselves Purchase

User upgrade! at

🔥 Upgrade Now