Premium MrLibya 554 Posted August 14, 2015 Premium Share Posted August 14, 2015 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) hallo all i want public my auto even quest , it's very simple to understand i made it from some long time quest auto_events begin state start begin when 20086.chat."auto event" with pc.is_gm() begin say_title(" Hallo "..pc.get_name()) say(" state now "..game.get_event_flag("autoevent").." ") say(" ") local s = select(" active "," disable "," close ") if s == 1 then setskin(NOWINDOW) server_loop_timer("auto_event_timer", 1) game.set_event_flag("autoevent", 1) elseif s == 2 then setskin(NOWINDOW) clear_server_timer("auto_event_timer") game.set_event_flag("autoevent", 0) end end when auto_event_timer.server_timer begin local events_info = { {"Sat 14:00", "hair", "event", "hairup", 1, " 4 hours ", "Sat 18:00", 0}, {"Sun 14:00", "6 Shabe Box", "event", "2006_drop", 1, " 4 hours ", "Sun 18:00", 0}, {"Mon 13:00", "Gold ball", "event", "gold_bool", 1, " 4 hours ", "Mon 18:00", 0}, {"Tue 14:00", "dressup box", "event", "dressup", 1, " 4 hours ", "Tue 18:00", 0}, {"Wed 14:00", "fotball box", "event", "football_drop", 1, " 4 hours ", "Wed 18:00", 0}, {"Thu 14:00", "moon box", "event", "drop_moon", 1, " 4 hours ", "Thu 18:00", 0}, {"Fri 14:00", "mount", "event", "Mount_Ring_Event", 1, " 4 hours ", "Fri 18:00", 0}, } local day_time = os.date("%a %H:%M") for i,v in ipairs(events_info) do if v[1] == day_time then if game.get_event_flag(v[4]) != v[5] then notice_all("notice: event "..v[2].." actived for "..v[6].." started from now! ") game.set_event_flag(v[4], v[5]) end elseif v[7] == day_time then if game.get_event_flag(v[4]) != v[8] then notice_all(" notice: event "..v[2].." finish, see u with other events !! ") game.set_event_flag(v[4], v[8]) end end end end end end 36 1 1 1 1 8 1 1 36 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
metin2team 766 Posted August 14, 2015 Share Posted August 14, 2015 I already have one. but nice work Link to comment Share on other sites More sharing options...
Premium Mano 22 Posted August 15, 2015 Premium Share Posted August 15, 2015 already have it Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted August 15, 2015 Author Premium Share Posted August 15, 2015 already have it yes my u stole it , i dont care anyway I already have one. but nice work yeah i know , thx If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Night 366 Posted August 19, 2015 Share Posted August 19, 2015 thx bro + .." " and fotball ahah 2 Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted August 24, 2015 Author Premium Share Posted August 24, 2015 (edited) note: for who ask about add new eventjust add new line after this {"Fri 14:00", "mount", "event", "Mount_Ring_Event", 1, " 4 hours ", "Fri 18:00", 0}, so it's like that "Fri 14:00" begin time "mount" event name type ( unimplemented ) "Mount_Ring_Event" the event flag name 1 the event start flag " 4 hours " event time "Fri 18:00" event finish time 0 event finish flag Edited August 24, 2015 by MrLibya If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
pfanner 2 Posted August 29, 2015 Share Posted August 29, 2015 hallo all i want public my auto even quest , it's very simple to understand i made it from some long time quest auto_events begin state start begin when 20086.chat."auto event" with pc.is_gm() begin say_title(" Hallo "..pc.get_name()) say(" state now "..game.get_event_flag("autoevent").." ") say(" ") local s = select(" active "," disable "," close ") if s == 1 then setskin(NOWINDOW) server_loop_timer("auto_event_timer", 1) game.set_event_flag("autoevent", 1) elseif s == 2 then setskin(NOWINDOW) clear_server_timer("auto_event_timer") game.set_event_flag("autoevent", 0) end end when auto_event_timer.server_timer begin local events_info = { {"Sat 14:00", "hair", "event", "hairup", 1, " 4 hours ", "Sat 18:00", 0}, {"Sun 14:00", "6 Shabe Box", "event", "2006_drop", 1, " 4 hours ", "Sun 18:00", 0}, {"Mon 13:00", "Gold ball", "event", "gold_bool", 1, " 4 hours ", "Mon 18:00", 0}, {"Tue 14:00", "dressup box", "event", "dressup", 1, " 4 hours ", "Tue 18:00", 0}, {"Wed 14:00", "fotball box", "event", "football_drop", 1, " 4 hours ", "Wed 18:00", 0}, {"Thu 14:00", "moon box", "event", "drop_moon", 1, " 4 hours ", "Thu 18:00", 0}, {"Fri 14:00", "mount", "event", "Mount_Ring_Event", 1, " 4 hours ", "Fri 18:00", 0}, } local day_time = os.date("%a %H:%M") for i,v in ipairs(events_info) do if v[1] == day_time then if game.get_event_flag(v[4]) != v[5] then notice_all("notice: event "..v[2].." actived for "..v[6].." started from now! ") game.set_event_flag(v[4], v[5]) end elseif v[7] == day_time then if game.get_event_flag(v[4]) != v[8] then notice_all(" notice: event "..v[2].." finish, see u with other events !! ") game.set_event_flag(v[4], v[8]) end end end end end end thank u Link to comment Share on other sites More sharing options...
mdxyz 240 Posted March 4, 2016 Share Posted March 4, 2016 thx 2 Link to comment Share on other sites More sharing options...
Scooby 25 Posted March 4, 2016 Share Posted March 4, 2016 nice work. 2 Link to comment Share on other sites More sharing options...
str0nd3r 0 Posted June 15, 2017 Share Posted June 15, 2017 work? Link to comment Share on other sites More sharing options...
DisLoyal 21 Posted August 18, 2019 Share Posted August 18, 2019 work like charm. but a little idiot question.. can we put here a "2019-08 .... bla bla blah " Date? thanks for answern Link to comment Share on other sites More sharing options...
Honorable Member Mali 41874 Posted August 19, 2019 Honorable Member Share Posted August 19, 2019 21 hours ago, DisLoyal said: work like charm. but a little idiot question.. can we put here a "2019-08 .... bla bla blah " Date? thanks for answern {"2019.08.19 14:00", "hair", "event", "hairup", 1, " 4 hours ", "2019.08.19 18:00", 0}, local day_time = os.date("%Y.%m.%d %H:%M") source:https://www.lua.org/pil/22.1.html 1 2 2 Link to comment Share on other sites More sharing options...
DisLoyal 21 Posted September 16, 2019 Share Posted September 16, 2019 Thank mali i try it! Link to comment Share on other sites More sharing options...
DisLoyal 21 Posted September 16, 2019 Share Posted September 16, 2019 work like charm thanks again! 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts