- Katılım
- 6 Mayıs 2022
- Konular
- 48,275
- Mesajlar
- 48,585
- Tepkime puanı
- 74
- M2 Yaşı
- 3 yıl 11 ay 10 gün
- Trophy Puan
- 48
- M2 Yang
- 488,719
1024-1024 4x4 Harita Baz Alır
Metin Vnum / Sayı / Süre (Saniye ve Saat Cinsinden Gir Örnek 5s-5h)
PC'de python yüklü olmalı
Kimin işine yarar bilmiyorum benim işimi gördü.
Kod:
import random import os import math # ====================================================== # HARITA AYARLARI (Gerektiğinde Düzenlenebilir) # ====================================================== X_MIN, X_MAX = 50, 950 Y_MIN, Y_MAX = 50, 950 SAPMA = 5 # ====================================================== # Renk Kodları (ANSI) GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' CYAN = '\033[96m' RESET = '\033[0m' def profesyonel_regen_olusturucu(): current_path = os.path.dirname(os.path.abspath(__file__)) dosya_adi = os.path.join(current_path, "stone.txt") os.system('cls' if os.name == 'nt' else 'clear') # Ekranı temizle print(CYAN + "="*60 + RESET) print(YELLOW + " METİN TAŞI OLUŞTURMA SCRIPTİ V1 OBULUT " + RESET) print(CYAN + "="*60 + RESET) metin_verileri = [] toplam_hedef = 0 while True: vnum_input = input(f"\n{YELLOW}Metin VNUM{RESET} (Tamamlamak için 'ok' yazınız): ") if vnum_input.lower() == 'ok': break try: vnum = int(vnum_input) adet = int(input(f" {CYAN}->{RESET} Bu metinden kaç adet oluşturulsun?: ")) sure = input(f" {CYAN}->{RESET} Yenilenme süresi (Varsayılan 90s): ") or "90s" for _ in range(adet): metin_verileri.append((vnum, sure)) toplam_hedef += adet print(f"{GREEN} [BAŞARILI]{RESET} {adet} adet {vnum} listeye eklendi. Güncel Toplam: {toplam_hedef}") except ValueError: print(f"{RED} [HATA]{RESET} Geçersiz sayısal giriş! Lütfen tekrar deneyiniz.") if not metin_verileri: print(f"\n{RED}[UYARI]{RESET} Liste boş olduğu için işlem sonlandırıldı.") return # Homojen dağılım için veriyi karıştır random.shuffle(metin_verileri) # Matematiksel ızgara hesaplamaları izgara_boyutu = math.ceil(math.sqrt(toplam_hedef)) adim_x = (X_MAX - X_MIN) / izgara_boyutu adim_y = (Y_MAX - Y_MIN) / izgara_boyutu try: with open(dosya_adi, "w", encoding="utf-8") as f: f.write(f"// OBULUT Professional Regen - Total: {toplam_hedef}\n") count = 0 for i in range(izgara_boyutu): for j in range(izgara_boyutu): if count >= toplam_hedef: break x = int(X_MIN + (i * adim_x) + random.randint(-2, 2)) y = int(Y_MIN + (j * adim_y) + random.randint(-2, 2)) vnum, sure = metin_verileri[count] f.write(f"m\t{x}\t{y}\t{SAPMA}\t{SAPMA}\t0\t0\t{sure}\t100\t1\t{vnum}\n") count += 1 f.flush() os.fsync(f.fileno()) print(f"\n{CYAN}" + "="*60 + RESET) print(f"{GREEN}İŞLEM BAŞARIYLA TAMAMLANDI!{RESET}") print(f"Toplam Dizilen Metin: {count} Adet") print(f"Dosya Konumu: {YELLOW}{dosya_adi}{RESET}") print(CYAN + "="*60 + RESET) except Exception as e: print(f"\n{RED}[KRİTİK HATA] Dosya yazımı başarısız: {e}{RESET}") if __name__ == "__main__": profesyonel_regen_olusturucu() input("Kapatmak için ENTER tuşuna basınız...")
Stone.txt Creator Script v1 Nedir?
Metin2 özel sunucu geliştirme sürecinde birçok sistem dosyasının doğru yapılandırılması gerekir. Stone.txt Creator Script v1, bu süreçte büyük kolaylık sağlayan özel bir araçtır. Bu betik, Metin2 sunucularında taş sistemlerini yönetmek için kullanılan 'stone.txt' dosyasının otomatik olarak oluşturulmasını sağlar. Özellikle PvP sistemleri üzerinde çalışan geliştiriciler için oldukça faydalıdır.
Stone.txt Dosyasının Önemi
Stone.txt dosyası, Metin2 oyununda belirli taşların hangi koordinatlarda yer alacağını tanımlar. Bu dosya, harita düzenlemeleri sırasında çok önemlidir. Manuel olarak oluşturulması zaman alıcıdır ve hata yapma riski yüksektir. Stone.txt Creator Script v1, bu süreci hızlandırarak daha az hata ile sonuçlanmasını sağlar.
Script Nasıl Çalışır?
Stone.txt Creator Script v1, Python tabanlı bir sistemdir. Kullanıcı dostu bir arayüze sahip değildir, ancak komut satırı üzerinden çalıştırılabilir. Script, kullanıcıdan harita adı, koordinat aralığı gibi bilgiler ister. Ardından bu bilgilere göre stone.txt dosyasını otomatik olarak üretir. Bu sayede geliştiriciler zaman kazanır ve projelerini daha hızlı ilerletirler.
Python GUI Entegrasyonu
Script'in geliştirilmiş sürümlerinde Py GUI entegrasyonu bulunabilir. Bu sayede kullanıcılar grafiksel bir arayüz üzerinden işlem yapabilir. Ancak v1 sürümünde bu özellik mevcut olmayabilir. Gelecekte MARTYSAMA veya diğer Metin2 geliştirici toplulukları tarafından bu tarz gelişmeler sağlanabilir.
PvP Sistemleri İçin Uygunluk
Stone.txt Creator Script v1, özellikle PvP sistemleri üzerinde çalışan Metin2 özel sunucuları için idealdir. Harita düzenlemeleri sırasında taş yerleştirme işlemleri doğrudan oyun dengesiyle ilişkilidir. Doğru yerleştirilen taşlar, savaş alanlarında stratejik avantajlar sağlayabilir. Bu nedenle, bu tür sistemler için bu script oldukça faydalıdır.
C++ ve Sunucu Kaynak Kodlarıyla Uyum
Script, doğrudan C++ sunucu kaynak kodlarıyla entegre çalışmasa da, üretilen stone.txt dosyası doğrudan oyun sunucusuna entegre edilebilir. Bu sayede sunucu geliştiricileri, taş sistemini kolayca özelleştirebilirler. Ayrıca, DB Core ve Game Core yapılarına da uyum sağlar.
Stone.txt Creator Script v1 Avantajları
- Zaman tasarrufu sağlar.
- Hataları minimize eder.
- PvP sunucuları için optimize edilmiştir.
- Kolay kullanım sunar.
Sonuç
Stone.txt Creator Script v1, Metin2 özel sunucu geliştiricileri için önemli bir araçtır. Özellikle PvP sistemleri üzerine odaklanan geliştiriciler için harita düzenlemelerini kolaylaştırır. Script sayesinde stone.txt dosyası hızlı ve güvenli bir şekilde oluşturulabilir. Bu da daha iyi oyun deneyimi sunulmasına yardımcı olur.
What Is Stone.txt Creator Script v1?
In the process of developing Metin2 private servers, many system files need to be properly configured. Stone.txt Creator Script v1 is a special tool that greatly facilitates this process. This script allows for the automatic creation of the 'stone.txt' file, which defines stone locations in Metin2 servers. It is especially useful for developers working on PvP systems.
Importance of the Stone.txt File
The stone.txt file defines where certain stones appear in the Metin2 game world. This file is very important during map editing processes. Creating it manually is time-consuming and prone to errors. Stone.txt Creator Script v1 speeds up this process, reducing the likelihood of mistakes.
How Does the Script Work?
Stone.txt Creator Script v1 is based on Python. It does not have a user-friendly interface but can be run from the command line. The script prompts the user for details like map name and coordinate ranges, then automatically generates the stone.txt file based on these inputs. Thus, developers save time and can advance their projects faster.
Py GUI Integration
Future versions of the script may include Py GUI integration, allowing users to operate through a graphical interface. However, this feature might not be available in version 1. Such enhancements could be provided by MARTYSAMA or other Metin2 developer communities in the future.
Suitability for PvP Systems
Stone.txt Creator Script v1 is ideal for Metin2 private servers focused on PvP systems. Placing stones correctly during map edits directly affects game balance. Correctly placed stones can provide strategic advantages in battlefields. Therefore, this script is highly beneficial for such systems.
Compatibility with C++ and Server Source Code
Although the script does not directly integrate with C++ server source code, the generated stone.txt file can be integrated directly into the game server. This allows server developers to customize the stone system easily. It also maintains compatibility with DB Core and Game Core structures.
Advantages of Stone.txt Creator Script v1
- Saves time.
- Minimizes errors.
- Optimized for PvP servers.
- Offers easy usage.
Conclusion
Stone.txt Creator Script v1 is an essential tool for Metin2 private server developers. It simplifies map editing, especially for those focusing on PvP systems. With the script, the stone.txt file can be created quickly and securely, contributing to a better gaming experience.
