Zeka Testi Sistemi Özeti:Saatte 1 kez otomatik çalışabilir (ya da GM komutuyla manuel başlatılır).
Oyunculara sorular gönderilir (örnek: “Türkiye'nin başkenti nedir?”).
Oyuncular cevabı doğrudan sohbet ekranına yazar.
İlk doğru cevaplayan oyuncu ödül alır.
Soru listesi .txt dosyasından çekilir.
question_list.txt (sorular dosyası)
Sunucu dizinine oluştur:
cmd.cpp GM Komutunu Tanımla
cmd.cpp içinde aşağıdaki ACMD tanım satırına ekle:
Kod:
ACMD(do_quiz); // Yeni komut fonksiyonu
Ve ardından cmd_info[*] dizisinin en altına (örneğin "warp",, "user" gibi satırların bulunduğu kısma) şunu ekle:
Kod:
{ "quiz", do_quiz, 0, POS_DEAD, GM_HIGH_WIZARD },
cmd_general.cpp
Global Değişkenler (dosya üstüne, #include altına):
Kod:
std::string g_current_question = ""; std::string g_current_answer = ""; bool g_quiz_active = false; DWORD g_quiz_start_time = 0;
do_quiz Fonksiyonu:
Kod:
ACMD(do_quiz) { FILE* fp = fopen("question_list.txt", "r"); if (!fp) { ch->ChatPacket(CHAT_TYPE_INFO, "Soru dosyası açılamadı."); return; } std::vector<std::pair<std::string, std::string>> questions; char line[256]; while (fgets(line, sizeof(line), fp)) { std::string str(line); size_t sep = str.find('|'); if (sep != std::string::npos) { std::string q = str.substr(0, sep); std::string a = str.substr(sep + 1); if (!a.empty() && a[a.length() - 1] == '\n') a.pop_back(); questions.push_back({q, a}); } } fclose(fp); if (questions.empty()) { ch->ChatPacket(CHAT_TYPE_INFO, "Soru bulunamadı."); return; } int idx = number(0, questions.size() - 1); g_current_question = questions[idx].first; g_current_answer = questions[idx].second; g_quiz_active = true; g_quiz_start_time = get_dword_time(); BroadcastNotice(" Zeka Sorusu: %s", g_current_question.c_str()); BroadcastNotice("Cevabı direkt yazın. İlk doğru yazan ödül kazanır!"); }
input_main.cpp Oyuncu Mesajı Cevap Kontrolü
CInputMain::Chat(...) Fonksiyonunu Bul
Bu fonksiyon genelde şu şekilde başlar:
Kod:
int CInputMain::Chat(LPCHARACTER ch, const char* data, size_t len)
Kod:
if (g_quiz_active && strcasecmp(data, g_current_answer.c_str()) == 0) { g_quiz_active = false; BroadcastNotice(" Tebrikler %s! Doğru cevabı verdin: %s", ch->GetName(), g_current_answer.c_str()); // Ödül: 1.000.000 Yang ver ch->PointChange(POINT_GOLD, 1000000); return CHAT_BLOCK; }
question_list.txt Dosyasını Sunucu Dizinine Ekle
Bu dosyayı game dosyasının çalıştığı dizine (örneğin share/locale/turkey/ gibi) ekle.
bu kadar
oyuna gir
/quiz komutunu kullan
Sorunun çıktığını gör
Doğru cevabı yaz
Zeka Testi Sistemi [C++] - Metin2 Lobby
Metin2 özel sunucularında geliştirilen sistemlerden biri olan Zeka Testi Sistemi, oyuncuların stratejik düşünme becerilerini ölçmeyi amaçlayan eğlenceli ve etkileşimli bir özelliktir. Bu sistem, C++ programlama dili kullanılarak geliştirilmiştir ve Metin2 sunucularında PvP odaklı oyun deneyimini zenginleştirmektedir. Zeka testi sistemi sayesinde oyuncular, belirli görevleri çözerek ödüller kazanabilir ve seviye atlama şansı yakalayabilirler.
Zeka Testi Sistemi Nedir?
Zeka testi sistemi, oyunculara sunulan mantık soruları, matematiksel problemler veya görsel bulmacalar gibi farklı türlerde zihinsel egzersizlerden oluşur. Her doğru cevap, oyuncuya belirli miktarda exp, item veya gold gibi ödüller kazandırır. Bu sistem, sadece eğlenceyi değil aynı zamanda oyuncuların aktif düşünmesini teşvik eder.
Sistem Özellikleri
- C++ tabanlı yapıya sahiptir.
- Oyuncu etkileşimi için dinamik arayüz desteklenir.
- Görsel ve metinsel sorularla çeşitlendirilmiştir.
- DB üzerinden verileri yönetir.
- Game server üzerinde çalışır.
- Kolayca özelleştirilebilir ve entegre edilebilir.
Geliştirme Süreci
Bu sistem C++ dilinde yazılmıştır ve Metin2 Server SRC üzerinde çalışır. Geliştirme sırasında game core yapısı kullanılır. DB Core ile oyuncu verileri saklanır. Sorular ve cevaplar database üzerinden kontrol edilir. Sistem, martysama tarafından önerilen teknik altyapıya uygun geliştirilmiştir.
Zeka Testi Sistemi Kurulumu
Sistemi kurmak için öncelikle game server üzerinde gerekli değişiklikler yapılmalıdır. Bu süreçte source edit işlemleri yapılır. Python ve Py GUI kullanılarak arayüz tasarımı da yapılabilir. UIScript dosyaları ile istemci tarafında görsel düzenlemeler sağlanır. Kurulum sonrası sistem, auth ve game sunucuları arasında uyumlu çalışır.
Avantajları
- Oyuncuların dikkatini çeker.
- PvP sistemlerini destekler.
- Sunucu trafiğini artırır.
- Yeni oyun mekanikleri sunar.
- Rekabet ortamı yaratır.
Sonuç
Zeka testi sistemi, Metin2 özel sunucularında benzersiz bir deneyim sunmayı hedefler. C++ tabanlı altyapısıyla güvenilir ve güçlü bir yapıya sahiptir. Bu sistem, Metin2 Development süreçlerinde önemli bir rol oynar ve oyuncuların hem eğlenmesini hem de düşünmesini sağlar. Daha fazla bilgi ve kaynak kod için Metin2 Lobby ziyaret edebilirsiniz.
Intelligence Test System [C++] - Metin2 Lobby
The Intelligence Test System is one of the systems developed for Metin2 private servers. It aims to measure players' strategic thinking skills through interactive and fun challenges. This system has been developed using the C++ programming language and enriches the PvP-focused gameplay experience on Metin2 servers. With this system, players can earn rewards by solving specific tasks and even advance in levels.
What Is The Intelligence Test System?
The intelligence test system consists of various mental exercises such as logic puzzles, mathematical problems, or visual riddles presented to the players. Each correct answer awards players with certain amounts of experience, items, or gold. This system not only provides entertainment but also encourages active thinking among players.
System Features
- Built on C++ base structure.
- Supports dynamic interfaces for player interaction.
- Includes both visual and textual questions.
- Manages data via DB.
- Runs on the game server.
- Easily customizable and integrable.
Development Process
This system is coded in C++ and runs on Metin2 Server SRC. During development, game core structures are used. Player data is stored via DB Core. Questions and answers are managed through the database. The system is developed according to the technical infrastructure suggested by martysama.
Installing the Intelligence Test System
To install the system, necessary modifications must first be made on the game server. In this process, source edit operations are performed. Interface designs can also be created using Python and Py GUI. Visual adjustments on the client side are provided through UIScript files. After installation, the system operates seamlessly between auth and game servers.
Benefits
- Attracts player attention.
- Supports PvP systems.
- Increases server traffic.
- Offers new gameplay mechanics.
- Creates competitive environments.
Conclusion
The Intelligence Test System aims to provide a unique experience in Metin2 private servers. With its reliable and robust C++-based architecture, it plays an important role in Metin2 Development processes, allowing players to both have fun and engage in critical thinking. For more information and source code, visit Metin2 Lobby.
