Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Eskiden quest indexini(getcurrentquestindex) yollardı, o kayıt edilirdi. O index ile başlatılırdı.
Şimdi index vs. gereksiz kodlarla uğraşmaya gerek yok sadece ismiyle questi başlatabilirsiniz.
Input ignore için setskin(NOWINDOW) kullanabilirsiniz.
input_main.cpp'de blockqlist var, quest ismini eklerseniz o quest başlatılamaz.
!when info or button begin kullanmak zorundasınız!
Metin2 Start Quest By Name Sistemi Hakkında Bilgi
Metin2 özel sunucularında geliştirme yaparken, oyuncuların belirli görevleri adlarına göre başlatmalarını sağlayan Start Quest By Name sistemi oldukça yaygın bir özelliktir. Bu sistem sayesinde oyuncular, bir NPC'ye gitmeden veya belirli bir arayüzden geçmeden doğrudan konsol üzerinden ya da bir komut ile istedikleri görevi başlatabilirler. Bu yazıda Metin2Lobby olarak bu sistemin nasıl çalıştığını, hangi dosyalarda değişiklik yapılması gerektiğini ve geliştiriciler için ne gibi kolaylıklar sunduğunu detaylıca ele alacağız.
Quest Sistemine Genel Bakış
Metin2'de quest sistemi, oyuncuların oyun içinde gerçekleştirecekleri görevleri yönetmek için kullanılır. Görevler genellikle Lua betikleriyle tanımlanır ve sunucu tarafında çalıştırılır. Standart sistemde bir görev başlatmak için oyuncu bir NPC ile etkileşime girmek zorundadır. Ancak bazı özel sunucularda geliştiriciler, oyuncuların görevleri doğrudan başlatmalarına izin verecek şekilde sistemi genişletirler.
Start Quest By Name Nedir?
Start Quest By Name, oyuncunun konsola belirli bir komut yazarak veya bir buton aracılığıyla doğrudan görev adını girerek o görevi başlatmasını sağlayan bir sistemdir. Bu özellik genellikle test süreçlerinde ya da özel sunucuların sunduğu ekstra özellikler arasında yer alır. Kullanıcı dostu bir yapıya sahiptir ve geliştiricilerin görev testlerini hızlandırır.
Sistemin Uygulanışı
Bu sistemi aktif etmek için genellikle oyunun client-side ve server-side olmak üzere iki ana bileşende değişiklik yapılması gerekir. Client tarafında bir komut sistemi veya GUI üzerinden kullanıcıdan görev adı alınır. Sunucu tarafında ise bu isim kontrol edilir ve mevcutsa görev başlatılır. Bu işlem sırasında güvenlik önlemleri alınmalıdır. Aksi takdirde yetkisiz oyuncuların yasadışı görevleri başlatması mümkün olabilir.
Güvenlik Açıkları ve Öneriler
Doğrudan görev başlatma özelliği, güçlü bir araç olmasına rağmen yanlış uygulandığında güvenlik açıklarına neden olabilir. Özellikle yetkisiz oyuncuların admin görevlerini başlatması engellenmelidir. Sunucu tarafında görev adlarının listesi kontrol edilmeli ve sadece erişim hakkı olan oyunculara izin verilmelidir. Ayrıca komut sistemi için yetkilendirme mekanizmaları entegre edilmelidir.
C++ ve Python ile Entegrasyon
Metin2 özel sunucularında geliştirme yaparken, hem C++ hem de Python dilleri kullanılır. Client tarafında genellikle Python (py root, py ui), sunucu tarafında ise C++ (game src, core) kullanılır. Start Quest By Name sistemi hem client hem de server tarafında küçük değişikliklerle entegre edilebilir. Python tarafında bir GUI veya komut sistemi geliştirilirken, C++ tarafında quest_handling fonksiyonları üzerinde değişiklikler yapılır.
Örnek Kullanım Senaryosu
Oyuncu oyun içi bir komutla /startquest quest_adı komutunu girer. Client bu komutu server'a gönderir. Server, quest_adı'nın mevcut bir görev olup olmadığını kontrol eder. Eğer geçerliyse ve oyuncunun yetkisi varsa, görev başlatılır. Bu sayede oyuncu hızlıca test yapabilir veya özel görevlere erişebilir.
Sonuç
Metin2 özel sunucu geliştirme sürecinde Start Quest By Name sistemi, hem geliştiriciler hem de oyuncular için faydalı bir özelliktir. Ancak güvenlik önlemleri alınmadan kullanıldığında riskli olabilir. Doğru uygulandığında ise hem test süreçlerini kolaylaştırır hem de kullanıcı deneyimini artırır.
Information About Metin2 Start Quest By Name System
While developing on Metin2 private servers, the Start Quest By Name system is a common feature that allows players to start specific quests by their names. With this system, players can directly initiate a quest via console or through a command without needing to interact with an NPC or go through a specific interface. In this article, we at Metin2Lobby will explain how this system works, which files need modifications, and what conveniences it offers for developers.
Overview of the Quest System
In Metin2, the quest system manages tasks that players perform within the game. These quests are typically defined with Lua scripts and executed on the server side. In the standard system, players must interact with an NPC to start a quest. However, some private servers extend the system to allow players to start quests directly.
What Is Start Quest By Name?
Start Quest By Name allows players to start a quest by entering its name directly into the console or through a button. This feature is often used during testing phases or as an extra feature on certain private servers. It has a user-friendly structure and speeds up quest testing for developers.
Implementation of the System
To activate this system, usually modifications are required in two main components: the client-side and the server-side. On the client side, a command system or GUI is used to receive the quest name from the user. On the server side, the name is checked and if valid, the quest is started. Security measures must be taken to prevent unauthorized users from starting restricted quests.
Security Risks and Recommendations
Although direct quest starting is a powerful tool, improper implementation may lead to security vulnerabilities. Unauthorized players attempting to start admin quests should be prevented. The server must verify that the quest name exists and ensure only authorized players have access. Authorization mechanisms should also be integrated into the command system.
Integration with C++ and Python
In Metin2 private server development, both C++ and Python are used. Python (py root, py ui) is generally used on the client side, while C++ (game src, core) is used on the server side. The Start Quest By Name system can be integrated with small changes on both sides. While a GUI or command system can be developed in Python, modifications on the C++ side involve quest handling functions.
Example Use Case
The player enters /startquest quest_name as an in-game command. The client sends this command to the server. The server checks whether quest_name corresponds to a valid quest. If valid and the player has permission, the quest starts. This way, the player can quickly test or access special quests.
Conclusion
In the process of developing Metin2 private servers, the Start Quest By Name system is a beneficial feature for both developers and players. However, it can pose risks if used without proper security measures. When implemented correctly, it simplifies testing processes and enhances user experience.
