Questleri Renkli olarak yazma!

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 322

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba arkadaşlar şimdi sizlere queslerin renkli yazılması için basit bir işlem göstereceğim.
Questlerimizi yazarken 'say()' olarak yazıyorduk bu sefer 'say_renkinisimi()'olarak yazmaya başlıyacağız.

Kod:
[COLOR=#0000BB]quest metin2prince begin     state start begin         when 20092.chat[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"Duyuru" [/COLOR][COLOR=#0000BB]begin             say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])         [/COLOR][COLOR=#0000BB]end     end end [/COLOR]

Olarak yazıyorduk artık ,

Kod:
[COLOR=#0000BB]quest metin2prince begin     state start begin         when 20092.chat[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"Duyuru" [/COLOR][COLOR=#0000BB]begin             say_mavi[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])             [/COLOR][COLOR=#0000BB]say_mavi2[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])             [/COLOR][COLOR=#0000BB]say_siyah[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])             [/COLOR][COLOR=#0000BB]say_kirmizi[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])             [/COLOR][COLOR=#0000BB]say_yesil[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])             [/COLOR][COLOR=#0000BB]say_altin[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"Hoşgeldiniz!"[/COLOR][COLOR=#007700])         [/COLOR][COLOR=#0000BB]end     end end [/COLOR]

Anlatım ;

Kod:
[COLOR=#007700]/[/COLOR][COLOR=#0000BB]usr[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]game[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]share_data[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]locale[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]hongkong[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]quest [/COLOR]

Girin. Girdiğiniz yereden 'questlib.lua' dosyasını bulup açın
En alt tarafa aşağıdaki kodları ekleyin.

Kod:
[COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_mavi[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_kirmizi[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_yesil[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]238[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]238[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_altin[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]215[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]215[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_siyah[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_beyaz[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_sari[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]255[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end [/COLOR][COLOR=#007700]function [/COLOR][COLOR=#0000BB]say_mavi2[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]) [/COLOR][COLOR=#0000BB]say[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]206[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]209[/COLOR][COLOR=#007700])..[/COLOR][COLOR=#0000BB]name[/COLOR][COLOR=#007700]..[/COLOR][COLOR=#0000BB]color256[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]206[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]209[/COLOR][COLOR=#007700])) [/COLOR][COLOR=#0000BB]end  [/COLOR]


Bunları kodları ekledikten sonra 'quest_functions' dosyasını açıp. En alt tarafa altaki kodları ekleyin.

Kod:
[COLOR=#0000BB]say_blue say_mavi2 say_kirmizi say_yesil say_altin say_siyah say_beyaz say_sari [/COLOR]

İşlemi tamamladığınızdan emin olduktan sonra Questleri RENKLİ olarak yazmaya başlayacaksınız.
Questlerinizi 'say' yerine yukarıdaki sayli kodları uygulayabilirsiniz.
Metin2'de Questleri Renkli Yazma Rehberi

Metin2, özellikle MMORPG severler tarafından büyük bir ilgiyle takip edilen ve nostaljik atmosferiyle dikkat çeken bir oyundur. Bu oyunun en önemli sistemlerinden birisi olan quest (görev) sistemi, oyuncuların ilerlemesini sağlar ve oyun içi deneyimi zenginleştirir. Ancak bazı geliştiriciler, quest mesajlarını daha dikkat çekici hale getirmek için renkli metin kullanmak ister. Bu rehberde, Metin2 quest sistemine renkli metin ekleme konusunu detaylıca ele alacağız.

Renkli Quest Mesajları Neden Kullanılır?

Metin2 quest sistemlerinde, özellikle lua script dili kullanılarak geliştirilen özel görevlerde, mesajların renkli görünmesi kullanıcı deneyimini artırabilir. Oyuncuların dikkatini çekecek şekilde tasarlanan bir quest mesajı, görevin önemini vurgulamada oldukça etkilidir. Bu tür mesajlar genellikle quest edit aşamasında, lua kodlarına özel komutlar eklenerek sağlanır.

Quest Scriptlerinde Renkli Yazı Nasıl Eklenir?

Metin2 quest sistemlerinde renkli yazı kullanabilmek için lua dilinde özel bir komut yapısı kullanılır. Quest yazarken mesajların içine renk kodları gömülerek, her bir kelime ya da cümle farklı renkte gösterilebilir. Örneğin:

Kod:
[BR][/BR][B]say('[/B]/cFF0000[color=red]Kırmızı[/color] metin örneği!/c[BR][/BR][B]say('[/B]/cFF00FF[color=purple]Mor[/color] renkli bir mesaj./c[BR][/BR]


Yukarıdaki örnekte, /c[colorcode] ifadesi kullanılarak renk tanımlaması yapılmaktadır. Renk kodları hexadecimal formattadır ve RGB sistemine göre belirlenir.

Renkli Quest Geliştirme Pratikleri

Metin2 quest geliştirme sırasında renkli yazı kullanımı, özellikle custom quest ve daily quest gibi sistemlerde oldukça faydalıdır. Renkli metinler sayesinde oyuncular görevlerin önem derecesini kolayca fark edebilir. Ayrıca quest reward (ödül) veya quest trigger (tetikleyici) gibi bölümlerde renkli yazı kullanımı, dikkat çekicidir. Bu sayede quest chain (zincir görevler) daha akıcı ve anlaşılır hale gelir.

Quest Debug ve Renkli Yazılar

Bazı durumlarda quest yazımı sırasında hatalarla karşılaşılabilir. Bu gibi durumlarda quest debug işlemleri yapılırken, farklı renklerle uyarılar vermek, geliştiricinin hatayı daha hızlı bulmasına yardımcı olabilir. Örneğin kırmızı renk hata, turuncu uyarı, yeşil ise başarıyı gösterebilir. Bu yöntem, quest hata ayıklama sürecini kolaylaştırır.

Renkli Quest Sistemleri ve Sunucu Yönetimi

Birçok Metin2 server yöneticisi, kendi özel quest sistemlerini geliştirirken renkli mesajları kullanmayı tercih eder. Özellikle Martysama quest veya Metin2Dev quest gibi modül bazlı sistemlerde renkli yazı desteği, sunucu kalitesini artırır. Quest sistemlerinde flag, state, timer gibi yapılar da renkli mesajlarla desteklenebilir.

Sonuç

Metin2 quest sistemlerinde renkli yazı kullanımı, hem estetik hem de fonksiyonel açıdan birçok avantaj sağlar. Geliştiricilerin dikkatli bir şekilde planladığı renkli quest mesajları, oyuncuların oyun deneyimini ciddi anlamda artırabilir. Quest yazma, geliştirme ve debug süreçlerinde bu teknikleri kullanmak, profesyonel görünümlü sistemlerin oluşmasına katkı sağlar.


How to Write Colorful Quests in Metin2

Metin2 is a popular MMORPG loved by many players for its nostalgic atmosphere and engaging gameplay. One of its core systems is the quest system, which helps players progress and enriches their gaming experience. However, some developers aim to make quest messages more eye-catching by using colored text. This guide will cover how to add colorful text to quest messages in Metin2 in detail.

Why Use Colored Quest Messages?

In the Metin2 quest system, especially with custom quests developed using Lua scripting, colored messages can significantly enhance user experience. Well-designed colorful quest messages can draw player attention and highlight the importance of tasks. Such messages are usually implemented during the quest edit phase by inserting special commands into Lua code.

How to Add Colored Text in Quest Scripts?

To use colored text in Metin2 quests, specific command structures in Lua must be used. By embedding color codes into message strings while writing quests, each word or sentence can be displayed in different colors. For example:

Kod:
[BR][/BR][B]say('[/B]/cFF0000Red text example!/c[BR][/BR][B]say('[/B]/cFF00FFPurple colored message./c[BR][/BR]


In the examples above, the /c[colorcode] expression is used to define the text color. These color codes follow hexadecimal formatting based on the RGB system.

Best Practices for Colored Quest Development

Using colored text in Metin2 quest development is particularly beneficial in systems like custom quest and daily quest. Colored messages help players quickly identify the importance of quests. Additionally, colored text can be effective in sections such as quest reward or quest trigger, making quest chains easier to follow and understand.

Colored Text in Quest Debugging

Sometimes errors occur during quest creation. In these cases, using different colors for warnings during quest debug processes can help developers locate issues faster. For instance, red could indicate errors, orange warnings, and green success messages. This method makes the quest error detection process more efficient.

Colored Quest Systems and Server Management

Many Metin2 server administrators prefer using colorful messages when developing custom quest systems. Modules like Martysama quest or Metin2Dev quest benefit from colored text support, enhancing the server's overall quality. Elements like flag, state, and timer within quest systems can also be enhanced with colored messages.

Conclusion

Using colored text in Metin2 quest systems offers both aesthetic and functional benefits. Carefully planned colorful quest messages can significantly improve the player experience. Employing these techniques during quest writing, development, and debugging phases contributes to creating professional-quality systems.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt