Register for your free account! | Forgot your password?

You last visited: Today at 00:07

  • Please register to post and access all features, it's quick, easy and FREE!


MMOKORE BASIC (IRO ODIN/CHAOS)

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2017
Posts: 24
Received Thanks: 4
MMOKORE BASIC (IRO ODIN/CHAOS)

MMOKORE is now in testing mode.

Update: Tests indicate to much processes usage. Planning for a full rewrite using different methods to reduce processing and provide a more stable experience for lower end processors.

Know the basics. Install Auto-It and download NomadMemory.au3.
Place NomadMemory.au3 in the includes folder located where Auto-It installed to.

Setting up the editor. Locate the SciTE folder located in the Auto-It install location. In the SciTE folder, right click the SciTE exe and click on Properties then click the tab Compatibility. Then click the check box for run as administrator.

This is so that changes can be made and ran by pressing f5 from the SciTE editor. Set the same administrator Properties if the script is compiled as an exe. The point is to run it as administrator no matter what method chosen.

Please report any bugs that might be found and any fixes that follow the same form and naming scheme as MMOKORE's code base.

Runs best if the user takes the mouse off the screen or minimizes the client.
This is not the case in PvP mode as the user does the walking.

Code is here! Reached text limit for EPvPers. Had to take all comments out.

Only works with /nc off.(Looking into a mele mode for faster attack speed.)
If MMOKORE is not attacking targets just turn /nc auto-attack off and attack one monster to reset everything to normal. IT should attack just fine after that.

Current known bugs:
Defending mode is keeping target after target has died. The walk after loot will be removed.(Fixed Odin and Chaos)


Changes:1/29/18
Added Chaos support by adding offsets to the ini due to chaos using different offsets.
$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID1
$OFFSET_LAST_ATTAKING_TARGET_X1
$OFFSET_LAST_ATTAKING_TARGET_Y1

Changes:1/30/18
Memory write to last attacking target in the target time out is working correctly. Setting it to 1 to avoid attacking a dead monster. Move has been removed from after looting that was put in place to avoid this bug.

Odin: (NomadMemory and Odin/Chaos Ini settings can be found in the Offset Thread for MMOKORE)

Code:
#RequireAdmin
#include <GuiEdit.au3>
#include <GuiStatusBar.au3>
#include <GuiConstantsEx.au3>
#include <GUIButton.au3>
#include <GUIToolbar.au3>
#include <GuiListView.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <NomadMemory.au3>
#include <SendMessage.au3>

Opt("GUICloseOnESC", 0)
Opt("GUIOnEventMode", 1)
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)

Global $STOP = True

Global $SOFTWARE_CONFIG = "MMOASSIST.ini"
Global $CFG_ADD_ROOT_KEY = "LastWorkingAddressLocations"
Global $CFG_TOGGLEBOX_ROOT_KEY = "ToggleBoxs"
Global $CFG_EXTRAS_AKS_KEY = "AntiKSToggleBox"
Global $CFG_EXTRAS_HBID_KEY = "PvMModeToggleBox"
Global $CFG_EXTRAS_PVP_KEY = "PvPModeToggleBox"
Global $CFG_TOGGLEBOX_ATTACKRAD_KEY = "AttackRadiusInputBox"
Global $CFG_MMOKORE_LAST_GUI_X = "LastMMOKOREX", $CFG_MMOKORE_LAST_GUI_Y = "LastMMOKOREY"
Global $CFG_SKILLS_ROOT_KEY = "Skills", $CFG_SKILL_UBOUND_KEY = "SkillUbound", $CFG_SKILL_COMBO_KEY = "SkillComboKey", $CFG_SKILL_TIMES_KEY = "SkillTimes", $SKCOUNTCFG = IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_UBOUND_KEY, "1")
Global $CFG_AUTOPOTION_ROOT_KEY = "AutoPotionSettings"
Global $AutoPotionGuiFlag = 0


Global $MOBLISTFORMOPEN = "0"

Global $TARGETLIST[100] = ["no targets added yet"]
Global $TLISTCOUNT  = 0


Global $LOOTLISTFORMOPEN = "0"


Global $LOOTLIST[100] = ["no loot names added yet"]
Global $LLISTCOUNT = 0
Global $LOOTLISTTEXTCOUNT[100]

Global $SKILLLISTFORMOPEN = "0"

	  $COUNT = 0
	  $TLISTCOUNT = IniRead($SOFTWARE_CONFIG, "Target List", "Count", "0")

	  If $TLISTCOUNT = 0 Then

	  Else

		 Do

			$TARGETLIST[$COUNT] = IniRead($SOFTWARE_CONFIG, "Target List", "Target"&$COUNT, "No target set.")
			$COUNT = $COUNT + 1
			sleep(10)

		 Until $COUNT = $TLISTCOUNT Or $TLISTCOUNT = 0

	  Endif

	  $COUNT = 0
	  $LLISTCOUNT = IniRead($SOFTWARE_CONFIG, "Loot List", "Count", "0")
	  If $LLISTCOUNT = 0 Then

	  Else

		 Do

			$LOOTLIST[$COUNT] = IniRead($SOFTWARE_CONFIG, "Loot List", "Loot"&$COUNT, "No target set.")
			$LOOTLISTTEXTCOUNT[$COUNT] = IniRead($SOFTWARE_CONFIG, "Loot List", "LootTextCount"&$COUNT, "No target set.")
			$COUNT = $COUNT + 1
			sleep(10)

		 Until $COUNT = $LLISTCOUNT Or $LLISTCOUNT = 0

	  Endif

Global $tempmonsterlist[100] = ["no targets added yet"]
Global $tempmonsterlistcount  = 0

Global $templootlist[100] = ["no targets added yet"]
Global $templootlistcount  = 0

Global $tempplayerlist[100] = ["no targets added yet"]
Global $tempplayerlistcount  = 0

Global $KEYCODE = "--|{F1}|{F2}|{F3}|{F4}|{F5}|{F6}|{F7}|{F8}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}|{9}|{a}|{b}|{c}|{d}|{e}|{f}|{g}|{h}|{i}|{j}|{k}|{l}|{m}|{n}|{o}|{p}|{q}|{r}|{s}|{t}|{u}|{v}|{w}|{x}|{y}|{z}"

Global $hWnd = 0

Global $LastTarget = 0

Global $SKILL_TIMES = 0

Global $SKILL_COUNT = 1

Global $PLAYER_ON_SCREEN = 0

Global $PLAYER_TIME_OUT = 0

Global $TARGET_TIME_OUT = 0

Global $CHECK_ID = 0

Global $CHECK_TYPE = 0

Global $LOOT_ITEM = 0

Global $LOOT_ID = 0

Global $LOOT_ON_LIST_CHECK = 0

Global $PORTAL_ON_SCREEN = 0

   Global $CHARACTER_UNIQUE_ID = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "CHARACTER_UNIQUE_ID", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "CHARACTER_UNIQUE_ID", 0x00E6A634)
	  $CHARACTER_UNIQUE_ID = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "CHARACTER_UNIQUE_ID", 0x00E6A634)

   Else

	  $CHARACTER_UNIQUE_ID = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "CHARACTER_UNIQUE_ID", 0x00E6A634)

   EndIf


Global $CHARACTER_ID = 0

Global $CHARACTER_NAME = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_NAME", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_NAME", 0x00E6D7F0)
	  $CHARACTER_NAME = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_NAME", 0x00E6D7F0)

   Else

	 $CHARACTER_NAME = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_NAME", 0x00E6D7F0)

   EndIf

Global $CHARACTER_MAX_HEALTH = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_HEALTH", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_HEALTH", 0x00E6CF48)
	  $CHARACTER_MAX_HEALTH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_HEALTH", 0x00E6CF48)

   Else

	  $CHARACTER_MAX_HEALTH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_HEALTH", 0x00E6CF48)

   EndIf

Global $MAXHP = 0

Global $CHARACTER_CURRENT_HEALTH = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_HEALTH", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_HEALTH", 0x00E6CF44)
	  $CHARACTER_CURRENT_HEALTH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_HEALTH", 0x00E6CF44)

   Else

	  $CHARACTER_CURRENT_HEALTH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_HEALTH", 0x00E6CF44)

   EndIf


Global $HP = 0


Global $CHARACTER_MAX_SPELL_POWER = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_SPELL_POWER", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_SPELL_POWER", 0x00E6CF50)
	  $CHARACTER_MAX_SPELL_POWER = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_SPELL_POWER", 0x00E6CF50)

   Else

	  $CHARACTER_MAX_SPELL_POWER = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_SPELL_POWER", 0x00E6CF50)

   EndIf


Global $MAXSP = 0

Global $CHARACTER_CURRENT_SPELL_POWER = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_SPELL_POWER", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_SPELL_POWER", 0x00E6CF4C)
	  $CHARACTER_CURRENT_SPELL_POWER = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_SPELL_POWER", 0x00E6CF4C)

   Else

	  $CHARACTER_CURRENT_SPELL_POWER = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_SPELL_POWER", 0x00E6CF4C)

   EndIf


Global $SP = 0


Global $CHARACTER_MAIN_CURRENCY = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAIN_CURRENCY", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAIN_CURRENCY", 0x00E6A6F8)
	  $CHARACTER_MAIN_CURRENCY = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAIN_CURRENCY", 0x00E6A6F8)

   Else

	  $CHARACTER_MAIN_CURRENCY = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAIN_CURRENCY", 0x00E6A6F8)

   EndIf


Global $CHARACTER_MAX_WEIGHT = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_WEIGHT", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_WEIGHT", 0x00E6A704)
	  $CHARACTER_MAX_WEIGHT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_WEIGHT", 0x00E6A704)

   Else

	  $CHARACTER_MAX_WEIGHT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_MAX_WEIGHT", 0x00E6A704)

   EndIf


Global $CHARACTER_CURRENT_WEIGHT = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_WEIGHT", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_WEIGHT", 0x00E6A708)
	  $CHARACTER_CURRENT_WEIGHT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_WEIGHT", 0x00E6A708)

   Else

	  $CHARACTER_CURRENT_WEIGHT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_CURRENT_WEIGHT", 0x00E6A708)

   EndIf

Global $CHARACTER_BASE_LEVEL = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_BASE_LEVEL", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_BASE_LEVEL", 0x00E6A658)
	  $CHARACTER_BASE_LEVEL = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_BASE_LEVEL", 0x00E6A658)

   Else

	  $CHARACTER_BASE_LEVEL = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_BASE_LEVEL", 0x00E6A658)

   EndIf

Global $CHARACTER_JOB_LEVEL = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_JOB_LEVEL", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_JOB_LEVEL", 0x00E6A660)
	  $CHARACTER_JOB_LEVEL = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_JOB_LEVEL", 0x00E6A660)

   Else

	  $CHARACTER_JOB_LEVEL = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_JOB_LEVEL", 0x00E6A660)

   EndIf

Global $CHARACTER_STR = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STR", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STR", 0x00E6A68C)
	  $CHARACTER_STR = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STR", 0x00E6A68C)

   Else

	  $CHARACTER_STR = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STR", 0x00E6A68C)

   EndIf

Global $CHARACTER_AGI = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_AGI", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_AGI", 0x00E6A690)
	  $CHARACTER_AGI = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_AGI", 0x00E6A690)

   Else

	  $CHARACTER_AGI = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_AGI", 0x00E6A690)

   EndIf

Global $CHARACTER_VIT = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_VIT", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_VIT", 0x00E6A694)
	  $CHARACTER_VIT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_VIT", 0x00E6A694)

   Else

	  $CHARACTER_VIT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_VIT", 0x00E6A694)

   EndIf

Global $CHARACTER_INT = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_INT", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_INT", 0x00E6A698)
	  $CHARACTER_INT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_INT", 0x00E6A698)

   Else

	  $CHARACTER_INT = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_INT", 0x00E6A698)

   EndIf

Global $CHARACTER_DEX = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_DEX", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_DEX", 0x00E6A69C)
	  $CHARACTER_DEX = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_DEX", 0x00E6A69C)

   Else

	  $CHARACTER_DEX = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_DEX", 0x00E6A69C)

   EndIf

Global $CHARACTER_LUK = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_LUK", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_LUK", 0x00E6A6A0)
	  $CHARACTER_LUK = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_LUK", 0x00E6A6A0)

   Else

	  $CHARACTER_LUK = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_LUK", 0x00E6A6A0)

   EndIf

Global $CHARACTER_STAT_POINTS = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STAT_POINTS", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STAT_POINTS", 0x00E6A65C)
	  $CHARACTER_STAT_POINTS = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STAT_POINTS", 0x00E6A65C)

   Else

	  $CHARACTER_STAT_POINTS = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_STAT_POINTS", 0x00E6A65C)

   EndIf

Global $CHARACTER_WORLD_X = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_X", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_X", 0x00E57034)
	  $CHARACTER_WORLD_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_X", 0x00E57034)

   Else

	  $CHARACTER_WORLD_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_X", 0x00E57034)

   EndIf

Global $CHARACTER_X = 0

Global $CHARACTER_WORLD_Y = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_Y", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_Y", 0x00E57038)
	  $CHARACTER_WORLD_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_Y", 0x00E57038)

   Else

	  $CHARACTER_WORLD_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_WORLD_Y", 0x00E57038)

   EndIf

Global $CHARACTER_Y = 0

Global $INTERACTION_BASE_ADDRESS = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$INTERACTION_BASE_ADDRESS", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$INTERACTION_BASE_ADDRESS", 0x00BE3C0C)
	  $INTERACTION_BASE_ADDRESS = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$INTERACTION_BASE_ADDRESS", 0x00BE3C0C)

   Else

	  $INTERACTION_BASE_ADDRESS = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$INTERACTION_BASE_ADDRESS", 0x00BE3C0C)

   EndIf

Global $OFFSET_BATTLESTATE[4]
$OFFSET_BATTLESTATE[1] = 204 ;CC
$OFFSET_BATTLESTATE[2] = 44 ;2C
$OFFSET_BATTLESTATE[3] = 112 ;494

Global $OFFSET_UNIQUE_ATTACK_ID[2]
$OFFSET_UNIQUE_ATTACK_ID[1] = 240 ;F0

Global $OFFSET_ATTACKING_MODE[2]
$OFFSET_ATTACKING_MODE[1] = 40 ;28

Global $OFFSET_LAST_TARGET_UNIQUE_ID[2]
$OFFSET_LAST_TARGET_UNIQUE_ID[1] = 748 ;2ec

Global $OFFSET_SET_WALK_TO_LOOT_ID[4]
$OFFSET_SET_WALK_TO_LOOT_ID[1] = 204 ;CC
$OFFSET_SET_WALK_TO_LOOT_ID[2] = 44 ;2C
$OFFSET_SET_WALK_TO_LOOT_ID[3] = 1172 ;494

Global $OFFSET_ACTIVATE_WALK_TO_LOOT[4]
$OFFSET_ACTIVATE_WALK_TO_LOOT[1] = 204 ;CC
$OFFSET_ACTIVATE_WALK_TO_LOOT[2] = 44 ;2C
$OFFSET_ACTIVATE_WALK_TO_LOOT[3] = 1152 ;480


$WORLD_OBJECTS_ARRAY_BASE_ADDRESS = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$WORLD_OBJECTS_ARRAY_BASE_ADDRESS", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$WORLD_OBJECTS_ARRAY_BASE_ADDRESS", 0x00BE3E90)
	  $WORLD_OBJECTS_ARRAY_BASE_ADDRESS = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$WORLD_OBJECTS_ARRAY_BASE_ADDRESS", 0x00BE3E90)

   Else

	  $WORLD_OBJECTS_ARRAY_BASE_ADDRESS = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$WORLD_OBJECTS_ARRAY_BASE_ADDRESS", 0x00BE3E90)

   EndIf




Global $OFFSET_NPC_PLAYER_LOOT_UNIQUE_ID_LIST[4]
$OFFSET_NPC_PLAYER_LOOT_UNIQUE_ID_LIST[1] = 4 ;04
$OFFSET_NPC_PLAYER_LOOT_UNIQUE_ID_LIST[2] = 8 ;08
$OFFSET_NPC_PLAYER_LOOT_UNIQUE_ID_LIST[3] = 72 ;48


Global $OFFSET_NPC_PLAYER_LOOT_TYPE_ID_LIST[4]
$OFFSET_NPC_PLAYER_LOOT_TYPE_ID_LIST[1] = 4 ;04
$OFFSET_NPC_PLAYER_LOOT_TYPE_ID_LIST[2] = 8 ;08
$OFFSET_NPC_PLAYER_LOOT_TYPE_ID_LIST[3] = 72 ;48

Global $MOVE_EDIT_ASSEMBLY_X_LOCATION = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_X_LOCATION", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_X_LOCATION", 0x00874158)
	  $MOVE_EDIT_ASSEMBLY_X_LOCATION = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_X_LOCATION", 0x00874158)

   Else

	  $MOVE_EDIT_ASSEMBLY_X_LOCATION = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_X_LOCATION", 0x00874158)

   EndIf

Global $MOVE_EDIT_ASSEMBLY_Y_LOCATION = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_Y_LOCATION", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_Y_LOCATION", 0x0087415E)
	  $MOVE_EDIT_ASSEMBLY_Y_LOCATION = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_Y_LOCATION", 0x0087415E)

   Else

	  $MOVE_EDIT_ASSEMBLY_Y_LOCATION = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_EDIT_ASSEMBLY_Y_LOCATION", 0x0087415E)

   EndIf


Global $MOVE_WORLD_X = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_X", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_X", 0x00C00784)
	  $MOVE_WORLD_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_X", 0x00C00784)

   Else

	  $MOVE_WORLD_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_X", 0x00C00784)

   EndIf


Global $MOVE_WORLD_Y = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_Y", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_Y", 0x00C00788)
	  $MOVE_WORLD_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_Y", 0x00C00788)

   Else

	  $MOVE_WORLD_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_WORLD_Y", 0x00C00788)

   EndIf

Global $MOVE_INVALID_CHECK = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_INVALID_CHECK", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_INVALID_CHECK", 0x00C0078C)
	  $MOVE_INVALID_CHECK = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_INVALID_CHECK", 0x00C0078C)

   Else

	  $MOVE_INVALID_CHECK = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$MOVE_INVALID_CHECK", 0x00C0078C)

   EndIf

Global $SCREEN_SIZE_X = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_X", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_X", 0x00E6D94C)
	  $SCREEN_SIZE_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_X", 0x00E6D94C)

   Else

	  $SCREEN_SIZE_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_X", 0x00E6D94C)

   EndIf

Global $ClientScreenSizeX = 0

Global $SCREEN_SIZE_Y = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_Y", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_Y", 0x00E6D950)
	  $SCREEN_SIZE_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_Y", 0x00E6D950)

   Else

	  $SCREEN_SIZE_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_SIZE_Y", 0x00E6D950)

   EndIf

Global $ClientScreenSizeY = 0

Global $SCREEN_CURSOR_X = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_X", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_X", 0x00BD55F8)
	  $SCREEN_CURSOR_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_X", 0x00BD55F8)

   Else

	  $SCREEN_CURSOR_X = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_X", 0x00BD55F8)

   EndIf

Global $SCREEN_CURSOR_Y = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_Y", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_Y", 0x00BD55FC)
	  $SCREEN_CURSOR_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_Y", 0x00BD55FC)

   Else

	  $SCREEN_CURSOR_Y = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$SCREEN_CURSOR_Y", 0x00BD55FC)

   EndIf


Global $tempX = 0,$tempY = 0


Global  $movexycount = 0

Global $PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH", 0x00873866)
	  $PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH", 0x00873866)

   Else

	  $PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH", 0x00873866)

   EndIf

Global $PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2 = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2", 0x00875642)
	  $PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2 = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2", 0x00875642)

   Else

	  $PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2 = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2", 0x00875642)

   EndIf

Global $LAST_TARGET_ASSEMBLY_SWITCH = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$LAST_TARGET_ASSEMBLY_SWITCH", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$LAST_TARGET_ASSEMBLY_SWITCH", 0x0086FE3F)
	  $LAST_TARGET_ASSEMBLY_SWITCH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$LAST_TARGET_ASSEMBLY_SWITCH", 0x0086FE3F)

   Else

	  $LAST_TARGET_ASSEMBLY_SWITCH = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$LAST_TARGET_ASSEMBLY_SWITCH", 0x0086FE3F)

   EndIf


Global $TARGETS_ATTACKING_PLAYERS_UNIQUE_ID = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$TARGETS_ATTACKING_PLAYERS_UNIQUE_ID", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$TARGETS_ATTACKING_PLAYERS_UNIQUE_ID", 0x0051ED40)
	  $TARGETS_ATTACKING_PLAYERS_UNIQUE_ID = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$TARGETS_ATTACKING_PLAYERS_UNIQUE_ID", 0x0051ED40)

   Else

	  $TARGETS_ATTACKING_PLAYERS_UNIQUE_ID = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$TARGETS_ATTACKING_PLAYERS_UNIQUE_ID", 0x0051ED40)

   EndIf


Global $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[2]
$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1] = 0

local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID1", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID1", 0xFC)
	  $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1] = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID1", 0xFC)

   Else

	  $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1] = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID1", 0xFC)

   EndIf

Global $OFFSET_LAST_ATTAKING_TARGET_X[2]
$OFFSET_LAST_ATTAKING_TARGET_X[1] = 0

local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_X1", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_X1", 0x100)
	  $OFFSET_LAST_ATTAKING_TARGET_X[1] = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_X1", 0x100)

   Else

	  $OFFSET_LAST_ATTAKING_TARGET_X[1] = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_X1", 0x100)

   EndIf


Global $OFFSET_LAST_ATTAKING_TARGET_Y[2]
$OFFSET_LAST_ATTAKING_TARGET_Y[1] = 0

local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_Y1", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_Y1", 0xF8)
	  $OFFSET_LAST_ATTAKING_TARGET_Y[1] = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_Y1", 0xF8)

   Else

	  $OFFSET_LAST_ATTAKING_TARGET_Y[1] = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$OFFSET_LAST_ATTAKING_TARGET_Y1", 0xF8)

   EndIf




Global $CHARACTER_FARM_MAP = 0

	  local $testiniIni = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_FARM_MAP", 1)

   If $testiniIni = 1 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_FARM_MAP", 0x00BE3C10)
	  $CHARACTER_FARM_MAP = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_FARM_MAP", 0x00BE3C10)

   Else

	  $CHARACTER_FARM_MAP = IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "$CHARACTER_FARM_MAP", 0x00BE3C10)

   EndIf

Global $STAY_ON_MAP = ""

$default_browser_path = RegRead('HKCR\' & RegRead('HKCR\.html', '') & '\shell\open\command', '')
If StringLeft($default_browser_path, 1) = '"' Then
    $default_browser_path = StringRegExpReplace($default_browser_path, '\A"+|".*\z', '')
Else
    $default_browser_path = StringRegExpReplace($default_browser_path, '\A\s+|\s.*\z', '')
EndIf

Global $NAME = "MMOKORE"

Global $LAST_START_X = 0
Global $LAST_START_Y = 0

Global $SOFTWARE_TITLE = "MMOKORE"
If IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_MMOKORE_LAST_GUI_X, "") <> -32000 Then
	$LAST_START_X = IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_MMOKORE_LAST_GUI_X, "")
EndIf
If IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_MMOKORE_LAST_GUI_Y, "") <> -32000 Then
	$LAST_START_Y = IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_MMOKORE_LAST_GUI_Y, "")
EndIf

Global $CurrentAction = "Nothing"

$MMOASSIST = GUICreate($SOFTWARE_TITLE, 251, 601, $LAST_START_X, $LAST_START_Y)
GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "WindowCloseClicked")
TraySetIcon("MMOKORE.ico")
GUISetIcon("MMOKORE.ico")
$MenuItem1 = GUICtrlCreateMenu("&File")
$MenuItem4 = GUICtrlCreateMenuItem("Start", $MenuItem1)
GUICtrlSetOnEvent(-1, "StartOrStop")
$MenuItem5 = GUICtrlCreateMenuItem("Exit", $MenuItem1)
GUICtrlSetOnEvent(-1, "WindowCloseClicked")
$MenuItem2 = GUICtrlCreateMenu("&Options")
$MenuItem7 = GUICtrlCreateMenuItem("Skills", $MenuItem2)
GUICtrlSetOnEvent(-1, "SetSkills")
$MenuItem6 = GUICtrlCreateMenuItem("Buffs"&"-"&"coming soon", $MenuItem2)
GUICtrlSetOnEvent(-1, "SetAutoBuffs")
$MenuItem8 = GUICtrlCreateMenuItem("Life Support", $MenuItem2)
GUICtrlSetOnEvent(-1, "autopotionstart")
$MenuItem10 = GUICtrlCreateMenuItem("Pet Support"&"-"&"coming soon", $MenuItem2)
GUICtrlSetOnEvent(-1, "SetPetSupport")
$MenuItem9 = GUICtrlCreateMenuItem("Pathfinding"&"-"&"coming soon", $MenuItem2)
GUICtrlSetOnEvent(-1, "SetFlyEscape")
$MenuItem11 = GUICtrlCreateMenuItem("Rotate Weapons"&"-"&"coming soon", $MenuItem2)
GUICtrlSetOnEvent(-1, "SetChangeWeapons")
$MenuItem12 = GUICtrlCreateMenuItem("Target List", $MenuItem2)
GUICtrlSetOnEvent(-1, "Set_MobList")
$MenuItem12 = GUICtrlCreateMenuItem("Loot List", $MenuItem2)
GUICtrlSetOnEvent(-1, "Set_LooTList")
$MenuItem3 = GUICtrlCreateMenu("Help")
GUISetFont(8, 800, 0, "MS Sans Serif")
GUISetBkColor(0x000000)
Global $MenuItem13 = GUICtrlCreateMenuItem("Check EPvPers", $MenuItem3)
GUICtrlSetOnEvent(-1, "OnlineSupport")

$BotStatus = GUICtrlCreateGroup("MMOKORE Status", 0, 0, 250, 51, -1, $WS_EX_TRANSPARENT)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($BotStatus), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlCreateGroup("MMOKORE Status", -99, -99, 1, 1)
GUICtrlSetTip(-1, "MMOKORE Status")
$BUTTON_START = GUICtrlCreateButton("Start", 5, 15, 60, 30)
GUICtrlSetOnEvent(-1, "StartOrStop")
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBKColor(-1, 0x000000)
$LABEL_MMOASSIST_STATUS = GUICtrlCreateLabel("MMOKORE: Stopped", 75, 14, 155, 15)
GUICtrlSetColor(-1, 0xC0C0C0)
$LABEL_GENERAL_STATUS = GUICtrlCreateLabel("Action: Nothing", 75, 31, 200, 15)
GUICtrlSetColor(-1, 0xC0C0C0)

$CharInfo = GUICtrlCreateGroup("Character Info", 0, 51, 250, 132)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CharInfo), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x00FF00)
$LabeNAME = GUICtrlCreateLabel("Name:", 12, 67, 35, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_NAME = GUICtrlCreateLabel("None", 50, 67, 150, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelLVL = GUICtrlCreateLabel("Level:", 13, 81, 35, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_LVL = GUICtrlCreateLabel("0", 52, 81, 40, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelCLASS = GUICtrlCreateLabel("Class:", 98, 81, 34, 18)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_CLASS = GUICtrlCreateLabel("None", 134, 81, 110, 18)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelHP = GUICtrlCreateLabel("HP:", 9, 100, 22, 17)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($LabelHP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0x000000)
$Perc_HP = GUICtrlCreateProgress(32, 98, 120, 17, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Perc_HP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$Label_HP = GUICtrlCreateLabel("0/0", 32, 98, 120, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 7, 10000, 0, "Arial")
GUICtrlSetBkColor(-1, -2)
$LabelSP = GUICtrlCreateLabel("SP:", 8, 120, 23, 17)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($LabelSP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x3232FF)
GUICtrlSetBkColor(-1, 0x000000)
$Perc_SP = GUICtrlCreateProgress(32, 118, 120, 17, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Perc_SP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x3232FF)
GUICtrlSetBkColor(-1, 0x9999FF)
$Label_SP = GUICtrlCreateLabel("0/0", 32, 118, 120, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 7, 10000, 0, "Arial")
GUICtrlSetBkColor(-1, -2)
$LabelEXP = GUICtrlCreateLabel("Exp:", 5, 138, 25, 17)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($LabelEXP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x800080)
GUICtrlSetBkColor(-1, 0x000000)
$Perc_EXP = GUICtrlCreateProgress(32, 138, 120, 17, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Perc_EXP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0xFF00FF)
GUICtrlSetBkColor(-1, 0xD8A0CB)
$Label_EXP = GUICtrlCreateLabel("0/0", 32, 138, 120, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 7, 10000, 0, "Arial")
GUICtrlSetBkColor(-1, -2)
$LabelSTR = GUICtrlCreateLabel("Str:", 166, 97, 20, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_STR = GUICtrlCreateLabel("00", 186, 97, 60, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelDEX = GUICtrlCreateLabel("Dex:", 159, 113, 26, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_DEX = GUICtrlCreateLabel("00", 186, 113, 60, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelVIT = GUICtrlCreateLabel("Vit:", 167, 129, 19, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_VIT = GUICtrlCreateLabel("00", 186, 129, 60, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelMAG = GUICtrlCreateLabel("Mag:", 157, 145, 28, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_MAG = GUICtrlCreateLabel("00", 186, 145, 60, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelXY = GUICtrlCreateLabel("XY:", 5, 160, 26, 17, $SS_CENTERIMAGE)
GUICtrlSetColor(-1, 0xC0C0C0)

$Label_XY = GUICtrlCreateLabel("000 / 000", 31, 160, 125, 17, $SS_CENTERIMAGE)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabeSPIRIT = GUICtrlCreateLabel("Spirit:", 153, 160, 31, 18, $SS_CENTERIMAGE)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_SPIRIT = GUICtrlCreateLabel("0", 186, 160, 60, 18, $SS_CENTERIMAGE)
GUICtrlSetColor(-1, 0xC0C0C0)


$TarInfo = GUICtrlCreateGroup("Target Info", 0, 184, 250, 75)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($TarInfo), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x00FF00)
$LabelTARNAME = GUICtrlCreateLabel("Name:", 12, 200, 35, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_TARNAME = GUICtrlCreateLabel("None", 50, 200, 195, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelTARDIST = GUICtrlCreateLabel("Dist:", 22, 213, 35, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_TARDIST = GUICtrlCreateLabel("0", 52, 213, 40, 17)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelTARSPEC = GUICtrlCreateLabel("Spec:", 98, 213, 34, 18)
GUICtrlSetColor(-1, 0xC0C0C0)
$Label_TARSPEC = GUICtrlCreateLabel("None", 134, 213, 114, 18)
GUICtrlSetColor(-1, 0xC0C0C0)
$LabelTARHP = GUICtrlCreateLabel("HP:", 9, 232, 22, 17)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($LabelHP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0x000000)
$Perc_TARHP = GUICtrlCreateProgress(32, 231, 120, 17, $PBS_SMOOTH)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Perc_TARHP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0xFFB3B5)
$Label_TARHP = GUICtrlCreateLabel("0/0", 32, 231, 120, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 7, 10000, 0, "Arial")
GUICtrlSetBkColor(-1, -2)

$HuntOpts = GUICtrlCreateGroup("Hunting Options", 0, 263, 250, 80)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($HuntOpts), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x00FF00)
$CHK_ANTIKS = GUICtrlCreateCheckbox("AntiKS", 5, 278, 105, 20)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CHK_ANTIKS), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 15743782)
GUICtrlSetBkColor(-1, 0x000000)
	If IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_AKS_KEY, "0") = 1 Then
		GUICtrlSetState(-1, $GUI_CHECKED)
	Else
		GUICtrlSetState(-1, $GUI_UNCHECKED)
	EndIf
$CHK_HBN = GUICtrlCreateCheckbox("PvM Mode", 5, 298,105, 20)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CHK_HBN), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x3232FF)
GUICtrlSetBkColor(-1, 0x000000)
	If IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_HBID_KEY, "0") = 1 Then
		GUICtrlSetState(-1, $GUI_CHECKED)

	Else
		GUICtrlSetState(-1, $GUI_UNCHECKED)
	EndIf
$CHK_PVP = GUICtrlCreateCheckbox("PvP Mode", 5, 318, 105, 20)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CHK_PVP), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x800080)
GUICtrlSetBkColor(-1, 0x000000)
	If IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_PVP_KEY, "0") = 1 Then
		GUICtrlSetState(-1, $GUI_CHECKED)

	Else
		GUICtrlSetState(-1, $GUI_UNCHECKED)
	EndIf
$Tar_Rad = GUICtrlCreateGroup("Target Radius", 112, 271, 131, 65)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Tar_Rad), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0xFFFF00)
$BTN_SETRAD = GUICtrlCreateButton("Set", 203, 289, 35, 21, $WS_GROUP)
GUICtrlSetOnEvent(-1, "SETHOMEXYZ")
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBKColor(-1, 0x000000)
$INPT_RAD = GUICtrlCreateInput("", 166, 289, 33, 21)
	If IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_TOGGLEBOX_ATTACKRAD_KEY, "0") <> "0" Then
		GUICtrlSetData(-1, IniRead($SOFTWARE_CONFIG, $CFG_EXTRAS_ROOT_KEY, $CFG_EXTRAS_ATTACKRAD_KEY, "0"))
	Else
		GUICtrlSetData(-1, "0")
	EndIf
$LABEL_RADIUS = GUICtrlCreateLabel("Radius:", 118, 292, 47, 17)
GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xC0C0C0)
$LABEL_RADCENTER = GUICtrlCreateLabel("0 = No Limit", 114, 315, 127, 17, $SS_CENTER)
GUICtrlSetColor(-1, 0xC0C0C0)


$HISTORY = GUICtrlCreateGroup("Battle History", 0, 345, 250, 203)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($HISTORY), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0x00FF00)
$LOG = GUICtrlCreateEdit("", 5, 362, 240, 185, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN), 0)
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBkColor(-1, 0x000000)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($LOG), "wstr", 0, "wstr", 0)
GUISetState(@SW_SHOW)


$LabelGOLD = GUICtrlCreateLabel("Gold:", 5, 557, 29, 18, $SS_CENTERIMAGE)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($LabelGOLD), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0xFFFF00)
$Label_GOLD = GUICtrlCreateLabel("0", 37, 557, 70, 18, $SS_CENTERIMAGE)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Label_GOLD), "wstr", 0, "wstr", 0)
GUICtrlSetColor(-1, 0xFFFF00)

SelectProcessId()



While (1)
	Main()
 WEnd

Func Main()

If $STOP = False Then


	  If GUICtrlRead($LABEL_MMOASSIST_STATUS) <> "MMOASSIST: Started" Then


		 $STAY_ON_MAP = _MemoryRead($CHARACTER_FARM_MAP, $PROCESS_INFORMATION, 'char[29]')

		 $CHARACTER_ID = _MemoryRead($CHARACTER_UNIQUE_ID, $PROCESS_INFORMATION)

		 $ClientScreenSizeX = _MemoryRead( $SCREEN_SIZE_X, $PROCESS_INFORMATION)
		 $ClientScreenSizeY = _MemoryRead( $SCREEN_SIZE_Y, $PROCESS_INFORMATION)

		 $ClientScreenSizeX = $ClientScreenSizeX/2
		 $ClientScreenSizeY = $ClientScreenSizeY/2

		 _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION,$ClientScreenSizeX)
		 _MemoryWrite($SCREEN_CURSOR_Y , $PROCESS_INFORMATION,$ClientScreenSizeY)

		 $MaxHP = _MemoryRead(IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "MaxHPAddress", $CHARACTER_MAX_HEALTH), $PROCESS_INFORMATION)
		 $MaxSP = _MemoryRead(IniRead($SOFTWARE_CONFIG, $CFG_ADD_ROOT_KEY, "MaxSPAddress", $CHARACTER_MAX_SPELL_POWER), $PROCESS_INFORMATION)

		 IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "MaxHP", $MaxHP)
		 IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "MaxSP", $MaxSP)

		 GUICtrlSetData($LABEL_MMOASSIST_STATUS, "MMOASSIST: Started")
		 GUICtrlSetData($LABEL_GENERAL_STATUS, "Action: MMOKORE ON")
	  EndIf

	  UpdateGuiData()

	  CheckHP($HP,$MAXHP)
	  CheckSP($SP,$MAXSP)


If GUICtrlRead($CHK_PVP) = 1 Then


ScanWorld()


		 If $PLAYER_TIME_OUT < 20 Then

			$PLAYER_TIME_OUT = $PLAYER_TIME_OUT + 1

		 Else

			$PLAYER_TIME_OUT = 0
			$PLAYER_ON_SCREEN = 0

		 EndIF


If $LastTarget > 0  Then

Addhistory("Defending Self")
AttackID($LastTarget, 0)

		 local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

	  If $testbattlestate = 8 or $testbattlestate = 2 Then

		 $TARGET_TIME_OUT = 0

	  Else
			If $TARGET_TIME_OUT < 25 Then

			   $TARGET_TIME_OUT = $TARGET_TIME_OUT + 1

			Else
			   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ATTACKING_MODE, 0)
			   _MemoryWrite($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID + $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1], $PROCESS_INFORMATION, 0)

			   $TARGET_TIME_OUT = 0
			   $LastTarget = 0
			   $SKILL_COUNT = 1
			   $SKILL_TIMES = 0

			EndIf

	  EndIf

            _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 240)
			_MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2, $PROCESS_INFORMATION, 137, 'byte')
			_MemoryWrite($LAST_TARGET_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 137, 'byte')
			_MemoryWrite($MOVE_EDIT_ASSEMBLY_X_LOCATION, $PROCESS_INFORMATION, 137, 'byte')
			_MemoryWrite($MOVE_EDIT_ASSEMBLY_Y_LOCATION, $PROCESS_INFORMATION, 137, 'byte')

Return

EndIf

Else

If GUICtrlRead($CHK_HBN) = 1 Then


	  _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION,$ClientScreenSizeX)
      _MemoryWrite($SCREEN_CURSOR_Y ,$PROCESS_INFORMATION, $ClientScreenSizeY)


local $testmap = _MemoryRead($CHARACTER_FARM_MAP, $PROCESS_INFORMATION, 'char[29]')


If $testmap <> $STAY_ON_MAP Then

ScanWorld()

	  IF $CHECK_TYPE = 45 Then
		 Addhistory("Entering Portal")
		 AttackID($CHECK_ID,$CHECK_TYPE)
		 sleep(5000)
		 $LastTarget = 0
		 Return

	  Else

		 Return

	  EndIf

Else

	  If $LastTarget = 0 And $LOOT_ITEM = 0 Then

		 ScanWorld()

	 EndIf

EndIf


IF $LOOT_ITEM = 1 Then

   $i = 0
   Do


	  ScanWorld()

		 If $LOOT_ID > 0 Then
			Loot($LOOT_ID)
		 EndIf

   $i = $i + 1

		 If $LOOT_ON_LIST_CHECK  = 1 Then

			Loot($LOOT_ID)
			$LOOT_ON_LIST_CHECK = 0
			sleep(1000)
			$i = 0

		 Endif

   Until $i > 200 Or $STOP = True

$LOOT_ITEM = 0

EndIf

If $LastTarget > 0  Then

addhistory("Defending Self")

AttackID($LastTarget, 0)

	  local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

	  If $testbattlestate = 1 or $testbattlestate = 8 or $testbattlestate = 2 Then

		 $TARGET_TIME_OUT = 0

	  Else
			If $TARGET_TIME_OUT < 25 then

			   $TARGET_TIME_OUT = $TARGET_TIME_OUT + 1

			Else

			   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ATTACKING_MODE, 0)
			   _MemoryWrite(_MemoryRead($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID,$PROCESS_INFORMATION) + $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1], $PROCESS_INFORMATION, 1)
			   $TARGET_TIME_OUT = 0
			   $LastTarget = 0
			   $LOOT_ITEM = 1
			   $SKILL_COUNT = 1
			   $SKILL_TIMES = 0

			EndIf

	  EndIf

Return

EndIf


			   local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

			   If $testbattlestate > 0 Then

				  addhistory("NO Monster on screen moving")
				  Move($CHARACTER_X,$CHARACTER_Y)

			   Else

				  $movexycount = Random(1,8,1)
				  addhistory("NO Monster on screen moving")
				  Move($CHARACTER_X,$CHARACTER_Y)
				  sleep(10)
				  Return

			   EndIf

If GUICtrlRead($CHK_ANTIKS) = 1 Then

	  _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION,$ClientScreenSizeX)
      _MemoryWrite($SCREEN_CURSOR_Y ,$PROCESS_INFORMATION, $ClientScreenSizeY)

   local $testmap = _MemoryRead($CHARACTER_FARM_MAP, $PROCESS_INFORMATION, 'char[29]')

If $testmap <> $STAY_ON_MAP Then


	  ScanWorld()

	  IF $CHECK_TYPE = 45 Then

		 Addhistory("Entering Portal")
		 AttackID($CHECK_ID,$CHECK_TYPE)
		 sleep(5000)
		 $LastTarget = 0
		 Return

	  Else

		 Return

	  EndIf

Else

	  If $LastTarget = 0 And $LOOT_ITEM = 0 Then


		 ScanWorld()

	  EndIf

EndIf


IF $LOOT_ITEM = 1 Then

   $i = 0
   Do

	  addhistory("looting")

	  ScanWorld()

		If $LOOT_ID > 0 Then
			Loot($LOOT_ID)
		 EndIf

  $i = $i + 1

		 If $LOOT_ON_LIST_CHECK  = 1 Then

			Loot($LOOT_ID)
			$LOOT_ON_LIST_CHECK = 0
			addhistory("SLEEP ONE SECOND")
			sleep(1000)
			$i = 0

		 EndIf

   Until $i > 200 Or $STOP = True
$LOOT_ITEM = 0

EndIf


   If $LastTarget > 0  Then

   addhistory("Defending Self")
   AttackID($LastTarget, 0)

	  local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

	  If $testbattlestate = 1 Or $testbattlestate = 8 Or $testbattlestate = 2 Then

		 $TARGET_TIME_OUT = 0

	  Else
			If $TARGET_TIME_OUT < 25 Then

			   $TARGET_TIME_OUT = $TARGET_TIME_OUT + 1

			Else
			   sleep(10)
			   _MemoryWrite(_MemoryRead($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID,$PROCESS_INFORMATION) + $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1], $PROCESS_INFORMATION, 1)
			   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ATTACKING_MODE, 0)
			  ; _MemoryPointerWrite($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID, $PROCESS_INFORMATION, $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID, 0)
			   $TARGET_TIME_OUT = 0
			   $LastTarget = 0
			   $LOOT_ITEM = 1
			   $SKILL_COUNT = 1
			   $SKILL_TIMES = 0

			EndIf

	  EndIf

   Return

   EndIf


		 If $PLAYER_TIME_OUT < 20 Then

			$PLAYER_TIME_OUT = $PLAYER_TIME_OUT + 1

		 Else

			$PLAYER_TIME_OUT = 0
            $LastTarget = 0
			$PLAYER_ON_SCREEN = 0

		 EndIf

        If $PLAYER_ON_SCREEN = 1 And $LastTarget = 0 And $PORTAL_ON_SCREEN = 0 Then

			   local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

			If $testbattlestate > 0 Then

			   addhistory("player on screen moving")
			   Move($CHARACTER_X,$CHARACTER_Y)
			   sleep(100)
			   Return

			Else

			   $movexycount = Random(1,8,1)
			   addhistory("player on screen moving")
			   Move($CHARACTER_X,$CHARACTER_Y)
			   sleep(100)
			   Return

			EndIf

		 EndIf


			If  $PLAYER_ON_SCREEN = 0 Then

				  local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

			   If $testbattlestate > 0 Then

				  addhistory("NO Monster on screen moving")
				  Move($CHARACTER_X,$CHARACTER_Y)

			   Else

				  $movexycount = Random(1,8,1)
				  addhistory("NO Monster on screen moving")
				  Move($CHARACTER_X,$CHARACTER_Y)
				  sleep(10)
				  Return

			   EndIf

			EndIf

	  Else

	  EndIf

   Else



   EndIf

EndIf

Else


		 If GUICtrlRead($LABEL_MMOASSIST_STATUS) <> "MMOKORE: Stopped" Then

			GUICtrlSetData($LABEL_MMOASSIST_STATUS, "MMOKORE: Stopped")
			_MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 240)
			_MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2, $PROCESS_INFORMATION, 137, 'byte')
			_MemoryWrite($LAST_TARGET_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 137, 'byte')
			_MemoryWrite($MOVE_EDIT_ASSEMBLY_X_LOCATION, $PROCESS_INFORMATION, 137, 'byte')
			_MemoryWrite($MOVE_EDIT_ASSEMBLY_Y_LOCATION, $PROCESS_INFORMATION, 137, 'byte')

		 EndIf


		 If $hWnd > 0 Then

			UpdateGuiData()

			ScanWorld()
			local $selectedtarget = _MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0x2EC, $PROCESS_INFORMATION)

			If $selectedtarget = $CHECK_ID Then

			  Addhistory("Last Target Type"&"="&$CHECK_TYPE)
              Addhistory("Last Target Unique ID"&"="&$CHECK_ID)

			EndIf

		 Endif


Sleep(100)
EndIf

EndFunc		;==>

Func EnterPortal()

	  local $testmap = _MemoryRead($CHARACTER_FARM_MAP, $PROCESS_INFORMATION, 'char[29]')

   If $testmap <> $STAY_ON_MAP Then

	  _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION,$ClientScreenSizeX+$ClientScreenSizeX)
      _MemoryWrite($SCREEN_CURSOR_Y , $PROCESS_INFORMATION,0)
	  Addhistory("Entering Portal")
	  AttackID($CHECK_ID,$CHECK_TYPE)
	  sleep(5000)
	  $CHECK_ID = 0
	  $CHECK_TYPE = 0
	  $LastTarget = 0

   EndIf

EndFunc

Func TargetScan()

For $i = 0 to $TLISTCOUNT -1

  If $CHECK_TYPE = $TARGETLIST[$i] Then

	  If $LastTarget = 0 Then

		 $LastTarget = $CHECK_ID
		 Return

	  EndIf

	  If $i = $TLISTCOUNT   Then ExitLoop


   EndIf

Next

EndFunc

Func ScanWorld()

	  ;NOT IMPLEMENTED YET.
	  ;Gather each objects X/Y location and Unique ID/Type ID.
	  ;Save the base to an array to update if object is still on screen and its location.
	  ;local $templastobjectbase = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x10, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)
      ;local $templastobjectuniqueidcheck = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x10, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x8, $PROCESS_INFORMATION)+ 0x230, $PROCESS_INFORMATION)
	  ;local $templastobjecttypecheck = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x10, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x8, $PROCESS_INFORMATION)+ 0x234, $PROCESS_INFORMATION)
	  ;local $templastobjectxcheck = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x10, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x8, $PROCESS_INFORMATION)+ 0x138, $PROCESS_INFORMATION)
	  ;local $templastobjectycheck = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x10, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x8, $PROCESS_INFORMATION)+ 0x13C, $PROCESS_INFORMATION)


$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1]
$OFFSET_LAST_ATTAKING_TARGET_X[1]
$OFFSET_LAST_ATTAKING_TARGET_Y[1]


	  ;ID and X Y location of monsters attacking players.
	  ;All monsters that are attacking a players on screen.
	  local $tempobjectattackingplayeruniqueidcheck = _MemoryRead(_MemoryRead($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID, $PROCESS_INFORMATION)+ $OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID[1], $PROCESS_INFORMATION)
      local $tempobjectattackingplayerxcheck = _MemoryRead(_MemoryRead($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID, $PROCESS_INFORMATION)+ $OFFSET_LAST_ATTAKING_TARGET_X[1], $PROCESS_INFORMATION)
      local $tempobjectattackingplayerycheck = _MemoryRead(_MemoryRead($TARGETS_ATTACKING_PLAYERS_UNIQUE_ID, $PROCESS_INFORMATION)+ $OFFSET_LAST_ATTAKING_TARGET_Y[1], $PROCESS_INFORMATION)

	  ;ID/Type everything currently on screen
	  local $tempobjectuniqueidcheck = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($WORLD_OBJECTS_ARRAY_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x8, $PROCESS_INFORMATION)+ 0x48, $PROCESS_INFORMATION)
	  local $tempobjecttypecheck = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($WORLD_OBJECTS_ARRAY_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x8, $PROCESS_INFORMATION)+ 0x4C, $PROCESS_INFORMATION)


;Run if MMOKORE is off to display last hovered over object ID/TYPE in addhistory
   If $STOP = True Then

	  $CHECK_TYPE = $tempobjecttypecheck
	  $CHECK_ID = $tempobjectuniqueidcheck
	  return

   Endif

;Run if there is a monster attacking a player on screen
   If $tempobjecttypecheck = 45 And $STOP = FALSE And GUICtrlRead($CHK_PVP) = 4 Then

	  $CHECK_TYPE = $tempobjecttypecheck
	  $CHECK_ID = $tempobjectuniqueidcheck
	  return

   Else

   ;Do nothing keep scanning.

   EndIf

   ;If a monster is attacking a player withing your range kill it.
   If $tempobjectattackingplayeruniqueidcheck > 0 And $tempobjectattackingplayeruniqueidcheck < 100000 And $tempobjectattackingplayeruniqueidcheck > 1 And GUICtrlRead($CHK_PVP) = 4 Then

	  If $tempobjectattackingplayerxcheck < $CHARACTER_X + 3 And $tempobjectattackingplayerxcheck > $CHARACTER_X - 3 And $tempobjectattackingplayerycheck < $CHARACTER_Y + 3 And $tempobjectattackingplayerycheck > $CHARACTER_Y - 3 Then

		$LastTarget = $tempobjectattackingplayeruniqueidcheck
		Return

	 EndIf

  EndIf

;Check for loot if $LOOT_ITEM is 1
If $tempobjecttypecheck = 32001 And $STOP = False And GUICtrlRead($CHK_PVP) = 4  Then

   If $tempobjectuniqueidcheck < 4000  Then

   ElseIf $LOOT_ITEM = 1 Then

	  $LastTarget = 0
	  $LOOT_ID = $tempobjectuniqueidcheck
	  Return

   EndIf

Else ;$tempobjecttypecheck = 32001

   If $tempobjectuniqueidcheck > 1000000  Then

   ;ID is not a valid ID to check

   Else

	  If $tempobjectuniqueidcheck > 100000 Then

		 ;Found a player on screen.

			If $tempobjectuniqueidcheck = $CHARACTER_ID Then

			   ;Found Character ID do nothing keep scanning.

			Else

			;Found player on screen
			Addhistory("Found a player on screen!")

			   If GUICtrlRead($CHK_ANTIKS) = 1 Then

				  $PLAYER_TIME_OUT = 0
				  $PLAYER_ON_SCREEN = 1
				  Return

			   EndIf

			Endif

	  Else; if $tempobjectuniqueidcheck > 100000 Then

		 ;Found a target ID to check.

		 If $LastTarget = 0 And $PLAYER_ON_SCREEN = 0 And $LOOT_ITEM = 0 Then

			$CHECK_TYPE = $tempobjecttypecheck
			$CHECK_ID = $tempobjectuniqueidcheck
			TargetScan()

		 EndIf

	  EndIf

   EndIf  ; if $tempobjectuniqueidcheck < 10000000  Then

EndIf;loot endif


EndFunc

Func AttackID($CHECK_ID,$CHECK_TYPE)

local $testbattlestate = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC,$PROCESS_INFORMATION)+ 0x2C,$PROCESS_INFORMATION)+ 0x70,$PROCESS_INFORMATION)

If $testbattlestate = 8 Or $testbattlestate = 1 Then

   ;Still casting skill
   return

EndIf

;Attack portal if on wrong map.
If $CHECK_TYPE = 45 Then

   ;Clear Target entering portal.
   $LastTarget = 0

   _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION,$ClientScreenSizeX + $ClientScreenSizeX )
   _MemoryWrite($SCREEN_CURSOR_Y ,$PROCESS_INFORMATION, 0)
   _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 748)
   _MemoryWrite($LAST_TARGET_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 139, 'byte')
   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_UNIQUE_ATTACK_ID, $CHECK_ID)
   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_LAST_TARGET_UNIQUE_ID, $CHECK_ID)
   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ATTACKING_MODE, 1)

   ;Send mouse click.
   _SendMessage($hWnd, $WM_LBUTTONDOWN)
   sleep(10)
   _SendMessage($hWnd, $WM_LBUTTONUP)
   Return

EndIf

;If there is a target attack it.
If $LastTarget > 0  Then

     _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 748)
     _MemoryWrite($LAST_TARGET_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 139, 'byte')
     _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_UNIQUE_ATTACK_ID, $LastTarget)
     _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_LAST_TARGET_UNIQUE_ID, $LastTarget)
     _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ATTACKING_MODE, 1)

	  If $SKILL_COUNT > IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_UBOUND_KEY, 1) Then

		 $SKILL_COUNT = 1

	  Else

		 local $skilltimes = IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_TIMES_KEY & $SKILL_COUNT, "1")

		 If $skilltimes = 0 Then

			ControlSend($hWnd, "", "", IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY,$CFG_SKILL_COMBO_KEY & $SKILL_COUNT , "--"))

		 Else

			If $SKILL_TIMES >= $skilltimes  Then

			$SKILL_COUNT = $SKILL_COUNT + 1
			$SKILL_TIMES = 0
			Return

			Else

			   $SKILL_TIMES = $SKILL_TIMES + 1
			   ControlSend($hWnd, "", "", IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY,$CFG_SKILL_COMBO_KEY & $SKILL_COUNT , "--"))

			EndIf

		 EndIf

	  EndIf

   _SendMessage($hWnd, $WM_LBUTTONDOWN)
   sleep(10)
   _SendMessage($hWnd, $WM_LBUTTONUP)
  ; _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ATTACKING_MODE, 0)
   Return

EndIf


EndFunc

Func Loot($LOOT_ID)

   ;Set mouse to center of screen.
   _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION,$ClientScreenSizeX)
   _MemoryWrite($SCREEN_CURSOR_Y , $PROCESS_INFORMATION,$ClientScreenSizeY)

   ;Switch assebly so that when hovering over player loot Unique ID can be used to check loot name.
   _MemoryWrite($LAST_TARGET_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 139, 'byte')

   ;Change switch address back to normal so that an ID can be targeted.
   _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 0xF0)

   ;Set the loot Unique ID to check.
   _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_LAST_TARGET_UNIQUE_ID, $LOOT_ID)

   ;Sleep time for checking item name.
   sleep(5)

   local $temptext = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x2B4, $PROCESS_INFORMATION)+ 0x74, $PROCESS_INFORMATION)+ 0x0, $PROCESS_INFORMATION, 'char[29]')
   local $temptextfourbyte = _MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead(_MemoryRead($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION)+ 0xCC, $PROCESS_INFORMATION)+ 0x4, $PROCESS_INFORMATION)+ 0x2B4, $PROCESS_INFORMATION)+ 0x74, $PROCESS_INFORMATION)+ 0x0, $PROCESS_INFORMATION)
   local $temptextfourbyte2 = _MemoryRead($temptextfourbyte, $PROCESS_INFORMATION, 'char[29]')

For $i = 0 to $LLISTCOUNT -1

	  local $temptext2 = StringTrimRight($temptext, 7)
	  local $temptext3 = StringTrimRight($temptextfourbyte2, 7)

   If $temptext2 = $LOOTLIST[$i] Then

	  addhistory("looting")
	  addhistory($temptext2)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_LAST_TARGET_UNIQUE_ID, $LOOT_ID)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_UNIQUE_ATTACK_ID, $LOOT_ID)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_SET_WALK_TO_LOOT_ID, $LOOT_ID)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIVATE_WALK_TO_LOOT, 2)
	  $LOOT_ID = 0
	  $LOOT_ON_LIST_CHECK  = 1
	  _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 0x2EC)
	  sleep(10)

   ElseIF $temptext3 = $LOOTLIST[$i] Then

	  addhistory("looting")
	  addhistory($temptext3)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_LAST_TARGET_UNIQUE_ID, $LOOT_ID)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_UNIQUE_ATTACK_ID, $LOOT_ID)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_SET_WALK_TO_LOOT_ID, $LOOT_ID)
	  _MemoryPointerWrite($INTERACTION_BASE_ADDRESS, $PROCESS_INFORMATION, $OFFSET_ACTIVATE_WALK_TO_LOOT, 2)
	  $LOOT_ID = 0
	  $LOOT_ON_LIST_CHECK = 1
	  sleep(10)
	  _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 0x2EC)
   Else

   ;Not on loot list.

   Endif

	  If $i = $LLISTCOUNT Then ExitLoop

Next

EndFunc

Func Move($X,$Y)

   local $XRandom = $X
   local $YRandom = $Y

If $movexycount = 0 Then
   $movexycount = $movexycount +1

   ElseIf $movexycount = 1 Then

	  addhistory("moving left")
	  $XRandom = $X - 6
	  $YRandom = $Y
	  $tempX =  $ClientScreenSizeX - 20
	  $tempY = $ClientScreenSizeY


   ElseIf $movexycount = 2 Then
	  addhistory("Moving North Left")
	  $XRandom = $X - 6
	  $YRandom = $Y + 6
	  $tempX =  $ClientScreenSizeX - 20
	  $tempY = $ClientScreenSizeY + 20


   ElseIf $movexycount = 3 Then

	  addhistory("Moving North")
	  $XRandom = $X
	  $YRandom = $Y + 6
	  $tempX =  $ClientScreenSizeX
	  $tempY = $ClientScreenSizeY - 50

   ElseIf $movexycount = 4 Then

	  addhistory("Moving North Right")
	  $XRandom = $X + 6
	  $YRandom = $Y + 6
	  $tempX =  $ClientScreenSizeX + 50
	  $tempY = $ClientScreenSizeY - 50

   ElseIf $movexycount = 5 Then

	  addhistory("Moving Right")
	  $XRandom = $X + 6
	  $YRandom = $Y
	  $tempX =  $ClientScreenSizeX + 50
	  $tempY = $ClientScreenSizeY

   ElseIf $movexycount = 6 Then

	  addhistory("Moving South Right")
	  $XRandom = $X + 6
	  $YRandom = $Y - 6
	  $tempX =  $ClientScreenSizeX + 50
	  $tempY = $ClientScreenSizeY - 50

   ElseIf $movexycount = 6 Then

	  addhistory("Moving North")
	  $XRandom = $X
	  $YRandom = $Y - 6
	  $tempX =  $ClientScreenSizeX
	  $tempY = $ClientScreenSizeY - 50

   ElseIf $movexycount = 7 Then

	  addhistory("Moving South")
	  $XRandom = $X
	  $YRandom = $Y - 6
	  $tempX =  $ClientScreenSizeX
	  $tempY = $ClientScreenSizeY + 50

   ElseIf $movexycount = 8 Then
	  addhistory("Moving North Left")
	  $XRandom = $X - 6
	  $YRandom = $Y - 6
	  $tempX =  $ClientScreenSizeX -50
	  $tempY = $ClientScreenSizeY - 50

   EndIf

   _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH, $PROCESS_INFORMATION, 0x2EC)
   _MemoryWrite($PREVENT_TARGET_CHANGE_ASSEMBLY_SWITCH2, $PROCESS_INFORMATION, 139, 'byte')
   _MemoryWrite($MOVE_EDIT_ASSEMBLY_X_LOCATION, $PROCESS_INFORMATION, 139, 'byte')
   _MemoryWrite($MOVE_EDIT_ASSEMBLY_Y_LOCATION, $PROCESS_INFORMATION, 139, 'byte')

   _MemoryWrite($SCREEN_CURSOR_X, $PROCESS_INFORMATION, $tempX)
   _MemoryWrite($SCREEN_CURSOR_Y ,$PROCESS_INFORMATION, $tempY)

   sleep(10)

   _MemoryWrite($MOVE_WORLD_X, $PROCESS_INFORMATION, $XRandom)
   _MemoryWrite($MOVE_WORLD_Y, $PROCESS_INFORMATION, $YRandom)

   _SendMessage($hWnd, $WM_LBUTTONDOWN)
   sleep(10)
   _SendMessage($hWnd, $WM_LBUTTONUP)

  _MemoryWrite($MOVE_EDIT_ASSEMBLY_X_LOCATION, $PROCESS_INFORMATION, 137, 'byte')
   _MemoryWrite($MOVE_EDIT_ASSEMBLY_Y_LOCATION, $PROCESS_INFORMATION, 137, 'byte')

EndFunc



 Func AddHistory($TEXT)

	If _GUICtrlEdit_GetLineCount($LOG) > 14 Then

		GuiCtrlSetData($LOG, "")

	EndIf

	$OLDLOGS = guictrlread($LOG)
	GuiCtrlSetData($LOG, $TEXT & $OLDLOGS)

 EndFunc		;==>



 Func StartOrStop()

	If $STOP = True Then

		GUICtrlSetData($BUTTON_START, "Stop")
		GUICtrlSetOnEvent($BUTTON_START, "StartOrStop")
		GUICtrlSetData($MenuItem4, "Stop")
		GUICtrlSetOnEvent($MenuItem4, "StartOrStop")
		GuiCtrlSetData($LOG, "")
		AddHistory("[[[MMOKORE Started]]]")
		$STOP = False

	Else

		GUICtrlSetData($BUTTON_START, "Start")
		GUICtrlSetOnEvent($BUTTON_START, "StartOrStop")
		GUICtrlSetData($MenuItem4, "Start")
		GUICtrlSetOnEvent($MenuItem4, "StartOrStop")
		AddHistory("[[[MMOKORE Stopped]]]")
		$STOP = True

	EndIf

EndFunc		;==>StartOrStop

Func WindowCloseClicked()

	  local $softwarewinpos
   $softwarewinpos = WinGetPos($SOFTWARE_TITLE)

   If $softwarewinpos[0] <> 32000 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_MMOKORE_LAST_GUI_X, $softwarewinpos[0])

   EndIf

   If $softwarewinpos[1] <> 32000 Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_MMOKORE_LAST_GUI_Y, $softwarewinpos[1])

   EndIf

   Exit

EndFunc

 Func UpdateGuiData()


		 ;Set updated values
			  $HP = _MemoryRead($CHARACTER_CURRENT_HEALTH, $PROCESS_INFORMATION)
			  $MAXHP = _MemoryRead($CHARACTER_MAX_HEALTH, $PROCESS_INFORMATION)
		      $SP = _MemoryRead($CHARACTER_CURRENT_SPELL_POWER, $PROCESS_INFORMATION)
		      $MAXSP = _MemoryRead($CHARACTER_MAX_SPELL_POWER, $PROCESS_INFORMATION)
			  $CHARACTER_X = _MemoryRead($CHARACTER_WORLD_X, $PROCESS_INFORMATION)
		      $CHARACTER_Y = _MemoryRead($CHARACTER_WORLD_Y, $PROCESS_INFORMATION)
		 local  $LVL = _MemoryRead($CHARACTER_BASE_LEVEL, $PROCESS_INFORMATION)
		 local $NAME = _MemoryRead($CHARACTER_NAME, $PROCESS_INFORMATION, 'char[30]')
		 local $STR = _MemoryRead($CHARACTER_STR, $PROCESS_INFORMATION)
		 local $DEX = _MemoryRead($CHARACTER_DEX, $PROCESS_INFORMATION)
		 local $VIT = _MemoryRead($CHARACTER_VIT, $PROCESS_INFORMATION)
		 local $MAG = _MemoryRead($CHARACTER_INT, $PROCESS_INFORMATION)
		 local $SPIRIT = _MemoryRead($CHARACTER_LUK, $PROCESS_INFORMATION)
		 local $GOLD = _MemoryRead($CHARACTER_MAIN_CURRENCY, $PROCESS_INFORMATION)

   ;UPDATE GUI. Some may not be used yet.
   ;Check and set Anti Kill Steal toggle box.
   If GUICtrlRead($CHK_ANTIKS) <> IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_AKS_KEY, "0") Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_AKS_KEY, GUICtrlRead($CHK_ANTIKS))

   EndIf

   ;Check and set PvM toggle box.
   If GUICtrlRead($CHK_HBN) <> IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_HBID_KEY, "0") Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_HBID_KEY, GUICtrlRead($CHK_HBN))

   EndIf

    ;Check and set PvP toggle box.
   If GUICtrlRead($CHK_PVP) <> IniRead($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_PVP_KEY, "0") Then

	  IniWrite($SOFTWARE_CONFIG, $CFG_TOGGLEBOX_ROOT_KEY, $CFG_EXTRAS_PVP_KEY, GUICtrlRead($CHK_PVP))

   EndIf

   ;Character information GUI update.
   If GUICtrlRead($Label_NAME) <> $NAME Then

	  GUICtrlSetData($Label_NAME, $NAME)

   EndIf

   If GUICtrlRead($Label_LVL) <> $LVL Then

	  GUICtrlSetData($Label_LVL, $LVL)

   EndIf

   If GUICtrlRead($Perc_HP) <> $HP/$MAXHP * 100 Then

	  GUICtrlSetData($Perc_HP, $HP/$MAXHP * 100)
	  GUICtrlSetData($Label_HP, StrAddComma($HP) & "/" & StrAddComma($MAXHP))

   EndIf

   If GUICtrlRead($Perc_SP) <> $SP/$MAXSP * 100 Then

	  GUICtrlSetData($Perc_SP, $SP/$MAXSP * 100)
	  GUICtrlSetData($Label_SP, StrAddComma($SP) & "/" & StrAddComma($MAXSP))

   EndIf

   If GUICtrlRead($Label_LVL) = 0 Then

	  GUICtrlSetData($Label_LVL, $LVL)

   EndIf

   If GUICtrlRead($Label_NAME) = "" Then

   Else

	  GUICtrlSetData($Label_XY, " " & $CHARACTER_X & " " & "/" & " " & $CHARACTER_Y )

   EndIf

   If GUICtrlRead($Label_STR) <> $STR Then

	  GUICtrlSetData($Label_STR, $STR)

   EndIf

   If GUICtrlRead($Label_DEX) <> $DEX Then

		GUICtrlSetData($Label_DEX, $DEX)

   EndIf

   If GUICtrlRead($Label_VIT) <> $VIT Then

		GUICtrlSetData($Label_VIT, $VIT)

   EndIf

   If GUICtrlRead($Label_MAG) <> $MAG Then

	 GUICtrlSetData($Label_MAG, $MAG)

   EndIf

	If GUICtrlRead($Label_SPIRIT) <> $SPIRIT Then

		GUICtrlSetData($Label_SPIRIT, $SPIRIT)

	EndIf

	If GUICtrlRead($Label_GOLD) <> $GOLD Then

		GUICtrlSetData($Label_GOLD, $GOLD)

	EndIf


	;NOT IMPLEMENTED YET.
	;If Not $TAR Then
		;If GUICtrlRead($label_TarNAME) <> "None" Then
		;	GUICtrlSetData($Label_TarNAME, "None")
		;EndIf
		;If $MOVEING = 1 Then
		;	$LASTTARDIS =  GetDistance(($X + 4000) / 10, ($Y + 5500) / 10, $LASTTARX[1], $LASTTARY[1]) ;($X + 4000) / 10 & "/" & ($Y + 5500) / 10 & "/" & $Z / 10
		;	GUICtrlSetData($Label_TarDIST, $LASTTARDIS & "m")
		;Else
		;	GUICtrlSetData($Label_TarDIST, "0m")
		;EndIf
		;If IniRead($SOFTWARE_CONFIG, $CFG_EXTRAS_ROOT_KEY, $CFG_EXTRAS_ATTACKRAD_KEY, "0") = 0 Then
		;	GUICtrlSetData($LABEL_RADCENTER, "Infinite Radius")
		;Else
		;	GUICtrlSetData($LABEL_RADCENTER, "Hunt By Radius ON")
		;EndIf
		;If GUICtrlRead($Label_TarSPEC) <> "None" Then
		;	GUICtrlSetData($Label_TarSPEC, "None")
		;EndIf
		;If GUICtrlRead($Perc_TarHP) <> "0" Then
		;	GUICtrlSetData($Perc_TarHP, "0")
		;EndIf
	  ;   If GUICtrlRead($Label_TarHP) <> "0/0" Then
		;	GUICtrlSetData($Label_TarHP, "0/0")
		;EndIf
	;Else
		;If GUICtrlRead($label_TarNAME) <> $TARNAME & " [" & $TARLVL & "]" Then
			GUICtrlSetData($Label_TarNAME, " " & $LastTarget )
		;EndIf
		;If IniRead($SOFTWARE_CONFIG, $CFG_EXTRAS_ROOT_KEY, $CFG_EXTRAS_ATTACKRAD_KEY, "0") = 0 Then
		;	If GUICtrlRead($Label_TarDIST) <> $TARDIS Then
		;		GUICtrlSetData($Label_TarDIST, $TARDIS & "m")
		;	EndIf
		;Else
			;If GUICtrlRead($LABEL_TARDIST) <> $TARDIS & "m" Then
			;	If IniRead($SOFTWARE_CONFIG, $CFG_EXTRAS_ROOT_KEY, $CFG_EXTRAS_ATTACKRAD_KEY, "0") = 0 Then
			;		GUICtrlSetData($LABEL_RADCENTER, "0 = No Limit")
			;	Else
			;		GUICtrlSetData($LABEL_RADCENTER, "Dist: " & $TARHOMEDIS & "m")
			;	EndIf
			;	GUICtrlSetData($Label_TarDIST, $TARDIS & "m")
			;EndIf
		;EndIf
		;If GUICtrlRead($Label_TarSPEC) <> $TARSPEC Then
		;	GUICtrlSetData($Label_TarSPEC, $TARSPEC)
		;EndIf
		;If GUICtrlRead($Label_TarHP) <> StrAddComma($TARHP) & "/" & StrAddComma($TARMAXHP) Then
		;	GUICtrlSetData($Perc_TarHP, $TARHP/$TARMAXHP * 100)
		;	GUICtrlSetData($Label_TarHP, StrAddComma($TARHP) & "/" & StrAddComma($TARMAXHP))
		;EndIf
	;EndIf
 EndFunc

Func StrAddComma($sStr, $sSeperator = -1, $sEnd = -1)

	If $sSeperator = -1 Or $sSeperator = Default Then $sSeperator = ','
    If $sEnd = -1 Or $sEnd = Default Then $sEnd = '.'

	  local $aNum = StringSplit($sStr, $sEnd), $nHold, $aSRE, $fUB, $iAdd

	If UBound($aNum) > 2 Then

		$aSRE = StringRegExp($aNum[1], '(\d+)(\d{3})', 3)
        $fUB = True

	Else

		$aSRE = StringRegExp($sStr, '(\d+)(\d{3})', 3)

	EndIf

   If UBound($aSRE) = 2 Then

		While IsArray($aSRE)

			$nHold = $sSeperator & $aSRE[1] & $nHold
            $aSRE = StringRegExp($aSRE[0], '(\d+)(\d{3})', 3)
            $iAdd += 1

		WEnd

	EndIf

	If $fUB And $nHold Then

		Return SetError(0, 0, StringTrimRight($sStr, ($iAdd + 1) * 3) & $nHold & $sEnd & $aNum[2])

	ElseIf $nHold Then

		Return SetError(0, 0, StringTrimRight($sStr, $iAdd * 3) & $nHold)

	EndIf

	Return SetError(1, 0, $sStr)

EndFunc

Func autopotionstart()

If $AutoPotionGuiFlag = 0 Then

   Global $FORM_LIFESUPPORT = GUICreate("Life Support", 445, 140, -1, -1, -1, -1, $MMOASSIST)
   GUISetOnEvent($GUI_EVENT_CLOSE, "WindowLifeSupportCloseClicked")
   GUISwitch($FORM_LIFESUPPORT)
   GUISetBkColor(0x000000)

   Global $GROUP_AUTOPOT = GUICtrlCreateGroup("Automatic Pot", 0, 0, 445, 135)
   GUICtrlSetColor(-1, 0x00FF00)
   GUICtrlSetBkColor(-1, 0x000000)
   GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
   DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($GROUP_AUTOPOT), "wstr", 0, "wstr", 0)
   GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")

   ;Auto-Pot HP1
   Global $CHECK_AUTOPOT_FLAG_HP1 = GUICtrlCreateCheckbox("Auto-Pot HP", 5, 15, 90, 20)
   DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CHECK_AUTOPOT_FLAG_HP1), "wstr", 0, "wstr", 0)
   GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
   GUICtrlSetColor(-1, 0xFF0000)
   GUICtrlSetBkColor(-1, 0x000000)

   If IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1CheckBox", "4") = 1 Then

	  GUICtrlSetState(-1, $GUI_CHECKED)

   Else

	  GUICtrlSetState(-1, $GUI_UNCHECKED)

   EndIf

   Global $SLIDE_AUTOPOT_HP1 = GUICtrlCreateSlider(5, 40, 100, 20)
   GUICtrlSetData(-1,IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1Slider", "100"))
   GUICtrlSetBkColor(-1, 0x000000)
   GUICtrlSetLimit(-1, 100, 0)
   GUICtrlCreateLabel("0           50        100% HP", 10, 65, 120, 20)
   GUICtrlSetColor(-1, 0xC0C0C0)
   GUICtrlCreateLabel("Key:", 5, 90, 50, 20)
   GUICtrlSetColor(-1, 0xC0C0C0)

   Global $AUTOPOT_HP1_KEY = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1Key", "--"), 30, 90, 45, 20)
   GUICtrlSetData(-1, $KEYCODE , IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1Key", "--"))

   ;Auto-Pot HP2
   Global $CHECK_AUTOPOT_FLAG_HP2 = GUICtrlCreateCheckbox("Auto-HP 2", 140, 15, 90, 20) ;+145
   DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CHECK_AUTOPOT_FLAG_HP2), "wstr", 0, "wstr", 0)
   GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
   GUICtrlSetColor(-1, 0x00FF00)
   GUICtrlSetBkColor(-1, 0x000000)

   If IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2CheckBox", "0") = 1 Then
	  GUICtrlSetState(-1, $GUI_CHECKED)
   Else
	  GUICtrlSetState(-1, $GUI_UNCHECKED)
   EndIf
   Global $SLIDE_AUTOPOT_HP2 = GUICtrlCreateSlider(140, 40, 100, 20)
   GUICtrlSetData(-1, IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Slider", "0"))
   GUICtrlSetBkColor(-1, 0x000000)
   GUICtrlSetLimit(-1, 100, 0)
   GUICtrlCreateLabel("0           50        100% HP", 145, 65, 120, 20)
   GUICtrlSetColor(-1, 0xC0C0C0)
   GUICtrlCreateLabel("Key:", 140, 90, 50, 20)
   GUICtrlSetColor(-1, 0xC0C0C0)
   Global $AUTOPOT_HP2_KEY = GUICtrlCreateCombo(IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Key", "--"), 165, 90, 45, 20)
   GUICtrlSetData(-1, $KEYCODE, IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Key", "0"))
   ;Auto-Pot SP
   Global $CHECK_AUTOPOT_FLAG_SP = GUICtrlCreateCheckbox("Auto-Pot SP", 275, 15, 90, 20)
   DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($CHECK_AUTOPOT_FLAG_SP), "wstr", 0, "wstr", 0)
   GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
   GUICtrlSetColor(-1, 0x0000FF)
   GUICtrlSetBkColor(-1, 0x000000)
   If IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPCheckBox", "4") = 1 Then
	   GUICtrlSetState(-1, $GUI_CHECKED)
   Else
		GUICtrlSetState(-1, $GUI_UNCHECKED)
   EndIf
   Global $SLIDE_AUTOPOT_SP = GUICtrlCreateSlider(275, 40, 100, 20)
   GUICtrlSetData(-1, IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPSlider", "50"))
   GUICtrlSetBkColor(-1, 0x000000)
   GUICtrlSetLimit(-1, 100, 0)
   GUICtrlCreateLabel("0           50        100% SP", 280, 65, 120, 20)
   GUICtrlSetColor(-1, 0xC0C0C0)
   GUICtrlCreateLabel("Key:", 275, 90, 50, 20)
   GUICtrlSetColor(-1, 0xC0C0C0)
   Global $AUTOPOT_SP_KEY = GUICtrlCreateCombo( IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPKey", "--"), 300, 90, 45, 20)
   GUICtrlSetData(-1, $KEYCODE, IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPKey", "--"))
   $AutoPotionGuiFlag = 1
   GUISetState(@SW_SHOW, $FORM_LIFESUPPORT)
   Else
EndIf
EndFunc

Func WindowLifeSupportCloseClicked()
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1CheckBox", GUICtrlRead($CHECK_AUTOPOT_FLAG_HP1))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1Slider", GUICtrlRead($SLIDE_AUTOPOT_HP1))
   IniWrite($SOFTWARE_CONFIG, $CFG_AutoPotion_ROOT_KEY, "AutoPotionHP1Key", GUICtrlRead($AUTOPOT_HP1_KEY))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2CheckBox", GUICtrlRead($CHECK_AUTOPOT_FLAG_HP2))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Slider", GUICtrlRead($SLIDE_AUTOPOT_HP2))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Key", GUICtrlRead($AUTOPOT_HP2_KEY))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPCheckBox", GUICtrlRead($CHECK_AUTOPOT_FLAG_SP))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPSlider", GUICtrlRead($SLIDE_AUTOPOT_SP))
   IniWrite($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPKey", GUICtrlRead($AUTOPOT_SP_KEY))
   $AutoPotionGuiFlag = 0
   GUIDelete($FORM_LIFESUPPORT)
EndFunc

Func CheckHP($HP,$MAXHP)
	  local $CurrentHP = $HP
	  local $UseHPPotionCheck = $CurrentHP/$MAXHP * 100
   If $UseHPPotionCheck < IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Slider", 1) And IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2CheckBox", 4) = 1 Then
	  ControlSend($hWnd, "", "", IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP2Key", "--"))
	  $TestHP = 1
   ElseIf $UseHPPotionCheck < IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1Slider", 1) And IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1CheckBox", 4) = 1 Then
	  ControlSend($hWnd, "", "", IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionHP1Key", "--"))
	  $TestHP = 1
   Else
	  $TestHP = 0
   EndIf
EndFunc

Func CheckSP($SP, $MAXSP)
	  local $CurrentSP = $SP
   If $CurrentSP = 0 Then
   ;do nothing sp potions on cool down
    Else
		 local $UseSPPotionCheck = $CurrentSP/$MAXSP * 100
	  If $UseSPPotionCheck < IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPSlider", 1) And IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPCheckBox", 4) = 1 Then
		 ControlSend($hWnd, "", "", IniRead($SOFTWARE_CONFIG, $CFG_AUTOPOTION_ROOT_KEY, "AutoPotionSPKey", "--"))
	  EndIf
   EndIf
EndFunc

Func Set_MobList()
   If $MobListFormOpen = 1 Then
	  GUIDelete($FORM_MOBLIST)
   EndIf
   sleep(10)
   $MobListFormOpen = 1
		 local $iniread = IniRead($SOFTWARE_CONFIG, "Target List", "Count", "0")
   If $iniread = 0 Then
	  IniWrite($SOFTWARE_CONFIG, "Target List", "Target0", "No target set.")
	  IniWrite($SOFTWARE_CONFIG, "Target List", "Count", "0")
   Else
	  $COUNT = 0
	  $TLISTCOUNT = IniRead($SOFTWARE_CONFIG, "Target List", "Count", "0")
	  Do
		 $TARGETLIST[$COUNT] = IniRead($SOFTWARE_CONFIG, "Target List", "Target"&$COUNT, "No target set.")
		 $COUNT = $COUNT + 1
		 sleep(10)
	  Until $COUNT = $TLISTCOUNT or $TLISTCOUNT = 0
   EndIf
	Global $FORM_MOBLIST = GUICreate("Target List", 260, 200, -1, -1, -1, -1, $MMOASSIST)
	GUISetBkColor(0x000000)
	Global $MobMenuItem1 = GUICtrlCreateMenu("&File")
	Global $MobMenuItem4 = GUICtrlCreateMenuItem("Exit", $MobMenuItem1)
	GUICtrlSetOnEvent(-1, "WindowMobListCloseClicked")
	Global $MobMenuItem2 = GUICtrlCreateMenu("&Options")
	Global $MobMenuItem5 = GUICtrlCreateMenuItem("Add To List", $MobMenuItem2)
	GUICtrlSetOnEvent(-1, "SetMobList")
	Global $MobMenuItem6 = GUICtrlCreateMenuItem("Reset List", $MobMenuItem2)
	GUICtrlSetOnEvent(-1, "ResetMobList")
	GUISetOnEvent($GUI_EVENT_CLOSE, "WindowMobListCloseClicked")
	GUISwitch($FORM_MOBLIST)
	Global $LABEL_LIST_MOB = GUICtrlCreateLabel("Current Target List (Max: 100)", 5, 5, 250, 20)
		GUICtrlSetColor(-1, 0xC0C0C0)
	GUICtrlSetColor(-1, 0x00FF00)
	Global $LIST_MOB = GUICtrlCreateListView("#|ID", 5, 0, 220, 190)
	sleep(10)
	  $COUNT = 0
	  Do
		 GUICtrlCreateListViewItem($COUNT & ")|" & $TARGETLIST[$COUNT], $LIST_MOB)
		 $COUNT = $COUNT + 1
		 sleep(10)
	  Until $COUNT = $TLISTCOUNT or $TLISTCOUNT = 0
GUISetState(@SW_SHOW, $FORM_MOBLIST)
EndFunc

Func ResetMobList()
Dim $TARGETLIST[100]
   $COUNT = 0
   $TLISTCOUNT = IniRead($SOFTWARE_CONFIG, "Target List", "Count", "0")
   Do
	  $TARGETLIST[$COUNT] = IniDelete($SOFTWARE_CONFIG, "Target List", "Target"&$COUNT)
	  $COUNT = $COUNT + 1
	  sleep(10)
   Until $COUNT = $TLISTCOUNT or $TLISTCOUNT = 0
   IniWrite($SOFTWARE_CONFIG, "Target List", "Count", "0")
   $TARGETLIST[0] = "no targets added yet"
   $TLISTCOUNT = 0
   Set_MobList()
   MsgBox(0, "List Reset", "The List Was Reset!")
EndFunc


Func RefreshMobList()
   Set_MobList()
EndFunc


Func SetMobList()
   Global $Form1AT = GUICreate("ENTER A UNIQUE ID/TYPE ID", 251, 161, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX))
   Global $label1 = GUICtrlCreateLabel("Enter a unique ID for players/type ID for monsters", 10, 10)
   Global $Input1AT = GUICtrlCreateInput("", 24, 96, 201, 21)
   GUICtrlSetLimit(-1, 30)
   Global $Button1AT = GUICtrlCreateButton("OK", 24, 128, 75, 25)
   GUICtrlSetOnEvent(-1, "OKButton")
   Global $Button2AT = GUICtrlCreateButton("Cancel", 152, 130, 75, 25)
   GUICtrlSetOnEvent(-1, "CANCELButton")
   GUISetState(@SW_SHOW)
EndFunc


Func OKButton()
   local $checkempty =  GUICtrlRead($Input1AT)
If $checkempty = "" Then
   GUIDelete($Form1AT)
Else
   $TARGETLIST[$TLISTCOUNT] = $checkempty
   local $inikey = "Target List"
   IniWrite($SOFTWARE_CONFIG, $inikey, "Target"&$TLISTCOUNT, $TARGETLIST[$TLISTCOUNT])
   $TLISTCOUNT = $TLISTCOUNT + 1
   IniWrite($SOFTWARE_CONFIG, $inikey, "Count", $TLISTCOUNT)
   RefreshMobList()
   addhistory($checkempty)
GUIDelete($Form1AT)
EndIf
EndFunc

Func CANCELButton()
 GUIDelete($Form1AT)
EndFunc

Func CLOSEClicked()
   GUIDelete($Form1AT)
EndFunc

func WindowMobListCloseClicked()
   GUIDelete($FORM_MOBLIST)
EndFunc

Func Set_LootList()
   If $LootListFormOpen = 1 Then
	  GUIDelete($FORM_LOOTLIST)
   EndIf
   sleep(10)
   $LootListFormOpen = 1
	  local $iniread = IniRead($SOFTWARE_CONFIG, "Loot List", "Count", "0")
   If $iniread = 0 Then
	  IniWrite($SOFTWARE_CONFIG, "Loot List", "Loot0", "No loot set.")
	  IniWrite($SOFTWARE_CONFIG, "Loot List", "Count", "0")
   Else
	  $COUNT = 0
	  $LLISTCOUNT = IniRead($SOFTWARE_CONFIG, "Loot List", "Count", "0")
	  Do
		 $LOOTLIST[$COUNT] = IniRead($SOFTWARE_CONFIG, "Loot List", "Loot"&$COUNT, "No target set.")
		 $LOOTLISTTEXTCOUNT[$COUNT] = IniRead($SOFTWARE_CONFIG, "Loot List", "LootTextCount"&$COUNT, "No target set.")
		 $COUNT = $COUNT + 1
		 sleep(10)
	  Until $COUNT = $LLISTCOUNT or $LLISTCOUNT = 0
   EndIf
	Global $FORM_LOOTLIST = GUICreate("Loot List", 260, 200, -1, -1, -1, -1, $MMOASSIST)
	GUISetBkColor(0x000000)
	Global $MobMenuItem1 = GUICtrlCreateMenu("&File")
	Global $MobMenuItem4 = GUICtrlCreateMenuItem("Exit", $MobMenuItem1)
	GUICtrlSetOnEvent(-1, "WindowLootListCloseClicked")
	Global $MobMenuItem2 = GUICtrlCreateMenu("&Options")
	Global $MobMenuItem5 = GUICtrlCreateMenuItem("Add To List", $MobMenuItem2)
	GUICtrlSetOnEvent(-1, "SetLootList")
	Global $MobMenuItem6 = GUICtrlCreateMenuItem("Reset List", $MobMenuItem2)
	GUICtrlSetOnEvent(-1, "ResetLootList")
	GUISetOnEvent($GUI_EVENT_CLOSE, "WindowLootListCloseClicked")
	GUISwitch($FORM_LOOTLIST)
	Global $LABEL_LIST_LOOT = GUICtrlCreateLabel("Current Target List (Max: 100)", 5, 5, 250, 20)
		GUICtrlSetColor(-1, 0xC0C0C0)
	GUICtrlSetColor(-1, 0x00FF00)
	Global $LIST_LOOT = GUICtrlCreateListView("#|ID", 5, 0, 220, 190)
	sleep(10)
	  $COUNT = 0
	  Do
		 GUICtrlCreateListViewItem($COUNT & ")|" & $LOOTLIST[$COUNT], $LIST_LOOT)
		 $COUNT = $COUNT + 1
		 sleep(10)
	  Until $COUNT = $LLISTCOUNT or $LLISTCOUNT = 0
GUISetState(@SW_SHOW, $FORM_LOOTLIST)
EndFunc

Func ResetLootList()
Dim $LOOTLIST[100]
Dim $LOOTLISTTEXTCOUNT[100]
$COUNT = 0
$LLISTCOUNT = IniRead($SOFTWARE_CONFIG, "Loot List", "Count", "0")
Do
   $LOOTLIST[$COUNT] = IniDelete($SOFTWARE_CONFIG, "Loot List", "Loot"&$COUNT)
   $LOOTLISTTEXTCOUNT[$COUNT] = IniDelete($SOFTWARE_CONFIG, "Loot List", "LootTextCount"&$COUNT)
   $COUNT = $COUNT + 1
   sleep(10)
Until $COUNT = $LLISTCOUNT or $LLISTCOUNT = 0
   IniWrite($SOFTWARE_CONFIG, "Loot List", "Count", "no loot added yet")
   $LOOTLIST[0] = "no loot added yet"
   $LLISTCOUNT = 0
   Set_LootList()
   MsgBox(0, "List Reset", "The List Was Reset!")
EndFunc


Func RefreshLootList()
   Set_LootList()
EndFunc


Func SetLootList()
   Global $Form1AT = GUICreate("ENTER A LOOT ITEM NAME.", 251, 161, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX))
   Global $label1 = GUICtrlCreateLabel("Spell the EXACT name of the item to pickup", 10, 10)
   Global $Input1AT = GUICtrlCreateInput("", 24, 96, 201, 21)
   GUICtrlSetLimit(-1, 30)
   Global $Button1AT = GUICtrlCreateButton("OK", 24, 128, 75, 25)
   GUICtrlSetOnEvent(-1, "LootOKButton")
   Global $Button2AT = GUICtrlCreateButton("Cancel", 152, 130, 75, 25)
   GUICtrlSetOnEvent(-1, "LootCANCELButton")
   GUISetState(@SW_SHOW)
EndFunc

Func LootOKButton()
	  local $checkempty =  GUICtrlRead($Input1AT)
   If $checkempty = "" Then
	  GUIDelete($Form1AT)
   Else
	  $LOOTLIST[$LLISTCOUNT] = $checkempty
	  IniWrite($SOFTWARE_CONFIG, "Loot List", "Loot"&$LLISTCOUNT, $LOOTLIST[$LLISTCOUNT])
	  IniWrite($SOFTWARE_CONFIG, "Loot List", "LootTextCount"&$LLISTCOUNT, StringLen($checkempty))
	  $LLISTCOUNT = $LLISTCOUNT + 1
	  IniWrite($SOFTWARE_CONFIG, "Loot List", "Count", $LLISTCOUNT)
	  RefreshLootList()
	  GUIDelete($Form1AT)
   EndIf
EndFunc

Func LootCANCELButton()
   GUIDelete($Form1AT)
EndFunc

Func LootCLOSEClicked()
 GUIDelete($Form1AT)
EndFunc

Func WindowLootListCloseClicked()
   GUIDelete($FORM_LOOTLIST)
EndFunc

Func SelectProcessId()
  Global $listview
  $listGUI = GUICreate("Select a client from the list. ", 400, 200, 100, 200, -1)
  GUISetOnEvent($GUI_EVENT_CLOSE, "On_Close_Main")
  $listview = GUICtrlCreateListView("Processes", 10, 10, 200, 150)
  _GUICtrlListView_SetColumnWidth($listview, 0, 150)
  Global $PList = ProcessList ( "Ragexe.exe" )
  local $PListCount = UBound($PList, $UBOUND_ROWS)
;check if a client is running
If $PList[0][0] = 0 Then
   MsgBox($MB_SYSTEMMODAL, "No Client", "Please run the game first.", 10)
   Exit
Else
   For $i = 1 To $PList[0][0]
	  local $Pid = $PList[$i][1]
	  GUICtrlCreateListViewItem($Pid, $listview)
   Next
   $BtnSelect = GUICtrlCreateButton("Select", 100, 165, 80, 30)
   GUICtrlSetOnEvent(-1, "SelectItem")
   GUISetState()
EndIf
EndFunc

Func SelectItem()
   $sItem = GUICtrlRead(GUICtrlRead($listview))
   Global $sItem = 0
   $sItem = StringTrimRight($sItem, 1) ; Will remove the pipe "|" from the end of the string
   _GetHwndFromPID($sItem)
   Global $PROCESS_INFORMATION = _MemoryOpen($sItem)
   $NAME = $sItem
   If GUICtrlRead($Label_NAME) <> $NAME Then
	 GUICtrlSetData($Label_NAME, $NAME)
  EndIf
GUIDelete()
EndFunc

Func _GetHwndFromPID($PID)
   $hWnd = 0
   $stPID = DllStructCreate("int")
   Do
	  $winlist2 = WinList()
	  For $i = 1 To $winlist2[0][0]
		 If $winlist2[$i][0] <> "" Then
			DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $winlist2[$i][1], "ptr", DllStructGetPtr($stPID))
			If DllStructGetData($stPID, 1) = $PID Then
			   $hWnd = $winlist2[$i][1]
			   ExitLoop
			EndIf
		 EndIf
	  Next
	  Sleep(100)
   Until $hWnd <> 0
Return $hWnd
EndFunc

 Func SetSkills()
   If $SKILLLISTFORMOPEN = 1 Then
	  GUIDelete($FORM_SKILL)
   EndIf
   sleep(10)
   $SKILLLISTFORMOPEN = 1
   Global $FORM_SKILL = GUICreate("Skills", 250, 400, -1, -1, -1, -1, $MMOASSIST)
   GUISetOnEvent($GUI_EVENT_CLOSE, "WindowSkillCloseClicked")
   GUISwitch($FORM_SKILL)
   GUISetBkColor(0x000000)
   GUISetFont(9, 800, 0, "MS Sans Serif")
   Global $HISTORY = GUICtrlCreateGroup("Skill List", 0, 0, 250, 399)
   GUICtrlSetColor(-1, 0x00FF00)
   GUICtrlSetBkColor(-1, 0x000000)
   DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($HISTORY), "wstr", 0, "wstr", 0)
   GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif")
   GUICtrlSetTip(-1, "Skills List")
   Global $SCOMBOKEY[9], $SKCOUNT, $LABELSK1[9], $LABELSK2[9], $LABELSK3[9], $SDELAY[9], $FORM_SKILL
   $SKCOUNTCFG = IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_UBOUND_KEY, 1)
   GUISetFont(8, 800, 0, "Arial")
   Global $BUTTON_ADD_SKILL = GUICtrlCreateButton("Add", 75, 28, 50, 18)
   GUICtrlSetOnEvent(-1, "AddSkill")
   GUICtrlSetColor(-1, 0x00FF00)
   GUICtrlSetBKColor(-1, 0x000000)
   Global $BUTTON_REMOVE_SKILL = GUICtrlCreateButton("Remove", 130, 28, 50, 18)
   GUICtrlSetOnEvent(-1, "RemoveSkill")
   GUICtrlSetColor(-1, 0x00FF00)
   GUICtrlSetBKColor(-1, 0x000000)
   Global $BUTTON_SAVE_SKILLS = GUICtrlCreateButton("Save", 185, 28, 50, 18)
   GUICtrlSetOnEvent(-1, "SaveSkills")
   GUICtrlSetColor(-1, 0x00FF00)
   GUICtrlSetBKColor(-1, 0x000000)
   For $SKCOUNT = 1 To IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_UBOUND_KEY, 1) Step +1
	  $LABELSK1[$SKCOUNT] = GUICtrlCreateLabel("Key", 20, 57 + ($SKCOUNT - 1) * 42, 30, 20)
	  GUICtrlSetColor(-1, 0xC0C0C0)
	  $SCOMBOKEY[$SKCOUNT] = GUICtrlCreateCombo("", 50, 55 + ($SKCOUNT - 1) * 42, 60, 150)
	  GUICtrlSetData(-1, $KEYCODE, IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_COMBO_KEY & $SKCOUNT, "{F1}"))
	  $LABELSK2[$SKCOUNT] = GUICtrlCreateLabel("Cast", 120, 57 + ($SKCOUNT - 1) * 42, 50, 20)
	  GUICtrlSetColor(-1, 0xC0C0C0)
	  $SDELAY[$SKCOUNT] = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_TIMES_KEY & $SKCOUNT, "1"), 155, 55 + ($SKCOUNT - 1) * 42, 40, 20)
	  $LABELSK3[$SKCOUNT] = GUICtrlCreateLabel("Times", 200, 57 + ($SKCOUNT - 1) * 42, 35, 20)
	  GUICtrlSetColor(-1, 0xC0C0C0)
   Next
$SKCOUNT = $SKCOUNT - 1
GUISetState(@SW_SHOW, $FORM_SKILL)
EndFunc

Func AddSkill()
   GUISwitch($FORM_SKILL)
   $SKCOUNTCFG = $SKCOUNTCFG + 1
   If $SKCOUNTCFG >= 9 Then
	  $SKCOUNTCFG = 9
	  MsgBox(0, "Error", "Max Skills Reached")
   Else
	  $LABELSK1[$SKCOUNTCFG] = GUICtrlCreateLabel("Key", 20, 57 + ($SKCOUNTCFG - 1) * 42, 30, 20)
	  GUICtrlSetColor(-1, 0xC0C0C0)
	  $SCOMBOKEY[$SKCOUNTCFG] = GUICtrlCreateCombo("", 50, 55 + ($SKCOUNTCFG - 1) * 42, 60, 150)
	  GUICtrlSetData(-1, $KEYCODE, IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_COMBO_KEY & $SKCOUNTCFG, "{F1}"))
	  $LABELSK2[$SKCOUNTCFG] = GUICtrlCreateLabel("Delay", 120, 57 + ($SKCOUNTCFG - 1) * 42, 50, 20)
	  GUICtrlSetColor(-1, 0xC0C0C0)
	  $SDELAY[$SKCOUNTCFG] = GUICtrlCreateInput(IniRead($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_TIMES_KEY & $SKCOUNTCFG, "1"), 155, 55 + ($SKCOUNTCFG - 1) * 42, 40, 20)
	  $LABELSK3[$SKCOUNTCFG] = GUICtrlCreateLabel("secs", 200, 57 + ($SKCOUNTCFG - 1) * 42, 35, 20)
	  GUICtrlSetColor(-1, 0xC0C0C0)
	EndIf
EndFunc

Func RemoveSkill()
	GUISwitch($FORM_SKILL)
	If $SKCOUNTCFG < 2 Then
		$SKCOUNTCFG = 1
		MsgBox(0, "Error", "Minimum Skills Reached")
	Else
		GUICtrlDelete($SCOMBOKEY[$SKCOUNTCFG])
		GUICtrlDelete($LABELSK1[$SKCOUNTCFG])
		GUICtrlDelete($LABELSK2[$SKCOUNTCFG])
		GUICtrlDelete($LABELSK3[$SKCOUNTCFG])
		GUICtrlDelete($SDELAY[$SKCOUNTCFG])
		$SKCOUNTCFG = $SKCOUNTCFG - 1
	EndIf
EndFunc

Func SaveSkills()
   $COUNT = 1
   $MAX = $SKCOUNTCFG
   IniWrite($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_UBOUND_KEY, $MAX)
   IniWrite($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_COMBO_KEY & $COUNT, GUICtrlRead($SCOMBOKEY[$COUNT]))
   IniWrite($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_TIMES_KEY & $COUNT, GUICtrlRead($SDELAY[$COUNT]))
   Do
	  $COUNT = $COUNT + 1
	  IniWrite($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_COMBO_KEY & $COUNT, GUICtrlRead($SCOMBOKEY[$COUNT]))
	  IniWrite($SOFTWARE_CONFIG, $CFG_SKILLS_ROOT_KEY, $CFG_SKILL_TIMES_KEY & $COUNT, GUICtrlRead($SDELAY[$COUNT]))
	  sleep(250)
   Until $COUNT >= $MAX
GUIDelete($FORM_SKILL)
EndFunc

Func WindowSkillCloseClicked()
   GUIDelete($FORM_SKILL)
EndFunc

Func OnlineSupport()
EndFunc



mmoassist is offline  
Old 02/10/2018, 21:38   #2
 
elite*gold: 0
Join Date: Dec 2012
Posts: 78
Received Thanks: 10
how did you get their address?

$OFFSET_LAST_ATTAKING_TARGET_UNIQUE_ID1
$OFFSET_LAST_ATTAKING_TARGET_X1
$OFFSET_LAST_ATTAKING_TARGET_Y1


nozomi.gusta is offline  
Old 02/11/2018, 08:23   #3
 
elite*gold: 0
Join Date: Mar 2017
Posts: 24
Received Thanks: 4
Get the unique ID of the monster you want to use to find the address by starting MMOKORE hover over the monster. Its unique ID should be listed in the addhistory section of MMOKORE.

Attack the monster so that it is attacking you Then attack another monster so you have 2 unique ID's attacking you. Search in cheat engine the first unique id that you got.
You will see an address that is changing back and forth to each unique ID of the monsters attacking you. Do a pointer scan on that address. You should be able to locate the offsets and base address.

Attention:
This will will be taken out of the next release because MMOKORE will get all X Y locations of all objects on screen. It will use the X Y locations to determine if you are being attacked, need to avoid portals and need to avoid kill stealing.
mmoassist is offline  
Old 02/11/2018, 08:31   #4
 
elite*gold: 0
Join Date: Dec 2012
Posts: 78
Received Thanks: 10
Quote:
Originally Posted by mmoassist View Post
Get the unique ID of the monster you want to use to find the address by starting MMOKORE hover over the monster. Its unique ID should be listed in the addhistory section of MMOKORE.

Attack the monster so that it is attacking you Then attack another monster so you have 2 unique ID's attacking you. Search in cheat engine the first unique id that you got.
You will see an address that is changing back and forth to each unique ID of the monsters attacking you. Do a pointer scan on that address. You should be able to locate the offsets and base address.
this is quite a huge code you made, i havent played RO for almost 3 years im thinking of playing back and use your codes. I'll try to migrate them in AHK too if i have the time.


nozomi.gusta is offline  
Old 02/11/2018, 08:37   #5
 
elite*gold: 0
Join Date: Mar 2017
Posts: 24
Received Thanks: 4
FYI this code is currently being redone because it uses to much of the CPU. I have managed to recode the main functions to reduce processing and improve the AI so that it is smarter.

Looting needs to be redone because it is not efficient. I have been testing some promising changes that will speed up loot time.
mmoassist is offline  
Old 02/11/2018, 08:45   #6
 
elite*gold: 0
Join Date: Dec 2012
Posts: 78
Received Thanks: 10
that is why i dont use autoit it uses too much cpu compared to AHK, looking forward to your next update. Also If the game use gepard or other gameguards what do you use if Cheat engine is blocked? can you please PM me thank you.
nozomi.gusta is offline  
Old 02/11/2018, 09:06   #7
 
elite*gold: 0
Join Date: Mar 2017
Posts: 24
Received Thanks: 4
During my testing with safe engine, I figured out that if you reformat your computer and use cheat engine it will work for the first time. Once the computer reboots, that is when cheat engine is blocked. So, I set up a restore point that has RO patched but never ran.
Make sure the restore point has everything you need installed like ro patched but not ran, cheat engine, autoit and any other program you need. Then make the restore point.

Once you hit play on RO that is when it makes the changes to block all your programs.
I found that if you have windows defender you can set it to not allow any programs to make changes to any folder unless it has permission.

What I did was when I needed to patch RO, I would give it the permission through windows defender and patch it. After it patched I would close the patcher and take away the permission. Then I would be able to run RO without it making the changes to block cheat engine.

Once you get to this step you can use cheat engine to try and figure out how to disable the game guard. It is much work and takes forever to test.
mmoassist is offline  
Old 02/19/2018, 09:55   #8
 
elite*gold: 0
Join Date: Apr 2009
Posts: 52
Received Thanks: 3
actually you can bypass gepard if you want to use cheat engine, just use windows title changer and rename cheat engine title.
priezm is offline  
Old 02/19/2018, 11:47   #9
 
elite*gold: 0
Join Date: Mar 2017
Posts: 24
Received Thanks: 4
Quote:
Originally Posted by priezm View Post
actually you can bypass gepard if you want to use cheat engine, just use windows title changer and rename cheat engine title.
Currently, I am trying to prevent safengine from hooking windows api's. I have no knowledge of hooking windows api's so I may just give up because there is no strait forward guide on how to do it.

Safengine is blocking autoit from reading and writing to the process. From what I understand, I need to hook the correct api's to prevent safengine from hooking.


mmoassist is offline  
Reply



« MMOKORE Offests IRO | Ro Cheat Engine Guides (iRO Renewal) »

Similar Threads
MMOKORE Offests IRO
12/23/2017 - RO Exploits, Hacks, Bots & Guides - 0 Replies
Here we will gather all the information that will be needed for MMOKORE. MMOKORE is an open source project for educational purpose only and using it in any game may result in a ban based on server rules. In preparation for MMOKORE Basic, this list will only include addresses and offsets used by MMOKORE Basic. This list will be changed as needed as it will be a base for the MMOKORE Foundation. IRO Odin MMOKORE BASIC Ini file: 1/29/18
WTB> Ragnarok Restart (iRO-Odin) zenny.
09/25/2017 - Trading - 4 Replies
Would like to buy zenny. PM me if you have offers.
iRO Spieler gesucht/looking for iRO players
11/20/2012 - Ragnarok Online - 2 Replies
Hallo Leute, ich komme hierher mit einem besonderen Anliegen. Also, ich würde gerne die iRO Spieler darum bitten mir ein paar Screenshots zu machen. Undzwar geht es mir um Screenshots von ALLEN NPCs in Malangdo. Brauche drigend Screenshots von den NPC Konversationen und auch von den Kordinaten. Ich danke schonmal im vorraus falls sich jemand bereiterklärt mir hiermit zu helfen. Hello guys, I am here to ask you for a special favor. I would like to ask the iRO players to take a couple...
T> iRO Classic chars for iRO Valk
10/29/2012 - Ragnarok Online - 0 Replies
Hi, I currently have a lvl 86 rogue, and lvl 86 knight (different accounts) along with 50+ mil zeny on iRO classic. I am looking for a decent leveled account on iRO Valk.
T> iRO Classic chars for iRO Valk
10/29/2012 - Trading - 0 Replies
Hi, I currently have a lvl 86 rogue, and lvl 86 knight (different accounts) along with 50+ mil zeny on iRO classic. I am looking for a decent leveled account on iRO Valk.



All times are GMT +1. The time now is 00:07.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.