Untitled
unknown
lua
a year ago
25 kB
10
Indexable
Relog_Func = {} -- 重登功能
Relog_Func.frame = CreateFrame("frame")
Relog_Func.logout_time = 0
Relog_Func.loop_time = 0 -- frame里的循环延时
Relog_Func.Dungeon_Flush_Time = 0 -- 爆本换号的延迟时间
Relog_Func.Dungeon_Flush = false -- 爆本换号
Relog_Func.On_Timer = function(time_string)
local time_table = string.split(time_string,"-")
local early_time = string.split(time_table[1],":")
local early_hour = tonumber(early_time[1])
local early_minute = tonumber(early_time[2])
local late_time = string.split(time_table[2],":")
local late_hour = tonumber(late_time[1])
local late_minute = tonumber(late_time[2])
local current_hour = tonumber(date("%H"))
local current_minute = tonumber(date("%M"))
if early_hour and early_minute and late_hour and late_minute then
local early_date = early_hour + early_minute / 60
local late_date = late_hour + late_minute / 60
local current_date = current_hour + current_minute / 60
if (
early_date <= current_date and late_date >= current_date and early_date < late_date
)
or (
early_date > late_date and current_date > early_date
)
or (
early_date > late_date and current_date < late_date
) then
return true, late_hour, late_minute
end
end
return false, "" , ""
end
Relog_Func.pause = function() -- 是否需要自动小退
if Blue_Data['自动登录-小退休息'] then
if string.find(Blue_Data['自动登录-小退休息-时间段'],"|") then
local time_period = string.split(Blue_Data['自动登录-小退休息-时间段'],"|")
for i = 1,#time_period do
if Relog_Func.On_Timer(time_period[i]) then
return true
end
end
return false
elseif string.find(Blue_Data['自动登录-小退休息-时间段'],"-") then
if Relog_Func.On_Timer(Blue_Data['自动登录-小退休息-时间段']) then
return true
end
return false
end
if Blue_Data["自动登录-爆本小退"] and Relog_Func.Dungeon_Flush then
SetProcessVariable("自动登录-爆本小退-休息秒数", Blue_Data["自动登录-爆本小退-休息秒数"])
SetProcessVariable("自动登录-触发爆本小退", true)
return true
end
return false
else
return false
end
end
Relog_Func.change_account = function() -- 是否需要自动换号
if Blue_Data['自动换号'] then
if Blue_Data['自动换号 - 时间段'] then
if string.find(Blue_Data['自动换号 - 时间段编辑框'],"|") then
local time_period = string.split(Blue_Data['自动换号 - 时间段编辑框'],"|")
for i = 1,#time_period do
if Relog_Func.On_Timer(time_period[i]) then
Relog_Func.change_account_update()
return true
end
end
elseif string.find(Blue_Data['自动换号 - 时间段编辑框'],"-") then
if Relog_Func.On_Timer(Blue_Data['自动换号 - 时间段编辑框']) then
Relog_Func.change_account_update()
return true
end
end
return false
elseif Blue_Data['自动换号 - 重置次数'] then
if Blue_Data.ResetTimes == nil or tonumber(Blue_Data['自动换号 - 重置次数编辑框']) == nil or #Blue_Data.ResetTimes < tonumber(Blue_Data['自动换号 - 重置次数编辑框']) then
return false
else
Relog_Func.change_account_update()
Blue_Data["清空重置次数"] = GetTime()
return true
end
elseif Blue_Data['自动换号 - 金币数量'] then
if tonumber(Blue_Data['自动换号 - 金币数量编辑框']) ~= nil and GetMoney() / 10000 > tonumber(Blue_Data['自动换号 - 金币数量编辑框']) then
Relog_Func.change_account_update()
return true
else
return false
end
elseif Blue_Data['自动换号 - 爆本换号'] and Relog_Func.Dungeon_Flush then
Relog_Func.change_account_update()
Blue_Data["清空重置次数"] = GetTime()
return true
end
return false
else
return false
end
end
Relog_Func.rewrite = function(relog_on, email, password, account, character, realm, serial, restore, pause_on, pause_period, pc_mark, account_change, login_wait, fail_wait, cn_ip, quit_option, pause_ui_option, offline_end_game, captcha_stop) -- 重写自动登录文件
local content = "{\n"
if relog_on then
content = content.."["..[["relog"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["relog"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if pause_on then
content = content.."["..[["pause"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["pause"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if cn_ip then
content = content.."["..[["CN_IP"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["CN_IP"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if quit_option then
content = content.."["..[["quit_option"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["quit_option"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if quit_option then
content = content.."["..[["dungeon_quit"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["dungeon_quit"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if pause_ui_option then
content = content.."["..[["pause_ui_option"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["pause_ui_option"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if pause_ui_option then
content = content.."["..[["logout_to_ui"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["logout_to_ui"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if captcha_stop then
content = content.."["..[["captcha_stop"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["captcha_stop"]].."]".."="..[["]].."off"..[[",]].."\n"
end
if offline_end_game then
content = content.."["..[["offline_end_game"]].."]".."="..[["]].."on"..[[",]].."\n"
else
content = content.."["..[["offline_end_game"]].."]".."="..[["]].."off"..[[",]].."\n"
end
content = content.."["..[["email"]].."]".."="..[["]]..email..[[",]].."\n"
content = content.."["..[["password"]].."]".."="..[["]]..password..[[",]].."\n"
content = content.."["..[["account"]].."]".."="..[["]]..account..[[",]].."\n"
content = content.."["..[["character"]].."]".."="..[["]]..character..[[",]].."\n"
content = content.."["..[["realm"]].."]".."="..[["]]..realm..[[",]].."\n"
content = content.."["..[["auth_serial"]].."]".."="..[["]]..serial..[[",]].."\n"
content = content.."["..[["auth_restore"]].."]".."="..[["]]..restore..[[",]].."\n"
content = content.."["..[["pause_period"]].."]".."="..[["]]..pause_period..[[",]].."\n"
content = content.."["..[["pc_mark"]].."]".."="..[["]]..pc_mark..[[",]].."\n"
content = content.."["..[["wait_time"]].."]".."="..[["]]..login_wait..[[",]].."\n"
content = content.."["..[["fail_wait_time"]].."]".."="..[["]]..fail_wait..[[",]].."\n"
if account_change then
SetProcessVariable("logout_to_ui", true)
else
SetProcessVariable("logout_to_ui", false)
end
content = content.."}"
WriteFile(GetExeDirectory()..[[\login.json]],content,false)
end
Relog_Func.change_account_update = function()
local login_ui = true
if Blue_Data["自动换号 - 邮箱"] == Blue_Data["自动登录 - 邮箱"] and Blue_Data["自动换号 - 子账号"] == Blue_Data["自动登录 - 子账号"] and Blue_Data["自动换号 - 服务器"] == Blue_Data["自动登录 - 服务器"] then
login_ui = false
end
Relog_Func.rewrite(
true,
Blue_Data["自动换号 - 邮箱"],
Blue_Data["自动换号 - 密码"],
Blue_Data["自动换号 - 子账号"],
Blue_Data["自动换号 - 角色"],
Blue_Data["自动换号 - 服务器"],
Blue_Data["自动换号 - 安全令"],
Blue_Data["自动换号 - 还原码"],
Blue_Data["自动换号 - 小退休息"],
Blue_Data["自动换号 - 小退休息 - 时间段"],
Blue_Data['自动换号 - 机器编号'],
login_ui,
Blue_Data['自动换号 - 登录等待时间'],
Blue_Data['自动换号 - 登录失败等待时间'],
Blue_Data['自动换号 - 禁用中国IP'],
Blue_Data['自动换号 - 小退休息 - 立即退出'],
Blue_Data['自动换号 - 小退休息 - 退出至登录界面'],
Blue_Data["自动登录-掉线结束游戏"],
Blue_Data["自动登录-验证码停止"]
)
end
Relog_Func.initial = function() -- 初始化自动登录信息
local Login_Info = ReadFile(GetExeDirectory()..[[\login.json]])
if Login_Info then
Login_Info = string.gsub(Login_Info, "\r", "")
Login_Info = string.gsub(Login_Info, "\n", "")
Login_Info = "relog_tab = "..Login_Info
LoadStringIntoPlugin(Login_Info)()
if not relog_tab then
debug(Check_UI("自动登录信息读取 --> 失败","Auto relog information read --> fail"))
return
end
Blue_Data["自动登录 - 邮箱"] = relog_tab["email"]
Blue_Data["自动登录 - 密码"] = relog_tab["password"]
Blue_Data["自动登录 - 子账号"] = relog_tab["account"]
Blue_Data["自动登录 - 服务器"] = relog_tab["realm"]
Blue_Data["自动登录 - 角色"] = relog_tab["character"]
if relog_tab["relog"] and relog_tab["relog"] == "on" then
Blue_Data["自动登录"] = true
else
Blue_Data["自动登录"] = false
end
if relog_tab["pause"] and relog_tab["pause"] == "on" then
Blue_Data["自动登录-小退休息"] = true
else
Blue_Data["自动登录-小退休息"] = false
end
if relog_tab["quit_option"] and relog_tab["quit_option"] == "on" then
Blue_Data["自动登录-小退休息-立即退出"] = true
elseif relog_tab["quit_option"] and relog_tab["quit_option"] == "off" then
Blue_Data["自动登录-小退休息-立即退出"] = false
end
if relog_tab["dungeon_quit"] and relog_tab["dungeon_quit"] == "on" then
Blue_Data["自动登录-小退休息-立即退出"] = true
elseif relog_tab["dungeon_quit"] and relog_tab["dungeon_quit"] == "off" then
Blue_Data["自动登录-小退休息-立即退出"] = false
end
if relog_tab["logout_to_ui"] and relog_tab["logout_to_ui"] == "on" then
Blue_Data["自动登录-小退休息-退出至登录界面"] = true
elseif relog_tab["logout_to_ui"] and relog_tab["logout_to_ui"] == "off" then
Blue_Data["自动登录-小退休息-退出至登录界面"] = false
end
if relog_tab["pause_ui_option"] and relog_tab["pause_ui_option"] == "on" then
Blue_Data["自动登录-小退休息-退出至登录界面"] = true
elseif relog_tab["pause_ui_option"] and relog_tab["pause_ui_option"] == "off" then
Blue_Data["自动登录-小退休息-退出至登录界面"] = false
end
if relog_tab["offline_end_game"] and relog_tab["offline_end_game"] == "on" then
Blue_Data["自动登录-掉线结束游戏"] = true
elseif relog_tab["offline_end_game"] and relog_tab["offline_end_game"] == "off" then
Blue_Data["自动登录-掉线结束游戏"] = false
end
if relog_tab["captcha_stop"] and relog_tab["captcha_stop"] == "on" then
Blue_Data["自动登录-验证码停止"] = true
elseif relog_tab["captcha_stop"] and relog_tab["captcha_stop"] == "off" then
Blue_Data["自动登录-验证码停止"] = false
end
Blue_Data["自动登录-小退休息-时间段"] = relog_tab["pause_period"]
end
if GetProcessVariable("自动登录-触发爆本小退") then
SetProcessVariable("自动登录-触发爆本小退", false)
end
end
Relog_Func.initial()
Relog_Func.update = function(login_ui)
if login_ui == nil then
if Blue_Data['自动登录-小退休息-退出至登录界面'] then
login_ui = true
else
login_ui = false
end
end
local cn_ip = false
if relog_tab['CN_IP'] == "on" then
cn_ip = true
end
Relog_Func.rewrite(
Blue_Data["自动登录"],
Blue_Data["自动登录 - 邮箱"],
Blue_Data["自动登录 - 密码"],
Blue_Data["自动登录 - 子账号"],
Blue_Data["自动登录 - 角色"],
Blue_Data["自动登录 - 服务器"],
relog_tab["auth_serial"],
relog_tab["auth_restore"],
Blue_Data["自动登录-小退休息"],
Blue_Data["自动登录-小退休息-时间段"],
relog_tab['pc_mark'],
login_ui,
relog_tab['wait_time'],
relog_tab['fail_wait_time'],
cn_ip,
Blue_Data['自动登录-小退休息-立即退出'],
Blue_Data['自动登录-小退休息-退出至登录界面'],
Blue_Data["自动登录-掉线结束游戏"],
Blue_Data["自动登录-验证码停止"]
)
end
function Create_Auto_Login_UI() -- 自动登录设置
UI.Basic_UI.autologin = {}
UI.Basic_UI.autologin.Py = -10
local function Frame_Create()
UI.Basic_UI.autologin.frame = CreateFrame('frame',"UI.Basic_UI.autologin.frame",UI.Basic_UI.Panel, BackdropTemplateMixin and "BackdropTemplate")
UI.Basic_UI.autologin.frame:SetPoint("TopLeft")
UI.Basic_UI.autologin.frame:SetSize(772,530)
UI.Basic_UI.autologin.frame:SetBackdrop({_,edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",_,_,edgeSize = 15,_})
UI.Basic_UI.autologin.frame:SetBackdropColor(0.1,0.1,0.1,0)
UI.Basic_UI.autologin.frame:SetBackdropBorderColor(0.1,0.1,0.1,0)
UI.Basic_UI.autologin.frame:Hide()
UI.Basic_UI.autologin.frame:SetFrameStrata('TOOLTIP')
end
Frame_Create()
Panel_List[#Panel_List + 1] = {display = Check_UI("自动登录/换号设置","Relog/account shift"), Show = function() UI.Basic_UI.autologin.frame:Show() end, Hide = function() UI.Basic_UI.autologin.frame:Hide() end}
Update_Basic_Panel_List()
local function Minus_Y(num)
UI.Basic_UI.autologin.Py = UI.Basic_UI.autologin.Py - num
end
local function Create_Check(Var,title,Default,x,y)
UI.Basic_UI.autologin[Var] = Create_Check_Button(UI.Basic_UI.autologin.frame, "TOPLEFT", x, y, title)
UI.Basic_UI.autologin[Var]:SetScript("OnClick", function(self)
if UI.Basic_UI.autologin[Var]:GetChecked() then
Blue_Data[Var] = true
elseif not UI.Basic_UI.autologin[Var]:GetChecked() then
Blue_Data[Var] = false
end
Relog_Func.update(false)
end)
if Blue_Data[Var] ~= nil then
if Blue_Data[Var] then
UI.Basic_UI.autologin[Var]:SetChecked(true)
else
UI.Basic_UI.autologin[Var]:SetChecked(false)
end
else
Blue_Data[Var] = Default
UI.Basic_UI.autologin[Var]:SetChecked(Default)
end
end
local function Create_Edit(Var,title,Default,number,x,y)
local Header = Create_Header(UI.Basic_UI.autologin.frame, "TOPLEFT", x, y, title)
UI.Basic_UI.autologin[Var] = Create_EditBox(UI.Basic_UI.autologin.frame, "TOPLEFT", x, y - 20, Default, false, 330, 24)
UI.Basic_UI.autologin[Var]:SetScript("OnEditFocusLost", function(self)
if not number then
Blue_Data[Var] = UI.Basic_UI.autologin[Var]:GetText()
else
Blue_Data[Var] = tonumber(UI.Basic_UI.autologin[Var]:GetText())
end
Relog_Func.update(false)
end)
if Blue_Data[Var] ~= nil then
UI.Basic_UI.autologin[Var]:SetText(Blue_Data[Var])
else
if not number then
Blue_Data[Var] = UI.Basic_UI.autologin[Var]:GetText()
else
Blue_Data[Var] = tonumber(UI.Basic_UI.autologin[Var]:GetText())
end
end
end
Create_Check("自动登录",Check_UI("自动登录账户","Auto relog accounts"),true,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动登录 - 邮箱",Check_UI("邮箱", "Email"),"",false,10,UI.Basic_UI.autologin.Py)
Create_Edit("自动登录 - 密码",Check_UI("密码", "Password"),"",false,370,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 服务器",Check_UI("服务器", "Realm"),Realm,false,10,UI.Basic_UI.autologin.Py)
Create_Edit("自动登录 - 角色",Check_UI("角色顺序/名称", "Character name or index"),UnitName("player"),false,370,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 子账号",Check_UI("子账号", "Account"),"WoW1",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 安全令",Check_UI("安全令", "Mobile auth serial"),"",false,10,UI.Basic_UI.autologin.Py)
Create_Edit("自动登录 - 还原码",Check_UI("还原码", "Mobile auth restore codes"),"",false,370,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动登录 - 小退休息",Check_UI("目标时间段 - 小退 停止挂机 休息","Stop botting - fixed time period"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Check("自动登录 - 爆本小退",Check_UI("爆本自动小退","Over 5 times dungeon/hour pause (restrict to get in dungeon)"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动登录 - 爆本小退 - 休息秒数",Check_UI("爆本小退 - 休息秒数", "Over 5 times dungeon/hour pause (wait seconds on login ui)"),"60",true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动登录 - 小退休息 - 退出至登录界面",Check_UI("小退 退出至登录界面 (默认退出至角色界面)","Stop botting (force logout to login ui) (default = character ui)"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Check("自动登录 - 小退休息 - 立即退出",Check_UI("小退 (立即退出) (默认副本外退出)","Stop botting (immediately logout) (default logout outside dungeon)"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动登录 - 小退休息 - 时间段",Check_UI("小退休息时间段 (例子 9:00-10:00|23:00-23:59|0:01-1:00)", "Fixed time period to stop botting (Example 9:00-10:00|23:00-23:59|0:01-1:00)"),"",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 安全令节点",Check_UI("安全令服务器节点 (1 - 9)", "Mobile auth server (1 - 9)"),1,true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 机器编号",Check_UI("PC 编号", "PC Mark"),"PC-01",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 登录等待时间",Check_UI("登录等待时间", "Auto login wait time"),"5",true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动登录 - 登录失败等待时间",Check_UI("登录4次失败等待时间", "Auto login fail 4 times - wait time"),"180",true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动登录 - 禁用中国IP",Check_UI("禁用中国IP登录","Ban chinese ip to login"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(80)
Create_Check("自动换号",Check_UI("自动轮换账户","Auto change to other accounts"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Check("自动换号 - 爆本换号",Check_UI("爆本自动换号","Over 5 times dungeon/hour change account (restrict to get in dungeon)"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Check("自动换号 - 时间段",Check_UI("自动换号时间段","Fixed time period to change accounts"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动换号 - 时间段编辑框",Check_UI("例子 9:00-10:00|23:00-23:59|0:01-1:00", "Example 9:00-10:00|23:00-23:59|0:01-1:00"),"",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动换号 - 重置次数",Check_UI("自动换号 - 重置次数","Fixed dungeon reset times to change accounts"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动换号 - 重置次数编辑框",Check_UI("触发的重置次数", "Dungeon reset times to trigger logic"),"",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动换号 - 金币数量",Check_UI("自动换号 - 金币数量","Fixed gold in bag to change accounts"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动换号 - 金币数量编辑框",Check_UI("触发的金币数量", "Bag gold amount to trigger logic"),"",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 邮箱",Check_UI("邮箱", "Email"),"",false,10,UI.Basic_UI.autologin.Py)
Create_Edit("自动换号 - 密码",Check_UI("密码", "Password"),"",false,370,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 服务器",Check_UI("服务器", "Realm"),Realm,false,10,UI.Basic_UI.autologin.Py)
Create_Edit("自动换号 - 角色",Check_UI("角色顺序/名称", "Character name or index"),1,false,370,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 子账号",Check_UI("子账号", "Account"),"WoW1",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 安全令",Check_UI("安全令", "Mobile auth serial"),"",false,10,UI.Basic_UI.autologin.Py)
Create_Edit("自动换号 - 还原码",Check_UI("还原码", "Mobile auth restore codes"),"",false,370,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动换号 - 小退休息",Check_UI("[换号]目标时间段 - 小退 停止挂机 休息","[another account]Stop botting - fixed time period"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Check("自动换号 - 小退休息 - 退出至登录界面",Check_UI("小退 退出至登录界面 (默认退出至角色界面)","Stop botting (force logout to login ui) (default = character ui)"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Check("自动换号 - 小退休息 - 立即退出",Check_UI("小退 (立即退出) (默认副本外退出)","Stop botting (immediately logout) (default logout outside dungeon)"),false,10,UI.Basic_UI.autologin.Py)
Minus_Y(30)
Create_Edit("自动换号 - 小退休息 - 时间段",Check_UI("小退休息时间段 (例子 9:00-10:00|23:00-23:59|0:01-1:00)", "Fixed time period to stop botting (Example 9:00-10:00|23:00-23:59|0:01-1:00)"),"",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 安全令节点",Check_UI("安全令服务器节点 (1 - 9)", "Mobile auth server (1 - 9)"),1,true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 机器编号",Check_UI("PC 编号", "PC Mark"),"PC-01",false,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 登录等待时间",Check_UI("登录等待时间", "Auto login wait time"),"5",true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Edit("自动换号 - 登录失败等待时间",Check_UI("登录4次失败等待时间", "Auto login fail 4 times - wait time"),"180",true,10,UI.Basic_UI.autologin.Py)
Minus_Y(50)
Create_Check("自动换号 - 禁用中国IP",Check_UI("禁用中国IP登录","Ban chinese ip to login"),false,10,UI.Basic_UI.autologin.Py)
end
Create_Auto_Login_UI()
C_Timer.After(45,function()
Relog_Func.frame:SetScript("OnUpdate",function()
if GetTime() - Relog_Func.loop_time > 5 then
Relog_Func.loop_time = GetTime()
if Relog_Func.change_account() then
if (not IsInInstance() or Blue_Data['自动登录 - 小退休息 - 立即退出']) and not UnitAffectingCombat("player") and GetTime() - Relog_Func.logout_time > 25 then
if Bot_End then
Bot_End()
end
if GetUnitSpeed("player") > 0 or IsFalling() then
Try_Stop()
awm.EnableCollision()
awm.StopEverything()
return
end
Relog_Func.logout_time = GetTime()
debug("[Logout] "..Check_UI("换号 -> ","Account change -> ")..Blue_Data["自动换号 - 邮箱"])
awm.Logout()
end
return
end
if Relog_Func.pause() then
if (not IsInInstance() or Blue_Data['自动登录 - 小退休息 - 立即退出']) and not UnitAffectingCombat("player") and GetTime() - Relog_Func.logout_time > 25 then
if Bot_End then
Bot_End()
end
if GetUnitSpeed("player") > 0 or IsFalling() then
Try_Stop()
awm.EnableCollision()
awm.StopEverything()
return
end
Relog_Func.logout_time = GetTime()
debug("[Logout] "..Check_UI("休息登出","Pause to logout"))
awm.Logout()
end
return
end
end
end)
end)
Editor is loading...
Leave a Comment