[QUEST] Metin2 Oto Event

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 287

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba Arkadaşlar,

Paylaşılan oto event questlerde sıkıntı olduğu için Kendi sunucumda yapmak istediğim bir questti birkaç araştırma ve yardımla bu kodları buldum kendi kodlamam değildir ama kendi araştırmamla beraber uğraş verdiğim bir questtir.

1.Aşama:
Filezilla girin;

usr/game/share/locale/turkey/quest
dizinine gelin
oto_event.lua adında dosya oluşturup içine alttaki kodları yapıştırın ve kaydedin.
(Notepad++ kullanın.)

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

2.Aşama
Putty Login olun;

cd /usr/game/share/locale/turkey/quest
yazın ardından
./qc oto_event.lua
yazıp enterlayın.
Oyunda gm çarla /reload q yapın veya reboot atın.

NOT: Eventler benim filesimdeki event drop kodlarıdır siz kendi eventlerinizin açılması için gereken kodları set_event_flag ve get_event_flag kısmına yazın.

3.Aşama: (Sunucunun Saatini Kontrol Etme)
WGdWlY.png

Ayrıca belirlenen saatlerde başlaması için sunucu saatinizin yerel saatle aynı olması lazım onu kontrol etmek için putty login olup date yazıp sunucu saatinizi öğrenebilirsiniz eğer yerel saatle uyuşmuyorsa sunucu saatini değiştirmek için
yazıp enterlamanız yeterli.

Not:

Bir Teşekkür yeterli :)
Kodlamada ki eksiği bulmam da yardımcı olan 'e ve 'e teşekkür ederim.
[QUEST] Metin2 Oto Event

Metin2 oyununda quest sistemleri sunucuların aktifliğini artırmada kilit rol oynar. Bu sistemlerden biri olan Oto Event, oyuncuların belirli zaman aralıklarında otomatik olarak başlatılan etkinliklerle etkileşim kurmasını sağlar. Bu yazıda [QUEST] Metin2 Oto Event yapısını ve nasıl çalıştığını detaylıca ele alacağız.

Metin2 Quest Sistemi Nedir?
Quest (görev) sistemi, Metin2 sunucularında oyunculara verilen görevleri, ödülleri ve etkileşimleri yöneten yapıdır. Bu sistem genellikle Lua diliyle yazılmış scriptlerle çalışır. Metin2 Quest Script yapısı sayesinde geliştiriciler, oyunculara özel görevler tasarlayabilir, NPC'lerle etkileşim sağlayabilir, zamanlayıcılar (timer), bayraklar (flag) ve durum kontrolleri (state) gibi gelişmiş fonksiyonları kullanabilirler.

Oto Event Nedir?
Oto Event, belirli aralıklarla otomatik olarak çalışan özel bir quest yapısıdır. Örneğin saatte bir, günde bir ya da haftalık döngülerle başlatılan bu etkinlikler, oyuncuların belirli görevleri yapmalarını teşvik eder. Metin2 Oto Event sistemi, genellikle günlük görevler (daily quest), turnuvalar veya özel ödüller veren sistemler için kullanılır.

Quest Trigger ve Timer Kullanımı
Oto Event sistemleri, genellikle timer ve trigger mekanizmaları üzerinden çalışır. Timer, belirli bir süre sonra bir işlemi başlatmak için kullanılır. Trigger ise belirli bir eylemle (örneğin bir NPC'ye tıklamak) tetiklenir. Metin2 Lua üzerinde bu yapılarla çalışmak için geliştiriciler, quest begin ve quest end gibi komutları kullanırlar.

Oto Event Nasıl Yazılır?
Metin2 Quest Yazma sürecinde dikkat edilmesi gereken bazı önemli noktalar vardır:
- Quest adı benzersiz olmalıdır.
- Quest dosyası doğru yere (.lua uzantılı olarak) konulmalıdır.
- Trigger zamanlayıcılar doğru ayarlanmalıdır.
- Bayrak (flag) ve durum (state) yönetimi dikkatle yapılmalıdır.

Örnek Oto Event Yapısı:
Kod:
[B]quest auto_event begin[/B][BR][/BR][B]    state start begin[/B][BR][/BR][B]        when login or levelup with pc.level >= 30 begin[/B][BR][/BR][B]            set_timer('auto_daily', 86400) -- 24 saat[/B][BR][/BR][B]        end[/B][BR][/BR][B]        when auto_daily.timer begin[/B][BR][/BR][B]            notice_all('Yeni günlük görev başladı!')[/B][BR][/BR][B]        end[/B][BR][/BR][B]    end[/B][BR][/BR][B]end[/B]


Quest Hataları ve Debugging
Metin2 Quest Hata durumları sıkça karşılaşılan problemlerdir. Yanlış parantez kullanımı, eksik komutlar veya bayrak tanımlamaları gibi küçük hatalar, tüm sistemin çalışmasını engelleyebilir. Metin2 Quest Debug işlemleri için geliştiriciler genellikle log dosyalarını takip eder veya test sunucularında denemeler yaparlar.

Oto Event ile Kazanç ve Aktivite Artışı
Oto Event sistemleri, oyuncuların sunucuya olan bağlılığını artırır. Günlük görevlerle oyunculara özel ödüller verilerek aktif kalma motivasyonu sağlanır. Metin2 Quest Reward yapısı sayesinde item, EXP, gold gibi ödüller doğrudan.quest üzerinden verilebilir.

Sonuç
[QUEST] Metin2 Oto Event sistemi, sunucuların aktifliğini artırmak ve oyuncuları daha fazla tutturmak için güçlü bir araçtır. Doğru kullanıldığında hem Metin2 Quest sistemlerini geliştirmek hem de oyuncu deneyimini zenginleştirmek mümkündür. Metin2dev quest ve martysama quest gibi örnek sistemler incelenerek daha gelişmiş yapılar kurulabilir.


[QUEST] Metin2 Auto Event

In Metin2, quest systems play a key role in increasing server activity. One such system is Auto Event, which allows players to interact with automatically launched events at specific time intervals. In this article, we will thoroughly examine the structure of [QUEST] Metin2 Auto Event and how it works.

What is the Metin2 Quest System?
The quest system manages tasks, rewards, and interactions given to players on Metin2 servers. This system typically operates through scripts written in Lua. With Metin2 Quest Scripts, developers can design custom tasks for players, interact with NPCs, and use advanced features like timers, flags, and state controls.

What is Auto Event?
Auto Event is a special type of quest that runs automatically at set intervals. For example, these events may launch hourly, daily, or weekly, encouraging players to complete certain tasks. The Metin2 Auto Event system is often used for daily quests, tournaments, or systems offering special rewards.

Using Quest Triggers and Timers
Auto Events usually operate through timer and trigger mechanisms. Timers are used to initiate actions after a certain period, while triggers activate when a specific event occurs (e.g., clicking an NPC). Developers working with Metin2 Lua use commands like quest begin and quest end to manage these structures.

How to Write an Auto Event?
There are several important considerations when writing Metin2 quests:
- The quest name must be unique.
- The quest file must be placed correctly (as a .lua file).
- Timers and triggers should be configured properly.
- Flags and states must be managed carefully.

Sample Auto Event Structure:
Kod:
[B]quest auto_event begin[/B][BR][/BR][B]    state start begin[/B][BR][/BR][B]        when login or levelup with pc.level >= 30 begin[/B][BR][/BR][B]            set_timer('auto_daily', 86400) -- 24 hours[/B][BR][/BR][B]        end[/B][BR][/BR][B]        when auto_daily.timer begin[/B][BR][/BR][B]            notice_all('New daily quest started!')[/B][BR][/BR][B]        end[/B][BR][/BR][B]    end[/B][BR][/BR][B]end[/B]


Quest Errors and Debugging
Metin2 Quest Errors are common issues. Small mistakes such as incorrect parentheses usage, missing commands, or misconfigured flags can prevent the entire system from functioning. Developers often check log files or run tests on test servers during Metin2 Quest Debug processes.

Increasing Revenue and Activity Through Auto Events
Auto Event systems increase player retention on servers. By offering special rewards through daily quests, player motivation to stay active is enhanced. Thanks to the Metin2 Quest Reward system, items, EXP, gold, and more can be distributed directly through quests.

Conclusion
[QUEST] Metin2 Auto Event is a powerful tool for boosting server activity and retaining players. When used correctly, it enables both the development of Metin2 Quest systems and enrichment of the player experience. More advanced structures can be built by examining examples like Metin2dev quest and martysama quest.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt