Merhabalar.
Normalde sadece ücretli questlere eklediğim bir sistemdi, basit bir sistem olduğu için izinleri dahilinde paylaşıyorum.
Normalde sadece ücretli questlere eklediğim bir sistemdi, basit bir sistem olduğu için izinleri dahilinde paylaşıyorum.
FTP /quest dizininde işlem yapacağız:
quest_functions dosyası açılır ve eklenir: say_item_table
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Örnek questteki gibi item_list ile tanımlanan tabloyu virgüllere dikkat ederek dolduruyorsunuz ve daha sonra say_item_table fonksyonunun ikinci parametresini(6) kendinize göre düzenliyorsunuz. Buradaki rakam, itemlerin sıraya kaçarlı girebileceklerini belirliyor.
quest_functions dosyası açılır ve eklenir: say_item_vnum_inline
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
İyi forumlar.
(30 satırlık queste fazla ücret istediğimi düşünenler, sizin 300 satırınız benim 30 satırım!)
Metin2 Quest Sistemi: [LUA] Queste Yan Yana Resim Ekleme (Güncel) * Scp1453
Metin2 sunucularında quest sistemleri, oyuncuların daha fazla etkileşimde bulunmasını sağlar ve oyun deneyimini zenginleştirir. Özellikle LUA tabanlı quest geliştirme, Metin2 geliştiricileri için oldukça popülerdir. Bu yazıda, queste yan yana resim ekleme yönteminden bahsedeceğiz. Bu özellik, özellikle scp1453 tarzı sunucularda estetik açıdan büyük avantaj sağlar.
Metin2 quest geliştirme yaparken görsel ögelerin doğru kullanımı, quest'in dikkat çekmesini ve oyuncu katılımını artırır. Bu rehberde, LUA quest dosyalarına nasıl yan yana resim ekleneceğini adım adım inceleyeceğiz.
Quest Dosyasına Resim Ekleme
Quest sistemine görsel entegrasyonu sağlamak için, LUA dosyası içinde HTML benzeri etiketler kullanılır. Ancak Metin2 quest sistemine doğrudan HTML kodu yazamazsınız. Görselleri eklemek için özel fonksiyonlar kullanılır.
Not: Quest görselleri genellikle 'locale' klasörü altında saklanır. Örnek yol: locale/tr/effect/etc/quest_images/.
Yan Yana Resim Eklemenin Yöntemi
Quest penceresinde iki veya daha fazla görseli yan yana konumlandırmak için, resmin boyutlarını ve konumunu dikkatlice ayarlamanız gerekir. Bunun için LUA dosyasında image fonksiyonları kullanılır. Örnek kod bloğu:
sayac = 0
function resim_ekle()
sayac = sayac + 1
if sayac == 1 then
pc.setqf('resim_x', 10)
pc.setqf('resim_y', 10)
elseif sayac == 2 then
pc.setqf('resim_x', 70)
pc.setqf('resim_y', 10)
end
end
Quest Resmi Dinamikleştirme
Quest görselleri, sabit olabileceği gibi, oyuncunun quest durumuna göre dinamik olarak da değiştirilebilir. Örneğin, görev tamamlandığında farklı bir resim gösterilebilir. Bu, quest state kontrolüyle yapılır.
Scp1453 Uyumlu Resim Gösterimi
Scp1453 tabanlı sunucularda quest görselleri farklı UI sınıfları üzerinden çalışabilir. Bu nedenle, quest UI dosyalarında değişiklik yapmadan önce hangi sınıfın kullanıldığını kontrol etmelisiniz.
Örnek olarak:
Quest UI'nin Python tarafında tanımlı olduğu sınıfta, resim pozisyonları SetPosition metoduyla belirlenir. LUA tarafında ise bu değerler pc.getqf fonksiyonuyla alınır.
Hata Ayıklama ve Debug
Queste resim ekleme sırasında karşılaşılan hatalar genellikle şu şekildedir:
- Görsel yolunun yanlış olması
- Quest UI dosyasında pozisyon ayarlarının eksik olması
- Lua scriptinde syntax hatası
Quest debug yaparken, syserr.txt dosyasını mutlaka kontrol edin. Burada quest ile ilgili hatalar görünür.
Sonuç
Metin2.quest sistemine yan yana resim ekleme işlemi, kullanıcı deneyimini artıran küçük ama etkili bir özelliktir. Doğru şekilde uygulanırsa, özel quest sistemleriniz daha profesyonel ve şık görünecektir. Metin2lobby.com olarak bu gibi gelişmiş quest tekniklerini paylaşmaya devam edeceğiz.
Metin2 Quest System: Adding Side-by-Side Images to Quests (Updated) * Scp1453
In Metin2 servers, quest systems increase player engagement and enrich the gaming experience. Especially LUA-based quest development is very popular among Metin2 developers. In this article, we will discuss how to add side-by-side images to quests. This feature provides significant aesthetic advantages, especially on servers like scp1453.
When developing Metin2 quests, proper usage of visual elements helps the quest stand out and increases player participation. In this guide, we will examine step by step how to add side-by-side images into LUA quest files.
Adding Images to Quest File
To integrate visuals into the quest system, special functions are used instead of direct HTML-like tags. However, you cannot write raw HTML code directly into Metin2 quest files. Special functions are needed to add images.
Note: Quest images are usually stored under the 'locale' folder. Example path: locale/tr/effect/etc/quest_images/.
Method for Adding Side-by-Side Images
To position two or more images side-by-side within the quest window, you need to carefully adjust the size and position of the images. For this purpose, image functions are used in the LUA file. Example code block:
counter = 0
function add_image()
counter = counter + 1
if counter == 1 then
pc.setqf('image_x', 10)
pc.setqf('image_y', 10)
elseif counter == 2 then
pc.setqf('image_x', 70)
pc.setqf('image_y', 10)
end
end
Dynamic Quest Images
Quest images can be dynamic based on the player's quest status, not just static. For example, a different image can be shown once the quest is completed. This is done with quest state checks.
Scp1453 Compatible Image Display
On scp1453-based servers, quest images may operate through different UI classes. Therefore, before making any changes to the quest UI files, make sure which class is being used.
As an example:
In the Python side where the quest UI is defined, image positions are set via the SetPosition method. On the LUA side, these values are retrieved using the pc.getqf function.
Debugging and Error Handling
Errors encountered while adding images to quests typically include:
- Incorrect image path
- Missing position settings in quest UI file
- Syntax error in Lua script
While debugging quests, always check the syserr.txt file. Errors related to the quest will appear here.
Conclusion
Adding side-by-side images to the Metin2 quest system is a small but impactful feature that enhances user experience. When implemented correctly, your custom quests will look more professional and stylish. As Metin2lobby.com, we will continue to share such advanced quest techniques.
