/usr/game/share/locale/turkey/quest endeksinde ki questlib.lua dosyayı düzenlemek üzere masa üstüne atıyoruz
Daha Sonra
function say_color(color,text)
if color==”blue” then
say(color256(0, 0, 255)..text..color256(196, 196, 196))
elseif color == “green” then
say(color256(0, 255, 0)..text..color256(196, 196, 196))
elseif color == “red” then
say(color256(255, 0, 0)..text..color256(196, 196, 196))
elseif color == “yellow” then
say(color256(255, 255, 0)..text..color256(196, 196, 196))
elseif color == “white” then
say(color256(255, 255, 255)..text..color256(196, 196, 196))
elseif color == “black” then
say(color256(0, 0, 0)..text..color256(196, 196, 196))
elseif color == “cyan” then
say(color256(0, 255, 255)..text..color256(196, 196, 196))
elseif color == “pink” then
say(color256(255, 0, 255)..text..color256(196, 196, 196))
elseif color == “miktarge” then
say(color256(255, 145, 0)..text..color256(196, 196, 196))
elseif color == “purple” then
say(color256(100, 0, 255)..text..color256(196, 196, 196))
else
say(color256(196, 196, 196)..text..color256(196, 196, 196))
end
end
Masa üstüne aldığımız ( questlib.lua ) dosyamıza müsait biçimde yerleştiyoruz ve dosyamızı yine ftp ye yolluyoruz tabi
Fonksiyon bölümünü tamamlamış olduk şimdi ise metin2 pwp de questte nasıl bir fonksiyon'a geçireceğimize sıra geldi.
quest colortest begin
state start begin
when 70039.use begin
say_title(“
say_color(“green”,”bu yazıyı yeşil olarak görürsün “)
end
end
end
görüldüğü üzere eski say(“Merhaba”) yapardık bunun yerine say_color(“red”,”bu yazı kırmızdır”)
İYİ FORUM'LAR
Daha Sonra
function say_color(color,text)
if color==”blue” then
say(color256(0, 0, 255)..text..color256(196, 196, 196))
elseif color == “green” then
say(color256(0, 255, 0)..text..color256(196, 196, 196))
elseif color == “red” then
say(color256(255, 0, 0)..text..color256(196, 196, 196))
elseif color == “yellow” then
say(color256(255, 255, 0)..text..color256(196, 196, 196))
elseif color == “white” then
say(color256(255, 255, 255)..text..color256(196, 196, 196))
elseif color == “black” then
say(color256(0, 0, 0)..text..color256(196, 196, 196))
elseif color == “cyan” then
say(color256(0, 255, 255)..text..color256(196, 196, 196))
elseif color == “pink” then
say(color256(255, 0, 255)..text..color256(196, 196, 196))
elseif color == “miktarge” then
say(color256(255, 145, 0)..text..color256(196, 196, 196))
elseif color == “purple” then
say(color256(100, 0, 255)..text..color256(196, 196, 196))
else
say(color256(196, 196, 196)..text..color256(196, 196, 196))
end
end
Masa üstüne aldığımız ( questlib.lua ) dosyamıza müsait biçimde yerleştiyoruz ve dosyamızı yine ftp ye yolluyoruz tabi
Fonksiyon bölümünü tamamlamış olduk şimdi ise metin2 pwp de questte nasıl bir fonksiyon'a geçireceğimize sıra geldi.
quest colortest begin
state start begin
when 70039.use begin
say_title(“
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
quest renkli yazı “)say_color(“green”,”bu yazıyı yeşil olarak görürsün “)
end
end
end
görüldüğü üzere eski say(“Merhaba”) yapardık bunun yerine say_color(“red”,”bu yazı kırmızdır”)
İYİ FORUM'LAR
Metin2 oyununda quest sistemleri, oyuncuların deneyim kazanması, eşya elde etmesi ve oyun içi hikâyeye dahil olması açısından büyük önem taşır. Bu sistemlerin en etkileyici yönlerinden birisi de quest içerisinde sunulan görsel ve metinsel deneyimdir. Özellikle quest sırasında gösterilen mesajlar, oyuncu dikkatini çekecek şekilde renklendirildiğinde daha etkileyici olabilir. Bu yazıda, Metin2 quest sisteminde nasıl istenen renkte yazı yazabileceğinizi detaylıca ele alacağız.
Metin2 Quest Sistemi Nedir?
Metin2'de quest sistemi, Lua dili kullanılarak geliştirilen komutlarla yönetilir. Quest dosyaları genellikle 'quest.lua' veya benzeri adlarla tanımlanır ve sunucuda belirli olayları tetiklemek, görevler oluşturmak veya NPC'lerle etkileşim kurmak için kullanılır. Quest sistemi aynı zamanda özel görevler, günlük görevler ve özel sunucular için özelleştirilmiş görevler için de temel alınmaktadır.
Quest İçerisinde Renkli Yazı Kullanımı
Quest içerisinde yazı yazarken standart olarak siyah renk kullanılır. Ancak bazı durumlarda uyarılar, önemli notlar veya hikâye anlatımları için farklı renkler tercih edilebilir. Metin2 quest sisteminde renkli yazı yazabilmek için özel komutlar kullanılır. Genellikle mesaj kutusuna yazılan metinlerde renk değiştirmek mümkündür. Bunun için aşağıdaki yapıyı kullanabilirsiniz:
say_text_ex(player.get_player_id(), '[0xFF0000]Bu kırmızı mesajdır.[/0xFF0000]')
Yukarıdaki örnekte, [0xFF0000] kodu kırmızı rengi temsil eder. Hexadecimal renk kodları kullanarak istediğiniz rengi seçebilirsiniz. Örneğin mavi için [0x0000FF], yeşil için [0x00FF00] gibi. Renkli yazılar sayesinde quest mesajlarınız daha dikkat çekici ve kullanıcı dostu hale gelir.
Renk Kodlarının Doğru Kullanımı
Renk kodlarını kullanırken dikkat etmeniz gereken birkaç önemli nokta vardır. İlk olarak, renk kodları genellikle 'say_text_ex' veya 'notice' gibi fonksiyonlarla birlikte kullanılır. Ayrıca, renk kodları doğrudan metin içinde yazılır ve kapatılır. Yanlış bir renk kodu kullanımı quest'in doğru çalışmamasına sebep olabilir. Bu nedenle, her zaman test ederek ilerlemek en güvenli yoldur.
Sık Yapılan Hatalar
Quest geliştirme sürecinde en çok karşılaşılan sorunlardan birisi renk kodlarının hatalı kullanımıdır. Bazı geliştiriciler, renk kodlarını yanlış yerde kapatırlar veya eksik renk kodları kullanırlar. Bu tür hatalar, metnin görünümünü bozabilir veya quest’in çalışmasını engelleyebilir. Ayrıca, tüm client’lerin renkli metni desteklediğinden emin olmak da önemlidir.
Pratik Renk Kodları
[0xFF0000] - Kırmızı
[0x00FF00] - Yeşil
[0x0000FF] - Mavi
[0xFFFF00] - Sarı
[0xFF00FF] - Mor
[0x00FFFF] - Turkuaz
[0xFFFFFF] - Beyaz
[0xCCCCCC] - Gri
Sonuç
Metin2 quest sistemleri, oyuncular için daha zengin ve etkileyici bir deneyim sunmak amacıyla geliştirilebilir. Renkli yazı kullanımı, özellikle önemli mesajların iletilmesi açısından oldukça faydalıdır. Doğru kullanıldığında, renkli metinler quest'lerin görsel kalitesini artırır ve oyuncu ilgisini çekebilir. Quest geliştirme sürecinde dikkat edilmesi gereken küçük detaylar, büyük farklar yaratabilir.
In the game Metin2, quest systems are crucial for players to gain experience, obtain items, and become involved in the in-game story. One of the most impressive aspects of these systems is the visual and textual experience presented during quests. Especially when messages displayed during quests are colorized to catch player attention, they can be more impactful. In this article, we will explain in detail how to write text in your desired color within a Metin2 quest.
What is the Metin2 Quest System?
The quest system in Metin2 is managed through commands developed using the Lua language. Quest files are generally defined with names like 'quest.lua' and are used to trigger specific events on the server, create missions, or interact with NPCs. The quest system also serves as a basis for special missions, daily quests, and customized quests for private servers.
Using Colored Text in Quests
By default, black color is used when writing text within a quest. However, in certain cases, different colors may be preferred for warnings, important notes, or storytelling. In the Metin2 quest system, special commands are used to write colored text. Usually, it is possible to change colors in message boxes. You can use the following structure:
say_text_ex(player.get_player_id(), '[0xFF0000]This is a red message.[/0xFF0000]')
In the above example, the code [0xFF0000] represents the color red. You can select any color by using hexadecimal color codes. For instance, [0x0000FF] for blue, [0x00FF00] for green, etc. Thanks to colored texts, your quest messages become more eye-catching and user-friendly.
Correct Usage of Color Codes
There are several important points to consider when using color codes. First, color codes are usually used together with functions like 'say_text_ex' or 'notice'. Additionally, color codes are written directly inside the text and closed. Incorrect usage of color codes may cause the quest not to function properly. Therefore, testing along the way is the safest method.
Common Mistakes
One of the most frequent issues encountered during the quest development process is the incorrect usage of color codes. Some developers close color codes in the wrong place or use incomplete color codes. Such errors may distort the appearance of the text or prevent the quest from running. It's also important to ensure that all clients support colored text.
Practical Color Codes
[0xFF0000] - Red
[0x00FF00] - Green
[0x0000FF] - Blue
[0xFFFF00] - Yellow
[0xFF00FF] - Purple
[0x00FFFF] - Cyan
[0xFFFFFF] - White
[0xCCCCCC] - Gray
Conclusion
Metin2 quest systems can be developed to offer richer and more engaging experiences for players. Using colored text is highly beneficial, especially for conveying important messages. When used correctly, colored texts enhance the visual quality of quests and attract player interest. Small details to pay attention to during the quest development process can make significant differences.
