Kristal Oda [CH1 SEÇMELİ] & [CH2 YAZMALI] >>> [LUA]

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba arkadaşlar,

Bugün çoğu kişinin istediği bir sistemi paylaşacağım. Bu sistemi kendim kullanıyordum daha iyi bir sistem geliştirdiğim için bunu paylaşmak istedim. Ch1 seçmeli, Ch2 yazmalı sistem şuanda çoğu tutulan büyük serverde olan bir sistem olduğundan arayanlarda çok, bunu fırsat bilip bu şekilde kristal oda questini ücretli satmaya başlamışlar. Böylesine basit bir sistemi para vererek almanızı istemem.


Yapılması gereken ayarlamaları dosya içerisinde dizinine kadar anlattım.






Kristal Oda [CH1 SEÇMELİ] & [CH2 YAZMALI] >>> [LUA]: Metin2 Quest Sisteminde Yeni Bir Seviye

Metin2 oyununda quest sistemleri, oyuncuların ilerlemesini sağlayan en temel yapı taşlarından biridir. Bu sistem özellikle LUA dilinde yazılmış olan questlerle daha da gelişmiş ve esnek hale gelmiştir. Bu makalede, 'Kristal Oda' adlı özel bir questin LUA tabanlı iki aşamasını detaylı olarak ele alacağız: CH1 (seçmeli) ve CH2 (yazmalı).

Kristal Oda Quest Hakkında Genel Bilgi

Kristal Oda, Metin2 sunucularında sunulan özel bir dungeon/quest sistemidir. Bu.quest, oyuncuların belli bir seviye veya eşya gereksinimine sahip olmalarını gerektirir. Oyuncu, doğru seçimleri yaparak ya da belirli görevleri yerine getirerek ilerlemeye çalışır. Questin iki farklı bölümü vardır:

- CH1 (Seçmeli): Bu bölümde oyuncudan bazı sorulara cevaplar vermesi beklenir. Doğru seçimi yapması gerekir.
- CH2 (Yazmalı): Burada ise oyuncudan belirli bir metni doğru yazması istenir. Yanlış yazarsa quest yeniden başlatılır.

Questin Lua Script Yapısı

LUA dili, Metin2 quest sistemlerinde kullanılan güçlü ve esnek bir betik dilidir. Quest geliştiricileri, LUA sayesinde karmaşık mantık yapıları oluşturabilir, özel sistemler geliştirebilirler. Kristal Oda questinin LUA scripti, iki ana fonksiyonu içerir: begin() ve end().

CH1 - Seçmeli Bölüm

CH1 aşamasında, oyuncuya bir menü gösterilir. Menüde belirli sayıda seçenek vardır. Oyuncu doğru seçeneği seçerse, CH2'ye geçebilir. Yanlış seçerse, quest sıfırlanır. Bu işlem bir if-else mantığıyla kontrol edilir. Örneğin:

Kod:
if select == 1 then[BR][/BR]    say('Tebrikler! Doğru seçeneği seçtiniz.') [BR][/BR]    set_state(2) -- CH2'ye geç[BR][/BR]else[BR][/BR]    notice('Yanlış seçenek. Lütfen tekrar deneyin.') [BR][/BR]    restart_quest()[BR][/BR]end


CH2 - Yazmalı Bölüm[/BR][/BR]
CH2 aşamasında, oyuncudan bir metin yazması istenir. Oyuncu doğru yazarsa quest tamamlanır, yanlışsa yeniden başlatılır. Bu bölümde string comparison işlemleri yapılır.

Kod:
local input = input_text()[BR][/BR]if input == 'dogru_metin' then[BR][/BR]    complete_quest()[BR][/BR]else[BR][/BR]    notice('Yanlış metin. Lütfen tekrar girin.') [BR][/BR]    restart_state()[BR][/BR]end


Questin Gereksinimleri ve Trigger Mekanizması

Quest, belirli bir NPC ile tetiklenir. Oyuncunun seviyesi, eşyaları veya flag durumu gibi bazı kriterler karşılanmadığında quest başlatılamaz. Bu kontroller, questin başına konulan koşullarla sağlanır.

Quest Ödülleri

Quest tamamlandığında oyuncuya özel ödüller verilir. Bu ödüller, eşyalar, 경험 puanı veya özel itemler olabilir. Reward sistemi, questin sonunda aktive edilir ve oyuncuya ödül verilir.

Hata Ayıklama ve Debugging

Quest geliştirme sürecinde hatalar oluşabilir. LUA betiklerinde debug işlemleri, questin doğru çalışıp çalışmadığını kontrol etmek için önemlidir. Geliştiriciler, loglama ve test işlemleriyle questi test ederler.

Sonuç

Kristal Oda questi, Metin2'de özel ve ilginç bir quest örneğidir. CH1 ve CH2 bölümleri, oyunculardan hem stratejik düşünmelerini hem de dikkatli olmalarını ister. LUA script sayesinde, bu questin her yönü özelleştirilebilir ve sunucuya özel hale getirilebilir. Quest sistemleri, Metin2'nin kalbinde yer alan önemli yapıdır ve bu gibi özel questler, oyuncuların uzun süre oyunda kalmasını sağlar.


Crystal Room [CH1 Multiple Choice] & [CH2 Written] >>> [LUA]: A New Level in Metin2 Quest System

In the Metin2 game, quest systems are among the fundamental elements that allow players to progress. This system has become more advanced and flexible with quests written in the LUA language. In this article, we will examine in detail two phases of a special quest called 'Crystal Room': CH1 (Multiple Choice) and CH2 (Written), both based on LUA.

General Information About Crystal Room Quest

The Crystal Room is a special dungeon/quest system offered on Metin2 servers. This quest requires players to meet certain level or item requirements. The player tries to advance by making correct choices or completing specific tasks. There are two different sections of the quest:

- CH1 (Multiple Choice): In this part, the player is asked to answer some questions correctly. They must choose the right option.
- CH2 (Written): Here, the player is required to write a specific text correctly. If they make a mistake, the quest resets.

Structure of the Lua Script for the Quest

LUA is a powerful and flexible scripting language used in Metin2's quest systems. Developers can create complex logical structures and develop custom systems thanks to LUA. The LUA script for the Crystal Room quest includes two main functions: begin() and end().

CH1 - Multiple Choice Section

In the CH1 stage, a menu is displayed to the player with several options. If the player selects the correct option, they can proceed to CH2. If wrong, the quest resets. This process is controlled via if-else logic. For example:

Kod:
if select == 1 then[BR][/BR]    say('Congratulations! You selected the correct option.') [BR][/BR]    set_state(2) -- Proceed to CH2[BR][/BR]else[BR][/BR]    notice('Wrong selection. Please try again.') [BR][/BR]    restart_quest()[BR][/BR]end


CH2 - Written Section

In the CH2 stage, the player is required to enter a specific text. If the input is correct, the quest completes; otherwise, it restarts. This section involves string comparison operations.

Kod:
local input = input_text()[BR][/BR]if input == 'correct_text' then[BR][/BR]    complete_quest()[BR][/BR]else[BR][/BR]    notice('Incorrect text. Please try again.') [BR][/BR]    restart_state()[BR][/BR]end


Requirements and Trigger Mechanism of the Quest

The quest is triggered by a specific NPC. If certain criteria such as the player's level, items, or flag status are not met, the quest cannot be started. These checks are implemented through conditions placed at the beginning of the quest.

Rewards of the Quest

Upon completion of the quest, special rewards are given to the player. These rewards can include items, experience points, or unique items. The reward system activates at the end of the quest and grants the player their rewards.

Debugging and Error Handling

Errors may occur during the development of the quest. Debugging operations in LUA scripts are important to check whether the quest is functioning properly. Developers use logging and testing methods to validate the quest.

Conclusion

The Crystal Room quest is an interesting and special example in Metin2. Its CH1 and CH2 stages require both strategic thinking and attention from players. Thanks to the LUA script, every aspect of the quest can be customized and tailored specifically for the server. Quest systems are a key component within Metin2, and quests like this keep players engaged and active in the game.
 

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

Benzer konular

Geri
Üst Alt