├── .gitignore ├── LICENSE ├── README.md ├── assets └── mobs.png ├── examples └── Gym │ ├── MapleEnv_v4.py │ └── ppo.py ├── maplewrapper ├── Wrapper.py ├── __init__.py ├── templates │ ├── general │ │ ├── bracket.png │ │ ├── bracket_closing.png │ │ └── slash.png │ ├── nametag_characters │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ ├── 9.png │ │ ├── a.png │ │ ├── a_.png │ │ ├── b.png │ │ ├── b_.png │ │ ├── blank.png │ │ ├── c.png │ │ ├── c_.png │ │ ├── d.png │ │ ├── d_.png │ │ ├── e.png │ │ ├── e_.png │ │ ├── f.png │ │ ├── f_.png │ │ ├── g.png │ │ ├── g_.png │ │ ├── h.png │ │ ├── h_.png │ │ ├── i.png │ │ ├── i_.png │ │ ├── j.png │ │ ├── j_.png │ │ ├── k.png │ │ ├── k_.png │ │ ├── l.png │ │ ├── l_.png │ │ ├── m.png │ │ ├── m_.png │ │ ├── n.png │ │ ├── n_.png │ │ ├── o.png │ │ ├── o_.png │ │ ├── p.png │ │ ├── p_.png │ │ ├── q.png │ │ ├── q_.png │ │ ├── r.png │ │ ├── r_.png │ │ ├── s.png │ │ ├── s_.png │ │ ├── space.png │ │ ├── t.png │ │ ├── t_.png │ │ ├── u.png │ │ ├── u_.png │ │ ├── v.png │ │ ├── v_.png │ │ ├── w.png │ │ ├── w_.png │ │ ├── x.png │ │ ├── x_.png │ │ ├── y.png │ │ ├── y_.png │ │ ├── z.png │ │ └── z_.png │ ├── numbers │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png │ ├── numbers_hitreg │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png │ └── numbers_lvl │ │ ├── 0.png │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png └── utils │ ├── KNN.py │ ├── NameTagMaker.py │ ├── __init__.py │ ├── exp.txt │ ├── fetch_exp.py │ ├── fetch_mobs.py │ ├── mobs.txt │ ├── nms.py │ └── window_pos.py ├── requirements.txt └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | /maplewrapper/templates/mobs/* 2 | /testing 3 | __pycache__/ 4 | *.py[cod] 5 | /test.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Vincent Morel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MapleWrapper 2 | 3 | _A MapleStory GMS v.92 and below client wrapper for real-time game data extraction. Enables you to implement your own reinforcement learning environments and bots._ 4 | 5 | **MapleWrapper:** 6 | 7 | * Is incredibly user-friendly. Get started with 2 lines of code. 8 | * Extracts player position, player stats, and mob position out of the box 9 | * Is easy to debug. Use the inspect() method to figure out what's going on behind the scenes. 10 | * Is thredded FAST! 11 | 12 | ### QuickStart Guide 13 | **Instantiate the MapleWrapper** 14 | ```python 15 | from maplewrapper import wrapper 16 | 17 | w = wrapper('Your_Player_IGN', mobs=['Mob_Name']) 18 | ``` 19 | You instantiate the wrapper by passing your player in-game name and a list of valid mob names (see [handbook](/maplewrapper/utils/mobs.txt)) that you would like the wrapper to detect. 20 | 21 | **Extract Game info** 22 | 23 | 24 | ```python 25 | from maplewrapper import wrapper 26 | 27 | with wrapper('Your_Player_IGN', mobs=['Mob_Name']) as w: 28 | w.observe(verbose=1) 29 | ``` 30 | ``` 31 | Out[1]: 32 | Player: [394 186 442 202] 33 | Stats: [11, 261, 118, 7] 34 | Mobs: [[354 67 417 97] 35 | [ 89 67 152 97]] 36 | ``` 37 | The _observe_ method returns three numpy array objects representing [x0, y0, x1, y1] hitbox coordinates for player and mobs and [LVL, HP, MP, EXP] for stats. The _start_ and _stop_ methods respectively start and stop the game capture. 38 | 39 | **Alternatively, High speed extraction** 40 | ```python 41 | from maplewrapper import wrapper 42 | 43 | with wrapper('Your_Player_IGN', mobs=['Mob_Name']) as w: 44 | while True: 45 | player, stats, mobs = w.observe() 46 | ``` 47 | 48 | **Extract information by category** 49 | 50 | 51 | ```python 52 | from maplewrapper import wrapper 53 | 54 | with wrapper('Your_Player_IGN', mobs=['Mob_Name']) as w: 55 | # Player hitbox coordinates [x0,y1,x1,y1] 56 | player = w.get_player() 57 | 58 | # Player current stats [LVL,HP,MP,EXP] 59 | stats = w.get_stats() 60 | 61 | # Player current base stats [LVL,Total_HP,Toal_MP,Total_EXP_required_for_LVL] 62 | base_stats = w.get_basestats() 63 | 64 | # Mobs hitbox coordinates [x0,y0,x1,y1] 65 | mobs = w.get_mobs() 66 | 67 | print(player, stats, base_stats, mobs) 68 | ``` 69 | ``` 70 | Out[1]: 71 | [394 186 442 202] [11, 261, 118, 7] [42, 30000, 30000, 285532] [] 72 | ``` 73 | The _get_basestats_ method returns a numpy array objects representing [LVL, HP, MP, EXP] of your player's current base stats. In other words, you get your players current level, total current possible HP/MP and the total amount of EXP for the LVL. 74 | 75 | 76 | **Debug Wrapper** 77 | 78 | ```python 79 | from maplewrapper import wrapper 80 | 81 | with wrapper('smashy', mobs=['Red Snail']) as w: 82 | w.inspect('mobs') 83 | ``` 84 | ![](/assets/mobs.png) 85 | 86 | The _inspect_ method displays the image crop of what the wrapper sees during data extraction. It will also display an overlay of the bounding box of predictions when applicable. 87 | 88 | The required argument ```item``` can take the following values: 89 | * ```'frame'``` : The complete game frame 90 | * ```'content'``` : The cropped game frame containing game content such as the player and the mobs 91 | * ```'ui'``` : The cropped game frame containing stats info 92 | * ```'player'``` : The content frame and player detection overlay 93 | * ```'mobs'``` : The cropped content frame and mobs detection overlay 94 | * ```'stats'``` : The ui frame and stats detection overlay 95 | * ```'base_stats'``` : The ui frame and base stats detection overlay 96 | * ```'nametag_t'``` : The generated nametag template 97 | * ```'mobs_t'``` : The generated mob templates 98 | 99 | You can save to disk by passing optional argument ```save_to_disk=True``` 100 | 101 | 102 | ## Requirements 103 | * Windows 7 and up 104 | * Python 3.6, 3.7 or 3.8 105 | 106 | 107 | ## Installation 108 | **Clone repository** 109 | ``` 110 | git clone https://github.com/vinmorel/MapleWrapper.git 111 | ``` 112 | **Install** 113 | ``` 114 | cd ./MapleWrapper 115 | pip install . 116 | ``` 117 | 118 | ### In-Depth Explanations 119 | The beauty of this wrapper comes from the fact that you don't have to do any dirty image manipulations yourself in order to adapt the wrapper to your system and needs. Everything is generated on the fly and cached for future use. 120 | 121 | The MapleWrapper object hooks to your MapleStory game window via [D3DShot](https://github.com/SerpentAI/D3DShot) screen capture. Therefore, your game window must be visible when running wrapper methods. It is recommended that you use the original 800x600 resolution game clients as this wrapper was built on top of it and there may be compatibility issues with other community made client resolutions. 122 | 123 | Most of the information is extracted using OpenCV image processing methods like template matching: 124 | * The player position is located using a generated nametag template and matched against the game screen. 125 | * Similarly, the mobs are located using template matching. Sprites are downloaded from the [Maplestory.io](https://maplestory.io/) API and cached on your system for future use. This keeps the repo slim by preventing the push of unecessary image files. 126 | * As for the player stats, a custom and efficient character recognition system is applied to the game ui. 127 | 128 | 129 | ### Acknowledgement 130 | Thank you to the team at Serpent.AI for the awesome [D3DShot](https://github.com/SerpentAI/D3DShot) package. 131 | -------------------------------------------------------------------------------- /assets/mobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/assets/mobs.png -------------------------------------------------------------------------------- /examples/Gym/MapleEnv_v4.py: -------------------------------------------------------------------------------- 1 | import gym 2 | import time 3 | from gym import spaces 4 | from maplewrapper import wrapper 5 | import numpy as np 6 | import pydirectinput 7 | import cv2 8 | 9 | class MapleEnv(gym.Env): 10 | """ 11 | Description: 12 | Gym environment of MapleStory v.90 and below using extracted information from maplewrapper. 13 | See https://github.com/vinmorel/MapleWrapper 14 | Observation: 15 | Type: Dict "MapleWrapper" : box(4) 16 | Num Observation Min Max 17 | 1 Player X1 0 825 18 | 2 Mob X1 (1) 0 825 19 | 3 Player Facing Direction 0 1 20 | 4 Attacked 0 1 21 | 22 | Actions: 23 | Type: Discrete(4) 24 | Num Action 25 | 0 Walk left 26 | 1 Walk right 27 | 2 Attack 1 28 | 3 Attack 2 29 | Reward: 30 | Reward is the sum of gained exp minus health damage, mp consumption and time penalities 31 | Starting State: 32 | All observations are intialized according to game information 33 | Episode Termination: 34 | Episode terminates every 10 minutes 35 | """ 36 | 37 | metadata = {'render.modes': ['human']} 38 | 39 | def __init__(self,w): 40 | pydirectinput.PAUSE = 0.0 41 | 42 | self.w = w 43 | self.lvl, self.max_hp, self.max_mp, self.max_exp = self.w.get_basestats() 44 | self.B_X = 850 # Bounding box max X 45 | 46 | self.Min = np.array([0] * 4,dtype=np.float32) 47 | self.Max = np.array([self.B_X] * 2 + [1] * 2 ,dtype=np.float32) 48 | 49 | self.action_space = spaces.Discrete(4) 50 | self.observation_space = spaces.Box(self.Min, self.Max, dtype=np.float32) 51 | 52 | self.state = None 53 | self.done = None 54 | self.penalty = None 55 | 56 | self.actions_d = { 57 | '0' : 'left', 58 | '1' : 'right', 59 | '2' : 'ctrl', 60 | '3' : 'shift', 61 | 'hp' : 'pageup', 62 | 'mp' : 'delete', 63 | 'pickup' : 'z' 64 | } 65 | 66 | self.reward_threshold = 20.0 67 | self.trials = 200 68 | self.steps_counter = 0 69 | self.id = "MapleBot" 70 | self.facing = None 71 | self.random_t_keydown = 0.01 72 | 73 | def step(self,action): 74 | """ 75 | The agent takes a step in the environment. 76 | Parameters 77 | ---------- 78 | action : int 79 | Returns 80 | ------- 81 | ob, reward, episode_over, info : tuple 82 | ob : List[int] 83 | an environment-specific object representing your observation of 84 | the environment. 85 | reward : float 86 | amount of reward achieved by the previous action. The scale 87 | varies between environments, but the goal is always to increase 88 | your total reward. 89 | episode_over : bool 90 | whether it's time to reset the environment again. Most (but not 91 | all) tasks are divided up into well-defined episodes, and done 92 | being True indicates the episode has terminated. (For example, 93 | perhaps the pole tipped too far, or you lost your last life.) 94 | info : Dict 95 | diagnostic information useful for debugging. It can sometimes 96 | be useful for learning (for example, it might contain the raw 97 | probabilities behind the environment's last state change). 98 | However, official evaluations of your agent are not allowed to 99 | use this for learning. 100 | """ 101 | self.take_action(action) 102 | self.new_p_state, new_stats = self.get_partial_state() 103 | self.get_reward(self.stats,new_stats) 104 | 105 | # Determine if attacked 106 | if new_stats[1] < self.stats[1]: 107 | self.attacked = np.array([1]) 108 | else : 109 | self.attacked = np.array([0]) 110 | self.stats = new_stats 111 | 112 | # Determine facing dirzzzection 113 | if action == 0: 114 | self.facing = np.array([action]) 115 | if action == 1: 116 | self.facing = np.array([action]) 117 | 118 | self.state = np.concatenate((self.new_p_state,self.facing,self.attacked)) 119 | 120 | # heal if necessary 121 | if new_stats[1]/self.max_hp < 0.5: 122 | self.take_action('hp') 123 | # mp if necessary 124 | if new_stats[2]/self.max_mp < 0.2: 125 | self.take_action('mp') 126 | # random pickup 127 | if np.random.binomial(1,0.3): 128 | self.take_action('pickup') 129 | # terminate episode if t 130 | self.current_time = time.time() 131 | if int(self.current_time - self.start_time) >= 300: 132 | self.done = 1 133 | 134 | return self.state, self.reward, self.done, {} 135 | 136 | def reset(self): 137 | self.take_action(1) 138 | self.facing = np.array([1]) 139 | self.attacked = np.array([0]) 140 | self.p_state, self.stats = self.get_partial_state() 141 | self.state = np.concatenate((self.p_state,self.facing,self.attacked)) 142 | self.done = 0 143 | self.start_time = time.time() 144 | return self.state 145 | 146 | def get_partial_state(self): 147 | self.player, stats, self.mobs = self.w.observe() 148 | self.player = np.array([self.player[2]]) 149 | self.mobs = self.sort_mobs(self.mobs,self.player) 150 | state = np.concatenate((self.player, self.mobs)) 151 | return state, stats 152 | 153 | def sort_mobs(self,mob_coords,player_x1): 154 | if len(mob_coords) == 0: 155 | mobs_X1 = np.full(1,410 - player_x1) 156 | else: 157 | mob_coords = sorted(mob_coords[:,2] - player_x1, key=abs) 158 | mobs_X1 = mob_coords[:1] # max 1 slot 159 | n_mobs = len(mobs_X1) 160 | 161 | return mobs_X1 162 | 163 | def take_action(self,action): 164 | if action != None: 165 | if 'p' in str(action): 166 | pydirectinput.press(self.actions_d[str(action)]) 167 | return None 168 | else: 169 | self.random_t_keydown = 0.09 170 | 171 | pydirectinput.keyDown(self.actions_d[str(action)]) 172 | time.sleep(self.random_t_keydown) 173 | pydirectinput.keyUp(self.actions_d[str(action)]) 174 | 175 | 176 | def get_reward(self,old_stats,new_stats): 177 | old_stats = np.array(old_stats) 178 | new_stats = np.array(new_stats) 179 | self.delta = new_stats - old_stats 180 | self.d_lvl, self.d_hp, self.d_mp, self.d_exp = self.delta 181 | 182 | # Default penality 183 | self.reward = -0.1 184 | # Penality if too close to map borders 185 | if self.new_p_state[0] < 125 or self.new_p_state[0] > 744: 186 | self.reward -= 0.1 187 | # Reward if mob hit 188 | if self.w.get_hitreg == True: 189 | self.reward += 0.5 190 | # reward if exp gains 191 | if self.d_exp > 0 : 192 | self.reward += 0.5 + (self.d_exp/self.max_exp) * 250 193 | # re-extract base stats if level up 194 | if self.d_lvl >= 1: 195 | self.lvl, self.max_hp, self.max_mp, self.max_exp = self.w.get_basestats() 196 | return self.reward 197 | 198 | def render(self, mode='human',close=False): 199 | self.w.inspect('frame') 200 | 201 | def close(self): 202 | pass 203 | 204 | if __name__ == "__main__": 205 | with wrapper("smashy", mobs=["Cynical Orange Mushroom"]) as w: 206 | env = MapleEnv(w) 207 | env.reset() 208 | 209 | while True: 210 | env.step(action=None) 211 | print(env.w.get_hitreg()) 212 | # print(env.new_p_state[1]) -------------------------------------------------------------------------------- /examples/Gym/ppo.py: -------------------------------------------------------------------------------- 1 | import gym 2 | from MapleEnv_v4 import MapleEnv 3 | from stable_baselines import PPO1 4 | from maplewrapper import wrapper 5 | from stable_baselines.common.policies import MlpPolicy 6 | 7 | 8 | with wrapper("smashy",["Cynical Orange Mushroom"]) as w: 9 | env = MapleEnv(w) 10 | model = PPO1(MlpPolicy, env, verbose=1) 11 | model.learn(total_timesteps=30000, log_interval=1) 12 | -------------------------------------------------------------------------------- /maplewrapper/Wrapper.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Sep 11 12:55:00 2020 4 | 5 | @author: Vincent Morel 6 | """ 7 | 8 | import cv2 9 | import time 10 | import pathlib 11 | import d3dshot 12 | import numpy as np 13 | from os import listdir 14 | import concurrent.futures 15 | from os.path import join, isfile 16 | from maplewrapper.utils.KNN import get_colors 17 | from maplewrapper.utils.NameTagMaker import make_tag 18 | from maplewrapper.utils.fetch_mobs import download_sprites 19 | from maplewrapper.utils.fetch_exp import get_expbase 20 | from maplewrapper.utils.window_pos import process_coords, get_classname 21 | from maplewrapper.utils.nms import non_max_suppression_fast 22 | 23 | class wrapper(): 24 | def __init__(self, player_name, mobs=[], cname="MapleStory"): 25 | self.wdir = pathlib.Path(__file__).resolve().parents[0] 26 | self.assets_pth = join(self.wdir,"templates") 27 | self.cname = get_classname(cname) 28 | self.p_coords = process_coords(self.cname) 29 | self.p_w = self.p_coords[2] - self.p_coords[0] 30 | self.p_h = self.p_coords[3] - self.p_coords[1] 31 | self.gold = (806, 629) 32 | self.content_frame = [int(0.35*self.p_h), int(0.85*self.p_h), 0, int(self.p_w)] 33 | self.ui_frame = [int(self.p_h - 41.01), None, None, int(0.7047 * self.gold[0])] 34 | self.d = d3dshot.create(capture_output="numpy", frame_buffer_size=50) 35 | self.name_t = make_tag(player_name) 36 | self.name_t_widthm = self.name_t.shape[1]//2 37 | self.lvl_numbers_t = [cv2.imread(join(self.assets_pth, "numbers_lvl", f),0) for f in sorted(listdir(join(self.assets_pth,"numbers_lvl"))) if isfile(join(self.assets_pth,"numbers_lvl/", f))] 38 | self.hitreg_numbers_t = [cv2.imread(join(self.assets_pth, "numbers_hitreg", f),0) for f in sorted(listdir(join(self.assets_pth,"numbers_hitreg"))) if isfile(join(self.assets_pth,"numbers_hitreg/", f))] 39 | self.numbers_t = [cv2.imread(join(self.assets_pth, "numbers", f),0) for f in sorted(listdir(join(self.assets_pth,"numbers"))) if isfile(join(self.assets_pth,"numbers", f))] 40 | self.slash_t = cv2.imread(join(self.assets_pth,"general","slash.png"),0) 41 | self.bracket_t = cv2.imread(join(self.assets_pth,"general","bracket.png"),0) 42 | self.bracket_c_t = cv2.imread(join(self.assets_pth,"general","bracket_closing.png"),0) 43 | self.mobs_t = self.initialize_mobs_t(mobs) 44 | 45 | def __enter__(self): 46 | self.start() 47 | self.frame, self.content, self.ui = self.get_aoi(self.d.get_latest_frame(), cv2.COLOR_BGR2GRAY) 48 | return self 49 | 50 | def __exit__(self, type, value, traceback): 51 | self.stop() 52 | 53 | def single_template_matching(self, img, template, method=cv2.TM_CCOEFF): 54 | """ 55 | returns int32 numpy array of best template match 56 | [x0, y1, x1, y1] 57 | 58 | """ 59 | res = cv2.matchTemplate(img,template,method) 60 | min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res) 61 | 62 | w, h = template.shape[::-1] 63 | 64 | top_left = max_loc 65 | bottom_right = (top_left[0] + w, top_left[1] + h) 66 | return np.array([top_left[0], top_left[1], bottom_right[0], bottom_right[1]], dtype=np.int32) 67 | 68 | def multi_template_matching(self, img, template, threshold=0.7, method=cv2.TM_CCOEFF_NORMED, nms=True): 69 | """ 70 | returns int32 numpy array of all NMS filtered template matches above threshold 71 | [x0, y1, x1, y1] 72 | 73 | """ 74 | res = cv2.matchTemplate(img,template,method) 75 | loc = np.where(res >= threshold) 76 | 77 | w, h = template.shape[::-1] 78 | 79 | num_det = loc[0].shape[0] 80 | x2 = loc[1] + np.repeat(w,num_det) 81 | y2 = loc[0] + np.repeat(h,num_det) 82 | boxes = np.column_stack((loc[1],loc[0], x2, y2)) 83 | if nms: 84 | boxes = non_max_suppression_fast(boxes,0.2) 85 | return boxes 86 | 87 | def initialize_mobs_t(self, mobs): 88 | mobs_t = [] 89 | self.adjust = {} 90 | content = self.d.screenshot(region=self.p_coords)[self.content_frame[0]:self.content_frame[1], self.content_frame[2]:self.content_frame[3]] 91 | for mob in mobs: 92 | download_sprites(mob) 93 | for template in sorted(listdir(join(self.assets_pth,"mobs", mob))): 94 | if isfile(join(self.assets_pth,"mobs", mob, template)): 95 | clr_mob_im = cv2.imread(join(self.assets_pth, "mobs", mob, template),cv2.IMREAD_UNCHANGED) 96 | clr_mob_im = self.blend_mobs(clr_mob_im, content) 97 | mob_im = cv2.cvtColor(clr_mob_im, cv2.COLOR_BGR2GRAY) 98 | h,w = mob_im.shape 99 | if h >= 40: 100 | mob_im = mob_im[:-33,:] 101 | 102 | mobs_t.append(mob_im) 103 | mobs_t.append(cv2.flip(mob_im, 1)) 104 | return mobs_t 105 | 106 | def blend_mobs(self, mob_t, content, k=1): 107 | clrs = get_colors(content, k) 108 | idx = np.random.randint(k, size=1) 109 | chosen_clr = np.append(clrs[idx,:], [255]) 110 | trans_mask = mob_t[:,:,3] == 0 111 | 112 | mob_t[trans_mask] = chosen_clr 113 | return mob_t 114 | 115 | def get_player(self): 116 | nametag_box = self.single_template_matching(self.content, self.name_t) 117 | player = self.postprocess_player(nametag_box) 118 | return player 119 | 120 | def postprocess_player(self, nametag_box): 121 | nametag_box[0] += (self.name_t_widthm - 25) 122 | nametag_box[2] += (-self.name_t_widthm + 25) 123 | nametag_box[1] -= 70 124 | nametag_box[3] -= 17 125 | return nametag_box 126 | 127 | def get_mobs(self): 128 | """ 129 | Returns list of list of mobs position [[x0, y1, x1, y1], ...] 130 | Currently must update template assets manually corresponding to mobs in map. 131 | Leverages multi-processing. 132 | """ 133 | ents = np.array([], dtype=np.int32) 134 | 135 | with concurrent.futures.ThreadPoolExecutor() as executor: 136 | granular_entities = [executor.submit(self.multi_template_matching, self.content, template, threshold=0.65, method=cv2.TM_CCOEFF_NORMED, nms=False) for i, template in enumerate(self.mobs_t)] 137 | for ent in granular_entities: 138 | ents = np.append(ents, ent.result()) 139 | 140 | size = ents.shape[0] 141 | chunks = size // 4 142 | 143 | if chunks != 0: 144 | ents = ents.reshape(chunks,-1) 145 | 146 | entity_list = ents[:10] 147 | entity_list = non_max_suppression_fast(entity_list, 0.75) 148 | return entity_list 149 | 150 | def get_stats(self, investigate=False): 151 | """ 152 | Returns [LVL, HP, MP, EXP] 153 | Crops the UI into close ups of stat numbers dynamically with template matchings of x1 extremities. 154 | Matches numbers with crops to deduct the digits (alternative to using Tesseract which is very slow) 155 | """ 156 | coords = { 157 | 'LVL' : [40, 14, 76, 28], 158 | 'HP' : [243, 9, None, 18], 159 | 'MP' : [354, 9, None, 18], 160 | 'EXP' : [467, 9, None, 18] 161 | } 162 | 163 | x1_hp_mp = self.get_pos_x0(self.ui, self.slash_t, 0.75) 164 | x1_exp = self.get_pos_x0(self.ui, self.bracket_t, 0.9) 165 | 166 | buffer = 2 167 | 168 | coords['HP'][2] = x1_hp_mp[0] + buffer 169 | coords['MP'][2] = x1_hp_mp[1] + buffer 170 | coords['EXP'][2] = x1_exp[2] + buffer 171 | 172 | stats = [] 173 | 174 | if investigate: 175 | for k,v in coords.items(): 176 | crop = [v[0], v[1], v[2], v[3]] 177 | stats.append(crop) 178 | 179 | else: 180 | for k,v in coords.items(): 181 | crop = self.ui[v[1]:v[3], v[0]:v[2]] 182 | if k == 'LVL': 183 | stat = self.get_numbers(crop, self.lvl_numbers_t) 184 | else: 185 | stat = self.get_numbers(crop, self.numbers_t) 186 | stats.append(stat) 187 | 188 | return stats 189 | 190 | def get_numbers(self, crop, templates): 191 | """ 192 | Returns INT of numbers present in crop 193 | """ 194 | numbers_list = [] 195 | for i, template in enumerate(templates): 196 | matches = self.multi_template_matching(crop, template, 0.99, cv2.TM_CCOEFF_NORMED, nms=False) 197 | 198 | if type(matches) != list: 199 | for match in matches: 200 | numbers_list.append([int(match[0]),str(i)]) 201 | 202 | numbers_list = sorted(numbers_list, key = lambda x: int(x[0])) 203 | stat = "" 204 | for num in numbers_list: 205 | stat += num[1] 206 | return int(stat) 207 | 208 | def get_pos_x0(self, ui, template, thresh, coord=0): 209 | """ 210 | Returns list [x1, ...] of the position(s) x0(s) of templates in UI. 211 | """ 212 | x1 = self.multi_template_matching(ui, template, threshold=thresh, method=cv2.TM_CCOEFF_NORMED, nms=True) 213 | try: 214 | x1 = np.sort(x1[:,coord]) 215 | except TypeError: 216 | raise Obstructed_Game_Window(f"Could not locate player stats. Please verify the game window is visible on screen.") 217 | return x1 218 | 219 | def different_ratio(self): 220 | """ Returns Bool [True/False] if current window size is same as gold size""" 221 | return (self.p_w != self.gold[0] or self.p_h != self.gold[1]) 222 | 223 | def update_region(self, fps): 224 | p_coords = process_coords(self.cname) 225 | if self.p_coords != p_coords: 226 | self.p_coords = p_coords 227 | self.d.stop() 228 | self.d.capture(target_fps=fps, region=self.p_coords) 229 | time.sleep(0.2) 230 | return 'updated' 231 | 232 | def start(self, fps=25): 233 | """ 234 | Starts capturing frames from environment, given fps recommendation (slows down if 235 | computer can't handle it). 236 | 237 | """ 238 | self.d.capture(target_fps=fps, region=self.p_coords) 239 | time.sleep(0.2) 240 | 241 | def get_aoi(self, game_window, clr_mode): 242 | """ 243 | Crops the areas of interest (frame, content, ui) from the game_window given a color mode 244 | [cv2.COLOR_BGR2GRAY or cv2.COLOR_RGB2BGR]. 245 | """ 246 | frame = cv2.cvtColor(game_window, clr_mode) 247 | content = frame[self.content_frame[0]:self.content_frame[1], self.content_frame[2]:self.content_frame[3]] 248 | ui = frame[self.ui_frame[0]:, :self.ui_frame[3]] 249 | return frame, content, ui 250 | 251 | def observe(self,fps=25, verbose=0): 252 | """ 253 | Extracts information from the latest frame in buffer by leveraging multi-processing. 254 | This information will be used by the agent. 255 | """ 256 | self.update_region(fps) 257 | self.frame, self.content, self.ui = self.get_aoi(self.d.get_latest_frame(), cv2.COLOR_BGR2GRAY) 258 | 259 | with concurrent.futures.ThreadPoolExecutor() as executor: 260 | t1 = executor.submit(self.get_player) 261 | t2 = executor.submit(self.get_stats) 262 | t3 = executor.submit(self.get_mobs) 263 | player = t1.result() 264 | stats = t2.result() 265 | mobs = t3.result() 266 | if verbose: print('\n Player:',player,'\n Stats:',stats,'\n Mobs:',mobs) 267 | return player, stats, mobs 268 | 269 | def stop(self): 270 | self.d.stop() 271 | 272 | def get_basestats(self, investigate=False): 273 | """ 274 | Returns base of [LVL, Base_HP, Base_MP, Base_EXP] 275 | This function is used to get the base stats of the player (total HP, total MP, total EXP until next level) 276 | Be careful not to confuse this with get_stats() which gets the dynamic LVL, HP, MP, EXP of the player 277 | """ 278 | self.frame, self.content, self.ui = self.get_aoi(self.d.screenshot(region=self.p_coords), cv2.COLOR_BGR2GRAY) 279 | 280 | coords = { 281 | 'LVL' : [40, 14, 76, 28], 282 | 'HP' : [None, 9, None, 18], 283 | 'MP' : [None, 9, None, 18], 284 | } 285 | 286 | x0_hp_mp = self.get_pos_x0(self.ui, self.slash_t, 0.75, 2) 287 | x1_hp_mp = self.get_pos_x0(self.ui, self.bracket_c_t, 0.9) 288 | 289 | buffer = 2 290 | 291 | coords['HP'][0] = x0_hp_mp[0] - buffer 292 | coords['MP'][0] = x0_hp_mp[1] - buffer 293 | coords['HP'][2] = x1_hp_mp[0] + buffer 294 | coords['MP'][2] = x1_hp_mp[1] + buffer 295 | 296 | base_stats = [] 297 | 298 | if investigate: 299 | for k,v in coords.items(): 300 | bounding_box = [v[0], v[1], v[2], v[3]] 301 | base_stats.append(bounding_box) 302 | 303 | else: 304 | for k,v in coords.items(): 305 | crop = self.ui[v[1]:v[3], v[0]:v[2]] 306 | if k == 'LVL': 307 | stat = self.get_numbers(crop, self.lvl_numbers_t) 308 | base_exp = int(get_expbase(stat)) 309 | else: 310 | stat = self.get_numbers(crop, self.numbers_t) 311 | base_stats.append(stat) 312 | base_stats.append(base_exp) 313 | return base_stats 314 | 315 | def get_hitreg(self): 316 | """ 317 | Returns Bool of mobs taking dmg 318 | Searches for hitreg numbers, returns 1 if hit 319 | Leverages multi-processing. 320 | """ 321 | ents = np.array([], dtype=np.int32) 322 | 323 | with concurrent.futures.ThreadPoolExecutor() as executor: 324 | granular_entities = [executor.submit(self.multi_template_matching, self.content, template, threshold=0.85, method=cv2.TM_CCOEFF_NORMED, nms=False) for i, template in enumerate(self.hitreg_numbers_t)] 325 | for ent in granular_entities: 326 | ents = np.append(ents, ent.result()) 327 | 328 | size = ents.shape[0] 329 | if size == 0: 330 | return False 331 | 332 | return True 333 | 334 | def display(self, im_name, im): 335 | cv2.imshow(f"{im_name}", im) 336 | cv2.waitKey() 337 | cv2.destroyAllWindows() 338 | 339 | def inspect(self, view, save_to_disk=False): 340 | """ 341 | Displays an image and template detections of a view for debugging. 342 | views : [frame, content, ui, player, mobs, stats] 343 | """ 344 | game_window = self.d.screenshot(region=self.p_coords) 345 | 346 | clr_frame, clr_content, clr_ui = self.get_aoi(game_window, cv2.COLOR_RGB2BGR) 347 | self.frame, self.content, self.ui = self.get_aoi(game_window, cv2.COLOR_BGR2GRAY) 348 | 349 | items = { 350 | 'frame' : [clr_frame, None], 351 | 'content' : [clr_content, None], 352 | 'ui' : [clr_ui, None], 353 | 'player' : [clr_content, self.get_player], 354 | 'mobs' : [clr_content, self.get_mobs], 355 | 'stats' : [clr_ui, self.get_stats], 356 | 'nametag_t' : [self.name_t, None], 357 | 'mobs_t' : [self.mobs_t, None], 358 | 'base_stats' : [clr_ui, self.get_basestats] 359 | } 360 | 361 | image = items[view][0] 362 | clr = (0, 0, 255) 363 | width = 2 364 | 365 | if items[view][1] != None: 366 | boxes = items[view][1]() if ('stats' not in view) else items[view][1](True) 367 | if view == 'player': 368 | image = cv2.rectangle(image, (boxes[0],boxes[1]), (boxes[2],boxes[3]), clr, width) 369 | elif view == 'mobs': 370 | for box in boxes: 371 | image = cv2.rectangle(image, (box[0],box[1]), (box[2],box[3]), clr , width) 372 | else: 373 | for box in boxes: 374 | image = cv2.rectangle(image, (box[0],box[1]), (box[2],box[3]), clr , width) 375 | 376 | self.d.stop() 377 | 378 | if type(items[view][0]) == list: 379 | for i, im in enumerate(items[view][0]): 380 | self.display(view, im) 381 | if save_to_disk: cv2.imwrite(f"{view}_{i}.png", im) 382 | else: 383 | self.display(view, image) 384 | if save_to_disk: cv2.imwrite(f"{view}.png", image) 385 | 386 | class Obstructed_Game_Window(Exception): 387 | pass 388 | -------------------------------------------------------------------------------- /maplewrapper/__init__.py: -------------------------------------------------------------------------------- 1 | from .Wrapper import wrapper -------------------------------------------------------------------------------- /maplewrapper/templates/general/bracket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/general/bracket.png -------------------------------------------------------------------------------- /maplewrapper/templates/general/bracket_closing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/general/bracket_closing.png -------------------------------------------------------------------------------- /maplewrapper/templates/general/slash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/general/slash.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/0.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/1.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/2.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/3.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/4.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/5.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/6.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/7.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/8.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/9.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/a.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/a_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/a_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/b.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/b_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/b_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/blank.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/c.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/c_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/c_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/d.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/d_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/d_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/e.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/e_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/e_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/f.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/f_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/f_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/g.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/g_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/g_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/h.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/h_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/h_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/i.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/i_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/i_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/j.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/j.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/j_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/j_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/k.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/k_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/k_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/l.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/l_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/l_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/m.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/m_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/m_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/n.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/n_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/n_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/o.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/o_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/o_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/p.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/p_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/p_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/q.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/q_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/q_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/r.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/r_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/r_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/s.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/s_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/s_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/space.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/t.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/t_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/t_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/u.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/u.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/u_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/u_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/v.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/v_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/v_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/w.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/w_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/w_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/x.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/x_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/x_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/y.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/y_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/y_.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/z.png -------------------------------------------------------------------------------- /maplewrapper/templates/nametag_characters/z_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/nametag_characters/z_.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/0.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/1.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/2.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/3.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/4.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/5.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/6.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/7.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/8.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers/9.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/0.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/1.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/2.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/3.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/4.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/5.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/6.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/7.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/8.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_hitreg/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_hitreg/9.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/0.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/1.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/2.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/3.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/4.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/5.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/6.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/7.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/8.png -------------------------------------------------------------------------------- /maplewrapper/templates/numbers_lvl/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/templates/numbers_lvl/9.png -------------------------------------------------------------------------------- /maplewrapper/utils/KNN.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | def get_colors(src_img,K): 5 | """ 6 | Sample of colors from image using cv2 K-means color extraction. 7 | """ 8 | Z = src_img.reshape((-1,3)) 9 | Z = np.float32(Z) 10 | criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 10, 1.0) 11 | ret,label,center = cv2.kmeans(Z,K,None,criteria,10,cv2.KMEANS_RANDOM_CENTERS) 12 | 13 | # Dominant colors list from kmeans calc 14 | colors = np.uint8(center) 15 | return colors -------------------------------------------------------------------------------- /maplewrapper/utils/NameTagMaker.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | from pathlib import Path 3 | from os import listdir 4 | from os.path import join, isfile 5 | 6 | def make_tag(name): 7 | wdir_pth = Path(__file__).resolve().parents[1] 8 | nametag_characters_pth = Path(wdir_pth,"templates","nametag_characters") 9 | character_t = [cv2.imread(join(nametag_characters_pth, f),0) for f in sorted(listdir(nametag_characters_pth)) if isfile(join(nametag_characters_pth, f))] 10 | 11 | nametag_im = cv2.imread(join(nametag_characters_pth, "space.png"),0) 12 | 13 | for l in name: 14 | if l != " ": 15 | if l.isupper(): 16 | char = cv2.imread(join(nametag_characters_pth, f"{l}_.png"),0) 17 | else: 18 | char = cv2.imread(join(nametag_characters_pth, f"{l}.png"),0) 19 | 20 | space = cv2.imread(join(nametag_characters_pth, "blank.png"),0) 21 | new_chars = cv2.hconcat([char,space]) 22 | nametag_im = cv2.hconcat([nametag_im, new_chars]) 23 | else: 24 | space = cv2.imread(join(nametag_characters_pth, "space.png"),0) 25 | nametag_im = cv2.hconcat([nametag_im, space]) 26 | 27 | return nametag_im 28 | 29 | 30 | if __name__ == "__main__": 31 | nametag = make_tag('Pink Bunny') 32 | 33 | cv2.imshow("test", nametag) 34 | cv2.waitKey() 35 | cv2.destroyAllWindows() -------------------------------------------------------------------------------- /maplewrapper/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinmorel/MapleWrapper/ca3eede3b5b3cbc6266844b052c37c375782774c/maplewrapper/utils/__init__.py -------------------------------------------------------------------------------- /maplewrapper/utils/exp.txt: -------------------------------------------------------------------------------- 1 | 1 - 15 2 | 2 - 34 3 | 3 - 57 4 | 4 - 92 5 | 5 - 135 6 | 6 - 372 7 | 7 - 560 8 | 8 - 840 9 | 9 - 1242 10 | 10 - 1144 11 | 11 - 1573 12 | 12 - 2144 13 | 13 - 2800 14 | 14 - 3640 15 | 15 - 4700 16 | 16 - 5893 17 | 17 - 7360 18 | 18 - 9144 19 | 19 - 11120 20 | 20 - 13477 21 | 21 - 16268 22 | 22 - 19320 23 | 23 - 22880 24 | 24 - 27008 25 | 25 - 31477 26 | 26 - 36600 27 | 27 - 42444 28 | 28 - 48720 29 | 29 - 55813 30 | 30 - 63800 31 | 31 - 86784 32 | 32 - 98208 33 | 33 - 110932 34 | 34 - 124432 35 | 35 - 139372 36 | 36 - 155865 37 | 37 - 173280 38 | 38 - 192400 39 | 39 - 213345 40 | 40 - 235372 41 | 41 - 259392 42 | 42 - 285532 43 | 43 - 312928 44 | 44 - 342624 45 | 45 - 374760 46 | 46 - 408336 47 | 47 - 445544 48 | 48 - 483532 49 | 49 - 524160 50 | 50 - 567772 51 | 51 - 598886 52 | 52 - 631704 53 | 53 - 666321 54 | 54 - 702836 55 | 55 - 741351 56 | 56 - 781976 57 | 57 - 824828 58 | 58 - 870028 59 | 59 - 917625 60 | 60 - 967995 61 | 61 - 1021041 62 | 62 - 1076994 63 | 63 - 1136013 64 | 64 - 1198266 65 | 65 - 1263930 66 | 66 - 1333194 67 | 67 - 1406252 68 | 68 - 1483314 69 | 69 - 1564600 70 | 70 - 1650340 71 | 71 - 1740778 72 | 72 - 1836173 73 | 73 - 1936794 74 | 74 - 2042930 75 | 75 - 2154882 76 | 76 - 2272970 77 | 77 - 2397528 78 | 78 - 2528912 79 | 79 - 2667496 80 | 80 - 2813674 81 | 81 - 2967863 82 | 82 - 3130502 83 | 83 - 3302053 84 | 84 - 3483005 85 | 85 - 3673873 86 | 86 - 3875201 87 | 87 - 4087562 88 | 88 - 4311559 89 | 89 - 4547832 90 | 90 - 4797053 91 | 91 - 5059931 92 | 92 - 5337215 93 | 93 - 5629694 94 | 94 - 5938202 95 | 95 - 6263614 96 | 96 - 6606860 97 | 97 - 6968915 98 | 98 - 7350811 99 | 99 - 7753635 100 | 100 - 8178534 101 | 101 - 8626718 102 | 102 - 9099462 103 | 103 - 9598112 104 | 104 - 10124088 105 | 105 - 10678888 106 | 106 - 11264090 107 | 107 - 11881362 108 | 108 - 12532461 109 | 109 - 13219239 110 | 110 - 13943653 111 | 111 - 14707765 112 | 112 - 15513750 113 | 113 - 16363902 114 | 114 - 17260644 115 | 115 - 18206527 116 | 116 - 19204245 117 | 117 - 20256637 118 | 118 - 21366700 119 | 119 - 22537594 120 | 120 - 23772654 121 | 121 - 25075395 122 | 122 - 26449526 123 | 123 - 27898960 124 | 124 - 29427822 125 | 125 - 31040466 126 | 126 - 32741483 127 | 127 - 34535716 128 | 128 - 36428273 129 | 129 - 38424542 130 | 130 - 40530206 131 | 131 - 42751262 132 | 132 - 45094030 133 | 133 - 47565183 134 | 134 - 50171755 135 | 135 - 52921167 136 | 136 - 55821246 137 | 137 - 58880250 138 | 138 - 62106888 139 | 139 - 65510344 140 | 140 - 69100311 141 | 141 - 72887008 142 | 142 - 76881216 143 | 143 - 81094306 144 | 144 - 85594273 145 | 145 - 90225770 146 | 146 - 95170142 147 | 147 - 100385466 148 | 148 - 105886589 149 | 149 - 111689174 150 | 150 - 117809740 151 | 151 - 124265714 152 | 152 - 131075474 153 | 153 - 138258410 154 | 154 - 145834970 155 | 155 - 153826726 156 | 156 - 162256430 157 | 157 - 171148082 158 | 158 - 180526997 159 | 159 - 190419876 160 | 160 - 200854885 161 | 161 - 211861732 162 | 162 - 223471711 163 | 163 - 223471711 164 | 164 - 248635353 165 | 165 - 262260570 166 | 166 - 276632449 167 | 167 - 291791906 168 | 168 - 307782102 169 | 169 - 324648562 170 | 170 - 342439302 171 | 171 - 361204976 172 | 172 - 380999008 173 | 173 - 401877754 174 | 174 - 423900654 175 | 175 - 447130410 176 | 176 - 471633156 177 | 177 - 497478653 178 | 178 - 524740482 179 | 179 - 553496261 180 | 180 - 583827855 181 | 181 - 615821622 182 | 182 - 649568646 183 | 183 - 685165008 184 | 184 - 722712050 185 | 185 - 762316670 186 | 186 - 804091623 187 | 187 - 848155844 188 | 188 - 894634784 189 | 189 - 943660770 190 | 190 - 995373379 191 | 191 - 1049919840 192 | 192 - 1107455447 193 | 193 - 1168144006 194 | 194 - 1232158297 195 | 195 - 1299680571 196 | 196 - 1370903066 197 | 197 - 1446028554 198 | 198 - 1525246918 199 | 199 - 1608855764 200 | 200 - 1697021059 201 | -------------------------------------------------------------------------------- /maplewrapper/utils/fetch_exp.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pathlib 3 | from os.path import join 4 | 5 | def get_expbase(lvl): 6 | exp_table_pth = join(pathlib.Path(__file__).resolve().parents[0],"exp.txt") 7 | with open(exp_table_pth, "r") as f: 8 | l = f.readlines() 9 | 10 | exp_list = [(line.split(" ")[0], line.split(" ")[2].strip()) for line in l] 11 | exp_table = dict(exp_list) 12 | 13 | base_exp = exp_table[str(lvl)] 14 | return base_exp 15 | 16 | if __name__ == "__main__": 17 | b_exp = get_expbase(7) 18 | print(b_exp) -------------------------------------------------------------------------------- /maplewrapper/utils/fetch_mobs.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pathlib 3 | from os.path import join 4 | import requests 5 | import zipfile 6 | import win32gui 7 | 8 | class Invalid_Mob_Name(Exception): 9 | pass 10 | 11 | def download_url(url, save_path, chunk_size=128): 12 | r = requests.get(url, stream=True) 13 | with open(save_path, 'wb') as fd: 14 | for chunk in r.iter_content(chunk_size=chunk_size): 15 | fd.write(chunk) 16 | 17 | def download_sprites(mob_name): 18 | """ 19 | Downloads sprites from maplestory.io if not already on disk. 20 | Returns : list of downloaded file names 21 | """ 22 | pth = pathlib.Path(__file__).resolve().parents[1] 23 | 24 | output_dir = join(pth, "templates","mobs", mob_name) 25 | if not os.path.exists(output_dir) or len(os.listdir(output_dir)) == 0: 26 | with open(join(pth, "utils", "mobs.txt"), "r") as f: 27 | l = f.readlines() 28 | identifiers = [((" ".join(item.split(" ")[2:])).strip(), item.split(" ")[0]) for item in l if "?" not in (" ".join(item.split(" ")[2:]))] 29 | identifiers = dict(identifiers) 30 | 31 | try: 32 | mob_id = identifiers[mob_name] 33 | except KeyError: 34 | raise Invalid_Mob_Name(f"Please verify '{mob_name}' spelling and confirm it is a valid entry at: https://github.com/vinmorel/MapleWrapper/blob/master/maplewrapper/utils/mobs.txt") 35 | 36 | try: 37 | os.makedirs(output_dir) 38 | except Exception as e: 39 | print(e) 40 | 41 | api = f"https://maplestory.io/api/GMS/83/mob/{mob_id}/download" 42 | 43 | save_dir = join(output_dir, f"{mob_name}.zip") 44 | download_url(api, save_dir, chunk_size=128) 45 | 46 | with zipfile.ZipFile(save_dir, 'r') as zip: 47 | files_in_zip = zip.namelist() 48 | stances = { 49 | "hit" : 1, 50 | "stand" : 5, 51 | "move" : 5, 52 | "attack" : None, 53 | "jump" : 2, 54 | "fly" : 3 55 | } 56 | 57 | chosen_templates = [] 58 | for stance, index in stances.items(): 59 | if stance == "attack": 60 | num_attacks = len([f for f in files_in_zip if stance in f]) 61 | index = num_attacks // 2 62 | stance_templates = sorted([f for f in files_in_zip if stance in f])[index:index+1] 63 | else: 64 | stance_templates = sorted([f for f in files_in_zip if stance in f])[:index] 65 | 66 | for candidates in stance_templates: 67 | chosen_templates.append(candidates) 68 | 69 | for f in chosen_templates: 70 | zip.extract(f, join(pth,"templates","mobs",f"{mob_name}")) 71 | 72 | print(f"{mob_name} sprites successfully added to local cache") 73 | 74 | os.remove(save_dir) 75 | 76 | return chosen_templates 77 | 78 | 79 | if __name__ == "__main__": 80 | print(download_sprites("Squid")) -------------------------------------------------------------------------------- /maplewrapper/utils/mobs.txt: -------------------------------------------------------------------------------- 1 | 100100 - Snail 2 | 100101 - Blue Snail 3 | 100120 - Tino 4 | 100121 - Tiv 5 | 100122 - Timu 6 | 100123 - Tiru 7 | 100124 - Tiguru 8 | 1110100 - Green Mushroom 9 | 1110101 - Dark Stump 10 | 1120100 - Octopus 11 | 1130100 - Axe Stump 12 | 1140100 - Ghost Stump 13 | 120100 - Shroom 14 | 1210100 - Pig 15 | 1210101 - Ribbon Pig 16 | 1210102 - Orange Mushroom 17 | 2230131 - Annoyed Zombie Mushroom 18 | 1110130 - Dejected Green Mushroom 19 | 1140130 - Smirking Ghost Stump 20 | 1210103 - Bubbling 21 | 130100 - Stump 22 | 130101 - Red Snail 23 | 2100100 - Desert Rabbit (F) 24 | 2100101 - Desert Rabbit (M) 25 | 2100102 - Jr. Cactus 26 | 9501018 - Stat Change Test 27 | 9300383 - Tutorial Muru 28 | 2100103 - Cactus 29 | 2100104 - Royal Cactus 30 | 2100105 - Bellamoa 31 | 2100106 - Ear Plug Plead 32 | 2100107 - Scarf Plead 33 | 210100 - Slime 34 | 2110200 - Horny Mushroom 35 | 2110300 - Sand Rat 36 | 2110301 - Scorpion 37 | 2130100 - Dark Axe Stump 38 | 2130103 - Jr. Necki 39 | 2220000 - Mano 40 | 2220100 - Blue Mushroom 41 | 2230100 - Evil Eye 42 | 2230101 - Zombie Mushroom 43 | 2230102 - Wild Boar 44 | 2230103 - Trixter 45 | 2230104 - Green Trixter 46 | 2230105 - Seacle 47 | 2230106 - Cico 48 | 2230107 - Krappy 49 | 2230108 - Pinboom 50 | 2230109 - Bubble Fish 51 | 2230110 - Wooden Mask 52 | 2230111 - Rocky Mask 53 | 2230200 - Flower Fish 54 | 2300100 - Stirge 55 | 3000000 - Sentinel 56 | 3000001 - Fairy 1 57 | 3000002 - Fairy 2 58 | 3000003 - Fairy 3 59 | 3000004 - Fairy 4 60 | 3000005 - Brown Teddy 61 | 3000006 - Krip 62 | 3100101 - Sand Dwarf 63 | 3100102 - Kiyo 64 | 3110100 - Ligator 65 | 3110101 - Pink Teddy 66 | 3110102 - Ratz 67 | 3110300 - Cube Slime 68 | 3110301 - Dark Sand Dwarf 69 | 3110302 - Rumo 70 | 3110303 - Triple Rumo 71 | 3210100 - Fire Boar 72 | 3210200 - Jr. Cellion 73 | 3210201 - Jr. Lioner 74 | 3210202 - Jr. Grupin 75 | 3210203 - Panda Teddy 76 | 3210204 - Roloduck 77 | 3210205 - Black Ratz 78 | 3210206 - Helly 79 | 3210207 - Tick 80 | 3210208 - Retz 81 | 3210450 - Scuba Pepe 82 | 3210800 - Lupin 83 | 3220000 - Stumpy 84 | 3220001 - Deo 85 | 3230100 - Curse Eye 86 | 3230101 - Jr. Wraith 87 | 3230102 - Lorang 88 | 3230103 - King Bloctopus 89 | 3230104 - Mask Fish 90 | 3230200 - Star Pixie 91 | 3230300 - Jr. Boogie 1 92 | 3230301 - Jr. Boogie 2 93 | 3230302 - Bloctopus 94 | 3230303 - Propelly 95 | 3230304 - Planey 96 | 3230305 - Toy Trojan 97 | 3230306 - Chronos 98 | 3230307 - Chirppy 99 | 3230308 - Tweeter 100 | 3230400 - Drumming Bunny 101 | 3230405 - Jr. Seal 102 | 4090000 - Iron Hook 103 | 4110300 - Iron Mutae 104 | 4110301 - Reinforced Iron Mutae 105 | 4110302 - Mithril mutae 106 | 4130100 - Copper Drake 107 | 4130101 - Tortie 108 | 4130102 - Dark Nependeath 109 | 4130103 - Rombot 110 | 4130104 - Dark Nependeath 111 | 4220000 - Seruf 112 | 4220001 - Seruf 113 | 4230100 - Cold Eye 114 | 4230101 - Zombie Lupin 115 | 4230102 - Wraith 116 | 4230103 - Iron Hog 117 | 4230104 - Clang 118 | 4230105 - Nependeath 119 | 4230106 - Lunar Pixie 120 | 4230107 - Flyeye 121 | 4230108 - Jr. Cerebes 122 | 4230109 - Block Golem 123 | 4230110 - King Block Golem 124 | 4230111 - Robo 125 | 4230112 - Master Robo 126 | 4230113 - Tick-Tock 127 | 4230114 - Platoon Chronos 128 | 4230115 - Master Chronos 129 | 4230116 - Barnard Gray 130 | 4230117 - Zeta Gray 131 | 4230118 - Ultra Gray 132 | 4230119 - Mateon 133 | 4230120 - Plateon 134 | 4230121 - Mecateon 135 | 4230122 - Nependeath 136 | 4230123 - Sparker 137 | 4230124 - Freezer 138 | 4230125 - Skeledog 139 | 4230126 - Mummydog 140 | 4230200 - Poopa 141 | 4230201 - Poison Poopa 142 | 4230300 - Moon Bunny 143 | 4230400 - Iron Boar 144 | 4230500 - Chipmunk 145 | 4230501 - Red Porky 146 | 4230502 - Black Porky 147 | 4230503 - Blue Flower Serpent 148 | 4230504 - Red Flower Serpent 149 | 4230505 - Jar 150 | 4230506 - Ginseng Jar 151 | 4230600 - Desert Giant 152 | 4240000 - Chief Gray 153 | 4250000 - Mossy Snail 154 | 4250001 - Tree Rod 155 | 5090000 - Shade 156 | 5090001 - Master Dummy 157 | 5100000 - Jr. Yeti 158 | 5100001 - Transforming Jr. Yeti 159 | 5100002 - Firebomb 160 | 5100003 - Hodori 161 | 5100004 - Samiho 162 | 5100005 - Hogul 163 | 5110300 - Reinforced Mithril Mutae 164 | 5110301 - Roid 165 | 5110302 - Neo Huroid 166 | 5120000 - Luster Pixie 167 | 5120001 - Cellion 168 | 5120002 - Lioner 169 | 5120003 - Grupin 170 | 5120100 - MT-09 171 | 5120500 - Grizzly 172 | 5120501 - Bellflower Root 173 | 5120502 - Sr. Bellflower Root 174 | 5120503 - Straw Target Dummy 175 | 5120504 - Wooden Target Dummy 176 | 5120505 - Reindeer 177 | 5120506 - The Book Ghost 178 | 5130100 - Drake 179 | 5130101 - Stone Golem 180 | 5130102 - Dark Stone Golem 181 | 5130103 - Croco 182 | 5130104 - Hector 183 | 5130105 - Dark Jr. Yeti 184 | 5130106 - Transforming Dark Jr. Yeti 185 | 5130107 - Coolie Zombie 186 | 5130108 - Miner Zombie 187 | 5140000 - White Fang 188 | 5150000 - Mixed Golem 189 | 5150001 - Skeleton Soldier 190 | 5200000 - Jr. Sentinel 191 | 5200001 - Ice Sentinel 192 | 5200002 - Fire Sentinel 193 | 5220000 - King Clang 194 | 5220001 - King Clang 195 | 5220002 - Faust 196 | 5220003 - Timer 197 | 5220004 - Giant Centipede 198 | 5250000 - Mossy Mushroom 199 | 5250001 - Stone Bug 200 | 5250002 - Primitive Boar 201 | 5300000 - Leatty 202 | 5300001 - Dark Leatty 203 | 5300100 - Malady 204 | 5400000 - Jr. Pepe 205 | 6090000 - Riche 206 | 6090001 - Snow Witch 207 | 6090002 - Bamboo Warrior 208 | 6090003 - Scholar Ghost 209 | 6090004 - Rurumo 210 | 6110300 - Homun 211 | 6110301 - Saitie 212 | 6130100 - Red Drake 213 | 6130101 - Mushmom 214 | 6130102 - Separated Pepe 215 | 6130103 - Pepe 216 | 6130104 - Boogie 217 | 6130200 - Buffy 218 | 6130201 - Blin 219 | 6130202 - Morphed Blin 220 | 6130203 - Panda 221 | 6130204 - Mr. Alli 222 | 6130207 - Peach Monkey 223 | 6130208 - Kru 224 | 6130209 - Sage Cat 225 | 6220000 - Dyle 226 | 6220001 - Zeno 227 | 6230100 - Wild Kargo 228 | 6230101 - Puco 229 | 6230200 - Dark Pepe 230 | 6230201 - Separated Dark Pepe 231 | 6230300 - Lazy Buffy 232 | 6230400 - Soul Teddy 233 | 6230401 - Jr. Lucida 234 | 6230500 - Master Soul Teddy 235 | 6230600 - Ice Drake 236 | 6230601 - Dark Drake 237 | 6230602 - Officer Skeleton 238 | 6300000 - Yeti 239 | 6300001 - Transformed Yeti 240 | 6300002 - Separated Yeti 241 | 6300003 - Punco 242 | 6300004 - Pachu 243 | 6300005 - Zombie Mushmom 244 | 6300100 - Buffoon 245 | 6400000 - Dark Yeti 246 | 6400001 - Transformed Dark Yeti 247 | 6400002 - Separated Dark Yeti 248 | 6400003 - Cuzco 249 | 6400004 - Opachu 250 | 6400005 - ??? ?? 251 | 6400100 - Deep Buffoon 252 | 7090000 - Security Camera 253 | 7110300 - D. Roy 254 | 7110301 - Homunculus 255 | 7130000 - Lucida 256 | 7130001 - Cerebes 257 | 7130002 - Beetle 258 | 7130003 - Dual Beetle 259 | 7130004 - Hankie 260 | 7130010 - Death Teddy 261 | 7130020 - Goby 262 | 7130100 - Tauromacis 263 | 7130101 - Taurospear 264 | 7130102 - Yeti and Pepe 265 | 7130103 - Commander Skeleton 266 | 7130104 - Captain 267 | 7130200 - Werewolf 268 | 7130300 - Master Death Teddy 269 | 7130400 - Yellow King Goblin 270 | 7130401 - Blue King Goblin 271 | 7130402 - Green King Goblin 272 | 7130500 - Rash 273 | 7130501 - Dark Rash 274 | 7130600 - Hobi 275 | 7130601 - Green Hobi 276 | 7130602 - Thorny Vine 277 | 7140000 - Ghost Pirate 278 | 7160000 - Dual Ghost Pirate 279 | 7220000 - Tae Roon 280 | 7220001 - Nine-Tailed Fox 281 | 7220002 - King Sage Cat 282 | 8090000 - Deet and Roi 283 | 8110300 - Homunscullo 284 | 8130100 - Jr. Balrog 285 | 8140000 - Lycanthrope 286 | 8140001 - Harp 287 | 8140002 - Blood Harp 288 | 8140100 - Dark Yeti and Pepe 289 | 8140101 - Black Kentaurus 290 | 8140102 - Red Kentaurus 291 | 8140103 - Blue Kentaurus 292 | 8140110 - Birk 293 | 8140111 - Dual Birk 294 | 8140200 - Klock 295 | 8140300 - Dark Klock 296 | 8140500 - Bain 297 | 8140555 - Bombing Fish House 298 | 8140600 - Bone Fish 299 | 8140700 - Blue Dragon Turtle 300 | 8140701 - Red Dragon Turtle 301 | 8140702 - Rexton 302 | 8140703 - Brexton 303 | 8141000 - Spirit Viking 304 | 8141100 - Gigantic Spirit Viking 305 | 8141300 - Squid 306 | 8142000 - Phantom Watch 307 | 8142100 - Risell Squid 308 | 8143000 - Grim Phantom Watch 309 | 8150000 - Crimson Balrog 310 | 8150100 - Shark 311 | 8150101 - Cold Shark 312 | 8150200 - Green Cornian 313 | 8150201 - Dark Cornian 314 | 8150300 - Red Wyvern 315 | 8150301 - Blue Wyvern 316 | 8150302 - Dark Wyvern 317 | 8160000 - Gatekeeper 318 | 8170000 - Thanatos 319 | 8180000 - Manon 320 | 8180001 - Griffey 321 | 8190000 - Jr. Newtie 322 | 8190001 - Jr. Newtie 323 | 8190002 - Nest Golem 324 | 8190003 - Skelegon 325 | 8190004 - Skelosaurus 326 | 8190005 - Nest Golem 327 | 8200000 - Eye of Time 328 | 8200001 - Memory Monk 329 | 8200002 - Memory Monk Trainee 330 | 8200003 - Memory Guardian 331 | 8200004 - Chief Memory Guardian 332 | 8200005 - Qualm Monk 333 | 8200006 - Qualm Monk Trainee 334 | 8200007 - Qualm Guardian 335 | 8200008 - Chief Qualm Guardian 336 | 8200009 - Oblivion Monk 337 | 8200010 - Oblivion Monk Trainee 338 | 8200011 - Oblivion Guardian 339 | 8200012 - Chief Oblivion Guardian 340 | 8220000 - Eliza 341 | 8220001 - Snowman 342 | 8220002 - Chimera 343 | 8220003 - Leviathan 344 | 8220004 - Dodo 345 | 8220005 - Lilynouch 346 | 8220006 - Lyka 347 | 8220007 - Blue Mushmom 348 | 8220009 - Snack Bar 349 | 8500000 - Time Sphere 350 | 8500001 - Papulatus Clock 351 | 8500002 - Papulatus 352 | 8500003 - High Darkstar 353 | 8500004 - Low Darkstar 354 | 8510000 - Pianus 355 | 8510100 - Bloody Boom 356 | 8520000 - Pianus 357 | 8800000 - Zakum1 358 | 8800001 - Zakum2 359 | 8800002 - Zakum3 360 | 8800003 - Zakum's Arm 1 361 | 8800004 - Zakum's Arm 2 362 | 8800005 - Zakum's Arm 3 363 | 8800006 - Zakum's Arm 4 364 | 8800007 - Zakum's Arm 5 365 | 8800008 - Zakum's Arm 6 366 | 8800009 - Zakum's Arm 7 367 | 8800010 - Zakum's Arm 8 368 | 8810000 - Horntail's Left Head 369 | 8810001 - Horntail's Right Head 370 | 8810002 - Horntail's Head A 371 | 8810003 - Horntail's Head B 372 | 8810004 - Horntail's Head C 373 | 8810005 - Horntail's Left Hand 374 | 8810006 - Horntail's Right Hand 375 | 8810007 - Horntail's Wings 376 | 8810008 - Horntail's Legs 377 | 8810009 - Horntail's Tails 378 | 8810010 - Dead Horntail's Head A 379 | 8810011 - Dead Horntail's Head B 380 | 8810012 - Dead Horntail's Head C 381 | 8810013 - Dead Horntail's Left Hand 382 | 8810014 - Dead Horntail's Right Hand 383 | 8810015 - Dead Horntail's Wings 384 | 8810016 - Dead Horntail's Legs 385 | 8810017 - Dead Horntail's Tails 386 | 8810018 - Horntail 387 | 8810019 - Red Wyvern 388 | 8810020 - Blue Wyvern 389 | 8810021 - Dark Wyvern 390 | 8810022 - Green Cornian 391 | 8810023 - Dark Cornian 392 | 8810024 - Summon Horntail's Left Head 393 | 8810025 - Summon Horntail's Right Head 394 | 8810026 - Summon Horntail 395 | 8820000 - Pink Bean 396 | 8820001 - Pink Bean 397 | 8820002 - Ariel 398 | 8820003 - Solomon the Wise 399 | 8820004 - Rex the Wise 400 | 8820005 - Hugin 401 | 8820006 - Munin 402 | 8820007 - Mini Bean 403 | 8820008 - Transparent Mob for summoning baby boss 404 | 8820009 - set0 Transparent Mob 405 | 8820010 - Pink Bean 406 | 8820011 - Pink Bean 407 | 8820012 - Pink Bean 408 | 8820013 - Pink Bean 409 | 8820014 - Pink Bean 410 | 8820015 - Solomon the Wise 411 | 8820016 - Rex the Wise 412 | 8820017 - Hugin 413 | 8820018 - Munin 414 | 8820019 - Ariel 415 | 8820020 - Solomon the Wise 416 | 8820021 - Rex the Wise 417 | 8820022 - Hugin 418 | 8820023 - Munin 419 | 8820024 - Solomon the Wise 420 | 8820025 - Rex the Wise 421 | 8820026 - Hugin 422 | 8820027 - Munin 423 | 9000001 - Curse Eye 2 424 | 9000002 - Horned Mushroom 2 425 | 9000100 - Fire Boar 2 426 | 9000101 - Lupin 2 427 | 9000200 - Evil Eye 2 428 | 9000201 - Zombie Mushroom 2 429 | 9000300 - Cold Eye 2 430 | 9000301 - Blue Mushroom 2 431 | 9001000 - Dances with Balrog's Clone 432 | 9001001 - Grendel the Really Old's Clone 433 | 9001002 - Athena Pierce's Clone 434 | 9001003 - Dark Lord's Clone 435 | 9001004 - Shadow Kyrin 436 | 9001005 - OctoPirate 437 | 9001006 - OctoPirate 438 | 9001007 - Scarecrow for Training 439 | 9001008 - Shadow Kyrin's Clone 440 | 9001009 - Master of Disguise 441 | 9001010 - Black Witch 442 | 9001011 - Tiguru of Exam 443 | 9100000 - Super Slime 444 | 9100001 - Super Jr. Necki 445 | 9100002 - Super Stirge 446 | 9100003 - Ultra Jr. Necki 1 447 | 9100004 - Ultra Jr. Necki 2 448 | 9100005 - Super Trickster 449 | 9100006 - Super Green Trickster 450 | 9100007 - Super Ribbon-Pig 451 | 9100008 - Super Coke Snail 1 452 | 9100009 - Super Coke Snail 2 453 | 9100010 - Mr. Black Sheep 454 | 9100013 - Adin 455 | 9200000 - Wild Boar (PC) 456 | 9200001 - Fire Boar (PC) 457 | 9200002 - Dark Stump (PC) 458 | 9200003 - Horned Mushroom (PC) 459 | 9200004 - Green Mushroom (PC) 460 | 9200005 - Slime (PC) 461 | 9200006 - Lupin (PC) 462 | 9200007 - Zombie Lupin (PC) 463 | 9200008 - Blue Mushroom (PC) 464 | 9200009 - Stone Golem (PC) 465 | 9200010 - Zombie Mushroom (PC) 466 | 9200011 - Evil Eye (PC) 467 | 9200012 - Drake (PC) 468 | 9200013 - Cold Eye (PC) 469 | 9200014 - Wild Kargo (PC) 470 | 9200015 - Brown Tanny 471 | 9200016 - Drumming Bunny 472 | 9200017 - Pink Tanny 473 | 9200018 - Jr. Yetti 474 | 9200019 - White Fang 475 | 9200020 - Yetti & Pepe 476 | 9200021 - Separated Yetti 477 | 9200022 - Separated Pepe 478 | 9300000 - Jr. Necki (PC) 479 | 9300001 - Ligator (PC) 480 | 9300002 - Curse Eye (PC) 481 | 9300003 - King Slime 482 | 9300004 - Mimic 483 | 9300005 - Ratz from Another Dimension 484 | 9300006 - Black Ratz from Another Dimension 485 | 9300007 - Bloctopus from Another Dimension 486 | 9300008 - Shadow Eye from Another Dimension 487 | 9300009 - Block Golem from Another Dimension 488 | 9300010 - Rombad from Another Dimension 489 | 9300011 - Toy Trojan 490 | 9300012 - Alishar 491 | 9300013 - King Block Golem from Another Dimension 492 | 9300014 - Dark Eye from Another Dimension 493 | 9300015 - Cronos 494 | 9300016 - Platoon Cronos 495 | 9300017 - Master Cronos 496 | 9300018 - Tutorial Jr. Sentinel 497 | 9300019 - Master Muscle Stone 498 | 9300020 - Muscle Stone 499 | 9300021 - Dark Muscle Stone 500 | 9300022 - Black Knight 501 | 9300023 - Myst Knight 502 | 9300024 - Puppet Golem 503 | 9300025 - Gargoyle 504 | 9300026 - Jr. Gargoyle 505 | 9300027 - Devil Slime 506 | 9300028 - Ergoth 507 | 9300029 - Lion Statue A 508 | 9300030 - Lion Statue B 509 | 9300031 - Knight Statue A 510 | 9300032 - Knight Statue B 511 | 9300033 - Jr. Gargoyle 512 | 9300034 - Mist Knight 513 | 9300035 - Jr. Gargoyle 514 | 9300036 - Black Knight 515 | 9300037 - Mist Knight 516 | 9300038 - Ghost Pixie 517 | 9300039 - Papa Pixie 518 | 9300040 - Cellion in Tower of Goddess 519 | 9300041 - Cellion in Tower of Goddess 520 | 9300042 - Grupin in Tower of Goddess 521 | 9300043 - Lioner in Tower of Goddess 522 | 9300044 - Lucida in Tower of Goddess 523 | 9300045 - Lunar Pixie in Tower of Goddess 524 | 9300046 - Star Pixie in Tower of Goddess 525 | 9300047 - Luster Pixie in Tower of Goddess 526 | 9300048 - Nependeath in Tower of Goddess 527 | 9300049 - Royal Nependeath in Tower of Goddess 528 | 9300050 - Flying Boogie 529 | 9300051 - Jr. Cellion in Tower of Goddess 530 | 9300052 - Jr. Lioner in Tower of Goddess 531 | 9300053 - Jr. Grupin in Tower of Goddess 532 | 9300054 - Lunar Pixie in Tower of Goddess(Summon Boss) 533 | 9300055 - Star Pixie in Tower of Goddess(Summon Boss) 534 | 9300056 - Luster Pixie in Tower of Goddess(Summon Boss) 535 | 9300057 - Cellion in Tower of Goddess 536 | 9300058 - Pig 537 | 9300059 - Ribbon Pig 538 | 9300060 - Iron Hog 539 | 9300061 - Moon Bunny 540 | 9300062 - Flyeye 541 | 9300063 - Stirge 542 | 9300064 - Goblin Fire 543 | 9300065 - Green Cornian1 in Cave 544 | 9300066 - Green Cornian 2 in Cave 545 | 9300067 - Dark Cornian 1 in Cave 546 | 9300068 - Dark Cornian 2 in Cave 547 | 9300069 - Red Wyvern 1 in Cave 548 | 9300070 - Red Wyvern 2 in Cave 549 | 9300071 - Blue Wyvern 1 in Cave 550 | 9300072 - Blue Wyvern 2 in Cave 551 | 9300073 - Dark Wyvern 1 in Cave 552 | 9300074 - Dark Wyvern 2 in Cave 553 | 9300075 - Skelegon 1 in Cave 554 | 9300076 - Skelegon 2 in Cave 555 | 9300077 - T-Skelegon in Cave 556 | 9300078 - Jr. Newtie in Cave 557 | 9300079 - Nest Golem in Cave 558 | 9300080 - Kru 559 | 9300081 - Flyeye 560 | 9300082 - Stirge 561 | 9300083 - Goblin Fire 562 | 9300084 - Deathly Fear 563 | 9300085 - Jr. Balrog in Another World 564 | 9300086 - The Elemental Thanatos 565 | 9300087 - The Charging Taurospear 566 | 9300088 - Dark Lord's Disciple 567 | 9300089 - Phoenix 568 | 9300090 - Freezer 569 | 9300091 - Buff Rocky in the Dark 570 | 9300092 - Jr. Balrog in Forgotten Shrine 571 | 9300093 - Tylus 572 | 9300094 - Crimson Balrog the Kidnapper 573 | 9300095 - Lycanthrope the Kidnapper 574 | 9300096 - Black Kentaurus 575 | 9300097 - Goby in Warped Dimension 576 | 9300098 - Bone Fish in Warped Dimension 577 | 9300099 - Shark in Warped Dimension 578 | 9300100 - The Elemental Thanatos 579 | 9300101 - Tamable Hog 580 | 9300102 - Watchhog 581 | 9300103 - Barnard Gray 582 | 9300104 - Zeta Gray 583 | 9300105 - Angry Lord Pirate 584 | 9300106 - Enraged Lord Pirate 585 | 9300107 - Peeking Lord Pirate 586 | 9300108 - Lord Pirate's Jar 587 | 9300109 - Lord Pirate's Ginseng Jar 588 | 9300110 - Lord Pirate's Bellflower 589 | 9300111 - Lord Pirate's Ancient Bellflower 590 | 9300112 - Lord Pirate's 100yrOld Bellflower 591 | 9300113 - Lord Pirate's 100yrOld Ancient Bellflower 592 | 9300114 - Lord Pirate's Enraged Mr. Alli 593 | 9300115 - Lord Pirate's Enraged Kru 594 | 9300116 - Lord Pirate's Enraged Captain 595 | 9300117 - Lord Pirate's Devoted Kru 596 | 9300118 - Lord Pirate's Devoted Captain 597 | 9300119 - Lord Pirate 598 | 9300120 - Lord Pirate's Furious Mr. Alli 599 | 9300121 - Lord Pirate's Furious Kru 600 | 9300122 - Lord Pirate's Furious Captain 601 | 9300123 - Lord Pirate's Mr. Alli 602 | 9300124 - Lord Pirate's Kru 603 | 9300125 - Lord Pirate's Captain 604 | 9300126 - Lord Pirate's Enraged Ginseng Jar 605 | 9300127 - Brown Teddy 606 | 9300128 - Bloctopus 607 | 9300129 - Ratz 608 | 9300130 - Chronos 609 | 9300131 - Toy Trojan 610 | 9300132 - Tick-Tock 611 | 9300133 - Robo 612 | 9300134 - King Bloctopus 613 | 9300135 - Master Chronos 614 | 9300136 - Rombot 615 | 9300137 - Juliet 616 | 9300138 - Romeo 617 | 9300139 - Frankenroid 618 | 9300140 - Angry Frankenroid 619 | 9300141 - Homun of Closed Laboratory 620 | 9300142 - Homunculu of hidden laboratory 621 | 9300143 - Reinforced Iron Mutae 622 | 9300144 - Reinforced Mithril Mutae 623 | 9300145 - Homun 624 | 9300146 - Cyti 625 | 9300147 - Homunculus 626 | 9300148 - Neo Huroid 627 | 9300149 - Roid 628 | 9300150 - Neo Huroid 629 | 9300151 - Frankenroid 630 | 9300152 - Angry Frankenroid 631 | 9300153 - Obstacle Mutae 632 | 9300154 - Experimental Neo Huroid 633 | 9300155 - Pig 634 | 9300156 - Black Magician's Disciple 635 | 9300157 - Scorpion 636 | 9300158 - Kyrin 637 | 9300159 - Inferno Kyrin 638 | 9300160 - Blue Flower Serpent 639 | 9300161 - Red Flower Serpent 640 | 9300162 - Willi 641 | 9300163 - Sage Cat 642 | 9300164 - The Book Ghost 643 | 9300165 - Peach Monkey 644 | 9300166 - Bomb 645 | 9300167 - Degraded Rumo 646 | 9300168 - Reinforced Roid 647 | 9300169 - Ratz from Another Dimension 648 | 9300170 - Black Ratz from Another Dimension 649 | 9300171 - Bloctopus from Another Dimension 650 | 9300172 - Poisoned Lord Tree 651 | 9300173 - Poisoned Stone Bug 652 | 9300174 - Poisoned Spright 653 | 9300175 - Poison Flower 654 | 9300176 - Poison Golem 655 | 9300177 - Poison Golem Level 2 656 | 9300178 - Poison Golem Level 3 657 | 9300179 - Spright 658 | 9300180 - Poison Golem 659 | 9300181 - Charged Poison Golem 660 | 9300182 - Super-Charged Poison Golem 661 | 9300183 - Deeply Poisoned Stone Bug 662 | 9300184 - Mano 663 | 9300185 - Stumpy 664 | 9300186 - Deo 665 | 9300187 - King Slime 666 | 9300188 - Giant Centipede 667 | 9300189 - Faust 668 | 9300190 - King Clang 669 | 9300191 - Mushmom 670 | 9300192 - Alishar 671 | 9300193 - Timer 672 | 9300194 - Dyle 673 | 9300195 - Papa Pixie 674 | 9300196 - Zombie Mushmom 675 | 9300197 - Zeno 676 | 9300198 - Lord Pirate 677 | 9300199 - Nine-Tailed Fox 678 | 9300200 - Tae Roon 679 | 9300201 - Super-Charged Poison Golem 680 | 9300202 - King Sage Cat 681 | 9300203 - Jr. Balrog 682 | 9300204 - Eliza 683 | 9300205 - Frankenroid 684 | 9300206 - Chimera 685 | 9300207 - Snack Bar 686 | 9300208 - Snowman 687 | 9300209 - Blue Mushmom 688 | 9300210 - Crimson Balrog 689 | 9300211 - Manon 690 | 9300212 - Griffey 691 | 9300213 - Leviathan 692 | 9300214 - Papulatus 693 | 9300215 - Mu Gong Merits 694 | 9300216 - A transparent item for checking elimination 695 | 9300217 - Blue Snail 696 | 9300218 - Red Snail 697 | 9300219 - Stump 698 | 9300220 - Axe Stump 699 | 9300221 - Cactus 700 | 9300222 - Royal Cactus 701 | 9300223 - Slime 702 | 9300224 - Black Sheep 703 | 9300225 - Lupin 704 | 9300226 - Zombie Lupin 705 | 9300227 - Lorang 706 | 9300228 - Clang 707 | 9300229 - Orange Mushroom 708 | 9300230 - Platoon Chronos 709 | 9300231 - Master Chronos 710 | 9300232 - Tick 711 | 9300233 - Tick-Tock 712 | 9300234 - Ligator 713 | 9300235 - Croko 714 | 9300236 - Luster Pixie 715 | 9300237 - Ghost Pixie 716 | 9300238 - Zombie Mushroom 717 | 9300239 - Zeta 718 | 9300240 - Ultra Gray 719 | 9300241 - Kru 720 | 9300242 - Captain 721 | 9300243 - Samiho 722 | 9300244 - Grizzly 723 | 9300245 - Panda 724 | 9300246 - Tree Road 725 | 9300247 - Stone Bug 726 | 9300248 - Sage Cat 727 | 9300249 - Tauromacis 728 | 9300250 - Taurospear 729 | 9300251 - Lucida 730 | 9300252 - Reinforced Iron Mutae 731 | 9300253 - Reinforced Mithril Mutae 732 | 9300254 - Reinforced Iron Mutae 733 | 9300255 - Mithril Mutae 734 | 9300256 - Transforming Doll Machine (Before) 735 | 9300257 - Transforming Doll Machine (After) 736 | 9300258 - Yeti 737 | 9300259 - Blue Mushroom 738 | 9300260 - Jr. Balrog 739 | 9300261 - Black Kentaurus 740 | 9300262 - Red Kentaurus 741 | 9300263 - Blue Kentaurus 742 | 9300264 - Dark Wyvern 743 | 9300265 - Blue Wyvern 744 | 9300266 - High Darkstar 745 | 9300267 - Low Darkstar 746 | 9300268 - Tae Roon 747 | 9300269 - So Gong 748 | 9300270 - Mingu 749 | 9300271 - Target Slime 750 | 9300272 - Target Orange Mushroom 751 | 9300273 - Target Pig 752 | 9300274 - Cynical Orange Mushroom 753 | 9300275 - Yellow Snail of the Maze 754 | 9300276 - Green Snail of the Maze 755 | 9300277 - Blue Snail of the Maze 756 | 9300278 - Red Snail of the Maze 757 | 9300279 - Purple Snail of the Maze 758 | 9300280 - Transforming Yellow Snail of the Maze 759 | 9300281 - Transforming Green Snail of the Maze 760 | 9300282 - Blue Transforming Snail of the Maze 761 | 9300283 - Transforming Yellow Snail of the Maze 762 | 9300284 - Transforming Yellow Snail of the Maze 763 | 9300285 - Puppeteer 764 | 9300286 - Dangerous Blue Mushroom 765 | 9300287 - Snowman of Competence 766 | 9300288 - Crimson Balrog of Competence 767 | 9300289 - Snipe of Competence 768 | 9300290 - Lilynouch of Competence 769 | 9300291 - Advanced Manon 770 | 9300292 - Advanced Griffey 771 | 9300293 - Advanced Leviathan 772 | 9300294 - Advanced Pianus 773 | 9300295 - The Dangerous Tree of the Maze 774 | 9300296 - The Cool Shade of the Maze 775 | 9300297 - Mutae of the Maze 776 | 9300298 - Red Ribbon Pig of the Maze 777 | 9300299 - Green Ribbon Pig of the Maze 778 | 9300300 - Blue Ribbon Pig of the Maze 779 | 9300301 - Purple Ribbon Pig of the Maze 780 | 9300302 - Pig of the Maze 781 | 9300303 - Sky Mushroom of the Maze I 782 | 9300304 - Sky Mushroom of the Maze II 783 | 9300305 - Sky Mushroom of the Maze III 784 | 9300306 - Sky Mushroom of the Maze IV 785 | 9300307 - Sky Mushroom of the Maze V 786 | 9300308 - Sky Mushroom of the Maze VI 787 | 9300309 - Rash of the Maze 788 | 9300310 - Sand Rabbit of the Maze 789 | 9300315 - Buffy 790 | 9300316 - Soul Teddy 791 | 9300317 - Lazy Buffy 792 | 9300318 - Master Soul Teddy 793 | 9300319 - Klock 794 | 9300320 - Buffoon 795 | 9300321 - Deep Buffoon 796 | 9300322 - Ghost Pirate 797 | 9300323 - Death Teddy 798 | 9300324 - Viking 799 | 9300325 - Cat Sleeping Spot 800 | 9300328 - Tutorial Tino 801 | 9300329 - Wolf's Bomb 802 | 9300330 - Rose Thorn 803 | 9300331 - Gaga 804 | 9300332 - Barnard Gray 805 | 9300333 - Ultra Gray 806 | 9300334 - Chief Gray 807 | 9300335 - Mateon 808 | 9300336 - Mecateon 809 | 9300337 - Mecateon 810 | 9300338 - Rescued Gaga 811 | 9300339 - Space Mateon 812 | 9300340 - Maple Bday Cake 813 | 9300341 - Target Slime 814 | 9300342 - Target Orange Mushroom 815 | 9300343 - Target Pig 816 | 9300344 - Puppeteer 817 | 9300345 - Puppeteer 818 | 9300346 - Puppeteer 819 | 9300347 - Giant Nependeath 820 | 9300348 - Giant 821 | 9300349 - Gentleman 822 | 9300350 - Mu Gong's Shadow 823 | 9300351 - Shadow Knight 824 | 9300352 - Gentleman 825 | 9300353 - Gentleman 826 | 9300354 - Wolf Underling 827 | 9300355 - Shapeshifter 828 | 9300356 - Sma Gingerman 829 | 9300357 - Grii Gingerman 830 | 9300358 - Grii Gingerman 831 | 9300359 - Sma Gingerman 832 | 9300360 - Grii Gingerman 833 | 9300361 - Grii Gingerman 834 | 9300362 - Grii Gingerman 835 | 9300363 - Grii Gingerman 836 | 9300364 - Sma Gingerman 837 | 9300365 - Grii Gingerman 838 | 9300366 - Grii Gingerman 839 | 9300367 - Witch Bear 840 | 9300368 - Witch Bear 841 | 9300369 - Witch Bear 842 | 9300370 - Witch Bear 843 | 9300371 - Witch Bear 844 | 9300372 - Witch Bear 845 | 9300373 - Witch Bear 846 | 9300374 - Witch Bear 847 | 9300375 - Witch Bear 848 | 9300376 - Witch Bear 849 | 9300377 - Witch Bear 850 | 9300378 - Giant Nependeath 851 | 9300379 - Black Mage Wyvern 852 | 9300380 - Black Mage Cornian 853 | 9300381 - Black Mage Skelegon 854 | 9300382 - ??? 855 | 9301000 - Bain 856 | 9301001 - Gigantic Viking 857 | 9301002 - Viking 858 | 9301003 - Dual Ghost Pirate 859 | 9301004 - Ghost Pirate 860 | 9400000 - Crow 861 | 9400001 - Fire Raccoon 862 | 9400002 - Cloud Fox 863 | 9400003 - Nightghost 864 | 9400004 - Big Cloud Fox 865 | 9400005 - Red Boogie 866 | 9400006 - Blue Boogie 867 | 9400007 - Green Boogie 868 | 9400008 - Black Boogie 869 | 9400009 - Crow 870 | 9400010 - Flaming Raccoon 871 | 9400011 - Paper Lantern Ghost 872 | 9400012 - Water Goblin 873 | 9400013 - Dreamy Ghost 874 | 9400014 - Black Crow 875 | 9400100 - Extra A 876 | 9400101 - Extra B 877 | 9400102 - Extra C 878 | 9400103 - Extra D 879 | 9400110 - Leader A 880 | 9400111 - Leader B 881 | 9400112 - Bodyguard A 882 | 9400113 - Bodyguard B 883 | 9400114 - Slot Machine 884 | 9400120 - Male Boss 885 | 9400121 - Female Boss 886 | 9400122 - Male Boss 887 | 9400200 - Malady 888 | 9400201 - Wild Cargo 889 | 9400202 - Golden Slime 890 | 9400203 - Silver Slime 891 | 9400204 - Red Slime 892 | 9400205 - Blue Mushmom 893 | 9400209 - Miner Zombie (JP) 894 | 9400210 - Coolie Zombie (JP) 895 | 9400211 - Dark Stone Golem (JP) 896 | 9400212 - Stone Golem (JP) 897 | 9400213 - Dark Jr. Yeti (JP) 898 | 9400214 - Master Chronos (JP) 899 | 9400215 - Ultra Gray (JP) 900 | 9400216 - Zeta Gray (JP) 901 | 9400217 - Flyeye (JP) 902 | 9400218 - Tauromacis (JP) 903 | 9400238 - Drumming Bunny 904 | 9400239 - Sand Rat 905 | 9400240 - Roid 906 | 9400241 - Pig 907 | 9400242 - Ribbon Pig 908 | 9400243 - Stone Golem 909 | 9400244 - Mixed Golem 910 | 9400245 - Zombie Mushroom 911 | 9400246 - Horny Mushroom 912 | 9400247 - Drumming Bunny 913 | 9400248 - Sand Rat 914 | 9400249 - Roid 915 | 9400300 - The Boss 916 | 9400310 - Tic (Easy) 917 | 9400311 - Tac (Easy) 918 | 9400312 - Toe (Easy) 919 | 9400313 - Tic (Medium) 920 | 9400314 - Tac (Medium) 921 | 9400315 - Toe (Medium) 922 | 9400316 - Tic (Hard) 923 | 9400317 - Tac (Hard) 924 | 9400318 - Toe (Hard) 925 | 9400319 - Cross (Easy) 926 | 9400320 - Cross (Medium) 927 | 9400321 - Cross (Hard) 928 | 9400322 - Giant Snowman (Lvl 1) - Easy 929 | 9400323 - Giant Snowman (Lvl 2) - Easy 930 | 9400324 - Giant Snowman (Lvl 3) - Easy 931 | 9400325 - Giant Snowman (Lvl 4) - Easy 932 | 9400326 - Giant Snowman (Lvl 5) - Easy 933 | 9400327 - Giant Snowman (Lvl 1) - Medium 934 | 9400328 - Giant Snowman (Lvl 2) - Medium 935 | 9400329 - Giant Snowman (Lvl 3) - Medium 936 | 9400330 - Giant Snowman (Lvl 4) - Medium 937 | 9400331 - Giant Snowman (Lvl 5) - Medium 938 | 9400332 - Giant Snowman (Lvl 1) - Hard 939 | 9400333 - Giant Snowman (Lvl 2) - Hard 940 | 9400334 - Giant Snowman (Lvl 3) - Hard 941 | 9400335 - Giant Snowman (Lvl 4) - Hard 942 | 9400336 - Giant Snowman (Lvl 5) - Hard 943 | 9400500 - Malady 944 | 9400501 - Jr. Wraith 945 | 9400502 - Wraith 946 | 9400503 - Stirge 947 | 9400504 - Coolie Zombie 948 | 9400505 - Turkey 949 | 9400506 - Candle Monster 950 | 9400507 - Cake Monster 951 | 9400508 - Mad Turkey 952 | 9400509 - Sakura Cellion 953 | 9400510 - Green Eggy Popp 954 | 9400511 - Yellow Eggy Popp 955 | 9400512 - Cake Mob (2nd) 956 | 9400513 - Candle Mob (2nd) 957 | 9400514 - Geist Balrog Phase 3 958 | 9400515 - Indigo Eye 959 | 9400516 - Crystal Boar 960 | 9400517 - Magik Fierry A 961 | 9400518 - Magik Fierry B 962 | 9400519 - G Slime 963 | 9400520 - P Slime 964 | 9400521 - O Slime 965 | 9400522 - B Slime 966 | 9400523 - Evil Eye GL 967 | 9400524 - Curse Eye GL 968 | 9400525 - Cold Eye GL 969 | 9400526 - Fierry GL 970 | 9400527 - Fire Boar GL 971 | 9400528 - Sentinel GL 972 | 9400529 - Ice Sentinel GL 973 | 9400530 - Zombie Lupin GL 974 | 9400531 - Toy Trojan GL 975 | 9400532 - King Slime GL 976 | 9400533 - Indigo Eye PQ 977 | 9400534 - Crystal Boar PQ 978 | 9400535 - Magik Fiarry A PQ 979 | 9400536 - Geist Balrog Phase 1 980 | 9400537 - Geist Balrog Phase 2 981 | 9400538 - Street Slime 982 | 9400539 - Urban Fungus 983 | 9400540 - Killa Bee 984 | 9400541 - Killa Bee 985 | 9400542 - Fire Tusk 986 | 9400543 - Electrophant 987 | 9400544 - Gryphon 988 | 9400545 - Wolf Spider 989 | 9400546 - I.AM.ROBOT 990 | 9400547 - Boomer 991 | 9400548 - Mighty Maple Eater 992 | 9400549 - Headless Horseman 993 | 9400550 - Boomer 994 | 9400551 - Bob 995 | 9400552 - Zoo Snail 996 | 9400553 - Purple Flying Book 997 | 9400554 - Orange Flying Book 998 | 9400555 - Blue Flying Book 999 | 9400556 - Glutton Ghoul 1000 | 9400557 - Psycho Jack Box 1001 | 9400558 - Psycho Jack 1002 | 9400559 - Sophilia Doll Ground 1003 | 9400560 - Sophilia Doll 1004 | 9400561 - Voodoo 1005 | 9400562 - Hoodoo 1006 | 9400563 - Nightmare 1007 | 9400564 - Mirror Ghost 1008 | 9400565 - Glutton Ghoul 1009 | 9400566 - Loki Box Ex 1010 | 9400567 - Loki Box Tr 1011 | 9400568 - Turkey Commando 1012 | 9400569 - Big Puff Daddy 1013 | 9400570 - Anniversary Cake 1014 | 9400571 - Headless Horseman 1015 | 9400572 - Geist Balrog 1016 | 9400573 - Baby typhon 1017 | 9400574 - Typhon 1018 | 9400575 - Bigfoot 1019 | 9400576 - Windraider 1020 | 9400577 - Firebrand 1021 | 9400578 - Firebrand 1022 | 9400579 - Nightshadow 1023 | 9400580 - Elderwraith 1024 | 9400581 - Stormbreaker 1025 | 9400582 - Crimson Guardian 1026 | 9400583 - Leprechaun 1027 | 9400584 - Leprechaun 1028 | 9400585 - Crimson Tree 1029 | 9400586 - Crimson Tree 1030 | 9400587 - Phantom Tree 1031 | 9400588 - Phantom Tree 1032 | 9400589 - MV 1033 | 9400590 - Margana 1034 | 9400591 - Red Nirg 1035 | 9400592 - Rellik 1036 | 9400593 - Hsalf 1037 | 9400594 - Master Guardian 1038 | 9400595 - Blood Stirge 1039 | 9400596 - Scarlet Phoenix 1040 | 9400597 - Azure Ocelot 1041 | 9400598 - Dark Menhir 1042 | 9400599 - Black Bird 1043 | 9400600 - MasteriaPQ Mob Summoner 1044 | 9400601 - Birthday Candle 1045 | 9400602 - Strawberry Cake 1046 | 9400603 - Angry Strawberry Cake 1047 | 9400604 - Deluxe Candle 1048 | 9400605 - Chocolate Cake 1049 | 9400606 - Giant Cake 1050 | 9400607 - Cake Monster 1051 | 9400608 - Big Puff Daddy 1052 | 9400704 - Beef Eater 1053 | 9400706 - Jr. MV 1054 | 9400707 - Item Maker 1055 | 9400708 - Snowman1 1056 | 9400709 - Snowman2 1057 | 9400710 - Snowman3 1058 | 9400711 - Transparent Mob 1059 | 9400712 - Little Snowman 1060 | 9400713 - Item Killer 1061 | 9400714 - Snow Blower 1062 | 9400715 - Snow Blower 1063 | 9400716 - Snow Blower 1064 | 9400717 - Snow Blower 1065 | 9400718 - Snow Blower 1066 | 9400719 - Snow Blower 1067 | 9400720 - Snow Blower 1068 | 9400721 - Snow Blower 1069 | 9400722 - Snow Blower 1070 | 9400723 - Snow Blower 1071 | 9400724 - Snow Blower 1072 | 9400739 - MV Minion 1073 | 9400740 - MV Minion 1074 | 9400741 - Skel Guard Dog 1075 | 9400742 - Mummy Guard Dog 1076 | 9400743 - Angry Guard Dog 1077 | 9400744 - Crimson Balrog Minion 1078 | 9400745 - Jr. Balrog Minion 1079 | 9400746 - Muscle Stone Minion 1080 | 9400747 - Bain Minion 1081 | 9400748 - MV 1082 | 9400749 - Red Eggy Popp 1083 | 9409000 - Tutorial Leatty 1084 | 9409001 - Tutorial Drumming Rabbit 1085 | 9410000 - Stray Dog 1086 | 9410001 - Stylish Stray Dog 1087 | 9410002 - Angry Stray Dog 1088 | 9410003 - Clown Monkey 1089 | 9410004 - Biker Monkey 1090 | 9410005 - Red Bubble Tea 1091 | 9410006 - Yellow Bubble Tea 1092 | 9410007 - Green Bubble Tea 1093 | 9410008 - Yeti UFO Catcher 1094 | 9410009 - Yeti Doll 1095 | 9410010 - Jr. Pepe UFO Catcher 1096 | 9410011 - Jr. Pepe Doll 1097 | 9410012 - UFO Catcher 1098 | 9410013 - Doll Vending Machine 1099 | 9410014 - Snack Bar 1100 | 9410015 - Snack Bar 1101 | 9410016 - Bubble Fish 1102 | 9410017 - Krappi 1103 | 9410018 - Poopa 1104 | 9410019 - Cico 1105 | 9410020 - Jr. Seal 1106 | 9420000 - Toad 1107 | 9420001 - Frog 1108 | 9420002 - Python 1109 | 9420003 - Red Lizard 1110 | 9420004 - Yellow Lizard 1111 | 9420005 - White Rooster 1112 | 9420006 - Book Monster 1113 | 9420015 - NooNoo 1114 | 9420500 - Stopnow 1115 | 9420501 - Freezer 1116 | 9420502 - Biner 1117 | 9420503 - Nospeed 1118 | 9420504 - Tippo Red 1119 | 9420505 - Tippo Blue 1120 | 9420506 - Batoo 1121 | 9420507 - Trucker 1122 | 9420508 - Octobunny 1123 | 9420509 - Pac Pinky 1124 | 9420510 - Slimy 1125 | 9420511 - Selkie Jr. 1126 | 9420512 - Mr. Anchor 1127 | 9420513 - Capt. Latanica 1128 | 9500000 - Making a wish to full moon 1129 | 9500001 - Making a wish to the full moon 1130 | 9500002 - Making a wish to the full moon 1131 | 9500003 - Making a wish to the full moon 1132 | 9500004 - Making a wish to the full moon 1133 | 9500005 - Making a wish to the full moon 1134 | 9500100 - Slime 1135 | 9500101 - Pig 1136 | 9500102 - Orange Mushroom 1137 | 9500103 - Bubbling 1138 | 9500104 - Octopus 1139 | 9500105 - Green Mushroom 1140 | 9500106 - Horny Mushroom 1141 | 9500107 - Drumming Bunny 1142 | 9500108 - Ligator 1143 | 9500109 - Ratz 1144 | 9500110 - Star Pixie 1145 | 9500111 - Jr. Wraith 1146 | 9500112 - Jr. Pepe 1147 | 9500113 - Panda Teddy 1148 | 9500114 - King Blockpus 1149 | 9500115 - Lorang 1150 | 9500116 - Zombie Lupin 1151 | 9500117 - Helly 1152 | 9500118 - Tweeter 1153 | 9500119 - Toy Trojan 1154 | 9500120 - King Block Golem 1155 | 9500121 - Wraith 1156 | 9500122 - Chief Gray 1157 | 9500123 - Mixed Golem 1158 | 9500124 - Mushmom 1159 | 9500125 - Red Drake 1160 | 9500126 - Ice Drake 1161 | 9500127 - Master Soul Teddy 1162 | 9500128 - Dark Yeti 1163 | 9500129 - Taurospear 1164 | 9500130 - Blue King Goblin 1165 | 9500131 - Lucida 1166 | 9500132 - Werewolf 1167 | 9500133 - Yeti and Pepe 1168 | 9500134 - Lycanthrope 1169 | 9500135 - Death Teddy 1170 | 9500136 - Gigantic Viking 1171 | 9500137 - G. Phantom Watch 1172 | 9500138 - Bain 1173 | 9500139 - Jr. Balrog 1174 | 9500140 - Crimson Balrog 1175 | 9500141 - Separated Yeti 1176 | 9500142 - Separated Pepe 1177 | 9500143 - Coke Pig 1178 | 9500144 - Coke Snail 1179 | 9500145 - Coke Seal 1180 | 9500146 - Play Seal 1181 | 9500147 - Yeti and Coketump 1182 | 9500148 - Igloo Turtle 1183 | 9500149 - Coke Golem 1184 | 9500150 - Ice Golem 1185 | 9500151 - Coke Slime 1186 | 9500152 - Coke Mushroom 1187 | 9500153 - Coketump 1188 | 9500154 - Coketump Lite 1189 | 9500155 - Three-Tailed Fox 1190 | 9500156 - Wraith 1191 | 9500157 - Jr. Wraith 1192 | 9500158 - Yellow King Goblin 1193 | 9500159 - Blue King Goblin 1194 | 9500160 - Green King Goblin 1195 | 9500161 - Hankie 1196 | 9500162 - Harp 1197 | 9500163 - Blood Harp 1198 | 9500164 - Black Kentaurus 1199 | 9500165 - Red Kentaurus 1200 | 9500166 - Blue Kentaurus 1201 | 9500167 - Golden Pig 1202 | 9500168 - King Slime 1203 | 9500169 - Jr. Balrog 1204 | 9500170 - Papa Pixie 1205 | 9500171 - Crimson Balrog 1206 | 9500172 - Alishar 1207 | 9500173 - Griffey 1208 | 9500174 - Manon 1209 | 9500175 - Angry Lord Pirate 1210 | 9500176 - Blue Mushmom 1211 | 9500177 - Giant Centipede 1212 | 9500178 - Snack Bar 1213 | 9500179 - Transformed Snack Bar 1214 | 9500180 - Papulatus 1215 | 9500181 - Papulatus 1216 | 9500182 - Watermelon Guard Hogol 1217 | 9500183 - Watermelon Guard Hogol 1218 | 9500184 - Rideword P 1219 | 9500185 - Rideword Y 1220 | 9500186 - Rideword B 1221 | 9500187 - Busted Doll 1222 | 9500188 - Destroyed Doll 1223 | 9500189 - Gift Box 1224 | 9500190 - Toy Clown 1225 | 9500191 - Green Phantom 1226 | 9500192 - Pumpkin Knight 1227 | 9500193 - Fire Steed 1228 | 9500194 - Mirror Ghost 1229 | 9500195 - Jack-o-Lantern 1230 | 9500196 - Ghost 1231 | 9500197 - Ghost 1232 | 9500198 - Gift Box 1233 | 9500199 - Toy Clown 1234 | 9500200 - Zoo Balrog 1235 | 9500201 - Zoo Yeti 1236 | 9500202 - Zoo White Fang 1237 | 9500203 - Zoo Pig 1238 | 9500204 - Zoo Ribbon Pig 1239 | 9500300 - Busted Doll 1240 | 9500301 - Destroyed Doll 1241 | 9500302 - Jack-o-Lantern at Pumpkin Farm 1242 | 9500303 - Mirror Ghost 2 1243 | 9500304 - Mirror Ghost 3 1244 | 9500305 - Jack-o-Lantern 1245 | 9500306 - Mano 1246 | 9500307 - Stumpy 1247 | 9500308 - Faust 1248 | 9500309 - King Clang 1249 | 9500310 - Timer 1250 | 9500311 - Dyle 1251 | 9500312 - Nine-Tailed Fox 1252 | 9500313 - Tae Roon 1253 | 9500314 - King Sage Cat 1254 | 9500315 - Eliza 1255 | 9500316 - Snow Yeti 1256 | 9500317 - Kid Snowman 1257 | 9500318 - Angry Snowman 1258 | 9500319 - Giant Snowman 1259 | 9500320 - Lost Rudolph 1260 | 9500321 - Snowman 1261 | 9500322 - Kid Snowman 1262 | 9500323 - Kitty from Cheese Storage 1263 | 9500324 - Kitty from Cheese Storage 1264 | 9500325 - King Slime 1265 | 9500326 - Mushmom 1266 | 9500327 - Jr. Balrog 1267 | 9500328 - Crimson Balrog 1268 | 9500329 - Papa Pixie 1269 | 9500330 - Alishar 1270 | 9500331 - Papulatus 1271 | 9500332 - Pianus 1272 | 9500333 - Leviathan 1273 | 9500334 - Lord Pirate 1274 | 9500335 - Frankenroid 1275 | 9500336 - P Junior 1276 | 9500337 - Mano 1277 | 9500338 - Stumpy 1278 | 9500339 - Deo 1279 | 9500340 - King Slime 1280 | 9500341 - Faust 1281 | 9500342 - King Clang 1282 | 9500343 - Alishar 1283 | 9500344 - Timer 1284 | 9500345 - Mushmom 1285 | 9500346 - Dyle 1286 | 9500347 - Zeno 1287 | 9500348 - Nine-Tailed Fox 1288 | 9500349 - Lord Pirate 1289 | 9500350 - Tae Roon 1290 | 9500351 - Papa Pixie 1291 | 9500352 - King Sage Cat 1292 | 9500353 - Jr. Balrog 1293 | 9500354 - Frankenroid 1294 | 9500355 - Eliza 1295 | 9500356 - Chimera 1296 | 9500357 - Snow Yeti 1297 | 9500358 - Crimson Balrog 1298 | 9500359 - Manon 1299 | 9500360 - Griffey 1300 | 9500361 - Leviathan 1301 | 9500362 - Papulatus 1302 | 9500363 - Pianus 1303 | 9500364 - Mini Dungeon Transparent Monster 1304 | 9500365 - Mini Dungeon Agent Box 1305 | 9500366 - Barnard Gray 1306 | 9500367 - Zeta Gray 1307 | 9500368 - Ultra Gray 1308 | 9500369 - Chief Gray 1309 | 9500370 - Mecateon 1310 | 9500371 - Mateon 1311 | 9500372 - Plateon 1312 | 9500373 - Machine MT-09 1313 | 9500400 - Gourd 1314 | 9501000 - Sealed 1315 | 9501001 - Darkness 1316 | 9501002 - Weakness 1317 | 9501003 - Knocked Out 1318 | 9501004 - Cursed 1319 | 9501005 - Poisoned 1320 | 9501006 - Slow 1321 | 9501007 - Disable Buff 1322 | 9501008 - Seduce 1323 | 9501009 - Immune to Weapon 1324 | 9501010 - Immune to Magic 1325 | 9501011 - Cancel Element 1326 | 9501012 - Reduce Element 1327 | 9501013 - Expand Element 1328 | 9501014 - Undead 1329 | 9501015 - Boss 1330 | 9501016 - Monster Book Test 1331 | 9501017 - Skull 1332 | 9600001 - Rooster 1333 | 9600002 - Duck 1334 | 9600003 - Sheep 1335 | 9600004 - Goat 1336 | 9600005 - Black Goat 1337 | 9600006 - Cow 1338 | 9600007 - Plow Ox 1339 | 9600008 - Black Sheep 1340 | 9600009 - Giant Centipede 1341 | 9600010 - Giant Centipede 1342 | 9600065 - Holiday Super Sock 1343 | 9600066 - New Year's Party Pouch 1344 | 9999998 - Star Monster 1345 | 9999999 - ??? 1346 | 9400630 - Event Horntail's Left Head 1347 | 9400631 - Event Horntail's Right Head 1348 | 9400632 - Event Pink Bean 1349 | 9420527 - Chlorotrap 1350 | 9420528 - Emo Slime 1351 | 9420529 - Dark Fission 1352 | 9420530 - Oly Oly 1353 | 9420531 - Scaredy Scarlion 1354 | 9420532 - Ratatula 1355 | 9420533 - Rodeo 1356 | 9420534 - Charmer 1357 | 9420535 - Jester Scarlion 1358 | 9420536 - Froscola 1359 | 9420537 - Yabber Doo 1360 | 9420538 - Booper Scarlion 1361 | 9420539 - Vikerola 1362 | 9420540 - Gallopera 1363 | 9420541 - Targa 1364 | 9420542 - Targa 1365 | 9420543 - Angry Targa 1366 | 9420544 - Furious Targa 1367 | 9420545 - Ratatula 1368 | 9420546 - Scarlion Boss 1369 | 9420547 - Scarlion Boss 1370 | 9420548 - Angry Scarlion Boss 1371 | 9420549 - Furious Scarlion Boss 1372 | 9420550 - Scaredy Scarlion 1373 | 6400006 - Crimson Balrog 1374 | 6400007 - Baby Balrog 1375 | 6400008 - Jr. Balrog 1376 | 6400009 - Crimson Balrog 1377 | 8830000 - Balrog 1378 | 8830001 - Balrog 1379 | 8830002 - Balrog 1380 | 8830003 - Balrog 1381 | 8830004 - Balrog 1382 | 8830005 - Balrog 1383 | 8830006 - Balrog 1384 | 8830007 - Balrog 1385 | 8830008 - Balrog 1386 | 8830009 - Balrog 1387 | 8830010 - Balrog 1388 | 8830011 - Balrog 1389 | 8830012 - Balrog 1390 | 8830013 - Balrog 1391 | 9300311 - Bam Bam Cat 1392 | 9300312 - Pigmy that lays Golden Eggs 1393 | 9300313 - Witch Cat 1394 | 9300314 - Witch Cat 1395 | 9300326 - Unknown Jr. Balrog 1396 | 9300327 - Balrog Corpse 1397 | 9302011 - Lupin Pig 1398 | 9001013 - Thief Crow 1399 | 9001014 - Uncontrollable Maha 1400 | 9303000 - Mano 1401 | 9303001 - Stumpy 1402 | 9303002 - King Slime 1403 | 9303003 - Deo 1404 | 9303004 - Mushmom 1405 | 9303005 - Tae Roon 1406 | 9303006 - Rombot 1407 | 9303007 - Zeno 1408 | 9303008 - Nine-Tailed Fox 1409 | 9303009 - King Sage Cat 1410 | 9303010 - Jr. Balrog 1411 | 9303011 - Lord Pirate 1412 | 9303012 - Papa Pixie 1413 | 9303013 - Crimson Balrog 1414 | 9303014 - Seruf 1415 | 9303015 - Eliza 1416 | 9303016 - Leviathan 1417 | 9302000 - Golden Pig 1418 | 9302001 - Golden Pig 1419 | 9302002 - Golden Pig 1420 | 9302003 - Golden Pig 1421 | 9302004 - Golden Pig 1422 | 9302005 - Golden Pig 1423 | 9302006 - Golden Pig 1424 | 9302007 - Golden Pig 1425 | 9302008 - Golden Pig 1426 | 9302009 - Golden Pig 1427 | 9302010 - Golden Pig 1428 | 100130 - Muru 1429 | 100131 - Murupa 1430 | 100132 - Murupia 1431 | 100133 - Murumuru 1432 | 100134 - Murukun 1433 | 9400609 - Andras 1434 | 9400610 - Amdusias 1435 | 9400611 - Crocell 1436 | 9400612 - Marbas 1437 | 9400613 - Valefor 1438 | 9400614 - Strange Orange Mushroom 1439 | 9400615 - Strange Ribbon Pig 1440 | 9400616 - Strange Green Mushroom 1441 | 9400617 - Strange Pig 1442 | 9400618 - Strange Dark Axe Stump 1443 | 9400619 - Strange Zombie Mushroom 1444 | 9400620 - Strange Dark Stump 1445 | 9400621 - Strange Horny Mushroom 1446 | 9400622 - Strange Blue Mushroom 1447 | 9400623 - Amdusias 1448 | 9400633 - Astaroth 1449 | 9400645 - Totem1 1450 | 9400646 - Totem2 1451 | 9400647 - A Parasite 1452 | 9400634 - Frog 1453 | 9400635 - Cursed Frog 1454 | 9400636 - Black Cat 1455 | 9400637 - Cursed Black Cat 1456 | 9400638 - Rotting Skeleton 1457 | 9400639 - Dead Scarecrow 1458 | 9400640 - Twisted Jester 1459 | 9400641 - Olivia 1460 | 9400642 - Olivia 1461 | 9400643 - Olivia 1462 | 9400644 - Malady 1463 | 9400648 - Possessed Bear Doll 1464 | 9400649 - Possessed Rabbit Doll 1465 | 9400650 - Possessed Bear Doll 1466 | 9400651 - Possessed Rabbit Doll 1467 | 9400652 - Possessed Bear Doll 1468 | 9400653 - Possessed Rabbit Doll 1469 | 9400654 - Event Pink Bean 1470 | 9400655 - Strange Orange Mushroom 1471 | 9400656 - Strange Ribbon Pig 1472 | 9400657 - Strange Green Mushroom 1473 | 3300000 - Renegade Spores 1474 | 3300001 - Poison Mushroom 1475 | 3300002 - Intoxicated Pig 1476 | 3300003 - Helmet Pepe 1477 | 3300004 - Royal Guard Pepe 1478 | 3300005 - Grey Yeti and King Pepe 1479 | 3300006 - Gold Yeti and King Pepe 1480 | 3300007 - White Yeti and King Pepe 1481 | 3300008 - Prime Minister 1482 | 9101000 - Green Mushroom 1483 | 9101001 - Zombie Mushroom 1484 | 9101002 - Ghost Stump 1485 | 9700000 - Subway Slime 1486 | 9700001 - Subway Orange Mushroom 1487 | 9700002 - Subway Ribbon Pig 1488 | 9700003 - Subway Horny Mushroom 1489 | 9700004 - Pyramid Mummydog 1490 | 9700005 - Pyramid Skeleton 1491 | 9700006 - Mummy 1492 | 9700007 - Pharaoh Snake 1493 | 9700008 - Anubis 1494 | 9700009 - Pyramid Mummydog 1495 | 9700010 - Pyramid Skeleton 1496 | 9700011 - Mummy 1497 | 9700012 - Pharaoh Snake 1498 | 9700013 - Anubis 1499 | 9700014 - Pyramid Mummydog 1500 | 9700015 - Pyramid Skeleton 1501 | 9700017 - Pharaoh Snake 1502 | 9700016 - Mummy 1503 | 9700018 - Anubis 1504 | 9700019 - Pharaoh Jr. Yeti 1505 | 9700020 - Metro Bubbling 1506 | 9700021 - Pharaoh Yeti 1507 | 9700022 - Transparent Pharaoh Yeti 1508 | 9700023 - Transparent Pharaoh Yeti 1509 | 9700024 - Pyramid Mummydog 1510 | 9700025 - Pyramid Skeleton 1511 | 9700026 - Mummy 1512 | 9700027 - Pharaoh Snake 1513 | 9700028 - Anubis 1514 | 9700029 - Pharaoh Jr. Yeti 1515 | 8220008 - Unknow Snack Bar 1516 | 9001012 - Scarred Bear 1517 | 9101003 - ???? 1518 | 1210111 - Strange Pig 1519 | 2220110 - Crying Blue Mushroom 1520 | 2230112 - Terrified Wild Boar 1521 | 3400000 - Cherry Bubble Tea 1522 | 3400001 - Mango Bubble Tea 1523 | 3400002 - Melon Bubble Tea 1524 | 3400003 - Yeti Doll Claw Game 1525 | 3400004 - Yeti Doll 1526 | 3400005 - Jr. Pepe Doll Claw Game 1527 | 3400006 - Jr. Pepe Doll 1528 | 3400007 - Transformed Doll Claw Game 1529 | 3400008 - Transformed Doll Claw Game 1530 | 4300000 - Blue Perfume 1531 | 4300001 - Blue Perfume 1532 | 4300002 - Yellow Perfume 1533 | 4300003 - Yellow Perfume 1534 | 4300004 - Pink Perfume 1535 | 4300005 - Pink Perfume 1536 | 4300006 - Kid Mannequin 1537 | 4300007 - Female Mannequin 1538 | 4300008 - Male Mannequin 1539 | 4300009 - Latest Hits Compilation 1540 | 4300010 - Greatest Oldies 1541 | 4300011 - Cheap Amplifier 1542 | 4300012 - Fancy Amplifier 1543 | 4300013 - Spirit of Rock 1544 | 4300014 - Greatest Oldies 1545 | 4300015 - Cheap Amplifier 1546 | 4300016 - Fancy Amplifier 1547 | 4300017 - Spirit of Rock's Soul 1548 | 7120100 - Gatekeeper Nex 1549 | 7120101 - Gatekeeper Nex 1550 | 7120102 - Gatekeeper Nex 1551 | 7120103 - Red Slime 1552 | 7120104 - Silver Slime 1553 | 7120105 - Gold Slime 1554 | 7120106 - Overlord A 1555 | 7120107 - Overlord B 1556 | 7120108 - Robby 1557 | 7120109 - Iruvata 1558 | 7220003 - Bergamot 1559 | 7220004 - Bergamot 1560 | 7220005 - Bergamot 1561 | 8120100 - Gatekeeper Nex 1562 | 8120101 - Gatekeeper Nex 1563 | 8120102 - Afterlord 1564 | 8120103 - Prototype Lord 1565 | 8120104 - Maverick Type A 1566 | 8120105 - Maverick Type S 1567 | 8120106 - Maverick Type D 1568 | 8120107 - Maverick Type D 1569 | 8140510 - Gatekeeper Nex 1570 | 8140511 - Imperial Guard 1571 | 8140512 - Royal Guard 1572 | 8220010 - Dunas 1573 | 8220011 - Aufheben 1574 | 8220012 - Oberon 1575 | 8220013 - Nibelung 1576 | 8220014 - Nibelung 1577 | 8220015 - Nibelung 1578 | 9300384 - Red Slime 1579 | 9300385 - Treacherous Fox 1580 | 9300386 - Trainee Spore 1581 | 9300387 - Enraged Golem 1582 | 9300388 - Free Spirit 1583 | 9300389 - Safe Guard 1584 | 9300390 - Door Block 1585 | 9300391 - Ice Wall 1586 | 9300392 - Black Wing Henchman 1587 | 9300393 - Gentleman 1588 | 9700030 - ?? ??? ?? 1589 | 9700031 - ?? ??? ?? 1590 | 9700032 - ?? ?? ?? 1591 | 9700033 - ?? ?? ?? 1592 | 9700034 - ?? ?? ?? 1593 | 9700035 - ?? ??? 1594 | 9700036 - ?? ?? 1595 | 9700037 - ??? ?? 1596 | 9700038 - ??? ??? ?? 1597 | 2100108 - Meerkat -------------------------------------------------------------------------------- /maplewrapper/utils/nms.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | # Malisiewicz et al. 4 | def non_max_suppression_fast(boxes, overlapThresh): 5 | # if there are no boxes, return an empty list 6 | if len(boxes) == 0: 7 | return [] 8 | # if the bounding boxes integers, convert them to floats -- 9 | # this is important since we'll be doing a bunch of divisions 10 | if boxes.dtype.kind == "i": 11 | boxes = boxes.astype("float") 12 | # initialize the list of picked indexes 13 | pick = [] 14 | # grab the coordinates of the bounding boxes 15 | x1 = boxes[:,0] 16 | y1 = boxes[:,1] 17 | x2 = boxes[:,2] 18 | y2 = boxes[:,3] 19 | # compute the area of the bounding boxes and sort the bounding 20 | # boxes by the bottom-right y-coordinate of the bounding box 21 | area = (x2 - x1 + 1) * (y2 - y1 + 1) 22 | idxs = np.argsort(y2) 23 | # keep looping while some indexes still remain in the indexes 24 | # list 25 | while len(idxs) > 0: 26 | # grab the last index in the indexes list and add the 27 | # index value to the list of picked indexes 28 | last = len(idxs) - 1 29 | i = idxs[last] 30 | pick.append(i) 31 | # find the largest (x, y) coordinates for the start of 32 | # the bounding box and the smallest (x, y) coordinates 33 | # for the end of the bounding box 34 | xx1 = np.maximum(x1[i], x1[idxs[:last]]) 35 | yy1 = np.maximum(y1[i], y1[idxs[:last]]) 36 | xx2 = np.minimum(x2[i], x2[idxs[:last]]) 37 | yy2 = np.minimum(y2[i], y2[idxs[:last]]) 38 | # compute the width and height of the bounding box 39 | w = np.maximum(0, xx2 - xx1 + 1) 40 | h = np.maximum(0, yy2 - yy1 + 1) 41 | # compute the ratio of overlap 42 | overlap = (w * h) / area[idxs[:last]] 43 | # delete all indexes from the index list that have 44 | idxs = np.delete(idxs, np.concatenate(([last], 45 | np.where(overlap > overlapThresh)[0]))) 46 | # return only the bounding boxes that were picked using the 47 | # integer data type 48 | return boxes[pick].astype("int") 49 | -------------------------------------------------------------------------------- /maplewrapper/utils/window_pos.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Sep 11 10:28:33 2020 4 | 5 | @author: Vincent Morel 6 | """ 7 | 8 | import win32gui 9 | 10 | def process_coords(c_name): 11 | """ 12 | Returns tuple (x0, y0, x1, y0) of process position on screen 13 | """ 14 | hdl = win32gui.FindWindow(c_name, None) 15 | rect = win32gui.GetWindowRect(hdl) 16 | return rect 17 | 18 | class_names = [] 19 | def callback(hwnd, extra): 20 | cname = win32gui.GetClassName(hwnd) 21 | class_names.append(cname) 22 | 23 | def get_classname(search_term): 24 | win32gui.EnumWindows(callback, None) 25 | try: 26 | cname = [i for i in class_names if search_term in i] 27 | return cname[0] 28 | except IndexError: 29 | raise Invalid_Game_Window(f"Could not find the MapleStory process. Verify that the game is running. If it is running, modify the wrapper instantiation argument 'cname' to the corresponding process in the following list: {class_names}") 30 | 31 | class Invalid_Game_Window(Exception): 32 | pass 33 | 34 | if __name__ == '__main__': 35 | a = get_cname('MapleStory') 36 | print(process_coords(a)) -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | d3dshot>=0.1.5 2 | numpy>=1.19.1 3 | opencv-python>=4.4.0.42 4 | pywin32==225 5 | pywin32-ctypes>=0.2.0 6 | requests>=2.23.0 -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | description = """MapleWrapper allows real-time game data extraction for MapleStory v.92 and below 4 | clients. It is primarily intended to facilitate the production of reinforcement learning environments 5 | for game agents. 6 | 7 | For more information, read the README at https://github.com/vinmorel/MapleWrapper. 8 | """ 9 | 10 | setup( 11 | name='MapleWrapper', 12 | version='1.0.0', 13 | description='MapleStory v.92 and below client wrapper', 14 | long_description=description, 15 | author='Vincent Morel', 16 | license='MIT License', 17 | keywords='MapleStory Wrapper Reinforcement Learning', 18 | url='https://github.com/vinmorel/MapleWrapper', 19 | packages=[ 20 | 'maplewrapper', 21 | 'maplewrapper.utils', 22 | ], 23 | install_requires=[ 24 | 'd3dshot', 25 | 'numpy>=1.19.1', 26 | 'opencv-python>=4.4.0.42', 27 | 'pywin32==225', 28 | 'pywin32-ctypes>=0.2.0', 29 | 'requests>=2.23.0' 30 | ], 31 | package_data={'maplewrapper': ['templates/general/*png', 32 | 'templates/nametag_characters/*png', 33 | 'templates/numbers/*png', 34 | 'templates/numbers_lvl/*png', 35 | 'templates/numbers_hitreg/*png', 36 | 'utils/*txt']}, 37 | 38 | classifiers=[ 39 | 'Intended Audience :: Science/Research', 40 | 'License :: MIT License' 41 | ], 42 | ) --------------------------------------------------------------------------------