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 Valentine's Day Event

Vanilla

Elite
Elite
Credits
1,180
C++:
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.
 

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!

Rogue

Rogue Purchase

User upgrade! at

🔥 Upgrade Now
Baba2

Baba2 Purchase

User upgrade! at

🔥 Upgrade Now

Escanor25 Purchase

User upgrade! at

🔥 Upgrade Now