Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ui, app
- , chr
- , time
- , grp
- , math
- , imp
- , skill
- , localeInfo
- , item
- , background
- , constInfo
- , uiScriptLocale
- , chrmgrm2g
- , playerm2g2 as player
- , wndMgr
- , chatm2g as chat
- try:
- import m2netm2g as m2net
- except:
- import net
- m2net = net
- else:
- import os
- from textTail import Pick
- import k_locale, k_timer
- , k_command_manager
- DISABLE_DLL_MODULE_FUNCTIONS = 1
- KAMER_MODULE_NOT_LOADED = 0
- try:
- import player5
- except:
- KAMER_MODULE_NOT_LOADED = 1
- dbg.LogBox('Failed to load kamer Module. Some functions are now disabled.')
- FARM_CONFIG_FILE = 'temp/h4ckb4r/farm_cords.cfg'
- MOD_CONFIG_FILE = 'temp/h4ckb4r/mod_config2.cfg'
- def ReadConfig(Setting):
- handle = app.OpenTextFile(MOD_CONFIG_FILE)
- count = app.GetTextFileLineCount(handle)
- for i in xrange(count):
- line = app.GetTextFileLine(handle, i)
- if line.startswith(Setting):
- return line.split('=')[1]
- def SaveConfig(Setting, Value):
- sReader = open(MOD_CONFIG_FILE, 'r')
- sLines = file.readlines(sReader)
- sWriter = open(MOD_CONFIG_FILE, 'w')
- for Line in sLines:
- if Line.startswith(Setting + '='):
- Line = Setting + '=' + Value + '\n'
- sWriter.write(Line)
- sWriter.close()
- sReader.close()
- MyX = 0
- MyY = 0
- if ReadConfig('ExtraPickUp') == '1':
- EXTRA_PICKUP = 1
- elif ReadConfig('ExtraPickUp') == '2':
- EXTRA_PICKUP = 2
- else:
- EXTRA_PICKUP = 1
- oldIsPrivateShopItemPriceList = 0
- def IsPrivateShopItemPriceList():
- return TRUE
- def SaveLoginInfo(name, channel, id, pwd, slot, auto_login):
- file = open('logininfo.xml', 'w')
- file.write('<logininfo name="%s" channel_idx="%s">\n' % (name, channel))
- if id == '':
- file.write(' <id> </id>\n')
- else:
- file.write(' <id>%s</id>\n' % id)
- if id == '':
- file.write(' <pwd> </pwd>\n')
- else:
- file.write(' <pwd>%s</pwd>\n' % pwd)
- file.write(' <slot>%s</slot>\n' % slot)
- file.write(' <auto_login>%s</auto_login>\n' % auto_login)
- file.write('</logininfo>')
- file.close()
- def LoadLoginInfo(x):
- def getValue(element, name, default):
- if [] != element.getElementsByTagName(name):
- return element.getElementsByTagName(name).item(0).firstChild.nodeValue
- else:
- return default
- from xml.dom.minidom import parse
- try:
- f = open('logininfo.xml', 'r')
- dom = parse(f)
- except:
- return ''
- if [] != dom.getElementsByTagName('logininfo'):
- logininfo = dom.getElementsByTagName('logininfo')[0]
- else:
- return ''
- if x == 'name':
- server_name = logininfo.getAttribute('name')
- return server_name
- else:
- if x == 'channel_idx':
- channel_idx = logininfo.getAttribute('channel_idx')
- return channel_idx
- if x == 'id':
- id = getValue(logininfo, 'id', '')
- return id
- if x == 'pwd':
- pwd = getValue(logininfo, 'pwd', '')
- return pwd
- if x == 'slot':
- slot = getValue(logininfo, 'slot', '0')
- return slot
- if x == 'is_auto_login':
- is_auto_login = getValue(logininfo, 'auto_login', '0')
- return is_auto_login
- return ''
- RED_POTION_ID = ''
- BLUE_POTION_ID = ''
- class Dialog1(ui.Window):
- Auto_Pickup = 0
- Auto_Attack = 0
- Auto_RedPotion = 0
- Auto_BluePotion = 0
- Fast_Attack = 0
- MoveSpeed = 0
- AttackSpeed = 0
- GuildExpDonate = 0
- Attract_Mobs = 0
- StopBotAndStandUp = 0
- WaitForHP = 0
- GM_Detector = 0
- WallHack = 0
- AttackInRange_Enable_Set = 0
- WalkAndSearch_Enable_Set = 0
- WalkAndSearch = 0
- FishingState = 'stop'
- killFish = 0
- dropHairDye = 0
- dropDeadFish = 0
- openClams = 0
- stopFishing = 0
- quitFishing = 0
- skillbot_1 = 0
- skillbot_2 = 0
- skillbot_3 = 0
- skillbot_4 = 0
- skillbot_5 = 0
- skillbot_6 = 0
- chat_SpamBot = 0
- whisper_SpamBot = 0
- BlackList = []
- SpaceBar_Attack = 0
- AutoRevive = 0
- WaitHack = 0
- LEVELBOT_STATE_STOP = 0
- LEVELBOT_STATE_START = 1
- LEVELBOT_STATE_DEAD = 2
- LEVELBOT_STATE_WAIT = 3
- def __init__(self):
- global BLUE_POTION_ID
- global RED_POTION_ID
- ui.Window.__init__(self)
- RED_POTION_ID = ReadConfig('RedPotionID')
- BLUE_POTION_ID = ReadConfig('BluePotionID')
- self.BuildWindow()
- k_command_manager.InitCommandManager()
- import k_hook_manager
- k_hook_manager.InitWhisperManager()
- k_hook_manager.InitRestartManager()
- k_hook_manager.InitMiniMapManager()
- k_hook_manager.InitPartyManager()
- k_hook_manager.InitSetLoginInfo()
- if ReadConfig('FastAttack_Enabled') == '1':
- self.FastAttack_Btn.Down()
- self.FastAttack_Btn_func('on')
- if ReadConfig('Wallhack_Enabled') == '1':
- self.Wallhack_Btn.Down()
- self.WallHack_Btn_func('on')
- if ReadConfig('GameMasterDetector_Enabled') == '1':
- self.GameMasterDetector_Btn.Down()
- self.GmDetector_Btn_func('on')
- if ReadConfig('AutoPickup_Enabled') == '1':
- self.AutoPickup_Btn.Down()
- self.Pickup_Btn_func('on')
- self.ItemFilter_Window.Hide()
- if ReadConfig('AttractMobs_Enabled') == '1':
- self.AttractMobs_Btn.Down()
- self.AttractMobs_Btn_func('on')
- if ReadConfig('AttackSpeed_Enabled') == '1':
- self.AttackSpeed_Btn.Down()
- self.AttackSpeed_Btn_func('on')
- if ReadConfig('WalkSpeed_Enabled') == '1':
- self.WalkSpeed_Btn.Down()
- self.WalkSpeed_Btn_func('on')
- if ReadConfig('BluePotion_Enabled') == '1':
- self.BluePotion_Btn.Down()
- self.BluePotion_Btn_func('on')
- if ReadConfig('RedPotion_Enabled') == '1':
- self.RedPotion_Btn.Down()
- self.RedPotion_Btn_func('on')
- if m2net.GetMainActorSkillGroup() != 0:
- slotIndex1 = player.GetSkillIndex(1)
- slotIndex2 = player.GetSkillIndex(2)
- slotIndex3 = player.GetSkillIndex(3)
- slotIndex4 = player.GetSkillIndex(4)
- slotIndex5 = player.GetSkillIndex(5)
- skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex1)
- skill_Duration1 = skill.GetDuration(slotIndex1, skillNextPercentage)
- if self.skill1_timer_edit.GetText() == '0':
- self.skill1_timer_edit.SetText(str(skill_Duration1))
- skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex2)
- skill_Duration2 = skill.GetDuration(slotIndex2, skillNextPercentage)
- if self.skill2_timer_edit.GetText() == '0':
- self.skill2_timer_edit.SetText(str(skill_Duration2))
- skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex3)
- skill_Duration3 = skill.GetDuration(slotIndex3, skillNextPercentage)
- if self.skill3_timer_edit.GetText() == '0':
- self.skill3_timer_edit.SetText(str(skill_Duration3))
- skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex4)
- skill_Duration4 = skill.GetDuration(slotIndex4, skillNextPercentage)
- if self.skill4_timer_edit.GetText() == '0':
- self.skill4_timer_edit.SetText(str(skill_Duration4))
- skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex5)
- skill_Duration5 = skill.GetDuration(slotIndex5, skillNextPercentage)
- if self.skill5_timer_edit.GetText() == '0':
- self.skill5_timer_edit.SetText(str(skill_Duration5))
- def __del__(self):
- ui.Window.__del__(self)
- def BuildWindow(self):
- self.Board = ui.ThinBoard()
- try:
- self.Board.SetSize(554, 50)
- except:
- dbg.MsgBox('lol')
- self.Board.SetPosition(wndMgr.GetScreenWidth() - 554, wndMgr.GetScreenHeight() - 50 - 38)
- self.Board.Show()
- self.comp = k_ui.Component()
- self.func = Functions()
- self.time = k_timer.Timer()
- self.chatTimer = k_timer.Timer()
- self.whisperTimer = k_timer.Timer()
- self.stopFishingTimer = k_timer.Timer()
- self.AutoRevive_Timer = k_timer.Timer()
- self.WaitHack_Timer = k_timer.Timer()
- self.LevelBot_Timer = k_timer.Timer()
- self.getskillicon = ''
- self.Fishing_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_FISHING, 90, 9, lambda arg='off': self.StartFishing_Btn_func(arg), lambda arg='on': self.StartFishing_Btn_func(arg), 'temp/h4ckb4r/fishbot_off.tga', 'temp/h4ckb4r/fishbot_on.tga', 'temp/h4ckb4r/fishbot_on.tga')
- self.Farm_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_FARM, 60, 9, lambda arg='off': self.Farm_Btn_func(arg), lambda arg='on': self.Farm_Btn_func(arg), 'temp/h4ckb4r/farm_off.tga', 'temp/h4ckb4r/farm_on.tga', 'temp/h4ckb4r/farm_on.tga')
- self.FastAttack_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_FASTATTACK, 40, 9, lambda arg='off': self.FastAttack_Btn_func(arg), lambda arg='on': self.FastAttack_Btn_func(arg), 'd:/ymir work/ui/game/TaskBar/Chat_Button_01.sub', 'd:/ymir work/ui/game/TaskBar/Chat_Button_02.sub', 'd:/ymir work/ui/game/TaskBar/Chat_Button_03.sub')
- self.AutoAttack_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_AUTOATTACK, 10, 10, lambda arg='off': self.StartBot_Btn_func(arg), lambda arg='on': self.StartBot_Btn_func(arg), 'd:/ymir work/ui/game/taskbar/mouse_button_auto_attack_01.sub', 'd:/ymir work/ui/game/taskbar/mouse_button_auto_attack_02.sub', 'd:/ymir work/ui/game/taskbar/mouse_button_auto_attack_03.sub')
- self.Wallhack_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_WALLHACK, 165, 9, lambda arg='off': self.WallHack_Btn_func(arg), lambda arg='on': self.WallHack_Btn_func(arg), 'temp/h4ckb4r/wallhack_off.tga', 'temp/h4ckb4r/wallhack_on.tga', 'temp/h4ckb4r/wallhack_on.tga')
- self.GameMasterDetector_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_GM_DETECTOR, 195, 10, lambda arg='off': self.GmDetector_Btn_func(arg), lambda arg='on': self.GmDetector_Btn_func(arg), 'temp/h4ckb4r/gm_off.tga', 'temp/h4ckb4r/gm_on.tga', 'temp/h4ckb4r/gm_on.tga')
- self.AutoPickup_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_AUTO_PICKUP, 225, 10, lambda arg='off': self.Pickup_Btn_func(arg), lambda arg='on': self.Pickup_Btn_func(arg), 'temp/h4ckb4r/pickup_off.tga', 'temp/h4ckb4r/pickup_on.tga', 'temp/h4ckb4r/pickup_on.tga')
- self.AttractMobs_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_MOBBER, 255, 10, lambda arg='off': self.AttractMobs_Btn_func(arg), lambda arg='on': self.AttractMobs_Btn_func(arg), 'temp/h4ckb4r/attract_off.tga', 'temp/h4ckb4r/attract_on.tga', 'temp/h4ckb4r/attract_on.tga')
- self.AttackSpeed_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_ATTACKSPEED, 285, 10, lambda arg='off': self.AttackSpeed_Btn_func(arg), lambda arg='on': self.AttackSpeed_Btn_func(arg), 'temp/h4ckb4r/attackspeed_off.tga', 'temp/h4ckb4r/attackspeed_on.tga', 'temp/h4ckb4r/attackspeed_on.tga')
- self.WalkSpeed_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_MOVESPEED, 315, 10, lambda arg='off': self.WalkSpeed_Btn_func(arg), lambda arg='on': self.WalkSpeed_Btn_func(arg), 'temp/h4ckb4r/walkspeed_off.tga', 'temp/h4ckb4r/walkspeed_on.tga', 'temp/h4ckb4r/walkspeed_on.tga')
- self.Donate_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_EXPDONATOR, 345, 10, lambda arg='off': self.Donate_Btn_func(arg), lambda arg='on': self.Donate_Btn_func(arg), 'temp/h4ckb4r/donate_off.tga', 'temp/h4ckb4r/donate_on.tga', 'temp/h4ckb4r/donate_on.tga')
- self.BluePotion_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_AUTO_POTION_BLUE, 375, 10, lambda arg='off': self.BluePotion_Btn_func(arg), lambda arg='on': self.BluePotion_Btn_func(arg), 'temp/h4ckb4r/blue_off.tga', 'temp/h4ckb4r/blue_on.tga', 'temp/h4ckb4r/blue_on.tga')
- self.RedPotion_Btn = self.comp.ToggleButton(self.Board, '', k_locale.TOOLTIP_AUTO_POTION_RED, 405, 10, lambda arg='off': self.RedPotion_Btn_func(arg), lambda arg='on': self.RedPotion_Btn_func(arg), 'temp/h4ckb4r/red_off.tga', 'temp/h4ckb4r/red_on.tga', 'temp/h4ckb4r/red_on.tga')
- self.skill_btn = self.comp.Button(self.Board, '', 'Skill Bot', 435, 10, self.skill_btn_func, 'temp/h4ckb4r/skillbot_settings_norm.tga', 'temp/h4ckb4r/skillbot_settings_over.tga', 'temp/h4ckb4r/skillbot_settings_norm.tga')
- self.settings_fish_btn = self.comp.Button(self.Board, '', 'Fish Bot Settings', 470, 10, self.settings_fish_btn_func, 'temp/h4ckb4r/fishing_settings_norm.tga', 'temp/h4ckb4r/fishing_settings_over.tga', 'temp/h4ckb4r/fishing_settings_norm.tga')
- self.settings_btn = self.comp.Button(self.Board, '', '', 505, 10, self.settings_btn_func, 'd:/ymir work/ui/game/taskbar/system_button_01.sub', 'd:/ymir work/ui/game/taskbar/system_button_02.sub', 'd:/ymir work/ui/game/taskbar/system_button_03.sub')
- self.hackbar_min = self.comp.Button(self.Board, '', 'Hide', self.Board.GetWidth() - 15, 0, self.Hide_Btn_func, 'd:/ymir work/ui/public/minimize_button_01.sub', 'd:/ymir work/ui/public/minimize_button_02.sub', 'd:/ymir work/ui/public/minimize_button_03.sub')
- if KAMER_MODULE_NOT_LOADED == 1 or DISABLE_DLL_MODULE_FUNCTIONS == 1:
- self.Farm_Btn.Disable()
- self.Farm_Btn.SetUpVisual('temp/h4ckb4r/farm_dis.tga')
- self.Fishing_Btn.Disable()
- self.Board.HideInternal()
- xPos, yPos = self.Board.GetGlobalPosition()
- self.HardBar_Vertical = self.comp.ThinBoard(None, FALSE, xPos + self.Board.GetWidth() - 50, yPos - 80, 50, 80, FALSE)
- self.WhisperSpammer_Btn = self.comp.Button(self.HardBar_Vertical, '', 'Whisper Spam', 10, 5, self.OpenWhisperSpamBot, 'd:/ymir work/ui/game/windows/btn_mail_up.sub', 'd:/ymir work/ui/game/windows/btn_mail_up.sub', 'd:/ymir work/ui/game/windows/btn_mail_up.sub')
- self.ChatSpammer_Btn = self.comp.Button(self.HardBar_Vertical, '', 'Chat Spam', 10, 40, self.OpenChatSpamBot, 'temp/h4ckb4r/chatspam_icon.tga', 'temp/h4ckb4r/chatspam_icon.tga', 'temp/h4ckb4r/chatspam_icon.tga')
- self.HardBar_Vertical.HideInternal()
- RedPotion = float(ReadConfig('RedPotion'))
- BluePotion = float(ReadConfig('BluePotion'))
- ExpDonatePercent = float(ReadConfig('ExpDonatePercent'))
- AttackSpeed = ReadConfig('AttackSpeed')
- WalkSpeed = ReadConfig('WalkSpeed')
- MobberDelay = ReadConfig('MobberDelay')
- MobberDistance = ReadConfig('MobberDistance')
- GM_ComboBox = ReadConfig('GameMasterDetector_ComboBox')
- FarmBot_ComboBox = ReadConfig('FarmBot_ComboBox')
- AttackInRange_Enable = int(ReadConfig('AttackInRange_Enable'))
- self.AttackInRange_Enable_Set = AttackInRange_Enable
- WalkAndSearch_Enable = int(ReadConfig('WalkAndSearch_Enable'))
- self.WalkAndSearch_Enable_Set = WalkAndSearch_Enable
- Fishbot_React_Delay = ReadConfig('Fishbot_React_Delay')
- Fishbot_Fishing_Delay = ReadConfig('Fishbot_Fishing_Delay')
- WaitHack_Set = int(ReadConfig('WaitHack'))
- self.FastAttack_Distance = ReadConfig('FastAttack_Distance')
- self.DETECT_PLAYER = int(ReadConfig('Detect_Player'))
- self.player_whitelist = open('temp/h4ckb4r/player_detector_whitelist.txt', 'r').read().split(',')
- xPos, yPos = self.Board.GetGlobalPosition()
- self.WIDTH = 360
- self.HEIGH = 250
- self.HackSetting_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - self.WIDTH - 30, self.Board.GetHeight() + yPos - self.HEIGH - 50, self.WIDTH, self.HEIGH, FALSE)
- self.HackSetting_Window.Hide()
- self.HackSetting_Window_Close = self.comp.Button(self.HackSetting_Window, '', '', self.WIDTH - 15, 0, self.HackSet_Close_func, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.tab1 = self.comp.TabControl(self.HackSetting_Window, self.WIDTH, self.HEIGH, ['bot_tab', 'Exp Bot'], ['farm_tab', 'Farm Bot'], ['auto_tab', 'Auto'], ['misc_tab', k_locale.TAB_MISC_TEXT])
- import binascii
- self.cred1 = self.comp.TextLine(self.HackSetting_Window, binascii.a2b_base64('Q3JlYXRlZCBieSBLYU1lUjEzMzcsIGh0dHA6Ly9tZXRpbjJtb2QudGs='), 15, 5, self.comp.RGB(255, 0, 0))
- self.slotbar_AttackSpeed_Edit, self.AttackSpeed_Edit = self.comp.EditLine(self.tab1['misc_tab'], AttackSpeed, 110, 10, 25, 15, 3)
- self.slotbar_MoveSpeed_Edit, self.MoveSpeed_Edit = self.comp.EditLine(self.tab1['misc_tab'], WalkSpeed, 110, 30, 25, 15, 3)
- self.slotbar_MobberDelay_Edit, self.MobberDelay_Edit = self.comp.EditLine(self.tab1['misc_tab'], MobberDelay, 110, 60, 20, 15, 2)
- self.slotbar_MobberDistance_Edit, self.MobberDistance_Edit = self.comp.EditLine(self.tab1['misc_tab'], MobberDistance, 110, 80, 30, 15, 4)
- self.RedPotion_Text = self.comp.TextLine(self.tab1['auto_tab'], k_locale.RED_POTION_TEXT, 10, 10, self.comp.RGB(255, 0, 0))
- self.BluePotion_Text = self.comp.TextLine(self.tab1['auto_tab'], k_locale.BLUE_POTION_TEXT, 10, 58, self.comp.RGB(0, 0, 255))
- self.ExpDonator_Text = self.comp.TextLine(self.tab1['auto_tab'], k_locale.EXP_DONATOR_TEXT, 10, 102, self.comp.RGB(255, 255, 255))
- self.AttackSpeed_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.ATTACK_SPEED_TEXT, 10, 10, self.comp.RGB(255, 255, 255))
- self.MoveSpeed_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.MOVE_SPEED_TEXT, 10, 30, self.comp.RGB(255, 255, 255))
- self.Mobber_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.MOBBER_DELAY_TEXT, 10, 60, self.comp.RGB(255, 255, 255))
- self.MobberDistance_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.MOBBER_DISTANCE_TEXT, 10, 80, self.comp.RGB(255, 255, 255))
- self.Mobber_Seconds_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.MOBBER_SECONDS_TEXT, 134, 60, self.comp.RGB(255, 255, 255))
- self.RedPotion_Bar = self.comp.SliderBar(self.tab1['auto_tab'], RedPotion, self.RedPotion_Bar_func, 10, 35)
- self.BluePotion_Bar = self.comp.SliderBar(self.tab1['auto_tab'], BluePotion, self.BluePotion_Bar_func, 10, 81)
- self.ExpDonator_Bar = self.comp.SliderBar(self.tab1['auto_tab'], ExpDonatePercent, self.ExpDonator_Bar_func, 10, 128)
- self.GM_Detector_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.GM_DETECTOR_TEXT, 10, 110, self.comp.RGB(255, 255, 255))
- self.Farm_Settings_Text = self.comp.TextLine(self.tab1['farm_tab'], k_locale.FARM_SETTINS_TEXT, 10, 10, self.comp.RGB(0, 255, 255))
- self.Farm_Search_Text = self.comp.TextLine(self.tab1['farm_tab'], k_locale.FARM_SEARCH_TEXT, 10, 50, self.comp.RGB(255, 255, 255))
- self.AttackInRange_Btn = self.comp.ToggleButton(self.tab1['bot_tab'], '', '', 10, 30, lambda arg='off': self.AttackInRange_Btn_func(arg), lambda arg='on': self.AttackInRange_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.ExpBot_Setting_Text = self.comp.TextLine(self.tab1['bot_tab'], k_locale.EXPBOT_SETTINGS_TEXT, 10, 10, self.comp.RGB(0, 255, 255))
- self.ExpBot_AttackInRange_Text = self.comp.TextLine(self.tab1['bot_tab'], k_locale.ATTACK_IN_RANGE_TEXT, 31, 30, self.comp.RGB(255, 255, 255))
- self.Farm_ComboBox = self.comp.ComboBox(self.tab1['farm_tab'], FarmBot_ComboBox, 60, 50, 90)
- self.AutoRevive_Btn = self.comp.ToggleButton(self.tab1['bot_tab'], '', '', 10, 80, lambda arg=0: self.autorevive_Btn_func(arg), lambda arg=1: self.autorevive_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.AutoRevive_Text = self.comp.TextLine(self.tab1['bot_tab'], k_locale.AUTO_REVIVE_TEXT, 31, 80, self.comp.RGB(255, 255, 255))
- self.WaitHack_Btn = self.comp.ToggleButton(self.tab1['bot_tab'], '', '', 10, 105, lambda arg=0: self.waithack_Btn_func(arg), lambda arg=1: self.waithack_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.WaitHack_Text = self.comp.TextLine(self.tab1['bot_tab'], k_locale.WAITHACK_TEXT, 31, 105, self.comp.RGB(255, 255, 255))
- self.Antifly_Btn = self.comp.ToggleButton(self.tab1['misc_tab'], '', '', 10, 140, lambda arg='off': self.Antifly_Btn_func(arg), lambda arg='on': self.Antifly_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.Antifly_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.ANTIFLY_TEXT, 30, 140, self.comp.RGB(255, 255, 255))
- self.day_btn = self.comp.Button(self.tab1['misc_tab'], 'Day', '', 300, 10, self.day_Btn_func, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.night_btn = self.comp.Button(self.tab1['misc_tab'], 'Night', '', 300, 30, self.night_Btn_func, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.slotbar_FastAttack_Distance_Edit, self.FastAttack_Distance_Edit = self.comp.EditLine(self.tab1['misc_tab'], self.FastAttack_Distance, 110, 162, 30, 15, 4)
- self.FastAttack_Distance_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.FASTATTACK_DISTANCE_SETUP_TEXT, 145, 162, self.comp.RGB(255, 255, 255))
- self.PlayerDetector_Btn = self.comp.ToggleButton(self.tab1['misc_tab'], '', 'temp/h4ckb4r/player_detector_whitelist.txt', 140, 140, lambda arg='off': self.PlayerDetector_Btn_func(arg), lambda arg='on': self.PlayerDetector_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.PlayerDetector_Text = self.comp.TextLine(self.tab1['misc_tab'], k_locale.STOP_BOT_PLAYER_APPEAR_TEXT, 160, 140, self.comp.RGB(255, 255, 255))
- self.GM_ComboBox = self.comp.ComboBox(self.tab1['misc_tab'], 'LogOut', 110, 110, 90)
- if ReadConfig('Antifly') == 'On':
- self.Antifly_Btn_func('on')
- self.Antifly_Btn.Down()
- else:
- self.Antifly_Btn.SetUp()
- if self.DETECT_PLAYER == 1:
- self.PlayerDetector_Btn_func('on')
- self.PlayerDetector_Btn.Down()
- else:
- self.PlayerDetector_Btn.SetUp()
- if WaitHack_Set == 1:
- self.waithack_Btn_func(1)
- self.WaitHack_Btn.Down()
- else:
- self.WaitHack_Btn.SetUp()
- self.FastAttack_Distance_Edit.SetNumberMode()
- self.AttackSpeed_Edit.SetNumberMode()
- self.MoveSpeed_Edit.SetNumberMode()
- self.MobberDelay_Edit.SetNumberMode()
- self.MobberDistance_Edit.SetNumberMode()
- self.RedPotion_Text.SetText(k_locale.RED_POTION_TEXT % float(self.RedPotion_Bar.GetSliderPos() * 100) + '%')
- self.BluePotion_Text.SetText(k_locale.BLUE_POTION_TEXT % float(self.BluePotion_Bar.GetSliderPos() * 100) + '%')
- self.ExpDonator_Text.SetText(k_locale.EXP_DONATOR_TEXT % float(self.ExpDonator_Bar.GetSliderPos() * 100) + '%')
- self.GM_ComboBox.SetCurrentItem(GM_ComboBox)
- ComboBox_List = ('LogOut', 'Quit', 'Stop Botting', 'Visible', 'Show Name')
- lCount = 0
- for cList in ComboBox_List:
- self.GM_ComboBox.InsertItem(lCount, cList)
- lCount += 1
- self.Farm_ComboBox.InsertItem(0, 'Metin')
- self.Farm_ComboBox.InsertItem(1, 'BOSS')
- self.Farm_ComboBox.InsertItem(2, 'Metin&BOSS')
- self.Farm_ComboBox.InsertItem(3, k_locale.FARM_COMBOBOX_ORE_TEXT)
- self.Farm_ComboBox.SetEvent(ui.__mem_func__(self.Farm_ComboBox_OnSelectItem))
- if AttackInRange_Enable == 1:
- self.AttackInRange_Btn.Down()
- self.func.AttackInRange = 1
- if WalkAndSearch_Enable == 1:
- self.Farm_Walk_Btn.Down()
- self.FarmCord_Window_Btn.Show()
- self.WalkAndSearch = 1
- self.GameMasterInfo_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 424, self.Board.GetHeight() + yPos - 10 - 68, 424, 15, FALSE)
- self.GameMasterInfo_Window.Hide()
- self.GameMasterInfo_Window_Close = self.comp.Button(self.GameMasterInfo_Window, '', '', 404, 10, self.GameMasterInfo_Close, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.GameMaster_Names_Text = self.comp.TextLine(self.GameMasterInfo_Window, '', 10, 10, self.comp.RGB(255, 0, 0))
- self.MetinInfo_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 424, self.Board.GetHeight() + yPos - 10 - 68 - 30, 424, 15, FALSE)
- self.MetinInfo_Window.Hide()
- self.MetinInfo_Window_Go = self.comp.Button(self.MetinInfo_Window, 'Go', '', 354, 7, self.MetinInfo_Go, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.MetinInfo_Window_Close = self.comp.Button(self.MetinInfo_Window, '', '', 404, 10, self.MetinInfo_Close, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.MetinInfo_Window_Text = self.comp.TextLine(self.MetinInfo_Window, '', 10, 10, self.comp.RGB(255, 0, 0))
- self.FarmCords_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 164 - 20, self.Board.GetHeight() + yPos - 283 - 50, 164, 283, FALSE)
- self.FarmCords_Window.Hide()
- self.AddCords_Btn = self.comp.Button(self.FarmCords_Window, 'Add', '', 10, 252, self.AddCords_Btn_func, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.RemoveCords_Btn = self.comp.Button(self.FarmCords_Window, 'Del', '', 57, 252, self.RemoveCords_Btn_func, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.FarmCords_Close = self.comp.Button(self.FarmCords_Window, '', '', 135, 255, self.FarmCords_Close_func, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.Cords_Text = self.comp.TextLine(self.FarmCords_Window, k_locale.FARM_COORDINATES_TEXT, 10, 10, self.comp.RGB(255, 0, 0))
- self.bar_FarmCord_ListBox, self.list_FarmCord_ListBox, self.scroll_FarmCord_ListBox = self.comp.ListBoxEx(self.FarmCords_Window, 10, 26, 142, 217)
- self.Farm_ComboBox_OnSelectItem()
- self.Fishbot_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 307 - 50, self.Board.GetHeight() + yPos - 245 - 60, 307, 245, FALSE)
- self.Fishbot_Window.Hide()
- self.CloseFish_Window = self.comp.Button(self.Fishbot_Window, ' ', '', 292, 230, self.CloseFish_Window_func, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.KillFish_Btn = self.comp.ToggleButton(self.Fishbot_Window, ' ', '', 10, 93, lambda arg='off': self.KillFish_Btn_func(arg), lambda arg='on': self.KillFish_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.DropHairDye_Btn = self.comp.ToggleButton(self.Fishbot_Window, ' ', '', 10, 118, lambda arg='off': self.DropHairDye_Btn_func(arg), lambda arg='on': self.DropHairDye_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.DropDeadFishes_Btn = self.comp.ToggleButton(self.Fishbot_Window, ' ', '', 10, 142, lambda arg='off': self.DropDeadFishes_Btn_func(arg), lambda arg='on': self.DropDeadFishes_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.OpenClams_Btn = self.comp.ToggleButton(self.Fishbot_Window, ' ', '', 10, 167, lambda arg='off': self.OpenClams_Btn_func(arg), lambda arg='on': self.OpenClams_Btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.stopfishing_btn = self.comp.ToggleButton(self.Fishbot_Window, '', 'Stop Fishing', 10, 215, lambda arg='off': self.stopfishing_btn_func(arg), lambda arg='on': self.stopfishing_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.quitfishing_btn = self.comp.ToggleButton(self.Fishbot_Window, '', 'Quit Game', 30, 215, lambda arg='off': self.quitfishing_btn_func(arg), lambda arg='on': self.quitfishing_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.slotbar_delay, self.delay = self.comp.EditLine(self.Fishbot_Window, Fishbot_React_Delay, 10, 35, 30, 15, 4)
- self.slotbar_fishing_delay, self.fishing_delay = self.comp.EditLine(self.Fishbot_Window, Fishbot_Fishing_Delay, 10, 62, 30, 15, 4)
- self.slotbar_stopfishing_timer, self.stopfishing_timer = self.comp.EditLine(self.Fishbot_Window, '60.0', 168, 216, 35, 15, 5)
- self.fishbot_settings_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_SETTINGS_TEXT, 10, 10, self.comp.RGB(255, 0, 0))
- self.fishbot_delay_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_REACT_DELAY_TEXT, 47, 36, self.comp.RGB(255, 255, 255))
- self.fishbot_fishingdelay_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_FISHING_DELAY_TEXT, 47, 63, self.comp.RGB(255, 255, 255))
- self.fishbot_killfish_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_KILLFISH_TEXT, 35, 94, self.comp.RGB(255, 255, 255))
- self.fishbot_dropdye_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_DROP_HAIRDYE_TEXT, 35, 119, self.comp.RGB(255, 255, 255))
- self.fishbot_dropdead_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_DROP_DEADFISH_TEXT, 35, 143, self.comp.RGB(255, 255, 255))
- self.fishbot_openclams_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_OPEN_CLAMS_TEXT, 35, 168, self.comp.RGB(255, 255, 255))
- self.stopfishing_text = self.comp.TextLine(self.Fishbot_Window, k_locale.FISHBOT_STOPQUIT_AFTER, 57, 216, self.comp.RGB(255, 255, 255))
- self.stopfishing_text2 = self.comp.TextLine(self.Fishbot_Window, localeInfo.MINUTE, 215, 217, self.comp.RGB(255, 255, 255))
- self.SkillBot_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 290 - 20, self.Board.GetHeight() + yPos - 160, 290, 120, FALSE)
- self.SkillBot_Window.Hide()
- self.skill_timer_active = {1: 0,
- 2: 0,
- 3: 0,
- 4: 0,
- 5: 0,
- 6: 0}
- self.skill_Timer1 = k_timer.Timer()
- self.skill_Timer2 = k_timer.Timer()
- self.skill_Timer3 = k_timer.Timer()
- self.skill_Timer4 = k_timer.Timer()
- self.skill_Timer5 = k_timer.Timer()
- self.skill_Timer6 = k_timer.Timer()
- def skillbot_timer_on_btn_func(arg):
- self.skill_timer_active[arg] = 1
- def skillbot_timer_off_btn_func(arg):
- self.skill_timer_active[arg] = 0
- self.slot_skill1_timer_edit, self.skill1_timer_edit = self.comp.EditLine(self.SkillBot_Window, '0', 10, 50, 30, 15, 4)
- self.skill1_timer_btn = self.comp.ToggleButton(self.SkillBot_Window, '', 'Activate Timer', 30, 50, lambda arg=1: skillbot_timer_off_btn_func(arg), lambda arg=1: skillbot_timer_on_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.slot_skill2_timer_edit, self.skill2_timer_edit = self.comp.EditLine(self.SkillBot_Window, '0', 60, 50, 30, 15, 4)
- self.skill2_timer_btn = self.comp.ToggleButton(self.SkillBot_Window, '', 'Activate Timer', 80, 50, lambda arg=2: skillbot_timer_off_btn_func(arg), lambda arg=2: skillbot_timer_on_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.slot_skill3_timer_edit, self.skill3_timer_edit = self.comp.EditLine(self.SkillBot_Window, '0', 110, 50, 30, 15, 4)
- self.skill3_timer_btn = self.comp.ToggleButton(self.SkillBot_Window, '', 'Activate Timer', 130, 50, lambda arg=3: skillbot_timer_off_btn_func(arg), lambda arg=3: skillbot_timer_on_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.slot_skill4_timer_edit, self.skill4_timer_edit = self.comp.EditLine(self.SkillBot_Window, '0', 150, 50, 30, 15, 4)
- self.skill4_timer_btn = self.comp.ToggleButton(self.SkillBot_Window, '', 'Activate Timer', 170, 50, lambda arg=4: skillbot_timer_off_btn_func(arg), lambda arg=4: skillbot_timer_on_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.slot_skill5_timer_edit, self.skill5_timer_edit = self.comp.EditLine(self.SkillBot_Window, '0', 190, 50, 30, 15, 4)
- self.skill5_timer_btn = self.comp.ToggleButton(self.SkillBot_Window, '', 'Activate Timer', 210, 50, lambda arg=5: skillbot_timer_off_btn_func(arg), lambda arg=5: skillbot_timer_on_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.slot_skill6_timer_edit, self.skill6_timer_edit = self.comp.EditLine(self.SkillBot_Window, '0', 240, 50, 30, 15, 4)
- self.skill6_timer_btn = self.comp.ToggleButton(self.SkillBot_Window, '', 'Activate Timer', 260, 50, lambda arg=6: skillbot_timer_off_btn_func(arg), lambda arg=6: skillbot_timer_on_btn_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.skill1_timer_edit.SetText(ReadConfig('Skill_Time1'))
- self.skill2_timer_edit.SetText(ReadConfig('Skill_Time2'))
- self.skill3_timer_edit.SetText(ReadConfig('Skill_Time3'))
- self.skill4_timer_edit.SetText(ReadConfig('Skill_Time4'))
- self.skill5_timer_edit.SetText(ReadConfig('Skill_Time5'))
- self.skill6_timer_edit.SetText(ReadConfig('Skill_Time6'))
- self.RestartHere_Activate = 0
- self.RestartHere_Timer1 = k_timer.Timer()
- self.FollowTarget_Activate = 0
- self.FollowTarget_Timer1 = k_timer.Timer()
- self.TARGET_FOLLOW_VID = 0
- def RestartHere_func(arg):
- if arg == 1:
- self.RestartHere_Activate = 1
- self.RestartHere_Timer1.SetTimer(12.0)
- else:
- self.RestartHere_Activate = 0
- self.FollowTarget_Btn = None
- self.FollowTarget_Text = None
- def FollowTarget_func(arg):
- if arg == 1:
- vid = player.GetTargetVID()
- if vid:
- self.TARGET_FOLLOW_VID = vid
- name = chr.GetNameByVID(vid)
- self.FollowTarget_Text.SetText('Follow Target: ' + name)
- self.FollowTarget_Activate = 1
- self.FollowTarget_Timer1.SetTimer(2.0)
- else:
- self.FollowTarget_Btn.SetUp()
- chat.AppendChat(1, 'Select Target')
- else:
- self.FollowTarget_Activate = 0
- self.FollowTarget_Text.SetText('Follow Target')
- chr.SelectInstance(player.GetMainCharacterIndex())
- self.RestartHere_Btn = self.comp.ToggleButton(self.SkillBot_Window, '', '', 10, 75, lambda arg=0: RestartHere_func(arg), lambda arg=1: RestartHere_func(arg), 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/check_image.sub')
- self.RestartHere_Text = self.comp.TextLine(self.SkillBot_Window, uiScriptLocale.RESTART_HERE, 30, 75, self.comp.RGB(255, 255, 255))
- self.WhisperSpamBot_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 330 - 20, self.Board.GetHeight() + yPos - 172 - 50, 330, 172, FALSE)
- self.WhisperSpamBot_Window.Hide()
- self.spam_send_btn = self.comp.Button(self.WhisperSpamBot_Window, 'Send', '', 185, 140, self.spam_send_btn_func, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.wspam_close = self.comp.Button(self.WhisperSpamBot_Window, ' ', '', 315, 0, self.wspam_close_func, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.spam_start_btn = self.comp.ToggleButton(self.WhisperSpamBot_Window, 'Start', '', 232, 140, lambda arg='off': self.spam_start_btn_func(arg), lambda arg='on': self.spam_start_btn_func(arg), 'd:/ymir work/ui/public/large_button_01.sub', 'd:/ymir work/ui/public/large_button_02.sub', 'd:/ymir work/ui/public/large_button_03.sub')
- self.slotbar_PlayersLimit_Edit, self.PlayersLimit_Edit = self.comp.EditLine(self.WhisperSpamBot_Window, '20', 10, 67, 20, 15, 2)
- self.slotbar_spam_timer_edit, self.spam_timer_edit = self.comp.EditLine(self.WhisperSpamBot_Window, '10.0', 235, 119, 30, 15, 4)
- self.slotbar_Whisperpam_Edit, self.Whisperpam_Edit = self.comp.EditLine(self.WhisperSpamBot_Window, '', 10, 26, 310, 30, 120)
- self.whisper_text = self.comp.TextLine(self.WhisperSpamBot_Window, 'WHISPER', 10, 10, self.comp.RGB(255, 0, 0))
- self.playerslimit_text = self.comp.TextLine(self.WhisperSpamBot_Window, 'Players Limit', 38, 68, self.comp.RGB(255, 255, 255))
- self.spam_timer_Text = self.comp.TextLine(self.WhisperSpamBot_Window, 'Timer', 270, 119, self.comp.RGB(255, 255, 255))
- self.ChatSpamBot_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 411 - 20, self.Board.GetHeight() + yPos - 96 - 50, 411, 96, FALSE)
- self.ChatSpamBot_Window.Hide()
- self.chat_SpamClose = self.comp.Button(self.ChatSpamBot_Window, '', '', 396, 0, self.chat_SpamClose_func, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.chat_SpamButton = self.comp.ToggleButton(self.ChatSpamBot_Window, 'Start', '', 341, 65, lambda arg='off': self.chat_SpamButton_func(arg), lambda arg='on': self.chat_SpamButton_func(arg), 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
- self.slotbar_chat_SpamEdit, self.chat_SpamEdit = self.comp.EditLine(self.ChatSpamBot_Window, '', 9, 27, 390, 30, 152)
- self.slotbar_chat_TimerEdit, self.chat_TimerEdit = self.comp.EditLine(self.ChatSpamBot_Window, '5.0', 10, 65, 25, 15, 4)
- self.chat_spamText = self.comp.TextLine(self.ChatSpamBot_Window, 'Chat Spamer', 10, 10, self.comp.RGB(255, 0, 0))
- self.chat_spamTimer = self.comp.TextLine(self.ChatSpamBot_Window, 'Timer', 40, 67, self.comp.RGB(255, 255, 255))
- self.pickupTimer = k_timer.Timer()
- self.ItemFilter_Window = self.comp.ThinBoard(None, FALSE, self.Board.GetWidth() + xPos - 385 - 20, self.Board.GetHeight() + yPos - 342 - 50, 385, 342, FALSE)
- self.ItemFilter_Window.Hide()
- self.if_close_pfilter_btn = self.comp.Button(self.ItemFilter_Window, ' ', '', 370, 0, self.if_close_pfilter_btn_func, 'd:/ymir work/ui/public/close_button_01.sub', 'd:/ymir work/ui/public/close_button_02.sub', 'd:/ymir work/ui/public/close_button_03.sub')
- self.if_remove_item_btn = self.comp.Button(self.ItemFilter_Window, 'Remove', '', 316, 300, self.if_remove_item_btn_func, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
- self.if_search_btn = self.comp.Button(self.ItemFilter_Window, 'Search', '', 132, 22, self.if_search_btn_func, 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.if_add_item_btn = self.comp.Button(self.ItemFilter_Window, 'Add', '', 118, 300, self.if_add_item_btn_func, 'd:/ymir work/ui/public/middle_button_01.sub', 'd:/ymir work/ui/public/middle_button_02.sub', 'd:/ymir work/ui/public/middle_button_03.sub')
- self.if_filter_on = self.comp.ToggleButton(self.ItemFilter_Window, 'ON', '', 13, 320, lambda arg='off': self.if_filter_on_func(arg), lambda arg='on': self.if_filter_on_func(arg), 'd:/ymir work/ui/public/small_button_01.sub', 'd:/ymir work/ui/public/small_button_02.sub', 'd:/ymir work/ui/public/small_button_03.sub')
- self.if_slotbar_search_edit, self.if_search_edit = self.comp.EditLine(self.ItemFilter_Window, '', 11, 25, 110, 15, 20)
- self.if_pickup_list_text = self.comp.TextLine(self.ItemFilter_Window, 'PickUp List', 205, 28, self.comp.RGB(255, 255, 255))
- self.if_filter_on_txt = self.comp.TextLine(self.ItemFilter_Window, 'Item Filter', 62, 323, self.comp.RGB(0, 0, 255))
- self.if_bar_list_items, self.if_list_list_items, if_list_items_scroll = self.comp.ListBoxEx(self.ItemFilter_Window, 10, 49, 168, 244)
- self.if_bar_list_white, self.if_list_list_white, if_white_scroll = self.comp.ListBoxEx(self.ItemFilter_Window, 204, 48, 171, 245)
- if ReadConfig('ExtraPickUp') == '2':
- self.if_filter_on.Down()
- self.if_filter_on.SetText('ON')
- else:
- self.if_filter_on.SetUp()
- self.if_filter_on.SetText('OFF')
- self.ITEM_FILTER_LIST = []
- self.ITEM_FILTER_WHITELIST = []
- return
- def Antifly_Btn_func(self, arg):
- if arg == 'on':
- chat.AppendChat(1, 'Antifly On, Restart game')
- SaveConfig('Antifly', 'On')
- elif arg == 'off':
- chat.AppendChat(1, 'Antifly Off, Restart game')
- SaveConfig('Antifly', 'Off')
- def PlayerDetector_Btn_func(self, arg):
- if arg == 'on':
- self.player_whitelist = open('temp/h4ckb4r/player_detector_whitelist.txt', 'r').read()
- self.DETECT_PLAYER = 1
- SaveConfig('Detect_Player', '1')
- elif arg == 'off':
- self.DETECT_PLAYER = 0
- SaveConfig('Detect_Player', '0')
- def day_Btn_func(self):
- background.SetEnvironmentData(0)
- def night_Btn_func(self):
- background.RegisterEnvironmentData(1, constInfo.ENVIRONMENT_NIGHT)
- background.SetEnvironmentData(1)
- def cleverbot_Btn_func(self, arg):
- import WHISPER_MODULE
- if arg == 'on':
- WHISPER_MODULE.CLEVERBOT_ENABLED = 1
- SaveConfig('Cleverbot', 'On')
- elif arg == 'off':
- WHISPER_MODULE.CLEVERBOT_ENABLED = 0
- SaveConfig('Cleverbot', 'Off')
- def autorevive_Btn_func(self, arg):
- self.AutoRevive = arg
- def waithack_Btn_func(self, arg):
- self.WaitHack_Timer.SetTimer(0.3)
- self.WaitHack = arg
- SaveConfig('WaitHack', str(arg))
- def SpaceBar_Attack_Btn_func(self, arg):
- if arg == 'on':
- self.SpaceBar_Attack = 1
- SaveConfig('SpaceBar_Attack_Enabled', '1')
- elif arg == 'off':
- self.SpaceBar_Attack = 0
- SaveConfig('SpaceBar_Attack_Enabled', '0')
- def al_close_btn_func(self):
- self.AutoLogin_Window.Hide()
- def al_save_btn_func(self):
- slot = int(self.al_slot_edit.GetText()) - 1
- SaveLoginInfo(self.al_combo_server.GetCurrentText(), self.al_channel_edit.GetText(), self.al_id_edit.GetText(), self.al_pwd_edit.GetText(), str(slot), self.AutoLogin)
- def al_autologin_btn_func(self, arg):
- if arg == 'on':
- self.AutoLogin = 1
- elif arg == 'off':
- self.AutoLogin = 0
- def FillWhiteList(self):
- handle = app.OpenTextFile('temp/h4ckb4r/pickup_whitelist.txt')
- count = app.GetTextFileLineCount(handle)
- self.ITEM_FILTER_WHITELIST = []
- self.if_list_list_white.RemoveAllItems()
- for i in xrange(count):
- line = app.GetTextFileLine(handle, i)
- item1 = line.split(' : ')
- if item1[0].isdigit():
- fill_list = {'vnum': item1[0], 'name': item1[1]}
- self.ITEM_FILTER_WHITELIST.append(fill_list)
- self.if_list_list_white.AppendItem(k_ui.Item('%s : %s' % (item1[0], item1[1])))
- def if_filter_on_func(self, arg):
- global EXTRA_PICKUP
- if arg == 'on':
- self.if_filter_on.SetText('ON')
- SaveConfig('ExtraPickUp', '2')
- EXTRA_PICKUP = 2
- elif arg == 'off':
- self.if_filter_on.SetText('OFF')
- SaveConfig('ExtraPickUp', '1')
- EXTRA_PICKUP = 1
- def if_close_pfilter_btn_func(self):
- self.ItemFilter_Window.Hide()
- def if_search_btn_func(self):
- if self.if_search_edit.GetText() == '':
- self.if_list_list_items.RemoveAllItems()
- for it in self.ITEM_FILTER_LIST:
- self.if_list_list_items.AppendItem(k_ui.Item('%s : %s' % (it['vnum'], it['name'])))
- else:
- self.if_list_list_items.RemoveAllItems()
- for it in self.ITEM_FILTER_LIST:
- if it['vnum'].count(self.if_search_edit.GetText()) or it['name'].count(self.if_search_edit.GetText()):
- self.if_list_list_items.AppendItem(k_ui.Item('%s : %s' % (it['vnum'], it['name'])))
- def if_remove_item_btn_func(self):
- count = 0
- selItem = self.if_list_list_white.GetSelectedItem()
- if selItem:
- selected = selItem.GetText().split(' : ')
- for i in self.ITEM_FILTER_WHITELIST:
- if selected[0] == i['vnum']:
- self.ITEM_FILTER_WHITELIST.pop(count)
- self.if_list_list_white.RemoveItem(selItem)
- break
- count += 1
- self.if_list_list_white.RemoveAllItems()
- save = open('temp/h4ckb4r/pickup_whitelist.txt', 'w')
- for newList in self.ITEM_FILTER_WHITELIST:
- self.if_list_list_white.AppendItem(k_ui.Item('%s : %s' % (newList['vnum'], newList['name'])))
- save.write('%s : %s\n' % (newList['vnum'], newList['name']))
- save.close()
- def if_add_item_btn_func(self):
- selItem = self.if_list_list_items.GetSelectedItem()
- if selItem:
- selected = selItem.GetText()
- self.if_list_list_white.AppendItem(k_ui.Item(selected))
- sp = selected.split(' : ')
- fill_list = {'vnum': sp[0],
- 'name': sp[1]}
- self.ITEM_FILTER_WHITELIST.append(fill_list)
- save = open('temp/h4ckb4r/pickup_whitelist.txt', 'w')
- for newList in self.ITEM_FILTER_WHITELIST:
- save.write('%s : %s\n' % (newList['vnum'], newList['name']))
- save.close()
- def LoadItemList(self):
- self.ITEM_FILTER_LIST = []
- handle = app.OpenTextFile('%s/item_list.txt' % app.GetLocalePath())
- count = app.GetTextFileLineCount(handle)
- for i in xrange(count):
- line = app.GetTextFileLine(handle, i)
- itemVnum = line.split('\t')[0]
- if itemVnum.isdigit():
- item.SelectItem(int(itemVnum))
- itemName = item.GetItemName()
- fill_list = {'vnum': itemVnum,
- 'name': itemName}
- self.ITEM_FILTER_LIST.append(fill_list)
- return self.ITEM_FILTER_LIST
- oldSetPhaseWindow = 0
- def SetPhaseWindow(self, phase, self2):
- if phase == m2net.PHASE_WINDOW_LOGIN:
- pass
- if phase == m2net.PHASE_WINDOW_GAME:
- pass
- if phase == m2net.PHASE_WINDOW_SELECT:
- pass
- if phase == m2net.PHASE_WINDOW_LOAD:
- pass
- self.oldSetPhaseWindow(phase, self2)
- oldClearPhaseWindow = 0
- def ClearPhaseWindow(self, phase, self2):
- if phase == m2net.PHASE_WINDOW_LOGIN:
- pass
- if phase == m2net.PHASE_WINDOW_GAME:
- if self.AttackSpeed == 1:
- self.AttackSpeed = 0
- self.AttackSpeed_Btn.SetUp()
- if self.MoveSpeed == 1:
- self.MoveSpeed = 0
- self.WalkSpeed_Btn.SetUp()
- if phase == m2net.PHASE_WINDOW_SELECT:
- pass
- if phase == m2net.PHASE_WINDOW_LOAD:
- pass
- self.oldClearPhaseWindow(phase, self2)
- def InitPhaseManager(self):
- self.oldSetPhaseWindow = m2net.SetPhaseWindow
- m2net.SetPhaseWindow = self.SetPhaseWindow
- self.oldClearPhaseWindow = m2net.ClearPhaseWindow
- m2net.ClearPhaseWindow = self.ClearPhaseWindow
- def OpenWhisperSpamBot(self):
- if self.WhisperSpamBot_Window.IsShow():
- self.WhisperSpamBot_Window.Hide()
- else:
- self.WhisperSpamBot_Window.Show()
- def spam_send_btn_func(self, auto=0):
- pLimit = 0
- for vid in player5.GetVirtualID():
- pLimit += 1
- if pLimit == int(self.PlayersLimit_Edit.GetText()):
- return
- if chr.INSTANCE_TYPE_PLAYER == chr.GetInstanceType(vid):
- name = chr.GetNameByVID(vid)
- if name != 'None':
- if not name.startswith('['):
- for bl in self.BlackList:
- if bl != name:
- m2net.SendWhisperPacket(name, self.Whisperpam_Edit.GetText())
- if auto == 1:
- self.BlackList.append(name)
- def wspam_close_func(self):
- self.WhisperSpamBot_Window.Hide()
- def spam_start_btn_func(self, arg):
- if arg == 'on':
- self.whisper_SpamBot = 1
- self.whisperTimer.SetTimer(float(self.spam_timer_edit.GetText()))
- self.BlackList = []
- elif arg == 'off':
- self.whisper_SpamBot = 0
- self.BlackList = []
- def OpenChatSpamBot(self):
- if self.ChatSpamBot_Window.IsShow():
- self.ChatSpamBot_Window.Hide()
- else:
- self.ChatSpamBot_Window.Show()
- def chat_SpamClose_func(self):
- self.ChatSpamBot_Window.Hide()
- def chat_SpamButton_func(self, arg):
- if arg == 'on':
- self.chat_SpamBot = 1
- self.chatTimer.SetTimer(float(self.chat_TimerEdit.GetText()))
- elif arg == 'off':
- self.chat_SpamBot = 0
- def SendChatText(self, text):
- if text[0] == '!':
- m2net.SendChatPacket(text[1:], chat.CHAT_TYPE_SHOUT)
- else:
- m2net.SendChatPacket(text, chat.CHAT_TYPE_TALKING)
- def CloseFish_Window_func(self):
- self.SaveConfigFile()
- self.Fishbot_Window.Hide()
- def KillFish_Btn_func(self, arg):
- if arg == 'on':
- self.killFish = 1
- elif arg == 'off':
- self.killFish = 0
- def DropHairDye_Btn_func(self, arg):
- if arg == 'on':
- self.dropHairDye = 1
- elif arg == 'off':
- self.dropHairDye = 0
- def DropDeadFishes_Btn_func(self, arg):
- if arg == 'on':
- self.dropDeadFish = 1
- elif arg == 'off':
- self.dropDeadFish = 0
- def OpenClams_Btn_func(self, arg):
- if arg == 'on':
- self.openClams = 1
- elif arg == 'off':
- self.openClams = 0
- def pos_change_btn_func(self, arg):
- if arg == 'on':
- pass
- elif arg == 'off':
- pass
- def stopfishing_btn_func(self, arg):
- if arg == 'on':
- self.stopFishing = 1
- self.quitfishing_btn.SetUp()
- self.quitFishing = 0
- elif arg == 'off':
- self.stopFishing = 0
- def quitfishing_btn_func(self, arg):
- if arg == 'on':
- self.quitFishing = 1
- self.stopfishing_btn.SetUp()
- self.stopFishing = 0
- elif arg == 'off':
- self.quitFishing = 0
- def StartFishing_Btn_func(self, arg):
- if arg == 'on':
- self.FishingState = 'start'
- self.time.SetTimerFishing(float(self.fishing_delay.GetText()) + player5.GetRandomFloat(0.0, 0.7))
- if self.stopFishing == 1:
- t = float(self.stopfishing_timer.GetText())
- from datetime import timedelta
- d = timedelta(8=t)
- self.stopFishingTimer.SetTimer(float(d.seconds))
- elif arg == 'off':
- self.FishingState = 'stop'
- player5.StartFishing()
- def Farm_ComboBox_OnSelectItem(self):
- if self.Farm_ComboBox.GetCurrentText() == 'Metin':
- self.Farm_Btn.SetUpVisual('temp/h4ckb4r/farm_off.tga')
- self.Farm_Btn.SetOverVisual('temp/h4ckb4r/farm_on.tga')
- self.Farm_Btn.SetDownVisual('temp/h4ckb4r/farm_on.tga')
- self.Farm_Btn_func('off')
- elif self.Farm_ComboBox.GetCurrentText() == 'BOSS':
- self.Farm_Btn.SetUpVisual('temp/h4ckb4r/farm_boss_off.tga')
- self.Farm_Btn.SetOverVisual('temp/h4ckb4r/farm_boss_on.tga')
- self.Farm_Btn.SetDownVisual('temp/h4ckb4r/farm_boss_on.tga')
- self.Farm_Btn_func('off')
- elif self.Farm_ComboBox.GetCurrentText() == k_locale.FARM_COMBOBOX_ORE_TEXT:
- self.Farm_Btn.SetUpVisual('temp/h4ckb4r/farm_ore_off.tga')
- self.Farm_Btn.SetOverVisual('temp/h4ckb4r/farm_ore_on.tga')
- self.Farm_Btn.SetDownVisual('temp/h4ckb4r/farm_ore_on.tga')
- self.Farm_Btn_func('off')
- else:
- self.Farm_Btn.SetUpVisual('temp/h4ckb4r/farm_off.tga')
- self.Farm_Btn.SetOverVisual('temp/h4ckb4r/farm_on.tga')
- self.Farm_Btn.SetDownVisual('temp/h4ckb4r/farm_on.tga')
- self.Farm_Btn_func('off')
- def MetinInfo_Go(self):
- if self.Farm_ComboBox.GetCurrentText() != k_locale.FARM_COMBOBOX_ORE_TEXT:
- player5.SendAttackPacket(self.func.metin_vid)
- elif player5.GetMotion() != 'Mining':
- m2net.SendOnClickPacket(self.func.metin_vid)
- def MetinInfo_Close(self):
- self.MetinInfo_Window.Hide()
- def GameMasterInfo_Close(self):
- self.GameMasterInfo_Window.Hide()
- def SaveFarmCords(self):
- save = open(FARM_CONFIG_FILE, 'w+')
- for i in xrange(self.list_FarmCord_ListBox.GetItemCount()):
- self.list_FarmCord_ListBox.SelectIndex(i)
- selItem = self.list_FarmCord_ListBox.GetSelectedItem()
- if selItem:
- save.write(selItem.GetText() + '\n')
- save.close()
- def ReadFarmCords(self):
- handle = app.OpenTextFile(FARM_CONFIG_FILE)
- count = app.GetTextFileLineCount(handle)
- for i in xrange(count):
- try:
- line = app.GetTextFileLine(handle, i).split(',')
- x = line[0]
- y = line[1]
- if x.isdigit() and y.isdigit():
- self.list_FarmCord_ListBox.AppendItem(k_ui.Item(x + ',' + y))
- except IndexError:
- pass
- def AddCords_Btn_func(self):
- x, y, z = player.GetMainCharacterPosition()
- x = int(x) / 100
- y = int(y) / 100
- self.list_FarmCord_ListBox.AppendItem(k_ui.Item(str(x) + ',' + str(y)))
- self.SaveFarmCords()
- if self.list_FarmCord_ListBox.GetItemCount() < 10:
- self.scroll_FarmCord_ListBox.Hide()
- else:
- self.scroll_FarmCord_ListBox.Show()
- def RemoveCords_Btn_func(self):
- selItem = self.list_FarmCord_ListBox.GetSelectedItem()
- sel = 0
- if selItem:
- sel = self.list_FarmCord_ListBox.GetItemIndex(selItem) - 1
- self.list_FarmCord_ListBox.RemoveItem(selItem)
- else:
- return
- self.SaveFarmCords()
- self.list_FarmCord_ListBox.RemoveAllItems()
- self.ReadFarmCords()
- self.list_FarmCord_ListBox.SelectIndex(sel)
- if self.list_FarmCord_ListBox.GetItemCount() < 10:
- self.scroll_FarmCord_ListBox.Hide()
- else:
- self.scroll_FarmCord_ListBox.Show()
- def FarmCords_Close_func(self):
- self.FarmCords_Window.Hide()
- self.settings_btn_func()
- def SaveConfigFile(self):
- SaveConfig('RedPotion', str(self.RedPotion_Bar.GetSliderPos() * 100))
- SaveConfig('BluePotion', str(self.BluePotion_Bar.GetSliderPos() * 100))
- SaveConfig('ExpDonatePercent', str(self.ExpDonator_Bar.GetSliderPos() * 100))
- SaveConfig('AttackSpeed', self.AttackSpeed_Edit.GetText())
- SaveConfig('WalkSpeed', self.MoveSpeed_Edit.GetText())
- SaveConfig('MobberDelay', self.MobberDelay_Edit.GetText())
- SaveConfig('MobberDistance', self.MobberDistance_Edit.GetText())
- SaveConfig('GameMasterDetector_ComboBox', self.GM_ComboBox.GetCurrentText())
- SaveConfig('FarmBot_ComboBox', self.Farm_ComboBox.GetCurrentText())
- SaveConfig('AttackInRange_Enable', str(self.AttackInRange_Enable_Set))
- SaveConfig('WalkAndSearch_Enable', str(self.WalkAndSearch_Enable_Set))
- SaveConfig('Fishbot_React_Delay', self.delay.GetText())
- SaveConfig('Fishbot_Fishing_Delay', self.fishing_delay.GetText())
- SaveConfig('FastAttack_Distance', self.FastAttack_Distance_Edit.GetText())
- def settings_btn_func(self):
- if self.HackSetting_Window.IsShow():
- self.SaveConfigFile()
- self.HackSetting_Window.Hide()
- else:
- xPos, yPos = self.Board.GetGlobalPosition()
- self.HackSetting_Window.SetPosition(self.Board.GetWidth() + xPos - self.WIDTH - 30, self.Board.GetHeight() + yPos - self.HEIGH - 50)
- self.HackSetting_Window.Show()
- def skill_btn_func(self):
- if self.SkillBot_Window.IsShow():
- self.SkillBot_Window.Hide()
- SaveConfig('Skill_Time1', self.skill1_timer_edit.GetText())
- SaveConfig('Skill_Time2', self.skill2_timer_edit.GetText())
- SaveConfig('Skill_Time3', self.skill3_timer_edit.GetText())
- SaveConfig('Skill_Time4', self.skill4_timer_edit.GetText())
- SaveConfig('Skill_Time5', self.skill5_timer_edit.GetText())
- SaveConfig('Skill_Time6', self.skill6_timer_edit.GetText())
- else:
- xPos, yPos = self.Board.GetGlobalPosition()
- self.SkillBot_Window.SetPosition(self.Board.GetWidth() + xPos - 290 - 20, self.Board.GetHeight() + yPos - 160)
- self.getskillicon = k_ui.SkillAditionDialog()
- x = -30
- self.skilliconsDict = {}
- self.skilliconsActiveDict = {}
- for i in range(1, 7):
- x = x + 45
- skillSlot = player.GetSkillIndex(i)
- skillGrade = player.GetSkillGrade(i)
- skillLevel = player.GetSkillLevel(i)
- if 0 == skillGrade:
- skillLevel += 0
- elif 1 == skillGrade:
- skillLevel += 20
- elif 2 == skillGrade:
- skillLevel += 30
- elif 3 == skillGrade:
- skillLevel = 40
- if m2net.GetMainActorSkillGroup() == 0:
- SkillIcon = ui.ToggleButton()
- SkillIcon.SetParent(self.SkillBot_Window)
- SkillIcon.SetPosition(x, 10)
- SkillIcon.SetUpVisual('d:/ymir work/ui/public/slot_base.sub')
- SkillIcon.SetOverVisual('d:/ymir work/ui/public/slot_base.sub')
- SkillIcon.SetDownVisual('d:/ymir work/ui/public/slot_base.sub')
- SkillIcon.SetToolTipText('')
- SkillIcon.SetText('')
- SkillIcon.Show()
- SkillIcon.Disable()
- self.skilliconsDict[i] = SkillIcon
- else:
- SkillIcon = ui.ToggleButton()
- SkillIcon.SetParent(self.SkillBot_Window)
- SkillIcon.SetPosition(x, 10)
- if skillGrade != 3:
- SkillIcon.SetUpVisual(self.getskillicon.GetSkillIcon(i, 'Count', skillGrade + 1))
- SkillIcon.SetOverVisual(self.getskillicon.GetSkillIcon(i, 'Count', skillGrade + 1))
- SkillIcon.SetDownVisual(self.getskillicon.GetSkillIcon(i, 'Count', skillGrade + 1))
- else:
- SkillIcon.SetUpVisual(self.getskillicon.GetSkillIcon(i, 'Count', skillGrade))
- SkillIcon.SetOverVisual(self.getskillicon.GetSkillIcon(i, 'Count', skillGrade))
- SkillIcon.SetDownVisual(self.getskillicon.GetSkillIcon(i, 'Count', skillGrade))
- SkillIcon.SetToolTipText(skill.GetSkillName(player.GetSkillIndex(i)))
- if skillLevel == 0:
- SkillIcon.SetText(str(skillLevel))
- else:
- SkillIcon.SetText('')
- SkillIcon.Show()
- SkillIcon.Enable()
- self.skilliconsDict[i] = SkillIcon
- SkillActivated = ui.ToggleButton()
- SkillActivated.SetParent(self.SkillBot_Window)
- SkillActivated.SetPosition(x, 10)
- SkillActivated.SetUpVisual('id:/ymir work/ui/public/slot_cover_button_03.sub')
- SkillActivated.SetOverVisual('d:/ymir work/ui/public/slot_cover_button_03.sub')
- SkillActivated.SetDownVisual('d:/ymir work/ui/public/slot_cover_button_03.sub')
- SkillActivated.SetToolTipText(skill.GetSkillName(player.GetSkillIndex(i)))
- SkillActivated.Hide()
- self.skilliconsActiveDict[i] = SkillActivated
- self.skilliconsDict[i].SetToggleDownEvent(lambda arg=i: self.skillbot_on_func(arg))
- self.skilliconsDict[i].SetToggleUpEvent(lambda arg=i: self.skillbot_off_func(arg))
- self.skilliconsActiveDict[i].SetToggleDownEvent(lambda arg=i: self.skillbot_on_func(arg))
- self.skilliconsActiveDict[i].SetToggleUpEvent(lambda arg=i: self.skillbot_off_func(arg))
- self.SkillBot_Window.Show()
- if self.skillbot_1 == 1:
- self.skilliconsActiveDict[1].Show()
- self.skilliconsActiveDict[1].Down()
- else:
- self.skilliconsActiveDict[1].Hide()
- self.skilliconsActiveDict[1].SetUp()
- if self.skillbot_2 == 1:
- self.skilliconsActiveDict[2].Show()
- self.skilliconsActiveDict[2].Down()
- else:
- self.skilliconsActiveDict[2].Hide()
- self.skilliconsActiveDict[2].SetUp()
- if self.skillbot_3 == 1:
- self.skilliconsActiveDict[3].Show()
- self.skilliconsActiveDict[3].Down()
- else:
- self.skilliconsActiveDict[3].Hide()
- self.skilliconsActiveDict[3].SetUp()
- if self.skillbot_4 == 1:
- self.skilliconsActiveDict[4].Show()
- self.skilliconsActiveDict[4].Down()
- else:
- self.skilliconsActiveDict[4].Hide()
- self.skilliconsActiveDict[4].SetUp()
- if self.skillbot_5 == 1:
- self.skilliconsActiveDict[5].Show()
- self.skilliconsActiveDict[5].Down()
- else:
- self.skilliconsActiveDict[5].Hide()
- self.skilliconsActiveDict[5].SetUp()
- if self.skillbot_6 == 1:
- self.skilliconsActiveDict[6].Show()
- self.skilliconsActiveDict[6].Down()
- else:
- self.skilliconsActiveDict[6].Hide()
- self.skilliconsActiveDict[6].SetUp()
- def skillbot_on_func(self, arg):
- self.skilliconsActiveDict[arg].Show()
- self.skilliconsActiveDict[arg].Down()
- self.func.UseSkillBot(arg)
- if arg == 1:
- if self.skill_timer_active[1] == 1:
- self.skill_Timer1.SetTimer(float(self.skill1_timer_edit.GetText()))
- self.skillbot_1 = 1
- elif arg == 2:
- if self.skill_timer_active[2] == 1:
- self.skill_Timer2.SetTimer(float(self.skill2_timer_edit.GetText()))
- self.skillbot_2 = 1
- elif arg == 3:
- if self.skill_timer_active[3] == 1:
- self.skill_Timer3.SetTimer(float(self.skill3_timer_edit.GetText()))
- self.skillbot_3 = 1
- elif arg == 4:
- if self.skill_timer_active[4] == 1:
- self.skill_Timer4.SetTimer(float(self.skill4_timer_edit.GetText()))
- self.skillbot_4 = 1
- elif arg == 5:
- if self.skill_timer_active[5] == 1:
- self.skill_Timer5.SetTimer(float(self.skill5_timer_edit.GetText()))
- self.skillbot_5 = 1
- elif arg == 6:
- if self.skill_timer_active[6] == 1:
- self.skill_Timer6.SetTimer(float(self.skill6_timer_edit.GetText()))
- self.skillbot_6 = 1
- def skillbot_off_func(self, arg):
- self.skilliconsActiveDict[arg].Hide()
- self.skilliconsActiveDict[arg].SetUp()
- if arg == 1:
- self.skillbot_1 = 0
- elif arg == 2:
- self.skillbot_2 = 0
- elif arg == 3:
- self.skillbot_3 = 0
- elif arg == 4:
- self.skillbot_4 = 0
- elif arg == 5:
- self.skillbot_5 = 0
- elif arg == 6:
- self.skillbot_6 = 0
- def settings_fish_btn_func(self):
- if self.Fishbot_Window.IsShow():
- self.SaveConfigFile()
- self.Fishbot_Window.Hide()
- else:
- xPos, yPos = self.Board.GetGlobalPosition()
- self.Fishbot_Window.SetPosition(self.Board.GetWidth() + xPos - 307 - 50, self.Board.GetHeight() + yPos - 245 - 60)
- self.Fishbot_Window.Show()
- def HackSet_Close_func(self):
- self.SaveConfigFile()
- self.HackSetting_Window.Hide()
- def Hide_Btn_func(self):
- self.Board.Hide()
- self.HardBar_Vertical.Hide()
- self.hackbar_s = self.comp.Button(None, '', 'Show', wndMgr.GetScreenWidth() - 15, wndMgr.GetScreenHeight() - 50 - 39, self.Show_Btn_func, 'd:/ymir work/ui/public/minimize_button_01.sub', 'd:/ymir work/ui/public/minimize_button_02.sub', 'd:/ymir work/ui/public/minimize_button_03.sub')
- return
- def Show_Btn_func(self):
- self.Board.Show()
- self.HardBar_Vertical.Show()
- self.hackbar_s.Hide()
- def FarmCord_Window_Btn_func(self):
- self.FarmCords_Window.Show()
- self.HackSetting_Window.Hide()
- self.list_FarmCord_ListBox.RemoveAllItems()
- self.ReadFarmCords()
- def WallHack_Btn_func(self, arg):
- if arg == 'on':
- player5.SkipCollision(1)
- self.WallHack = 1
- self.time.SetTimerWallHack(5.0)
- SaveConfig('Wallhack_Enabled', '1')
- elif arg == 'off':
- self.WallHack = 0
- player5.SkipCollision(0)
- SaveConfig('Wallhack_Enabled', '0')
- def AttackInRange_Btn_func(self, arg):
- if arg == 'on':
- self.func.AttackInRange = 1
- self.AttackInRange_Enable_Set = 1
- elif arg == 'off':
- self.func.AttackInRange = 0
- self.AttackInRange_Enable_Set = 0
- def Farm_Btn_func(self, arg):
- if arg == 'on':
- self.Auto_Attack = 0
- self.StopBotAndStandUp = 0
- self.WaitForHP = 0
- self.time.SetTimerFarm(1.5)
- self.func.farmbot_active = 'goto'
- elif arg == 'off':
- self.func.farmbot_active = 'stop'
- self.pos = 0
- def Farm_Walk_Btn_func(self, arg):
- if arg == 'on':
- self.FarmCord_Window_Btn.Show()
- self.WalkAndSearch_Enable_Set = 1
- self.WalkAndSearch = 1
- elif arg == 'off':
- self.FarmCord_Window_Btn.Hide()
- self.WalkAndSearch_Enable_Set = 0
- self.WalkAndSearch = 0
- def GmDetector_Btn_func(self, arg):
- if arg == 'on':
- self.GM_Detector = 1
- SaveConfig('GameMasterDetector_Enabled', '1')
- elif arg == 'off':
- self.GM_Detector = 0
- SaveConfig('GameMasterDetector_Enabled', '0')
- def FastAttack_Btn_func(self, arg):
- if arg == 'on':
- self.Fast_Attack = 1
- self.time.SetTimerFastAttack(0.6)
- SaveConfig('FastAttack_Enabled', '1')
- elif arg == 'off':
- self.Fast_Attack = 0
- SaveConfig('FastAttack_Enabled', '0')
- def StartBot_Btn_func(self, arg):
- global MyX
- global MyY
- if arg == 'on':
- if self.func.AttackInRange == 1:
- MyX, MyY, z = player.GetMainCharacterPosition()
- self.Auto_Attack = self.LEVELBOT_STATE_START
- if self.SpaceBar_Attack == 1:
- player.SetAttackKeyState(TRUE)
- self.AutoRevive = 0
- self.AutoRevive_Btn.SetUp()
- SaveConfig('AutoAttack_Enabled', '1')
- elif arg == 'off':
- self.Auto_Attack = self.LEVELBOT_STATE_STOP
- chrmgrm2g.AutoAttackOnOff(0)
- chrmgrm2g.AutoStartOnOff(0, 1)
- if self.SpaceBar_Attack == 1:
- player.SetAttackKeyState(FALSE)
- SaveConfig('AutoAttack_Enabled', '0')
- def Pickup_Btn_func(self, arg):
- if arg == 'on':
- self.if_list_list_items.RemoveAllItems()
- for it in self.LoadItemList():
- self.if_list_list_items.AppendItem(k_ui.Item('%s : %s' % (it['vnum'], it['name'])))
- self.FillWhiteList()
- self.ItemFilter_Window.Show()
- self.Auto_Pickup = 1
- SaveConfig('AutoPickup_Enabled', '1')
- elif arg == 'off':
- self.ItemFilter_Window.Hide()
- self.Auto_Pickup = 0
- SaveConfig('AutoPickup_Enabled', '0')
- def AttractMobs_Btn_func(self, arg):
- if arg == 'on':
- self.func.MobberFunction(int(self.MobberDistance_Edit.GetText()))
- self.Attract_Mobs = 1
- self.time.SetTimerMobber(float(self.MobberDelay_Edit.GetText()))
- SaveConfig('AttractMobs_Enabled', '1')
- elif arg == 'off':
- self.Attract_Mobs = 0
- SaveConfig('AttractMobs_Enabled', '0')
- def AttackSpeed_Btn_func(self, arg):
- if arg == 'on':
- self.AttackSpeed = 1
- SaveConfig('AttackSpeed_Enabled', '1')
- elif arg == 'off':
- self.AttackSpeed = 0
- player5.SetAtt4ckSpeed(player.GetMainCharacterIndex(), player.GetStatus(player.ATT_SPEED))
- SaveConfig('AttackSpeed_Enabled', '0')
- def WalkSpeed_Btn_func(self, arg):
- if arg == 'on':
- self.MoveSpeed = 1
- self.time.SetTimerMoveSpeed(1.5)
- SaveConfig('WalkSpeed_Enabled', '1')
- elif arg == 'off':
- self.MoveSpeed = 0
- player5.SetMoveSpeed(player.GetMainCharacterIndex(), player.GetStatus(player.MOVING_SPEED))
- SaveConfig('WalkSpeed_Enabled', '0')
- def Donate_Btn_func(self, arg):
- if arg == 'on':
- import uiCommon
- QuestionDialog = uiCommon.QuestionDialog()
- QuestionDialog.SetText('Turn On Guild exp donator ?')
- QuestionDialog.SetAcceptEvent(self.DonatorOk)
- QuestionDialog.SetCancelEvent(self.DonatorCancel)
- QuestionDialog.Open()
- self.DonatorQuestionDialog = QuestionDialog
- elif arg == 'off':
- self.GuildExpDonate = 0
- def DonatorOk(self):
- self.GuildExpDonate = 1
- self.DonatorQuestionDialog.Close()
- self.DonatorQuestionDialog = None
- return
- def DonatorCancel(self):
- self.Donate_Btn.SetUp()
- self.DonatorQuestionDialog.Close()
- self.DonatorQuestionDialog = None
- return
- def RedPotion_Btn_func(self, arg):
- if arg == 'on':
- self.Auto_RedPotion = 1
- SaveConfig('RedPotion_Enabled', '1')
- elif arg == 'off':
- self.Auto_RedPotion = 0
- SaveConfig('RedPotion_Enabled', '0')
- def BluePotion_Btn_func(self, arg):
- if arg == 'on':
- self.Auto_BluePotion = 1
- SaveConfig('BluePotion_Enabled', '1')
- elif arg == 'off':
- self.Auto_BluePotion = 0
- SaveConfig('BluePotion_Enabled', '0')
- def RedPotion_Bar_func(self):
- self.RedPotion_Text.SetText(k_locale.RED_POTION_TEXT % float(self.RedPotion_Bar.GetSliderPos() * 100) + '%')
- def BluePotion_Bar_func(self):
- self.BluePotion_Text.SetText(k_locale.BLUE_POTION_TEXT % float(self.BluePotion_Bar.GetSliderPos() * 100) + '%')
- def ExpDonator_Bar_func(self):
- self.ExpDonator_Text.SetText(k_locale.EXP_DONATOR_TEXT % float(self.ExpDonator_Bar.GetSliderPos() * 100) + '%')
- def OnUpdate(self):
- if self.RestartHere_Activate == 1:
- HP = int(player.GetStatus(player.HP))
- if HP <= 0:
- if self.RestartHere_Timer1.Timer():
- m2net.SendChatPacket('/restart_here')
- self.RestartHere_Timer1.SetTimer(12.0)
- if self.FollowTarget_Activate == 1:
- chr.SelectInstance(self.TARGET_FOLLOW_VID)
- x, y, z = chr.GetPixelPosition(self.TARGET_FOLLOW_VID)
- mx, my, mz = player.GetMainCharacterPosition()
- if player.GetCharacterDistance(self.TARGET_FOLLOW_VID) > 600:
- chr.MoveToDestPosition(player.GetMainCharacterIndex(), int(x) + 200, int(y))
- if self.Fast_Attack == 1:
- if self.time.TimerFastAttack():
- self.func.FastAttack(int(self.FastAttack_Distance_Edit.GetText()))
- self.time.SetTimerFastAttack(0.6)
- if self.Auto_Pickup == 1:
- if EXTRA_PICKUP == 1:
- if self.pickupTimer.Timer():
- self.func.NewPickCloseItem()
- self.pickupTimer.SetTimer(0.5)
- elif EXTRA_PICKUP == 2:
- if self.pickupTimer.Timer():
- for newList in self.ITEM_FILTER_WHITELIST:
- self.func.PickCloseItemID(int(newList['vnum']))
- self.pickupTimer.SetTimer(0.5)
- elif self.pickupTimer.Timer():
- player5.PickCloseItem()
- self.pickupTimer.SetTimer(0.5)
- if self.AttackSpeed == 1:
- try:
- player5.SetAtt4ckSpeed(player.GetMainCharacterIndex(), int(self.AttackSpeed_Edit.GetText()))
- except:
- pass
- if self.MoveSpeed == 1:
- try:
- player5.SetMoveSpeed(player.GetMainCharacterIndex(), int(self.MoveSpeed_Edit.GetText()))
- if self.time.TimerMoveSpeed():
- player5.SetMoveSpeed(player.GetMainCharacterIndex(), player.GetStatus(player.MOVING_SPEED))
- int(self.MoveSpeed_Edit.GetText())
- self.time.SetTimerMoveSpeed(1.5)
- except:
- pass
- if self.GuildExpDonate == 1:
- self.func.ExpDonator(self.ExpDonator_Bar.GetSliderPos() * 100)
- if self.Auto_Attack == self.LEVELBOT_STATE_START:
- if self.LevelBot_Timer.Timer():
- if player.GetStatus(player.HP) <= 0:
- self.LevelBot_Timer.SetTimer(12.0)
- self.Auto_Attack = self.LEVELBOT_STATE_DEAD
- elif self.SpaceBar_Attack == 0:
- chrmgrm2g.AutoAttackOnOff(1)
- chrmgrm2g.AutoStartOnOff(1, 1)
- else:
- self.LevelBot_Timer.SetTimer(3.0)
- elif self.Auto_Attack == self.LEVELBOT_STATE_DEAD:
- if self.LevelBot_Timer.Timer():
- m2net.SendChatPacket('/restart_here')
- self.LevelBot_Timer.SetTimer(1.0)
- self.Auto_Attack = self.LEVELBOT_STATE_WAIT
- elif self.Auto_Attack == self.LEVELBOT_STATE_WAIT:
- maxHP = player.GetStatus(player.MAX_HP)
- hp = player.GetStatus(player.HP)
- curPoint = min(hp, maxHP)
- curPoint = max(hp, 0)
- maxPoint = max(maxHP, 0)
- if int(float(curPoint) / max(1, float(maxPoint)) * 100) > 30:
- self.LevelBot_Timer.SetTimer(1.0)
- self.Auto_Attack = self.LEVELBOT_STATE_START
- if self.Auto_Attack == self.LEVELBOT_STATE_STOP and self.AutoRevive == 1:
- HP = player.GetStatus(player.HP)
- if HP <= 0:
- self.AutoRevive_Timer.SetTimer(11.0)
- self.AutoRevive = 2
- if self.AutoRevive == 2:
- if self.AutoRevive_Timer.Timer():
- m2net.SendChatPacket('/restart_here')
- self.AutoRevive = 1
- if self.WaitHack == 1:
- if self.func.PlayerDetector(self.DETECT_PLAYER, self.player_whitelist) == False:
- if self.WaitHack_Timer.Timer():
- for vid in player5.GetVirtualID():
- if chr.INSTANCE_TYPE_ENEMY == chr.GetInstanceType(vid) or 2 == chr.GetInstanceType(vid):
- if player.GetCharacterDistance(vid) < 500:
- player5.SendBattlePacket(vid)
- self.WaitHack_Timer.SetTimer(0.3)
- if self.Auto_RedPotion == 1:
- self.func.AutoPotRed(self.RedPotion_Bar.GetSliderPos() * 100)
- if self.Auto_BluePotion == 1:
- self.func.AutoPotBlue(self.BluePotion_Bar.GetSliderPos() * 100)
- if self.Attract_Mobs == 1:
- if self.func.PlayerDetector(self.DETECT_PLAYER, self.player_whitelist) == False:
- if self.time.TimerMobber():
- self.func.MobberFunction(int(self.MobberDistance_Edit.GetText()))
- self.time.SetTimerMobber(float(self.MobberDelay_Edit.GetText()))
- if self.GM_Detector == 1:
- if self.GM_ComboBox.GetCurrentText() == 'LogOut':
- if self.func.DetectGameMaster():
- m2net.SendChatPacket('/logout')
- self.GM_Detector = 0
- elif self.GM_ComboBox.GetCurrentText() == 'Quit':
- if self.func.DetectGameMaster():
- app.Abort()
- elif self.GM_ComboBox.GetCurrentText() == 'Stop Botting':
- if self.func.DetectGameMaster():
- self.FastAttack_Btn.SetUp()
- self.FastAttack_Btn_func('off')
- self.AttractMobs_Btn.SetUp()
- self.AttractMobs_Btn_func('off')
- self.Fishing_Btn.SetUp()
- self.StartFishing_Btn_func('off')
- self.AttackSpeed_Btn.SetUp()
- self.AttackSpeed_Btn_func('off')
- self.WalkSpeed_Btn.SetUp()
- self.WalkSpeed_Btn_func('off')
- self.GameMaster_Names_Text.SetText('Bot stopped ' + self.func.GetGameMasterName() + ' is around')
- if not self.GameMasterInfo_Window.IsShow():
- self.GameMasterInfo_Window.Show()
- self.GM_Detector = 0
- elif self.GM_ComboBox.GetCurrentText() == 'Visible':
- self.func.MakeGameMasterVisible()
- elif self.GM_ComboBox.GetCurrentText() == 'Show Name':
- if self.func.DetectGameMaster():
- x, y = self.func.GetGameMasterPosition()
- x = int(x) / 100
- y = int(y) / 100
- self.GameMaster_Names_Text.SetText('GM: %s (%i, %i)' % (self.func.GetGameMasterName(), x, y))
- if not self.GameMasterInfo_Window.IsShow():
- self.GameMasterInfo_Window.Show()
- if self.func.farmbot_active == 'goto':
- if self.time.TimerFarm() == 1:
- if self.WalkAndSearch == 1:
- self.func.Farming(self.Farm_ComboBox.GetCurrentText())
- else:
- type = self.Farm_ComboBox.GetCurrentText()
- if self.func.GetMetin(type) != '':
- self.MetinInfo_Window_Text.SetText(self.func.GetMetin(type))
- if not self.MetinInfo_Window.IsShow():
- self.MetinInfo_Window.Show()
- self.time.SetTimerFarm(1.5)
- elif self.func.farmbot_active == 'metin_found':
- if self.time.TimerFarm() == 1:
- if player.GetStatus(player.HP) < 0:
- self.time.SetTimerFarm(12.0)
- self.func.farmbot_active = 'dead'
- player.SetTarget(self.func.metin_vid)
- if player.GetTargetVID() == self.func.metin_vid:
- player5.SendAttackPacket(self.func.metin_vid)
- else:
- self.func.farmbot_active = 'goto'
- self.time.SetTimerFarm(2.0)
- elif self.func.farmbot_active == 'ore_found':
- if self.time.TimerFarm() == 1:
- if player.GetStatus(player.HP) < 0:
- self.time.SetTimerFarm(12.0)
- self.func.farmbot_active = 'dead'
- player.SetTarget(self.func.metin_vid)
- if player.GetTargetVID() == self.func.metin_vid:
- if player5.GetMotion() != 'Mining':
- m2net.SendOnClickPacket(self.func.metin_vid)
- else:
- self.func.farmbot_active = 'goto'
- self.time.SetTimerFarm(10.0)
- elif self.func.farmbot_active == 'dead':
- if self.time.TimerFarm() == 1:
- m2net.SendChatPacket('/restart_here')
- self.time.SetTimerFarm(12.0)
- self.func.farmbot_active = 'metin_found'
- if self.WallHack == 1:
- if self.time.TimerWallHack() == 1:
- player5.SkipCollision(1)
- self.time.SetTimerWallHack(5.0)
- if self.FishingState == 'start':
- if self.quitFishing == 1:
- if self.stopFishingTimer.Timer() == 1:
- app.Abort()
- if self.stopFishing == 1:
- if self.stopFishingTimer.Timer() == 1:
- self.Fishing_Btn.SetUp()
- self.FishingState = 'stop'
- player5.StartFishing()
- if player.GetStatus(player.HP) < 0:
- self.time.SetTimerFishing(12.0)
- self.FishingState = 'Dead'
- if player5.GetMotion() == 'Idle':
- if self.time.TimerFishing() == 1:
- if self.func.UseBait():
- player5.StartFishing()
- else:
- self.Fishing_Btn.SetUp()
- self.FishingState = 'stop'
- self.time.SetTimerFishing(float(self.fishing_delay.GetText()) + player5.GetRandomFloat(0.0, 1.0))
- elif player5.GetMotion() == 'Fishing_React':
- self.time.SetTimerFishing(float(self.delay.GetText()) + player5.GetRandomFloat(0.0, 1.0))
- self.FishingState = 'React'
- elif self.FishingState == 'React':
- if self.time.TimerFishing() == 1:
- player5.StartFishing()
- self.FishingState = 'start'
- if self.killFish == 1:
- self.func.killFishes()
- if self.dropHairDye == 1:
- self.func.dropHairDye()
- if self.dropDeadFish == 1:
- self.func.dropDeadFishes()
- if self.openClams == 1:
- self.func.openClams()
- self.time.SetTimerFishing(float(self.fishing_delay.GetText()) + player5.GetRandomFloat(0.0, 1.0))
- elif self.FishingState == 'Dead':
- if self.time.TimerFishing() == 1:
- m2net.SendChatPacket('/restart_here')
- self.FishingState = 'start'
- self.time.SetTimerFishing(float(self.fishing_delay.GetText()))
- if self.skillbot_1 == 1:
- if self.skill_timer_active[1] == 1:
- if self.skill_Timer1.Timer() == 1:
- self.func.UseSkillBot(1)
- self.skill_Timer1.SetTimer(float(self.skill1_timer_edit.GetText()))
- else:
- self.func.UseSkillBot(1)
- if self.skillbot_2 == 1:
- if self.skill_timer_active[2] == 1:
- if self.skill_Timer2.Timer() == 1:
- self.func.UseSkillBot(2)
- self.skill_Timer2.SetTimer(float(self.skill2_timer_edit.GetText()))
- else:
- self.func.UseSkillBot(2)
- if self.skillbot_3 == 1:
- if self.skill_timer_active[3] == 1:
- if self.skill_Timer3.Timer() == 1:
- self.func.UseSkillBot(3)
- self.skill_Timer3.SetTimer(float(self.skill3_timer_edit.GetText()))
- else:
- self.func.UseSkillBot(3)
- if self.skillbot_4 == 1:
- if self.skill_timer_active[4] == 1:
- if self.skill_Timer4.Timer() == 1:
- self.func.UseSkillBot(4)
- self.skill_Timer4.SetTimer(float(self.skill4_timer_edit.GetText()))
- else:
- self.func.UseSkillBot(4)
- if self.skillbot_5 == 1:
- if self.skill_timer_active[5] == 1:
- if self.skill_Timer5.Timer() == 1:
- self.func.UseSkillBot(5)
- self.skill_Timer5.SetTimer(float(self.skill5_timer_edit.GetText()))
- else:
- self.func.UseSkillBot(5)
- if self.skillbot_6 == 1:
- if self.skill_timer_active[6] == 1:
- if self.skill_Timer6.Timer() == 1:
- self.func.UseSkillBot(6)
- self.skill_Timer6.SetTimer(float(self.skill6_timer_edit.GetText()))
- else:
- self.func.UseSkillBot(6)
- if self.chat_SpamBot == 1:
- if self.chatTimer.Timer() == 1:
- self.SendChatText(self.chat_SpamEdit.GetText())
- self.chatTimer.SetTimer(float(self.chat_TimerEdit.GetText()))
- if self.whisper_SpamBot == 1:
- if self.whisperTimer.Timer() == 1:
- self.spam_send_btn_func(1)
- self.whisperTimer.SetTimer(float(self.spam_timer_edit.GetText()))
- def OpenWindow(self):
- if self.Board.IsShow():
- self.Board.Hide()
- else:
- self.Board.Show()
- def Close(self):
- self.Board.Hide()
- class Functions():
- def GetHP_Percent(self):
- maxHP = int(player.GetStatus(player.MAX_HP))
- HP = int(player.GetStatus(player.HP))
- curPoint = min(HP, maxHP)
- curPoint = max(HP, 0)
- maxPoint = max(maxHP, 0)
- return float(curPoint) / max(1, float(maxPoint)) * 100
- def AutoPotRed(self, percent):
- maxHP = int(player.GetStatus(player.MAX_HP))
- HP = int(player.GetStatus(player.HP))
- HP_RECOVERY = int(player.GetStatus(player.HP_RECOVERY))
- curPoint = min(HP, maxHP)
- curPoint = max(HP, 0)
- maxPoint = max(maxHP, 0)
- if float(curPoint) / max(1, float(maxPoint)) * 100 < percent and HP_RECOVERY == 0:
- for eachSlot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(eachSlot) in [ int(i) for i in RED_POTION_ID.split(',') ]:
- m2net.SendItemUsePacket(eachSlot)
- break
- def AutoPotBlue(self, percent):
- maxSP = int(player.GetStatus(player.MAX_SP))
- SP = int(player.GetStatus(player.SP))
- SP_RECOVERY = int(player.GetStatus(player.SP_RECOVERY))
- curPoint2 = min(SP, maxSP)
- curPoint2 = max(SP, 0)
- maxPoint2 = max(maxSP, 0)
- if float(curPoint2) / max(1, float(maxPoint2)) * 100 < percent and SP_RECOVERY == 0:
- for eachSlot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(eachSlot) in [ int(i) for i in BLUE_POTION_ID.split(',') ]:
- m2net.SendItemUsePacket(eachSlot)
- break
- def ExpDonator(self, percent):
- nextEXP = int(player.GetStatus(player.NEXT_EXP))
- Exp = int(player.GetEXP())
- curPoint = min(Exp, nextEXP)
- curPoint = max(Exp, 0)
- maxPoint = max(nextEXP, 0)
- if float(curPoint) / max(1, float(maxPoint)) * 100 > percent:
- m2net.SendGuildOfferPacket(Exp)
- return
- def MobberFunction(self, dist):
- maxHP = int(player.GetStatus(player.MAX_HP))
- HP = int(player.GetStatus(player.HP))
- curPoint = min(HP, maxHP)
- curPoint = max(HP, 0)
- maxPoint = max(maxHP, 0)
- if float(curPoint) / max(1, float(maxPoint)) * 100 > 30:
- for vid in player5.GetVirtualID():
- if chr.INSTANCE_TYPE_ENEMY == chr.GetInstanceType(vid):
- if player.GetCharacterDistance(vid) < dist:
- player5.SendBattlePacket(vid)
- AttackInRange = 0
- def IsInRange(self, vid):
- if self.AttackInRange == 1:
- mobX, mobY = player5.GetPixelPosition2(vid)
- x1 = (MyX - mobX) / 100
- y1 = (MyY - mobY) / 100
- return math.sqrt(math.pow(x1, 2) + math.pow(y1, 2))
- def AttackNearestMob(self):
- MobList = []
- Count = 0
- for vid in player5.GetVirtualID():
- if chr.INSTANCE_TYPE_ENEMY == chr.GetInstanceType(vid):
- if self.IsInRange(vid) < 40:
- if player5.IsDead(i) == 0:
- distance = player.GetCharacterDistance(vid)
- MobData = {'VID': vid,
- 'COUNT': Count,
- 'DISTANCE': distance}
- Count += 1
- MobList.append(MobData)
- NearestMob = 0
- try:
- for data in MobList:
- Distance = float(data['DISTANCE'])
- if Distance < float(MobList[NearestMob]['DISTANCE']):
- NearestMob = data['COUNT']
- VID = int(MobList[NearestMob]['VID'])
- player5.SendAttackPacket(VID)
- except IndexError:
- VID = 0
- def FastAttack(self, dst):
- vid = player.GetTargetVID()
- distance = player.GetCharacterDistance(vid)
- if distance < dst:
- if vid != 0:
- if vid != -1:
- if chr.INSTANCE_TYPE_NPC != chr.GetInstanceType(vid):
- if vid != player.GetMainCharacterIndex():
- player5.SendBattlePacket(vid)
- def DetectGameMaster(self):
- for vid in player5.GetVirtualID():
- name = chr.GetNameByVID(vid)
- if name.startswith('['):
- return 1
- return 0
- def MakeGameMasterVisible(self):
- for vid in player5.GetVirtualID():
- name = chr.GetNameByVID(vid)
- if name.startswith('['):
- chr.SelectInstance(vid)
- chr.SetNameString(name)
- chr.Show()
- chr.SelectInstance(player.GetMainCharacterIndex())
- def GetGameMasterName(self):
- for vid in player5.GetVirtualID():
- name = chr.GetNameByVID(vid)
- if name.startswith('['):
- return name
- return ''
- def GetGameMasterPosition(self):
- for vid in player5.GetVirtualID():
- name = chr.GetNameByVID(vid)
- if name.startswith('['):
- mobX, mobY = player5.GetPixelPosition2(vid)
- return (
- mobX, abs(mobY))
- return (0, 0)
- def ReadFarmConfig(Setting):
- lines = open('temp/h4ckb4r/mod_farm_list.cfg').readlines()
- for line in lines:
- if line.startswith(Setting):
- return line.split('=')[1].replace('\n', '')
- pos = 0
- metin_vid = 0
- metin_life = 0
- farmbot_active = 'stop'
- MetinList = [ int(n) for n in ReadFarmConfig('MetinList').split(',') ]
- BossList = [ int(n) for n in ReadFarmConfig('BossList').split(',') ]
- OreList = [ int(n) for n in ReadFarmConfig('OreList').split(',') ]
- def Farming(self, type):
- x, y, z = player.GetMainCharacterPosition()
- x = int(x) / 100
- y = int(y) / 100
- handle = app.OpenTextFile(FARM_CONFIG_FILE)
- count = app.GetTextFileLineCount(handle) - 1
- line = app.GetTextFileLine(handle, self.pos)
- xx = int(line.split(',')[0])
- yy = int(line.split(',')[1])
- chr.MoveToDestPosition(player.GetMainCharacterIndex(), xx * 100, yy * 100)
- if x >= xx - 2 and x <= xx + 2 and y >= yy - 2 and y <= yy + 2:
- if self.pos != count:
- self.pos += 1
- if self.pos == count:
- self.pos = 0
- for vid in player5.GetVirtualID():
- vnum = player5.GetVirtualNumber(vid)
- if type == 'Metin':
- if vnum in self.MetinList:
- self.metin_vid = vid
- self.metin_life = i
- self.farmbot_active = 'metin_found'
- break
- elif type == 'BOSS':
- if vnum in self.BossList:
- self.metin_vid = vid
- self.metin_life = i
- self.farmbot_active = 'metin_found'
- break
- elif type == k_locale.FARM_COMBOBOX_ORE_TEXT:
- if vnum in self.OreList:
- self.metin_vid = vid
- self.farmbot_active = 'ore_found'
- break
- elif vnum in MetinList or vnum in BossList:
- self.metin_vid = vid
- self.metin_life = i
- self.farmbot_active = 'metin_found'
- break
- FOUND_COORDS = (0, 0)
- def GetMetin(self, type):
- for vid in player5.GetVirtualID():
- if type == 'Metin':
- if vnum in self.MetinList:
- x, y = player5.GetPixelPosition2(vid)
- self.FOUND_COORDS = (int(x), int(y))
- self.metin_vid = vid
- return chr.GetNameByVID(vid) + ', VID: ' + str(vid) + ', VNUM: ' + str(vnum) + ', POS: (' + str(int(x) / 100) + ', ' + str(int(y) / 100) + ')'
- elif type == 'BOSS':
- if vnum in self.BossList:
- x, y = player5.GetPixelPosition2(vid)
- self.FOUND_COORDS = (int(x), int(y))
- self.metin_vid = vid
- return chr.GetNameByVID(vid) + ', VID: ' + str(vid) + ', VNUM: ' + str(vnum) + ', POS: (' + str(int(x) / 100) + ', ' + str(int(y) / 100) + ')'
- elif type == k_locale.FARM_COMBOBOX_ORE_TEXT:
- if vnum in self.OreList:
- x, y = player5.GetPixelPosition2(vid)
- self.FOUND_COORDS = (int(x), int(y))
- self.metin_vid = vid
- return chr.GetNameByVID(vid) + ', VID: ' + str(vid) + ', VNUM: ' + str(vnum) + ', POS: (' + str(int(x) / 100) + ', ' + str(int(y) / 100) + ')'
- elif vnum in self.MetinList or vnum in self.BossList:
- x, y = player5.GetPixelPosition2(vid)
- self.FOUND_COORDS = (int(x), int(y))
- self.metin_vid = vid
- return chr.GetNameByVID(vid) + ', VID: ' + str(vid) + ', VNUM: ' + str(vnum) + ', POS: (' + str(int(x) / 100) + ', ' + str(int(y) / 100) + ')'
- return ''
- def UseBait(self):
- for Slot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(Slot) in (27800, 27801, 27802):
- m2net.SendItemUsePacket(Slot)
- return 1
- return 0
- def killFishes(self):
- for Slot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(Slot) in (27803, 27804, 27805, 27806, 27807, 27808,
- 27809, 27811, 27812, 27813, 27814, 27815,
- 27816, 27817, 27818, 27819, 27820, 27821,
- 27822, 27823, 30112):
- m2net.SendItemUsePacket(Slot)
- def openClams(self):
- for Slot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(Slot) == 27987:
- m2net.SendItemUsePacket(Slot)
- def dropDeadFishes(self):
- for Slot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(Slot) in (27833, 27834, 27835, 27836, 27837, 27838,
- 27839, 27840, 27841, 27842, 27843, 27844,
- 27845, 27846, 27847, 27848, 27849, 27850,
- 27851, 27852, 27853, 27802):
- m2net.SendItemDropPacketNew(player.INVENTORY, Slot, 1)
- def dropHairDye(self):
- for Slot in xrange(player.INVENTORY_PAGE_SIZE * 2):
- if player.GetItemIndex(Slot) >= 70201 and player.GetItemIndex(Slot) <= 70208:
- m2net.SendItemDropPacketNew(player.INVENTORY, Slot, 1)
- def UseSkillBot(self, slot):
- if not player.IsSkillCoolTime(slot):
- player.ClickSkillSlot(slot)
- def MoveToDestPosition(self, xx, yy):
- x, y, z = player.GetMainCharacterPosition()
- x = int(x) / 100
- y = int(y) / 100
- if x >= xx - 2 and x <= xx + 2 and y >= y - 2 and y <= yy + 2:
- return 'running'
- else:
- chr.MoveToDestPosition(player.GetMainCharacterIndex(), xx * 100, yy * 100)
- return 'dest'
- def GetRandom(self):
- rdata = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]
- for n in xrange(len(rdata)):
- if n == app.GetRandom(0, len(rdata)):
- return rdata[n]
- return rdata[0]
- def PickCloseItemID(self, vnum):
- for VID in self.GetItemsOnGround():
- if player5.GetVirtualNumberOfGroundItem(VID) == vnum:
- player5.SendItemPickUpPacket(VID)
- def NewPickCloseItem(self):
- for VID in self.GetItemsOnGround():
- player5.SendItemPickUpPacket(VID)
- def PickCloseYang(self):
- for VID in self.GetYangOnGround():
- player5.SendItemPickUpPacket(VID)
- def GetItemsOnGround(self):
- List = []
- Picker = Pick
- for y in xrange(125, 600, 18):
- for x in xrange(300, 825, 31):
- iVID = Picker(x, y)
- if iVID != -1 and iVID not in List:
- List.append(iVID)
- return List
- def GetYangOnGround(self):
- List = []
- Picker = Pick
- for y in xrange(125, 600, 18):
- for x in xrange(300, 825, 31):
- FirstCoord = None
- LastCoord = None
- iVID = Picker(x, y)
- if iVID != -1:
- if iVID not in List:
- _range = xrange(1, 29)
- for i in _range:
- if Picker(x - i, y) != iVID:
- FirstCoord = x - i + 1
- break
- if FirstCoord == None:
- continue
- for i in _range:
- if Picker(FirstCoord + i, y) != iVID:
- LastCoord = FirstCoord + i - 1
- break
- if LastCoord == None:
- continue
- List.append(iVID)
- return List
- def PlayerDetector(self, detect, whitelist):
- if detect == True:
- for vid in player5.GetVirtualID():
- if chr.INSTANCE_TYPE_PLAYER == chr.GetInstanceType(vid):
- if vid == player.GetMainCharacterIndex():
- continue
- name = chr.GetNameByVID(vid)
- if name == 'None':
- continue
- if name in whitelist:
- continue
- if int(player.GetCharacterDistance(vid)) < 7000:
- return True
- return False
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement