Bot kontrolun çalışma mantığı 30 metin kırdığınızda çarınız sersemler ve quest ekranı gelir orada captcha doğrulaması yapmanızı ister 3 hakkınız var 3 kere yanlış yaparsanız sizi köye ışınlar.
Kod:
quest anti_bot_captcha begin state start begin function setting() return { ["true_vnum"] = { 101129 , 9600 , 12829 , 2169 , 11839 , 12789 , 71107 , 79 , 2099 , 199 , 2159 , 3169 , 2139 , 5349 , 1139 , 101006 , 12809 , 7009 , 13109 , 7029 , 189 , 39 , 7019 , 29 , 101005 }, ["fake_vnum1"] = { 11299 , 17229 , 7379 , 2079 , 101119 , 20509 , 2129 , 18089 , 11819 , 129 , 13089 , 89 , 69 , 11849 , 101141 , 469 , 12849 , 101004 , 16579 , 2069 , 101140 , 14579 , 169 , 2039 , 15459 }, ["fake_vnum2"] = { 11899 , 2019 , 101144 , 11499 , 20259 , 3199 , 139 , 101109 , 7059 , 2109 , 13169 , 17709 , 14229 , 2059 , 7039 , 99 , 49 , 101143 , 13069 , 18099 , 11699 , 479 , 15449 , 179 , 2049 }, ["fake_vnum3"] = { 5129 , 20009 , 59 , 2089 , 2379 , 9830 , 11829 , 20759 , 101142 , 119 , 2179 , 2009 , 2119 , 16229 , 11809 , 101139 , 19 , 2029 , 1349 , 11859 , 2179 , 13149 , 7049 , 13129 , 2149 }, ["metin_limit"] = { 50 }, ["failed_limit"] = { 3 }, } end function block_player() pc.setqf("anti_bot_captcha_status", 1) pc.affect_stun() end function unblock_player() pc.setqf("anti_bot_captcha_status", 0) pc.setqf("anti_bot_captcha_metin_counter", 0) pc.setqf("anti_bot_captcha_failed_counter", 0) affect.remove(210) end function metin_register() pc.setqf("anti_bot_captcha_metin_counter", pc.getqf("anti_bot_captcha_metin_counter")+1) local metin_counter = pc.getqf("anti_bot_captcha_metin_counter") local captcha_status = pc.getqf("anti_bot_captcha_status") -- syschat(string.format("anti_bot_captcha_metin_counter: %d / anti_bot_captcha_status: %d", metin_counter, captcha_status)) end function captcha_ok() anti_bot_captcha.unblock_player() end function captcha_failed() local setting = anti_bot_captcha.setting() pc.setqf("anti_bot_captcha_failed_counter", pc.getqf("anti_bot_captcha_failed_counter")+1) syschat(string.format("Wrong captcha! (You failed %d of %d attempts)", pc.getqf("anti_bot_captcha_failed_counter"), setting.failed_limit[1])) if pc.getqf("anti_bot_captcha_failed_counter") >= setting.failed_limit[1] then pc.setqf("anti_bot_captcha_failed_counter", 0) warp_to_village() end send_letter("Captcha") end function show_captcha() local setting = anti_bot_captcha.setting() local true_vnum_total = table.getn(setting.true_vnum) -- total of items in the table local random_true_vnum = number(1, true_vnum_total) -- random value local true_item = setting.true_vnum[random_true_vnum] -- random result local fake_vnum_total1 = table.getn(setting.fake_vnum1) -- total of items in the table local fake_vnum_total2 = table.getn(setting.fake_vnum2) -- total of items in the table local fake_vnum_total3 = table.getn(setting.fake_vnum3) -- total of items in the table local random_fake_vnum_1 = number(1, fake_vnum_total1) --- random value local fake_item1 = setting.fake_vnum1[random_fake_vnum_1] -- random result local random_fake_vnum_2 = number(1, fake_vnum_total2) --- random value local fake_item2 = setting.fake_vnum2[random_fake_vnum_2] -- random result local random_fake_vnum_3 = number(1, fake_vnum_total3) --- random value local fake_item3 = setting.fake_vnum3[fake_vnum_total3] -- random result local random_question = number(1, 4) if pc.getqf("anti_bot_captcha_status") == 0 then say_title("Captcha:") say("You have no pending verification.") return; end say("What is the name of this item?") say_item_vnum(true_item) say("[ENTER][ENTER]") if random_question == 1 then local menu = select(item_name(true_item), item_name(fake_item1), item_name(fake_item2), item_name(fake_item3)) if menu == 1 then anti_bot_captcha.captcha_ok() elseif menu == 2 then anti_bot_captcha.captcha_failed() elseif menu == 3 then anti_bot_captcha.captcha_failed() elseif menu == 4 then anti_bot_captcha.captcha_failed() end elseif random_question == 2 then local menu = select(item_name(fake_item1), item_name(true_item), item_name(fake_item2), item_name(fake_item3)) if menu == 1 then anti_bot_captcha.captcha_failed() elseif menu == 2 then anti_bot_captcha.captcha_ok() elseif menu == 3 then anti_bot_captcha.captcha_failed() elseif menu == 4 then anti_bot_captcha.captcha_failed() end elseif random_question == 3 then local menu = select(item_name(fake_item1), item_name(fake_item2), item_name(true_item), item_name(fake_item3)) if menu == 1 then anti_bot_captcha.captcha_failed() elseif menu == 2 then anti_bot_captcha.captcha_failed() elseif menu == 3 then anti_bot_captcha.captcha_ok() elseif menu == 4 then anti_bot_captcha.captcha_failed() end elseif random_question == 4 then local menu = select(item_name(fake_item1), item_name(fake_item2), item_name(fake_item3), item_name(true_item)) if menu == 1 then anti_bot_captcha.captcha_failed() elseif menu == 2 then anti_bot_captcha.captcha_failed() elseif menu == 3 then anti_bot_captcha.captcha_failed() elseif menu == 4 then anti_bot_captcha.captcha_ok() end end end when login or letter begin send_letter("Captcha") end when button or info begin anti_bot_captcha.show_captcha() end when kill with not npc.is_pc() and npc.is_metin() begin anti_bot_captcha.metin_register() local setting = anti_bot_captcha.setting() if pc.getqf("anti_bot_captcha_metin_counter") >= setting.metin_limit[1] then anti_bot_captcha.block_player() anti_bot_captcha.show_captcha() end end end end
Kod:
// aç : questlua_pc.cpp // dosya içinde bul void RegisterPCFunctionTable() üstüne ekle int pc_affect_stun(lua_State * L) { const uint32_t lDuration = 86400; // 24h in seconds const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch) ch->AddAffect(AFFECT_STUN, POINT_NONE, 0, AFF_STUN, lDuration, 0, true); return 0; } bul { NULL, NULL } üstüne ekle { "affect_stun", pc_affect_stun },
Metin Bot Kontrol Sistemi - Stone Bot Control System Lua + C++
Giriş
Metin2 özel sunucularında bot kontrol sistemleri, hem oyun deneyimini artırmak hem de sunucu yönetimini kolaylaştırmak adına kritik öneme sahiptir. Stone Bot Control System, Lua ve C++ tabanlı güçlü bir bot kontrol altyapısıdır. Bu sistem sayesinde, geliştiriciler Metin2 sunucularında botların davranışlarını, görevlerini ve etkileşimlerini detaylıca kontrol edebilir. Bu yazıda, Stone Bot Control System'ün yapısı, avantajları ve nasıl entegre edileceği konularına değineceğiz.
Stone Bot Control System Nedir?
Stone Bot Control System, Metin2 özel sunucu geliştiricileri için özel olarak tasarlanmış, Lua scripting dili ve C++ kodlama tabanlı bir bot kontrol sistemidir. Bu sistem, botların akıllıca hareket etmesini, belirlenen görevleri otomatik olarak yerine getirmesini sağlar. Geliştiriciler, botların PvP davranışlarını, seyahat rotalarını, item toplama stratejilerini ve daha fazlasını Lua komutları aracılığıyla özelleştirebilirler. Aynı zamanda C++ ile daha alt seviye kontrol imkanı da sunar.
Sistemin Temel Özellikleri
- Lua Script Desteği: Geliştiriciler, Lua dilini kullanarak bot davranışlarını dinamik olarak tanımlayabilir. Bu, sistemde yüksek düzeyde esneklik sağlar.
- C++ Entegrasyonu: Alt yapıda C++ tabanlı işlemler sayesinde performans artışı sağlanır ve daha kompleks sistemler kurulabilir.
- Otomatik Görev Sistemleri: Botlara belirli görevler atanabilir. Örneğin, belirli bölgelerde dolaşım, mob avı veya item toplama gibi.
- PvP Davranışları: PvP sunucularında botlar, belirlenen stratejilere göre savaşabilir, düşman takibi yapabilir veya koruma görevi üstlenebilir.
Kurulum ve Entegrasyon
Stone Bot Control System, Metin2 sunucu dosyalarına entegre edilirken öncelikle Lua kütüphaneleri ve C++ modül yapısı dikkate alınmalıdır. Kurulum aşamasında game_src klasöründe gerekli değişiklikler yapılmalı ve bot kontrol komutları Lua dosyalarına aktarılmalıdır. Ayrıca auth_server ve game_server arasında senkronizasyon sağlanması önemlidir. Bu sistem, py_root ve uiscript ile de entegre çalışabilir. Böylece bot kontrol arayüzü daha kullanıcı dostu hale gelir.
Avantajları
- Yüksek Performans: C++ destekli altyapısı sayesinde sistem düşük gecikme süresiyle çalışır.
- Genişletilebilirlik: Lua scripting sayesinde yeni komutlar ve bot davranışları kolayca eklenebilir.
- Kolay Yönetim: Botlar merkezi olarak yönetilebilir, ihtiyaç duyulduğunda devreye alınabilir veya durdurulabilir.
- PvP Odaklı: Özellikle PvP sunucularında botların stratejik rol üstlenmesi sağlanabilir.
Sonuç
Stone Bot Control System, Metin2 özel sunucularında bot yönetimini daha verimli ve etkili hale getiren güçlü bir çözümdür. Lua ve C++ tabanlı yapısı sayesinde hem geliştiricilere hem de oyun sunucularına büyük kolaylıklar sunar. Bu sistem sayesinde botlar artık sadece basit görevler değil, karmaşık davranışlar sergileyebilir. Bu yönüyle, Metin2 geliştiricileri için vazgeçilmez bir araçtır.
Metin Bot Control System - Stone Bot Control System Lua + C++
Introduction
In Metin2 private servers, bot control systems are crucial for both enhancing gameplay and simplifying server management. The Stone Bot Control System is a powerful bot control infrastructure based on Lua and C++. This system allows developers to finely control bot behaviors, tasks, and interactions within Metin2 servers. In this article, we will discuss the structure, advantages, and integration methods of the Stone Bot Control System.
What is Stone Bot Control System?
The Stone Bot Control System is a bot control framework specifically designed for Metin2 private server developers. It is based on the Lua scripting language and C++ coding. With this system, bots can act intelligently, performing assigned tasks automatically. Developers can customize bot PvP behaviors, travel routes, item gathering strategies, and more through Lua commands. Additionally, it offers low-level control via C++.
Key Features of the System
- Lua Script Support: Developers can dynamically define bot behaviors using the Lua language, offering high flexibility in the system.
- C++ Integration: Low-level operations based on C++ provide performance improvements and allow for more complex system designs.
- Automated Task Systems: Bots can be assigned specific tasks such as patrolling certain areas, hunting monsters, or collecting items.
- PvP Behaviors: On PvP servers, bots can fight according to defined strategies, track enemies, or take on protective roles.
Installation and Integration
When integrating the Stone Bot Control System into Metin2 server files, Lua libraries and the C++ module structure must first be considered. During installation, necessary modifications should be made in the game_src folder, and bot control commands must be transferred to Lua files. Additionally, synchronization between the auth_server and game_server is critical. The system can also work integrated with py_root and uiscript, making the bot control interface more user-friendly.
Advantages
- High Performance: Thanks to its C++-supported architecture, the system operates with low latency.
- Extensibility: New commands and bot behaviors can easily be added thanks to Lua scripting.
- Easy Management: Bots can be centrally managed, activated, or paused as needed.
- PvP Focused: Especially on PvP servers, bots can take on strategic roles.
Conclusion
The Stone Bot Control System is a powerful solution that makes bot management more efficient and effective in Metin2 private servers. Its Lua and C++-based architecture provides significant conveniences for both developers and game servers. With this system, bots can exhibit not just simple tasks but complex behaviors. For this reason, it is an indispensable tool for Metin2 developers.
