Kod:
quest blackforceitemsilici begin state start begin when 20094.take with item.get_id() begin kod = item.get_vnum() say_title("Item silici") say("Demek item silmek istiyorsun.") say_item_vnum(kod) say("Tamam, "..item.get_name().." esyasini senin icin siliyorum.") local s = select("Sil","Kalsin") if s == 1 then pc.remove_item(kod) elseif s == 2 then return end end when 20094.chat."Nasil item silebilirim?" begin say_title("Item silici") say("Merhabalar envanterinizde gereksiz yer kaplayan") say("esyalari silmek icin bana gelebilirsin..") say("Sadece itemi ustume surukle!") end end end
Hepsini silme questi
Kod:
quest blackforceitemsilici begin state start begin when 20094.take with item.get_id() begin kod = item.get_vnum() adet = pc.count_item(kod) say_title("Item silici") say("Demek item silmek istiyorsun.") say_item_vnum(kod) say("Tamam, "..item.get_name().." esyasini senin icin siliyorum.") local s = select("Sil","Kalsin") if s == 1 then pc.remove_item(kod,adet) elseif s == 2 then return end end when 20094.chat."Nasil item silebilirim?" begin say_title("Item silici") say("Merhabalar envanterinizde gereksiz yer kaplayan") say("esyalari silmek icin bana gelebilirsin..") say("Sadece itemi ustume surukle!") end end end
Bu questi nasıl yüklerim?
Questi yüklemek çok basit.
PuTTY'ye gelip ;
cd /usr/game/share/locale/turkey/quest
[ENTER]
./qc silelim.quest
[ENTER]
Ve oyun içerisinde /reload q yaparak questi kullanmaya başlayabilirsiniz.
Metin2'de Sürükle Bırak Sistemi ile İtem Silme Quest'i Oluşturma
Metin2 sunucularında quest sistemleri, oyuncuların deneyim kazanması, ödüller alması ve oyun içi hikayeye dahil olması için kritik öneme sahiptir. Bu sistemlerin en dikkat çekici ve kullanışlı örneklerinden birisi sürükle bırak (drag and drop) tabanlı questlerdir. Özellikle item silme quest gibi işlemlerde bu sistem, kullanıcı dostu bir arayüz sunar. Bu yazıda, Metin2 üzerinde sürükle bırak sistemi kullanarak item silme quest nasıl yapılır onu detaylıca inceleyeceğiz.
Sürükle Bırak Sistemi Nedir?
Sürükle bırak sistemi, Metin2 oyununda belirli bir quest işlevini başlatmak veya bir işlemi gerçekleştirmek için oyuncudan gelen etkileşimli eylemleri temsil eder. Örneğin, bir quest penceresi açılır ve oyuncudan belirli bir itemi belirtilen alana sürükleyip bırakması istenir. Bu işlem, Lua script tarafında tanımlanan belirli bir fonksiyonu tetikler ve item silinir veya başka bir işlem gerçekleştirilir.
İtem Silme Quest Script Yapısı
Metin2 quest sistemleri genellikle Lua dilinde yazılır. Bir quest dosyası (.lua uzantılı) içinde,.quest uzantılı yapılar kullanılır. Quest trigger mekanizmaları sayesinde, oyuncu belirli bir NPC ile etkileşime girdiğinde veya belirli bir itemi envanterden sürüklediğinde işlem başlatılır. Bu işlem sırasında, quest state ve flag yapıları önemlidir. Quest’in hangi aşamada olduğu, item silme işlemi yapılmış mı gibi bilgiler buradan kontrol edilir.
Quest Başlatma ve Item Kontrolü
Öncelikle, quest’in başlatılması için bir begin bloğu oluşturulur. Burada oyuncunun quest başlatma şartları kontrol edilir. Ardından, sürükle bırak sistemi ile item kontrolü yapılır. Oyuncu, belirtilen itemi quest penceresine sürüklediğinde, quest event ile item ID’si kontrol edilir. Eğer doğru item ise, pc.remove_item komutuyla item silinir ve oyuncuya ödül verilir.
Item Silme Quest Hataları ve Debugging
Quest yazarken karşılaşılan en yaygın sorunlardan biri quest hata oluşumudur. Bu hatalar genellikle quest debug işlemleri ile çözülür. Özellikle item silme işlemlerinde, item ID’si yanlış girilmişse veya quest flag durumu uygun değilse, işlem gerçekleşmez. Metin2Dev ve MartySama gibi topluluklar, bu konularda destek sağlar. Hata ayıklama için log dosyaları incelenmelidir.
Quest Reward ve Ödül Sistemi
Item silme quest’inin başarılı bir şekilde tamamlanması sonucu, oyuncuya quest reward olarak para, EXP veya özel item verilebilir. Bu ödüller, quest reward blokları ile tanımlanır. Aynı zamanda, daily quest sistemleri ile bu işlem günlük olarak tekrarlanabilir hale getirilir. Daily quest sistemi, oyuncunun her gün aynı quest’i yapmasını engeller.
Metin2 Quest Edit Araçları
Quest geliştirme sürecinde, quest edit araçları büyük kolaylık sağlar. Quest dosyaları manuel olarak da düzenlenebilir ama özel araçlar ile geliştirme süresi kısalır. Quest dosyaları, genellikle quest_info.lua ve quest.lua dosyalarında bulunur. Quest chain sistemleri ile birden fazla quest birbiriyle bağlanabilir.
Sonuç
Metin2 üzerinde sürükle bırak sistemi ile çalışan bir item silme quest oluşturmak, hem oyuncu deneyimi açısından hem de sunucu yönetimi açısından oldukça faydalıdır. Doğru yapılandırılmış bir quest sistemi, oyuncuların daha aktif kalmasını ve oyun içi etkileşimi artırmayı sağlar. Quest geliştirme, Metin2 sunucularının özelleştirilmesi açısından kritik öneme sahiptir.
Creating Item Deletion Quest with Drag and Drop System in Metin2
In Metin2 servers, quest systems are critical for players to gain experience, receive rewards, and become part of the game's story. Among these systems, one of the most noticeable and useful examples are the drag and drop-based quests. Particularly in operations like item deletion quests, this system offers a user-friendly interface. In this article, we will examine in detail how to create an item deletion quest using the drag and drop system in Metin2.
What is the Drag and Drop System?
The drag and drop system represents interactive actions from the player to initiate a specific quest function or perform an operation in the Metin2 game. For example, a quest window opens and the player is asked to drag a certain item into a designated area. This action triggers a specific function defined in the Lua script, which then deletes the item or performs another action.
Structure of Item Deletion Quest Scripts
Metin2 quest systems are generally written in Lua. Within a quest file (.lua extension), structures with .quest extension are used. With quest trigger mechanisms, when a player interacts with a specific NPC or drags a certain item from their inventory, the process starts. During this process, quest state and flag structures are important. Information such as at which stage the quest is, or whether the item deletion has been performed, is checked here.
Starting the Quest and Item Check
Firstly, a begin block is created to start the quest. Here, the conditions for the player to initiate the quest are checked. Then, an item check is made via the drag and drop system. When the player drags the specified item to the quest window, the quest event checks the item ID. If the correct item is provided, the item is deleted using the pc.remove_item command and a reward is given to the player.
Quest Errors and Debugging
One of the most common issues encountered during quest writing is quest error occurrence. These errors can typically be resolved through quest debug processes. Especially in item deletion operations, if the item ID is entered incorrectly or the quest flag status is not appropriate, the operation fails. Communities like Metin2Dev and MartySama provide support in these areas. Log files should be examined for debugging purposes.
Quest Rewards and Reward System
Upon successful completion of the item deletion quest, the player can be rewarded with money, EXP, or special items as quest reward. These rewards are defined within quest reward blocks. Additionally, with daily quest systems, this process can be repeated each day. The daily quest system prevents players from repeating the same quest every day.
Metin2 Quest Editing Tools
During the quest development process, quest edit tools offer great convenience. Although quest files can also be edited manually, special tools reduce development time. Quest files are usually located in quest_info.lua and quest.lua files. With quest chain systems, multiple quests can be linked together.
Conclusion
Creating an item deletion quest that operates with the drag and drop system in Metin2 is highly beneficial both in terms of player experience and server management. A correctly configured quest system ensures that players remain more active and increases in-game interaction. Quest development is critically important for customizing Metin2 servers.
