Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. Message: [string "EWT = {}..."]:1405: attempt to perform arithmetic on local 'X2' (a nil value)
  2. Time: Mon Feb 17 14:36:23 2020
  3. Count: 8
  4. Stack: [string "EWT = {}..."]:1405: attempt to perform arithmetic on local 'X2' (a nil value)
  5. [string "=[C]"]: ?
  6. [string "EWT = {}
  7.  
  8. local version, internalVersion, date, uiVersion = GetBuildInfo()
  9. EWT.wowBuild = tonumber(internalVersion)
  10. if EWT.wowBuild == nil then
  11. EWT.wowBuild = tonumber(uiVersion)
  12. EWT.isClassic = string.find(date, "1.13") == 1
  13. EWT.is83 = string.find(date, "8.3") == 1
  14. else
  15. EWT.isClassic = string.find(version, "1.13") == 1
  16. EWT.is83 = string.find(version, "8.3") == 1
  17. end
  18. EWT.is73 = false
  19. EWT.isPrivate = false
  20. EWT.mode = 1
  21. EWT.isDebug = false
  22. if EWT.wowBuild then
  23. EWT.is73 = EWT.wowBuild >= 24920
  24. EWT.is80 = EWT.wowBuild >= 27165
  25. end
  26.  
  27. if _G == nil then
  28. _G = getfenv()
  29. end
  30.  
  31. function EWT.print(msg)
  32. local str = 'EWT | ' .. msg
  33. if EWT.wowBuild < 12340 then
  34. DEFAULT_CHAT_FRAME:AddMessage(str)
  35. else
  36. print(str)
  37. end
  38. end
  39.  
  40. EWT.debug = false
  41. local function eprint(msg)
  42. if EWT.debug == true then
  43. EWT.print(msg)
  44. end
  45. end
  46.  
  47. if EWT.wowBuild ~= nil and EWT.wowBuild < 12340 and DEFAULT_CHAT_FRAME ~= nil then
  48.  
  49. function print(msg) DEFAULT_CHAT_FRAME:AddMessage(tostring(msg)) end
  50.  
  51. end
  52.  
  53. if AccountLoginUI == nil and AccountLogin ~= nil then
  54. AccountLoginUI = AccountLogin.UI
  55. end
  56.  
  57. if AccountLogin ~= nil then
  58. if AccountLoginPasswordEdit == nil then
  59. AccountLoginPasswordEdit = AccountLogin.UI.PasswordEditBox
  60. end
  61. if AccountLoginAccountEdit == nil then
  62. AccountLoginAccountEdit = AccountLogin.UI.AccountEditBox
  63. end
  64. end
  65.  
  66. -- ewtMod is needed because of WoW 1.12.1 which doesnt have % operator
  67. local function ewtMod (a, b)
  68. return a - math.floor(a / b) * b
  69. end
  70.  
  71. local GetSessionVariable_Original = GetSessionVariable
  72. function GetSessionVariable(var)
  73. if var == "loginPw" or var ==
  74. "loginAcc" then
  75. error("Forbidden session variable")
  76. else
  77. return GetSessionVariable_Original(var)
  78. end
  79. end
  80.  
  81. EWT.enterWorld = true
  82. EWT.loginLimit = 100
  83. local loginCount = 0
  84. local loginCount2 = 0
  85. local clickedRealm = 0
  86. local chosenRealm = nil
  87. local chosenAccount = nil
  88. function EWT.login()
  89. -- GlueDialog shown when 'Connecting' or 'You have been disconnected'. It blocks all input.
  90. -- UIParent always present. WorldFrame only in the game world.
  91. -- AccountLoginUI > RealmListUI > CharacterSelectUI > WorldFrame
  92. if AccountLoginUI and AccountLoginUI:IsVisible() and AccountLoginPasswordEdit then
  93. local loginPw = GetSessionVariable_Original("loginPw")
  94. local loginName = GetSessionVariable_Original("loginName")
  95. local loginAcc = GetSessionVariable_Original("loginAcc")
  96. if loginName ~= nil and loginName ~= "" then
  97. AccountLoginAccountEdit:SetText(loginName)
  98. else
  99. loginName = GetSavedAccountName()
  100. end
  101. if loginPw == nil or string.len(loginPw) == 0 then
  102. return 1
  103. end
  104. if AccountLoginUI.WoWAccountSelectDialog:IsShown() then
  105. C_Login.SelectGameAccount(loginAcc);
  106. end
  107. AccountLoginPasswordEdit:SetText(loginPw)
  108. clickedRealm = 0
  109. loginCount = 0
  110. loginCount2 = loginCount2 + 1
  111. -- Spam on private servers
  112. if (EWT.isPrivate == false and loginCount2 == EWT.loginLimit) or EWT.isPrivate == true then
  113. if DefaultServerLogin then
  114. DefaultServerLogin(loginName, loginPw)
  115. else
  116. C_Login.Login(loginName, AccountLoginPasswordEdit)
  117. if EWT.isPrivate == false and AccountLoginDropDown:IsShown() then
  118. C_Login.SelectGameAccount(GlueDropDownMenu_GetSelectedValue(AccountLoginDropDown))
  119. end
  120. end
  121. end
  122. return 1
  123. end
  124. if chosenRealm ==
  125. nil then
  126. if GetServerName then
  127. chosenRealm = GetServerName()
  128. end
  129. if G
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement