Jump to content

Official Events & Events Manager


MrLibya

Recommended Posts

  • Premium

M2 Download Center

This is the hidden content, please
( Internal )

hallo all

 

thos quests are only present in my files that i sell ( NewWorld) and someone stole it from one of my clients so i will public it here ( while the last update for thos two quests have too new feature )

the system will send a leeter to any gm with high level so he can start / close any event & also rate

note : it was writen too long time by me , so maybe u may not like some method

note2: the other event i will upload it here < useing official 40k quests < some of them i make litile change for them

note3: for adding more events , u can just add new line in the next two quests < easy to add

event manger:

Spoiler

 



			quest event begin

			    state start begin

			        when letter with pc.get_gm_level()==5 begin

			            send_letter(gameforge.event.letter_10)

			        end

			        when button or info begin

			            say_title(gameforge.event.title_20)

			            say(gameforge.event.say_30)

			            local events_info = {

			                --- event_name , flag

			                {gameforge.event.event_90, "new_2006_drop"},

			                {gameforge.event.event_100, "new_drop_moon"},

			                {gameforge.event.event_110, "new_valentine_drop"},

			                {gameforge.event.event_120, "new_football_drop"},

			                {gameforge.event.event_130, "new_ramadan_drop"},

			                {gameforge.event.event_140, "halloween_hair"},

			                {gameforge.event.event_150, "easter_rabbit"},

			                {gameforge.event.event_160, "new_xmas_event"},

			                {gameforge.event.event_170, "dressup_saleh"},

			                {gameforge.event.event_180, "sertbox_saleh"},

			                -- حالة خاصه , لاتقم بالتعديل هنا

			                {gameforge.event.say_70, nil}, -- rate

			                {gameforge.locale.cancel, ""} -- close

			            }

			            local menu01 = {}

			            for num1,str1 in ipairs(events_info) do

			                table.insert(menu01, str1[1])

			            end

			            local seltab01 = select_table(menu01, gameforge.locale.cancel)

			            if seltab01 == table.getn(menu01) then return end

			            say_reward(gameforge.event.say_reward_40)

			            if events_info[seltab01][2] == nil then

			                say(gameforge.event.say_80)

			                local min_rate = tonumber(input())

			                if min_rate == nil then

			                    say(gameforge.event.say_90)

			                    return

			                end

			                game.set_event_flag("event_rate", min_rate)

			            else

			                local s = select(gameforge.event.select_50, gameforge.event.select_60, gameforge.locale.cancel)

			                if s == 1 then

			                    notice_all(string.format(gameforge.event.notice_70, events_info[seltab01][1]))

			                    game.set_event_flag(events_info[seltab01][2], 1)

			                elseif s == 2 then

			                    notice_all(string.format(gameforge.event.notice_80, events_info[seltab01][1]))

			                    game.set_event_flag(events_info[seltab01][2], 0)

			                else

			                    return

			                end

			            end

			        end

			    end

			end  

			


		

event drop :

Spoiler


			quest event_drop begin

			    state start begin

			        function get_events_table()

			            if event_drop.events_info == nil then

			                event_drop.events_info={

			                    {gameforge.event.event_90, "new_2006_drop", 50037},

			                    {gameforge.event.event_100, "new_drop_moon", 50011},

			                    {" صندوق غامض ", "new_kids_day_drop", 50034},

			                    {gameforge.event.event_120, "new_football_drop", 50096},

			                    {gameforge.event.event_130, "new_ramadan_drop", 30315},

			                    {gameforge.event.event_170, "dressup_saleh", 50130},

			                    {gameforge.event.event_180, "sertbox_saleh", 50033},

			                }

			            end

			            return event_drop.events_info

			        end

			        

			        when login or enter begin

			            for i,v in ipairs(event_drop.get_events_table()) do

			                if game.get_event_flag(v[2]) == 1 then

			                    syschat(gameforge.event.say_100, v[1])

			                end

			            end

			        end

			        

			        when kill with not npc.is_pc() begin

			            for i,v in ipairs(event_drop.get_events_table()) do

			                if game.get_event_flag(v[2]) == 1 then

			                    local level = pc.get_level()

			                    local limit = npc.get_level0()

			                    local rate = game.get_event_flag("event_rate")

			                    if level < limit+5 then

			                        if math.random(1, 100) <= rate then

			                            game.drop_item_with_ownership(v[3])

			                        end

			                    end

			                end

			            end

			        end

			    end

			end   


 

 

  • Metin2 Dev 37
  • Eyes 2
  • Facepalm 1
  • Dislove 1
  • Sad 1
  • Cry 1
  • Confused 2
  • Good 9
  • Love 3
  • Love 40

If you're going to do something, then do it right.

Link to comment
Share on other sites

Announcements



×
×
  • 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.