MERHABA
KULLANDIGIM QUESTTE SORUN YASIYORUM BU YÜZDEN YENİ BİR QUEST'TE İHTİYACIM VAR.
YAŞLI KADINA İTEMİ SÜRÜKLEYİP BIRAKTIGIMIZDA İTEMİ SİLİP , SİLMEMEYİ SORDUGUNDA EVET DİYORUM SİLDİGİM İTEM /i 469 10 TANE RUNİK KILICI VAR EDVANTERDE BEN 1 TANESINI SİLİYORUM LAKİN QUEST HEPSİNİ SİLİYOR.
İSTEK;İSTEDİGİM QUESTTE İTEMİ YAŞLI KADINA SÜRÜKLEYİP BIRATIKTAN O İTEMTEN KAC TANE SİLECEGİMİ SORSUN
ÖRNEK; 10 TANE RUNİK KILICI VAR EDVANTERİMDE , 1 TANE RUNİK KILICINI YAŞLI KADINA SÜRÜKLEYİP BIRAKTIGIMDA 2 YAZDIGIMDA 10 TANE KILICIN 2 TANESİNİ SİLSİN 5000 YAZDIGIMDA 5000 İN TANESİNİ SİLSİN
KULLANDIGIM QUESTTE SORUN YASIYORUM BU YÜZDEN YENİ BİR QUEST'TE İHTİYACIM VAR.
YAŞLI KADINA İTEMİ SÜRÜKLEYİP BIRAKTIGIMIZDA İTEMİ SİLİP , SİLMEMEYİ SORDUGUNDA EVET DİYORUM SİLDİGİM İTEM /i 469 10 TANE RUNİK KILICI VAR EDVANTERDE BEN 1 TANESINI SİLİYORUM LAKİN QUEST HEPSİNİ SİLİYOR.
İSTEK;İSTEDİGİM QUESTTE İTEMİ YAŞLI KADINA SÜRÜKLEYİP BIRATIKTAN O İTEMTEN KAC TANE SİLECEGİMİ SORSUN
ÖRNEK; 10 TANE RUNİK KILICI VAR EDVANTERİMDE , 1 TANE RUNİK KILICINI YAŞLI KADINA SÜRÜKLEYİP BIRAKTIGIMDA 2 YAZDIGIMDA 10 TANE KILICIN 2 TANESİNİ SİLSİN 5000 YAZDIGIMDA 5000 İN TANESİNİ SİLSİN
Metin2'de İstek Quest ve İtem Silme Questleri Oluşturmak
Metin2 sunucularında quest sistematiği, oyuncuların oyun içi etkileşimlerini artırmak ve görev tabanlı oynanışı desteklemek açısından oldukça önemlidir. Bu yazıda özellikle istek quest ve item silme quest gibi özel görevlerin nasıl yazıldığını ve hangi Lua komutları ile yapılandırıldığını detaylıca ele alacağız.
İstek Quest Nedir?
İstek quest, oyuncudan belirli bir işlem yapmasını talep eden quest türüdür. Örneğin, bir NPC'ye belirli bir item getirmesi, bir görevi tamamlaması veya belirli bir konuma gitmesi istenebilir. Bu tür questler genellikle quest begin, quest end gibi yapılarla tanımlanır..quest define ile başlayan sistemlerde, istek kısmında say_title ile mesaj kutusu açılabilir, getitem ile item kontrolü yapılabilir.
Item Silme Quest Nasıl Oluşturulur?
Item silme questlerinde amaç, oyuncudan bir itemi teslim alması veya envanterinden silinmesidir. Bunun için Lua scriptlerinde pc.get_item_count fonksiyonu kullanılır. Eğer item sayısı yeterliyse, pc.remove_item komutu ile item silinir. Ardından quest reward kısmı ile oyuncuya ödül verilir. Bu süreçte quest state ve flag sistemleri de aktif olarak kullanılabilir.
Quest Script Yapısı ve Örnek Kod
Aşağıda basit bir item silme quest örneği verilmiştir:
Kod:
[B]quest[/B] istek_quest [B]begin[/B][BR][/BR][B]state[/B] start [B]begin[/B][BR][/BR][BR][/BR][B]when[/B] click [B]with[/B] npc.is_npc() [B]begin[/B][BR][/BR] say('Merhaba, bana 5 adet elmas getirir misin?')[BR][/BR] [B]local[/B] count = pc.get_item_count(70001)[BR][/BR] [B]if[/B] count >= 5 [B]then[/B][BR][/BR] pc.remove_item(70001, 5)[BR][/BR] pc.change_point('gold', 100000)[BR][/BR] say('Teşekkür ederim! İşte ödülünn.')[BR][/BR] [B]else[/B][BR][/BR] say('Yeterli elmasın yok.')[BR][/BR] [B]end[/B][BR][/BR][B]end[/B][BR][/BR][BR][/BR][B]end[/B][BR][/BR][B]end[/B]
Quest Hataları ve Debugging
Quest yazarken karşılaşılan en yaygın hatalardan birisi syntax hatasıdır. Ayrıca item ID'lerin yanlış girilmesi, flag'lerin yanlış yönetimi gibi durumlar da questin düzgün çalışmasını engeller. Debugging için quest log veya server console üzerinden çıktıları takip etmek gerekir.
Gelişmiş Quest Özellikleri
Metin2 quest sistematiğinde timer, trigger gibi gelişmiş özellikler de mevcuttur. Timer ile belirli süreli görevler, trigger ile tetiklenebilen görevler yazılabilir. Ayrıca quest chain sistemleri ile birbiriyle bağlantılı quest'ler de geliştirilebilir. Bu tür sistemlerde martysama quest ve metin2dev quest örneklerinden faydalanmak oldukça faydalıdır.
Sonuç
İstek quest ve item silme quest gibi sistemler, Metin2 sunucularında kullanıcı deneyimini zenginleştiren önemli ögelerdir. Doğru yapılandırılmış quest'ler, oyuncuların daha fazla sürede oyunda kalmasını sağlar. Quest geliştirme sürecinde dikkat edilmesi gereken detaylar, hem teknik hem de yaratıcı yönlerden önemlidir.
Creating Request Quests and Item Deletion Quests in Metin2
In Metin2 servers, the quest system is crucial for enhancing player interactions within the game and supporting mission-based gameplay. In this article, we will thoroughly examine how special quests like request quests and item deletion quests are written and structured using Lua commands.
What is a Request Quest?
A request quest is a type of quest that asks the player to perform a specific action. For example, players might be asked to deliver a certain item to an NPC, complete a task, or travel to a specific location. These types of quests are typically defined using structures such as quest begin, quest end. In systems starting with .quest define, the request section can open a message box using say_title, and item checks can be performed using getitem.
How to Create an Item Deletion Quest?
The goal in item deletion quests is to have the player hand over an item or remove it from their inventory. To achieve this, the function pc.get_item_count is used in Lua scripts. If the item count is sufficient, pc.remove_item is used to delete the item. Then, the player is rewarded via the quest reward section. During this process, quest state and flag systems can also be actively used.
Quest Script Structure and Sample Code
Below is a basic example of an item deletion quest:
Kod:
[B]quest[/B] request_quest [B]begin[/B][BR][/BR][B]state[/B] start [B]begin[/B][BR][/BR][BR][/BR][B]when[/B] click [B]with[/B] npc.is_npc() [B]begin[/B][BR][/BR] say('Hello, could you bring me 5 diamonds?')[BR][/BR] [B]local[/B] count = pc.get_item_count(70001)[BR][/BR] [B]if[/B] count >= 5 [B]then[/B][BR][/BR] pc.remove_item(70001, 5)[BR][/BR] pc.change_point('gold', 100000)[BR][/BR] say('Thank you! Here is your reward.')[BR][/BR] [B]else[/B][BR][/BR] say('You do not have enough diamonds.')[BR][/BR] [B]end[/B][BR][/BR][B]end[/B][BR][/BR][BR][/BR][B]end[/B][BR][/BR][B]end[/B]
Quest Errors and Debugging
One of the most common errors encountered while writing quests is syntax errors. Additionally, incorrect item IDs or improper management of flags can prevent quests from functioning properly. To debug, outputs should be monitored via quest log or server console.
Advanced Quest Features
Advanced features such as timers and triggers exist in the Metin2 quest system. Timers allow timed missions, and triggers enable event-based quests. Moreover, quest chains can link multiple quests together. Examples like martysama quest and metin2dev quest can be very helpful in such systems.
Conclusion
Request quests and item deletion quests are important elements that enrich the user experience on Metin2 servers. Properly configured quests help keep players engaged longer. Attention to detail during the quest development process is important both technically and creatively.
