;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 自身保护
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
SafeSelf proc uses ebx edi esi
local _temp: DWORD
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SELF_LIFE_1
cmp eax, BST_CHECKED
jne _safe_self_2
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_2, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_2, eax
cmp _temp, TRUE
jne _safe_self_2
cmp g_Self_Safe_Life_Percent_2, 64H
ja _safe_self_2
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_2
div ebx
cmp eax, g_SelfCurLife
jb _safe_self_2
;SKILL_STATE_CODE_1
BT g_SkillAssoilState, SKILL_STATE_MASK_1
JC _safe_self_2
OR g_SkillAssoilState, SKILL_STATE_CODE_1
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_10, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 1500, SKILL_STATE_MASK_1
_safe_self_2:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SELF_LIFE_2
cmp eax, BST_CHECKED
jne _safe_self_3
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_3, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_3, eax
cmp _temp, TRUE
jne _safe_self_3
cmp g_Self_Safe_Life_Percent_3, 64H
ja _safe_self_3
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_3
div ebx
cmp eax, g_SelfCurLife
jb _safe_self_3
;SKILL_STATE_CODE_2
BT g_SkillAssoilState, SKILL_STATE_MASK_2
JC _safe_self_3
OR g_SkillAssoilState, SKILL_STATE_CODE_2
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_11, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 1500, SKILL_STATE_MASK_2
_safe_self_3:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SELF_LIFE_3
cmp eax, BST_CHECKED
jne _exit_safe_self
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_4, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_4, eax
cmp _temp, TRUE
jne _exit_safe_self
cmp g_Self_Safe_Life_Percent_4, 64H
ja _exit_safe_self
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_4
div ebx
cmp eax, g_SelfCurLife
jb _exit_safe_self
invoke TerminateProcess, g_ZTProcess, -1
invoke GetLastError
_exit_safe_self:
xor eax, eax
ret
SafeSelf endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 自身辅助
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
HelpeSelf proc uses ebx edi esi
local _temp: DWORD
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_LIFE
cmp eax, BST_CHECKED
jne _help_self_magic
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_1, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_1, eax
mov eax, _temp
cmp eax, TRUE
jne _help_self_magic
cmp g_Self_Safe_Life_Percent_1, 64H
ja _help_self_magic
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_1
div ebx
cmp eax, g_SelfCurLife
jb _help_self_magic
BT g_SkillAssoilState, SKILL_STATE_MASK_3
JC _help_self_magic
OR g_SkillAssoilState, SKILL_STATE_CODE_3
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_AUTO_LIFE_KEY, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 1500, SKILL_STATE_MASK_3
_help_self_magic:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_MAGIC
cmp eax, BST_CHECKED
jne _exit_help_self
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_MAGIC, \
addr _temp, FALSE
mov g_Self_Safe_Magic_Percent, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_help_self
cmp g_Self_Safe_Magic_Percent, 64H
ja _exit_help_self
mov ebx, 64H
mov eax, g_SelfMaxMagic
mul g_Self_Safe_Magic_Percent
div ebx
cmp eax, g_SelfCurMagic
jb _exit_help_self
;SKILL_STATE_CODE_4
BT g_SkillAssoilState, SKILL_STATE_MASK_4
JC _exit_help_self
OR g_SkillAssoilState, SKILL_STATE_CODE_4
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_AUTO_MAGIC_KEY, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_4
_exit_help_self:
xor eax, eax
ret
HelpeSelf endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 角色自动释放技能
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AutoAssoilSkill proc uses ebx edi esi
local _temp: DWORD
local _buff[10]: byte
; if (IDC_CHECK_AUTO_SKILL_1 == BST_CHECKED)
; {
; GetSetTimer_1;
; if (g_Skill_Interval_1 == 0)
; {
; call AssiolSkill();
; g_Skill_Interval_1 = GetTickCount();
; }
; else if ((GetTickCount() - g_Skill_Interval_1) < setTime_1)
; {
; calll ShowCurSkillTimer();
; }
; else
; {
; g_Skill_Interval_1 = 0;
; }
; }
; else
; {
; g_Skill_Interval_1 = 0;
; }
xor edx, edx
;**************************** 第 1 个自动释放技能 **************************
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_1
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_1, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_1, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_1
;SKILL_STATE_CODE_5
mov eax, g_SkillAssoilState
BT eax, SKILL_STATE_MASK_5
JC _skill_2
OR g_SkillAssoilState, SKILL_STATE_CODE_5
mov g_Skill_Assoil_1, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_1, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_5
invoke GetTickCount
mov g_Skill_Interval_1, eax
mov g_SkillAssoilBackTime_1, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_1
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_1 == 0
mov g_SkillAssoilBackTime_1, eax
.elseif g_SkillAssoilBackTime_1 < eax
mov g_SkillAssoilBackTime_1, eax
.if eax >= g_Set_Skill_Interval_Time_1
mov g_Skill_Assoil_1, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_1, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
;**************************** 第 2 个自动释放技能 **************************
_skill_2:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_2
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_2, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_2, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_2
;SKILL_STATE_CODE_6
BT g_SkillAssoilState, SKILL_STATE_MASK_6
JC _skill_3
OR g_SkillAssoilState, SKILL_STATE_CODE_6
mov g_Skill_Assoil_2, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_2, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_6
invoke GetTickCount
mov g_Skill_Interval_2, eax
mov g_SkillAssoilBackTime_2, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_2
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_2 == 0
mov g_SkillAssoilBackTime_2, eax
.elseif g_SkillAssoilBackTime_2 < eax
mov g_SkillAssoilBackTime_2, eax
.if eax >= g_Set_Skill_Interval_Time_2
mov g_Skill_Assoil_2, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_2, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
;**************************** 第 3 个自动释放技能 **************************
_skill_3:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_3
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_3, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_3, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_3
;SKILL_STATE_CODE_7
BT g_SkillAssoilState, SKILL_STATE_MASK_7
JC _skill_4
OR g_SkillAssoilState, SKILL_STATE_CODE_7
mov g_Skill_Assoil_3, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_3, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_7
invoke GetTickCount
mov g_Skill_Interval_3, eax
mov g_SkillAssoilBackTime_3, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_3
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_3 == 0
mov g_SkillAssoilBackTime_3, eax
.elseif g_SkillAssoilBackTime_3 < eax
mov g_SkillAssoilBackTime_3, eax
.if eax >= g_Set_Skill_Interval_Time_3
mov g_Skill_Assoil_3, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_3, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
;**************************** 第 4 个自动释放技能 **************************
_skill_4:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_4
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_4, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_4, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_4
;SKILL_STATE_CODE_8
BT g_SkillAssoilState, SKILL_STATE_MASK_8
JC _skill_over
OR g_SkillAssoilState, SKILL_STATE_CODE_8
mov g_Skill_Assoil_4, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_4, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_8
invoke GetTickCount
mov g_Skill_Interval_4, eax
mov g_SkillAssoilBackTime_4, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_4
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_4 == 0
mov g_SkillAssoilBackTime_4, eax
.elseif g_SkillAssoilBackTime_4 < eax
mov g_SkillAssoilBackTime_4, eax
.if eax >= g_Set_Skill_Interval_Time_4
mov g_Skill_Assoil_4, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_4, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
_set_skill_interval_time_error:
_skill_over:
xor eax, eax
ret
AutoAssoilSkill endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 仙辅助目标
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
XianSafeObject proc uses ebx edi esi
local _temp: DWORD
; 判断目标是否在可控制范围
cmp g_ObjectNotInRangle, TRUE
jne _exit_xian_safe_object
; 判断目标是否玩家
cmp g_ObjectIsPlayer, TRUE
jne _exit_xian_safe_object
_safe_object_begin:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_XIAN_HELPER
cmp eax, BST_CHECKED
jne _exit_xian_safe_object
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_OBJECT_LIFE_1
cmp eax, BST_CHECKED
jne _safe_object_safe_life_2
;**************************** 第一个加血点 **************************
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_OBJECT_LIFE_1, \
addr _temp, FALSE
mov g_Object_Safe_Life_Percent_1, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_xian_safe_object
mov ebx, 64H
mov eax, g_ObjectMaxLife
mul g_Object_Safe_Life_Percent_1
xor edx, edx
div ebx
cmp eax, g_ObjectCurLife
jb _safe_object_safe_life_2
;SKILL_STATE_CODE_9
BT g_SkillAssoilState, SKILL_STATE_MASK_9
JC _safe_object_safe_life_2
OR g_SkillAssoilState, SKILL_STATE_CODE_9
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_5,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 2500, SKILL_STATE_MASK_9
;**************************** 第二个加血点 **************************
_safe_object_safe_life_2:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_OBJECT_LIFE_2
cmp eax, BST_CHECKED
jne _safe_object_magic
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_OBJECT_LIFE_2, \
addr _temp, FALSE
mov g_Object_Safe_Life_Percent_2, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_xian_safe_object
mov ebx, 64H
mov eax, g_ObjectMaxLife
mul g_Object_Safe_Life_Percent_2
xor edx, edx
div ebx
cmp eax, g_ObjectCurLife
jb _safe_object_magic
;SKILL_STATE_CODE_10
BT g_SkillAssoilState, SKILL_STATE_MASK_10
JC _safe_object_magic
OR g_SkillAssoilState, SKILL_STATE_CODE_10
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_6,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 2500, SKILL_STATE_MASK_10
;**************************** 法力通道 **************************
_safe_object_magic:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_OBJECT_MAGIC
cmp eax, BST_CHECKED
jne _shensheng_safe_object
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_OBJECT_MAGIC, \
addr _temp, FALSE
mov g_Object_Safe_Magic_Percent, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_xian_safe_object
mov ebx, 64H
mov eax, g_ObjectMaxMagic
mul g_Object_Safe_Magic_Percent
xor edx, edx
div ebx
cmp eax, g_ObjectCurMagic
jb _shensheng_safe_object
;SKILL_STATE_CODE_11
BT g_SkillAssoilState, SKILL_STATE_MASK_11
JC _shensheng_safe_object
OR g_SkillAssoilState, SKILL_STATE_CODE_11
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_7,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 2500, SKILL_STATE_MASK_11
; if (IDC_CHECK_SHENSHENG_AUTO_SKILL == BST_CHECKED)
; {
; if (!g_SSAssoiled)
; {
; call AssoilShenShengSkill();
; g_SS_sTime = GetTickCount();
; g_SSAssoiled = TRUE;
; }
; else
; {
; if ((GetTickCount() - g_SS_startTime) >= MAX_SKILL_TIME)
; {
; g_SS_sTime = GetTickCount;
; g_SSAssoiled = TRUE;
; call AssiolShenShengSkill();
; }
; }
; }
;**************************** 神圣祝福 **************************
_shensheng_safe_object:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SHENSHENG_AUTO_SKILL_4
cmp eax, BST_CHECKED
jne _zhanshen_safe_object
cmp g_SSAssoiled, TRUE
je _shensheng_safe_object_assoiled
;SKILL_STATE_CODE_12
BT g_SkillAssoilState, SKILL_STATE_MASK_12
JC _zhanshen_safe_object
OR g_SkillAssoilState, SKILL_STATE_CODE_12
invoke GetTickCount
mov g_SS_sTime, eax
mov g_SSAssoiled, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_8,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 3000, SKILL_STATE_MASK_12
_shensheng_safe_object_assoiled:
invoke GetTickCount
sub eax, g_SS_sTime
mov ecx, 1000 ;专换成秒
xor edx, edx
div ecx
cmp eax, 295 ;释放间隔为295秒
jb _zhanshen_safe_object
mov g_SSAssoiled, FALSE
;**************************** 战神祝福 **************************
_zhanshen_safe_object:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_ZHANSHEN_AUTO_SKILL_5
cmp eax, BST_CHECKED
jne _exit_xian_safe_object
cmp g_ZSAssoiled, TRUE
je _zhanshen_safe_object_assioled
;SKILL_STATE_CODE_13
BT g_SkillAssoilState, SKILL_STATE_MASK_13
JC _zhanshen_safe_object
OR g_SkillAssoilState, SKILL_STATE_CODE_13
invoke GetTickCount
mov g_ZS_sTime, eax
mov g_ZSAssoiled, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_9,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 3000, SKILL_STATE_MASK_13
_zhanshen_safe_object_assioled:
invoke GetTickCount
sub eax, g_ZS_sTime
mov ecx, 1000 ;专换成秒
xor edx, edx
div ecx
cmp eax, 295 ;释放间隔为295秒
jb _exit_xian_safe_object
mov g_ZSAssoiled, FALSE
_exit_xian_safe_object:
xor eax, eax
ret
XianSafeObject endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 仙打坐
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
XianSitDown proc uses ebx edi esi
local _activeWnd: DWORD
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_XIAN_AUTO_SITDOWN
.if eax == BST_CHECKED
.if g_SitState == SIT_STATE_UP
mov ecx, 3CH ; 60%
mov ebx, 64H
mov eax, g_SelfMaxMagic
mul ecx
xor edx, edx
div ebx
.if eax > g_SelfCurMagic
mov _activeWnd, NULL
invoke GetForegroundWindow
.if eax
mov _activeWnd, eax
.endif
invoke PostMessage, g_ZTCurWnd, WM_KEYDOWN, 044H, 00440001H
invoke PostMessage, g_ZTCurWnd, WM_KEYUP, 044H, 0C0440000H
mov eax, _activeWnd
.if eax
invoke SetForegroundWindow, _activeWnd
.endif
.endif
.endif
.endif
_xian_sit_down:
ret
XianSitDown endp
; 自身保护
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
SafeSelf proc uses ebx edi esi
local _temp: DWORD
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SELF_LIFE_1
cmp eax, BST_CHECKED
jne _safe_self_2
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_2, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_2, eax
cmp _temp, TRUE
jne _safe_self_2
cmp g_Self_Safe_Life_Percent_2, 64H
ja _safe_self_2
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_2
div ebx
cmp eax, g_SelfCurLife
jb _safe_self_2
;SKILL_STATE_CODE_1
BT g_SkillAssoilState, SKILL_STATE_MASK_1
JC _safe_self_2
OR g_SkillAssoilState, SKILL_STATE_CODE_1
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_10, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 1500, SKILL_STATE_MASK_1
_safe_self_2:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SELF_LIFE_2
cmp eax, BST_CHECKED
jne _safe_self_3
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_3, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_3, eax
cmp _temp, TRUE
jne _safe_self_3
cmp g_Self_Safe_Life_Percent_3, 64H
ja _safe_self_3
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_3
div ebx
cmp eax, g_SelfCurLife
jb _safe_self_3
;SKILL_STATE_CODE_2
BT g_SkillAssoilState, SKILL_STATE_MASK_2
JC _safe_self_3
OR g_SkillAssoilState, SKILL_STATE_CODE_2
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_11, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 1500, SKILL_STATE_MASK_2
_safe_self_3:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SELF_LIFE_3
cmp eax, BST_CHECKED
jne _exit_safe_self
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_4, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_4, eax
cmp _temp, TRUE
jne _exit_safe_self
cmp g_Self_Safe_Life_Percent_4, 64H
ja _exit_safe_self
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_4
div ebx
cmp eax, g_SelfCurLife
jb _exit_safe_self
invoke TerminateProcess, g_ZTProcess, -1
invoke GetLastError
_exit_safe_self:
xor eax, eax
ret
SafeSelf endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 自身辅助
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
HelpeSelf proc uses ebx edi esi
local _temp: DWORD
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_LIFE
cmp eax, BST_CHECKED
jne _help_self_magic
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_LIFE_1, \
addr _temp, FALSE
mov g_Self_Safe_Life_Percent_1, eax
mov eax, _temp
cmp eax, TRUE
jne _help_self_magic
cmp g_Self_Safe_Life_Percent_1, 64H
ja _help_self_magic
mov ebx, 64H
mov eax, g_SelfMaxLife
mul g_Self_Safe_Life_Percent_1
div ebx
cmp eax, g_SelfCurLife
jb _help_self_magic
BT g_SkillAssoilState, SKILL_STATE_MASK_3
JC _help_self_magic
OR g_SkillAssoilState, SKILL_STATE_CODE_3
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_AUTO_LIFE_KEY, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 1500, SKILL_STATE_MASK_3
_help_self_magic:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_MAGIC
cmp eax, BST_CHECKED
jne _exit_help_self
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_SELF_MAGIC, \
addr _temp, FALSE
mov g_Self_Safe_Magic_Percent, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_help_self
cmp g_Self_Safe_Magic_Percent, 64H
ja _exit_help_self
mov ebx, 64H
mov eax, g_SelfMaxMagic
mul g_Self_Safe_Magic_Percent
div ebx
cmp eax, g_SelfCurMagic
jb _exit_help_self
;SKILL_STATE_CODE_4
BT g_SkillAssoilState, SKILL_STATE_MASK_4
JC _exit_help_self
OR g_SkillAssoilState, SKILL_STATE_CODE_4
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_AUTO_MAGIC_KEY, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_4
_exit_help_self:
xor eax, eax
ret
HelpeSelf endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 角色自动释放技能
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AutoAssoilSkill proc uses ebx edi esi
local _temp: DWORD
local _buff[10]: byte
; if (IDC_CHECK_AUTO_SKILL_1 == BST_CHECKED)
; {
; GetSetTimer_1;
; if (g_Skill_Interval_1 == 0)
; {
; call AssiolSkill();
; g_Skill_Interval_1 = GetTickCount();
; }
; else if ((GetTickCount() - g_Skill_Interval_1) < setTime_1)
; {
; calll ShowCurSkillTimer();
; }
; else
; {
; g_Skill_Interval_1 = 0;
; }
; }
; else
; {
; g_Skill_Interval_1 = 0;
; }
xor edx, edx
;**************************** 第 1 个自动释放技能 **************************
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_1
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_1, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_1, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_1
;SKILL_STATE_CODE_5
mov eax, g_SkillAssoilState
BT eax, SKILL_STATE_MASK_5
JC _skill_2
OR g_SkillAssoilState, SKILL_STATE_CODE_5
mov g_Skill_Assoil_1, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_1, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_5
invoke GetTickCount
mov g_Skill_Interval_1, eax
mov g_SkillAssoilBackTime_1, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_1
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_1 == 0
mov g_SkillAssoilBackTime_1, eax
.elseif g_SkillAssoilBackTime_1 < eax
mov g_SkillAssoilBackTime_1, eax
.if eax >= g_Set_Skill_Interval_Time_1
mov g_Skill_Assoil_1, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_1, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
;**************************** 第 2 个自动释放技能 **************************
_skill_2:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_2
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_2, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_2, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_2
;SKILL_STATE_CODE_6
BT g_SkillAssoilState, SKILL_STATE_MASK_6
JC _skill_3
OR g_SkillAssoilState, SKILL_STATE_CODE_6
mov g_Skill_Assoil_2, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_2, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_6
invoke GetTickCount
mov g_Skill_Interval_2, eax
mov g_SkillAssoilBackTime_2, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_2
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_2 == 0
mov g_SkillAssoilBackTime_2, eax
.elseif g_SkillAssoilBackTime_2 < eax
mov g_SkillAssoilBackTime_2, eax
.if eax >= g_Set_Skill_Interval_Time_2
mov g_Skill_Assoil_2, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_2, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
;**************************** 第 3 个自动释放技能 **************************
_skill_3:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_3
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_3, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_3, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_3
;SKILL_STATE_CODE_7
BT g_SkillAssoilState, SKILL_STATE_MASK_7
JC _skill_4
OR g_SkillAssoilState, SKILL_STATE_CODE_7
mov g_Skill_Assoil_3, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_3, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_7
invoke GetTickCount
mov g_Skill_Interval_3, eax
mov g_SkillAssoilBackTime_3, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_3
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_3 == 0
mov g_SkillAssoilBackTime_3, eax
.elseif g_SkillAssoilBackTime_3 < eax
mov g_SkillAssoilBackTime_3, eax
.if eax >= g_Set_Skill_Interval_Time_3
mov g_Skill_Assoil_3, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_3, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
;**************************** 第 4 个自动释放技能 **************************
_skill_4:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_AUTO_SKILL_4
.if eax == BST_CHECKED
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_AUTO_SKILL_INTERVAL_4, \
addr _temp, FALSE
mov g_Set_Skill_Interval_Time_4, eax
cmp _temp, FALSE
je _set_skill_interval_time_error
.if !g_Skill_Assoil_4
;SKILL_STATE_CODE_8
BT g_SkillAssoilState, SKILL_STATE_MASK_8
JC _skill_over
OR g_SkillAssoilState, SKILL_STATE_CODE_8
mov g_Skill_Assoil_4, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_4, \
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 1500, SKILL_STATE_MASK_8
invoke GetTickCount
mov g_Skill_Interval_4, eax
mov g_SkillAssoilBackTime_4, 0
.endif
invoke GetTickCount
sub eax, g_Skill_Interval_4
xor edx, edx
mov ecx, 1000
div ecx
.if g_SkillAssoilBackTime_4 == 0
mov g_SkillAssoilBackTime_4, eax
.elseif g_SkillAssoilBackTime_4 < eax
mov g_SkillAssoilBackTime_4, eax
.if eax >= g_Set_Skill_Interval_Time_4
mov g_Skill_Assoil_4, FALSE
.else
invoke wsprintf, addr _buff, _T('%d'), eax
invoke SendDlgItemMessage, g_MainWnd, IDC_STATIC_AUTO_SKILL_TIME_4, \
WM_SETTEXT, 0, addr _buff
.endif
.endif
.endif
_set_skill_interval_time_error:
_skill_over:
xor eax, eax
ret
AutoAssoilSkill endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 仙辅助目标
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
XianSafeObject proc uses ebx edi esi
local _temp: DWORD
; 判断目标是否在可控制范围
cmp g_ObjectNotInRangle, TRUE
jne _exit_xian_safe_object
; 判断目标是否玩家
cmp g_ObjectIsPlayer, TRUE
jne _exit_xian_safe_object
_safe_object_begin:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_XIAN_HELPER
cmp eax, BST_CHECKED
jne _exit_xian_safe_object
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_OBJECT_LIFE_1
cmp eax, BST_CHECKED
jne _safe_object_safe_life_2
;**************************** 第一个加血点 **************************
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_OBJECT_LIFE_1, \
addr _temp, FALSE
mov g_Object_Safe_Life_Percent_1, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_xian_safe_object
mov ebx, 64H
mov eax, g_ObjectMaxLife
mul g_Object_Safe_Life_Percent_1
xor edx, edx
div ebx
cmp eax, g_ObjectCurLife
jb _safe_object_safe_life_2
;SKILL_STATE_CODE_9
BT g_SkillAssoilState, SKILL_STATE_MASK_9
JC _safe_object_safe_life_2
OR g_SkillAssoilState, SKILL_STATE_CODE_9
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_5,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 2500, SKILL_STATE_MASK_9
;**************************** 第二个加血点 **************************
_safe_object_safe_life_2:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_OBJECT_LIFE_2
cmp eax, BST_CHECKED
jne _safe_object_magic
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_OBJECT_LIFE_2, \
addr _temp, FALSE
mov g_Object_Safe_Life_Percent_2, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_xian_safe_object
mov ebx, 64H
mov eax, g_ObjectMaxLife
mul g_Object_Safe_Life_Percent_2
xor edx, edx
div ebx
cmp eax, g_ObjectCurLife
jb _safe_object_magic
;SKILL_STATE_CODE_10
BT g_SkillAssoilState, SKILL_STATE_MASK_10
JC _safe_object_magic
OR g_SkillAssoilState, SKILL_STATE_CODE_10
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_6,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 2500, SKILL_STATE_MASK_10
;**************************** 法力通道 **************************
_safe_object_magic:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_OBJECT_MAGIC
cmp eax, BST_CHECKED
jne _shensheng_safe_object
invoke GetDlgItemInt, g_MainWnd, IDC_EDIT_OBJECT_MAGIC, \
addr _temp, FALSE
mov g_Object_Safe_Magic_Percent, eax
mov eax, _temp
cmp eax, TRUE
jne _exit_xian_safe_object
mov ebx, 64H
mov eax, g_ObjectMaxMagic
mul g_Object_Safe_Magic_Percent
xor edx, edx
div ebx
cmp eax, g_ObjectCurMagic
jb _shensheng_safe_object
;SKILL_STATE_CODE_11
BT g_SkillAssoilState, SKILL_STATE_MASK_11
JC _shensheng_safe_object
OR g_SkillAssoilState, SKILL_STATE_CODE_11
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_7,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_LOW, 2500, SKILL_STATE_MASK_11
; if (IDC_CHECK_SHENSHENG_AUTO_SKILL == BST_CHECKED)
; {
; if (!g_SSAssoiled)
; {
; call AssoilShenShengSkill();
; g_SS_sTime = GetTickCount();
; g_SSAssoiled = TRUE;
; }
; else
; {
; if ((GetTickCount() - g_SS_startTime) >= MAX_SKILL_TIME)
; {
; g_SS_sTime = GetTickCount;
; g_SSAssoiled = TRUE;
; call AssiolShenShengSkill();
; }
; }
; }
;**************************** 神圣祝福 **************************
_shensheng_safe_object:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_SHENSHENG_AUTO_SKILL_4
cmp eax, BST_CHECKED
jne _zhanshen_safe_object
cmp g_SSAssoiled, TRUE
je _shensheng_safe_object_assoiled
;SKILL_STATE_CODE_12
BT g_SkillAssoilState, SKILL_STATE_MASK_12
JC _zhanshen_safe_object
OR g_SkillAssoilState, SKILL_STATE_CODE_12
invoke GetTickCount
mov g_SS_sTime, eax
mov g_SSAssoiled, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_8,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 3000, SKILL_STATE_MASK_12
_shensheng_safe_object_assoiled:
invoke GetTickCount
sub eax, g_SS_sTime
mov ecx, 1000 ;专换成秒
xor edx, edx
div ecx
cmp eax, 295 ;释放间隔为295秒
jb _zhanshen_safe_object
mov g_SSAssoiled, FALSE
;**************************** 战神祝福 **************************
_zhanshen_safe_object:
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_ZHANSHEN_AUTO_SKILL_5
cmp eax, BST_CHECKED
jne _exit_xian_safe_object
cmp g_ZSAssoiled, TRUE
je _zhanshen_safe_object_assioled
;SKILL_STATE_CODE_13
BT g_SkillAssoilState, SKILL_STATE_MASK_13
JC _zhanshen_safe_object
OR g_SkillAssoilState, SKILL_STATE_CODE_13
invoke GetTickCount
mov g_ZS_sTime, eax
mov g_ZSAssoiled, TRUE
invoke SendDlgItemMessage, g_MainWnd, IDC_COMBO_SKILL_KEY_9,\
CB_GETCURSEL, 0, 0
invoke AddKeyEventToQueue, eax, SKILL_LVEVL_HIGH, 3000, SKILL_STATE_MASK_13
_zhanshen_safe_object_assioled:
invoke GetTickCount
sub eax, g_ZS_sTime
mov ecx, 1000 ;专换成秒
xor edx, edx
div ecx
cmp eax, 295 ;释放间隔为295秒
jb _exit_xian_safe_object
mov g_ZSAssoiled, FALSE
_exit_xian_safe_object:
xor eax, eax
ret
XianSafeObject endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 仙打坐
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
XianSitDown proc uses ebx edi esi
local _activeWnd: DWORD
invoke IsDlgButtonChecked, g_MainWnd, IDC_CHECK_XIAN_AUTO_SITDOWN
.if eax == BST_CHECKED
.if g_SitState == SIT_STATE_UP
mov ecx, 3CH ; 60%
mov ebx, 64H
mov eax, g_SelfMaxMagic
mul ecx
xor edx, edx
div ebx
.if eax > g_SelfCurMagic
mov _activeWnd, NULL
invoke GetForegroundWindow
.if eax
mov _activeWnd, eax
.endif
invoke PostMessage, g_ZTCurWnd, WM_KEYDOWN, 044H, 00440001H
invoke PostMessage, g_ZTCurWnd, WM_KEYUP, 044H, 0C0440000H
mov eax, _activeWnd
.if eax
invoke SetForegroundWindow, _activeWnd
.endif
.endif
.endif
.endif
_xian_sit_down:
ret
XianSitDown endp