Merhaba arkadaşlar,
Nerdeyse herkesin kullanmış olduğu metin2 oto event sistemini sizlerle paylaşmak istedim. Burada otomatik event ile iş yükünden kurtulmuş olacaksınız. Metin2 oto event için aşağıdaki kodları kullanıyoruz. Kodları siz istediğiniz şekilde değiştirebilirsiniz. Şimdi öncelikle masaüstünde bir txt dosyası oluşturup oto_event.lua adını veriyoruz. Daha sonra aşağıdaki kodları içerisine ekleyip kaydediyoruz. Tabi bu işlemi notepad++ ile yapıyoruz.
Sonra bu dosyayı filezilla içerisinde quest bölümüne atıyoruz. Daha sonra putty'e girip aşağıdaki komutları giriyoruz.
cd /usr/game/share/locale/turkey/quest
yazın ardından
./qc oto_event.lua
yazın. Son olarak reboot atarsanız işlem tamamlanmış olacak.
Nerdeyse herkesin kullanmış olduğu metin2 oto event sistemini sizlerle paylaşmak istedim. Burada otomatik event ile iş yükünden kurtulmuş olacaksınız. Metin2 oto event için aşağıdaki kodları kullanıyoruz. Kodları siz istediğiniz şekilde değiştirebilirsiniz. Şimdi öncelikle masaüstünde bir txt dosyası oluşturup oto_event.lua adını veriyoruz. Daha sonra aşağıdaki kodları içerisine ekleyip kaydediyoruz. Tabi bu işlemi notepad++ ile yapıyoruz.
Kod:
quest oto_event begin
state start begin
when login with pc.is_gm() begin
clear_server_timer("oto_event")
server_loop_timer("oto_event",1)
end
when oto_event.server_timer begin
local saat = tonumber(os.date("%H"))
local time = os.date("%X")
local gun = tostring(os.date("%A"))
if gun == "Monday" then
if time == "21:00:00" then
if game.get_event_flag("ayisigi") == 0 then
game.set_event_flag("ayisigi",1)
notice_all("Ayisigi Define Sandığı eventi 2 saat süreyle başlamıştır.")
end
elseif time == "23:00:00" then
if game.get_event_flag("ayisigi") == 1 then
game.set_event_flag("ayisigi",0)
notice_all("Ayisigi Define Sandığı eventi sona ermiştir.")
end
end
elseif gun == "Tuesday" then
if time == "21:00:00" then
if game.get_event_flag("event_altigen_drop") == 0 then
game.set_event_flag("event_altigen_drop",1)
notice_all("Altıgen Hediye Paketş eventi 2 saat süreyle başlamıştır.")
end
elseif time == "23:00:00" then
if game.get_event_flag("event_altigen_drop") == 1 then
game.set_event_flag("event_altigen_drop",0)
notice_all("Altıgen Hediye Paketi eventi sona ermiştir.")
end
end
elseif gun == "Wednesday" then
if time == "18:59:50" then
if game.get_event_flag("sertifika_drop") == 0 then
game.set_event_flag("sertifika_drop",1)
notice_all("Sertifika eventi 2,5 saat süreyle başlamıştır.")
end
elseif time == "21:29:50" then
if game.get_event_flag("sertifika_drop") == 1 then
game.set_event_flag("sertifika_drop",0)
notice_all("Sertifika eventi sona ermiştir.")
end
end
elseif gun == "Thursday" then
if time == "21:00:00" then
if game.get_event_flag("col_firtinasi_drop") == 0 then
game.set_event_flag("col_firtinasi_drop",1)
notice_all("Çöl Fırtınası eventi 1 saat süreyle başlamıştır.")
end
elseif time == "22:00:00" then
if game.get_event_flag("col_firtinasi_drop") == 1 then
game.set_event_flag("col_firtinasi_drop",0)
notice_all("Çöl Fırtınası eventi sona ermiştir.")
end
end
elseif gun == "Friday" then
if time == "20:00:00" then
if game.get_event_flag("football_drop") == 0 then
game.set_event_flag("football_drop",1)
game.set_event_flag("new_football_2014_event",1)
notice_all("Dünya Kupası eventi 3 saat süreyle başlamıştır.")
end
elseif time == "23:00:00" then
if game.get_event_flag("football_drop") == 1 then
game.set_event_flag("football_drop",0)
game.set_event_flag("new_football_2014_event",0)
notice_all("Dünya Kupası eventi sona ermiştir.")
end
end
elseif gun == "Saturday" then
if time == "21:00:00" then
if game.get_event_flag("sonsuz_kis_drop") == 0 then
game.set_event_flag("sonsuz_kis_drop",1)
notice_all("Sonsuz Kış Sandığı eventi 1 saat süreyle başlamıştır.")
end
elseif time == "22:00:00" then
if game.get_event_flag("sonsuz_kis_drop") == 1 then
game.set_event_flag("sonsuz_kis_drop",0)
notice_all("Sonsuz Kış Sandığı eventi sona ermiştir.")
end
end
elseif gun == "Sunday" then
if time == "19:00:00" then
if game.get_event_flag("cards_event") == 0 then
game.set_event_flag("cards_event",1)
notice_all("Okey Kart eventi 4 saat süreyle başlamıştır.")
end
elseif time == "23:00:00" then
if game.get_event_flag("cards_event") == 1 then
game.set_event_flag("cards_event",0)
notice_all("Okey Kart eventi sona ermiştir.")
end
end
end
end
end
end
Sonra bu dosyayı filezilla içerisinde quest bölümüne atıyoruz. Daha sonra putty'e girip aşağıdaki komutları giriyoruz.
cd /usr/game/share/locale/turkey/quest
yazın ardından
./qc oto_event.lua
yazın. Son olarak reboot atarsanız işlem tamamlanmış olacak.