Quests /Python Valentine's Day Event

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
C++:
Expand Collapse Copy
quest saovalentim begin
    state start begin
        when login begin
                if game.get_event_flag ("sao_valentim") == 1 then
                    notice ("The Valentine's Day event is active.")
                end
            end
        when 20095.chat. "St. Valentine's Event" with pc.is_gm () begin
            say_title ("St. Valentine's Day")
            say ("The 'Valentine's Day' event consists of the drop")
            say ("of Yellow Roses and Chocolates by characters")
            say ("female 'and Red Roses and Chocolates")
            say ("by 'Male' characters. These items")
            say ("contains a gift inside and should be")
            say ("exchanged between couples so they can be opened.")
            say_reward ("What do you want to do?")
        local s = select ("Enable Event", "Disable Event", "Cancel")
            if s == 1 then
                game.set_event_flag ("sao_valentim", 1)
                notice_all ("The Valentine's Day event has started.")
                notice_all ("You can now get Yellow Roses, Red Roses and Chocolates")
                notice_all ("on all monsters and exchange them with your partner.")
            elseif s == 2 then
                game.set_event_flag ("sao_valentim", 0)
                notice_all ("The Valentine's Event is over.")
                notice_all ("Unfortunately the Valentine's Day event has ended, but it hasn't")
                notice_all ("You will be sad on February 14th, there's more!")
            end
        end

        when kill with not npc.is_pc () and game.get_event_flag ("sao_valentim") == 1 begin
            local porc2 = math.random (1,1500)
            if pc.get_sex () == 1 then
                if porc2 <= 3 then
                    game.drop_item_with_ownership ("50031", 1)
                elseif porc2 == 18 then
                    game.drop_item_with_ownership ("50025", 1)
                end
            end
                    
                    
            if pc.get_sex () == 0 then
                if porc2 <= 3 then
                    game.drop_item_with_ownership ("50024", 1)
                elseif porc2 == 18 then
                    game.drop_item_with_ownership ("50025", 1)
                end
            end
            
        end
    end
end


'Valentine's Day' event as you can see consists of the drop of roses and chocolates and to be opened it has to be exchanged for characters of the opposite sex.
I am not sure if it is 100% the same as the official because I never went through that event.
 
Back
Top