abdallahessam118 Posted December 31, 2025 Posted December 31, 2025 i have noticed that there are several Maptypeflags missing like ctf and crosses, etc.. how can i get them ? Quote
abdallahessam118 Posted January 1 Author Posted January 1 (edited) 2 hours ago, xFranko said: Are you talking about the map id ? Each map has a type This type is compressed into map type flags like arenic map, wingdisable etc.. I am looking for the missing types like ctf maybe 0x80000000 or something not sure And i want to know how to get missing values based on the type correctly Edited January 1 by abdallahessam118 Quote
xFranko Posted January 1 Posted January 1 1 hour ago, abdallahessam118 said: Each map has a type This type is compressed into map type flags like arenic map, wingdisable etc.. I am looking for the missing types like ctf maybe 0x80000000 or something not sure And i want to know how to get missing values based on the type correctly Hmm I'm not sure, but I think I might have them in my database if you tell me the map Id I might be able to look for it for you Quote
abdallahessam118 Posted January 1 Author Posted January 1 that is what i mean, I want to know how to get all the combined flags that this type has, instead of checking the type directly look at the other flags and the ctf in the screen Quote
theshadowpriest Posted January 23 Posted January 23 (edited) It's a bitmask, you can break down the flags it has enabled, but you need to cross reference them with the flags for whatever version you have. Idk what values that is, but here's a python script I use. Can/should be adjusted per the flags you want to check according to the version you're using, etc. import tkinter as tk from tkinter import messagebox MAP_FLAGS = { 0x0000: "Normal", 0x0001: "PK_FIELD", 0x0002: "CHANGE_MAP_DISABLE", 0x0004: "RECORD_DISABLE", 0x0008: "PK_DISABLE", 0x0010: "BOOTH_ENABLE", 0x0020: "TEAM_DISABLE", 0x0040: "TELEPORT_DISABLE", 0x0080: "GUILD_MAP", 0x0100: "PRISON_MAP", 0x0200: "WING_DISABLE", 0x0400: "FAMILY", 0x0800: "MINE_FIELD", 0x1000: "PK_GAME", 0x2000: "NEVER_WOUND", 0x4000: "DEAD_ISLAND", 0x20000: "SKILL_MAP", 0x40000: "LINE_SKILL_ONLY" } def decode_flags(value): result = [] undefined_bits = value for bit, name in MAP_FLAGS.items(): if value & bit: result.append(name) undefined_bits &= ~bit if value == 0: result.append("Normal") undefined_bits = 0 if undefined_bits: result.append(f"Undefined flags: 0x{undefined_bits:04X}") return result def on_check(): try: val = int(entry.get(), 0) flags = decode_flags(val) output.config(state='normal') output.delete('1.0', tk.END) output.insert(tk.END, "\n".join(flags)) output.config(state='disabled') except ValueError: messagebox.showerror("Error", "Please enter a valid number (decimal or 0x hex).") root = tk.Tk() root.title("Map Flag Checker") tk.Label(root, text="Enter Flag Value (e.g. 1234 or 0x4C):").pack() entry = tk.Entry(root) entry.pack() tk.Button(root, text="Check Flags", command=on_check).pack() output = tk.Text(root, height=10, width=50, state='disabled') output.pack() root.mainloop() Edited January 23 by theshadowpriest added another flag on the script, but needs adjusting per build ver Quote
Konichu Posted January 23 Posted January 23 (edited) This thread already have some documentation about it. But you do bitwise operations to check the map flag. Example: /// <summary> /// Checks if the map is a pk field. Wont add pk points. /// </summary> public bool IsPkField() { return Type.HasFlag(MapTypeFlag.PkField); } /// <summary> /// Disable teleporting by skills or scrolls. /// </summary> public bool IsChgMapDisable() { return Type.HasFlag(MapTypeFlag.ChangeMapDisable); } /// <summary> /// Disable recording the map position into the database. /// </summary> public bool IsRecordDisable() { return Type.HasFlag(MapTypeFlag.RecordDisable); } /// <summary> /// Disable team creation into the map. /// </summary> public bool IsTeamDisable() { return Type.HasFlag(MapTypeFlag.TeamDisable); } /// <summary> /// Disable use of pk on the map. /// </summary> public bool IsPkDisable() { return Type.HasFlag(MapTypeFlag.PkDisable); } /// <summary> /// Disable teleporting by actions. /// </summary> public bool IsTeleportDisable() { return Type.HasFlag(MapTypeFlag.TeleportDisable); } /// <summary> /// Checks if the map is a syndicate map /// </summary> /// <returns></returns> public bool IsSynMap() { return Type.HasFlag(MapTypeFlag.GuildMap); } /// <summary> /// Checks if the map is a prision /// </summary> public bool IsPrisionMap() { return Type.HasFlag(MapTypeFlag.PrisonMap); } /// <summary> /// If the map enable the fly skill. /// </summary> public bool IsWingDisable() { return Type.HasFlag(MapTypeFlag.WingDisable); } /// <summary> /// Check if the map is in war. /// </summary> public bool IsWarTime() { return (Flag & 1) != 0; } /// <summary> /// Check if the map is the training ground. [1039] /// </summary> public bool IsTrainingMap() { return Identity == 1039; } /// <summary> /// Check if its the family (clan) map. /// </summary> public bool IsFamilyMap() { return Type.HasFlag(MapTypeFlag.House); } /// <summary> /// If the map enables booth to be built. /// </summary> public bool IsBoothEnable() { return Type.HasFlag(MapTypeFlag.BoothEnable); } /// <summary> /// Check if the map allows user to revive here. /// </summary> /// <returns></returns> public bool IsRebornNowEnable() { return Type.HasFlag(MapTypeFlag.RebornNowEnable); } Edited January 23 by Konichu Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.