Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Message: [string "EWT = {}..."]:1405: attempt to perform arithmetic on local 'X2' (a nil value)
- Time: Mon Feb 17 14:36:23 2020
- Count: 8
- Stack: [string "EWT = {}..."]:1405: attempt to perform arithmetic on local 'X2' (a nil value)
- [string "=[C]"]: ?
- [string "EWT = {}
- local version, internalVersion, date, uiVersion = GetBuildInfo()
- EWT.wowBuild = tonumber(internalVersion)
- if EWT.wowBuild == nil then
- EWT.wowBuild = tonumber(uiVersion)
- EWT.isClassic = string.find(date, "1.13") == 1
- EWT.is83 = string.find(date, "8.3") == 1
- else
- EWT.isClassic = string.find(version, "1.13") == 1
- EWT.is83 = string.find(version, "8.3") == 1
- end
- EWT.is73 = false
- EWT.isPrivate = false
- EWT.mode = 1
- EWT.isDebug = false
- if EWT.wowBuild then
- EWT.is73 = EWT.wowBuild >= 24920
- EWT.is80 = EWT.wowBuild >= 27165
- end
- if _G == nil then
- _G = getfenv()
- end
- function EWT.print(msg)
- local str = 'EWT | ' .. msg
- if EWT.wowBuild < 12340 then
- DEFAULT_CHAT_FRAME:AddMessage(str)
- else
- print(str)
- end
- end
- EWT.debug = false
- local function eprint(msg)
- if EWT.debug == true then
- EWT.print(msg)
- end
- end
- if EWT.wowBuild ~= nil and EWT.wowBuild < 12340 and DEFAULT_CHAT_FRAME ~= nil then
- function print(msg) DEFAULT_CHAT_FRAME:AddMessage(tostring(msg)) end
- end
- if AccountLoginUI == nil and AccountLogin ~= nil then
- AccountLoginUI = AccountLogin.UI
- end
- if AccountLogin ~= nil then
- if AccountLoginPasswordEdit == nil then
- AccountLoginPasswordEdit = AccountLogin.UI.PasswordEditBox
- end
- if AccountLoginAccountEdit == nil then
- AccountLoginAccountEdit = AccountLogin.UI.AccountEditBox
- end
- end
- -- ewtMod is needed because of WoW 1.12.1 which doesnt have % operator
- local function ewtMod (a, b)
- return a - math.floor(a / b) * b
- end
- local GetSessionVariable_Original = GetSessionVariable
- function GetSessionVariable(var)
- if var == "loginPw" or var ==
- "loginAcc" then
- error("Forbidden session variable")
- else
- return GetSessionVariable_Original(var)
- end
- end
- EWT.enterWorld = true
- EWT.loginLimit = 100
- local loginCount = 0
- local loginCount2 = 0
- local clickedRealm = 0
- local chosenRealm = nil
- local chosenAccount = nil
- function EWT.login()
- -- GlueDialog shown when 'Connecting' or 'You have been disconnected'. It blocks all input.
- -- UIParent always present. WorldFrame only in the game world.
- -- AccountLoginUI > RealmListUI > CharacterSelectUI > WorldFrame
- if AccountLoginUI and AccountLoginUI:IsVisible() and AccountLoginPasswordEdit then
- local loginPw = GetSessionVariable_Original("loginPw")
- local loginName = GetSessionVariable_Original("loginName")
- local loginAcc = GetSessionVariable_Original("loginAcc")
- if loginName ~= nil and loginName ~= "" then
- AccountLoginAccountEdit:SetText(loginName)
- else
- loginName = GetSavedAccountName()
- end
- if loginPw == nil or string.len(loginPw) == 0 then
- return 1
- end
- if AccountLoginUI.WoWAccountSelectDialog:IsShown() then
- C_Login.SelectGameAccount(loginAcc);
- end
- AccountLoginPasswordEdit:SetText(loginPw)
- clickedRealm = 0
- loginCount = 0
- loginCount2 = loginCount2 + 1
- -- Spam on private servers
- if (EWT.isPrivate == false and loginCount2 == EWT.loginLimit) or EWT.isPrivate == true then
- if DefaultServerLogin then
- DefaultServerLogin(loginName, loginPw)
- else
- C_Login.Login(loginName, AccountLoginPasswordEdit)
- if EWT.isPrivate == false and AccountLoginDropDown:IsShown() then
- C_Login.SelectGameAccount(GlueDropDownMenu_GetSelectedValue(AccountLoginDropDown))
- end
- end
- end
- return 1
- end
- if chosenRealm ==
- nil then
- if GetServerName then
- chosenRealm = GetServerName()
- end
- if G
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement