Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.05 KB | None | 0 0
  1. /*
  2. controlInfo() Class written by njaguar
  3. v3.1
  4. */
  5.  
  6. function controlInfo() {
  7. this.controls = new Array();
  8. this.controls.lobby = new Array();
  9. this.controls.lobby.name = "Lobby";
  10. this.controls.lobby.id = 1;
  11.  
  12. this.controls.lobby.textBox = new Array();
  13. this.controls.lobby.textBox.chat = [4,28,410,354,298];
  14. this.controls.lobby.textBox.status = [4,447,398,290,269];
  15. this.controls.lobby.textBox.characterInfo = [4,143,588,230,87];
  16.  
  17. this.controls.lobby.button = new Array();
  18. this.controls.lobby.button.create = [6,533,469,120,20];
  19. this.controls.lobby.button.join = [6,652,469,120,20];
  20. this.controls.lobby.button.channel = [6,535,490,80,20];
  21. this.controls.lobby.button.ladder = [6,614,490,80,20];
  22. this.controls.lobby.button.quit = [6,693,490,80,20];
  23. this.controls.lobby.button.enterChat = [6,27,480,120,20];
  24. this.controls.lobby.button.help = [6,146,480,120,20];
  25.  
  26. this.controls.lobby.location = [
  27. this.controls.lobby.button.enterChat,
  28. this.controls.lobby.button.help,
  29. ];
  30.  
  31.  
  32. this.controls.lobby.inLine = new Array();
  33. this.controls.lobby.inLine.name = "Waiting In Line";
  34. this.controls.lobby.inLine.id = 2;
  35.  
  36. this.controls.lobby.inLine.textBox = new Array();
  37. this.controls.lobby.inLine.textBox.inLine = [4,427,234,300,100];
  38.  
  39. this.controls.lobby.inLine.button = new Array();
  40. this.controls.lobby.inLine.button.cancel = [6,433,433,96,32];
  41.  
  42. this.controls.lobby.inLine.location = [
  43. this.controls.lobby.inLine.textBox.inLine,
  44. this.controls.lobby.inLine.button.cancel,
  45. ];
  46.  
  47. this.controls.lobby.serverDown = new Array();
  48. this.controls.lobby.serverDown.name = "Server Down";
  49. this.controls.lobby.serverDown.id = 24;
  50.  
  51. this.controls.lobby.serverDown.textBox = new Array();
  52. this.controls.lobby.serverDown.textBox.serverDown = [4,438,300,326,150];
  53. this.controls.lobby.serverDown.textBox.serverDown.key = [5139];
  54.  
  55. this.controls.lobby.serverDown.location = [
  56. this.controls.lobby.serverDown.textBox.serverDown,
  57. ]
  58.  
  59. // this is also the Please Wait dialog in the lobby, as well as Character Already Exists for creating chars
  60. this.controls.lobby.pleaseWait = new Array();
  61. this.controls.lobby.pleaseWait.name = "Please Wait...";//"Lost Connection";
  62. this.controls.lobby.pleaseWait.id = 25;
  63.  
  64. this.controls.lobby.pleaseWait.textBox = new Array();
  65. this.controls.lobby.pleaseWait.textBox.pleaseWait = [4,268,320,264,120];
  66.  
  67. this.controls.lobby.pleaseWait.button = new Array();
  68. this.controls.lobby.pleaseWait.button.cancel = [6,351,337,96,32];
  69.  
  70. this.controls.lobby.pleaseWait.location = [
  71. this.controls.lobby.pleaseWait.textBox.pleaseWait,
  72. this.controls.lobby.pleaseWait.button.cancel,
  73. ];
  74.  
  75.  
  76. // this is also the Please Wait dialog in the lobby
  77. this.controls.lobby.lostConnection = new Array();
  78. this.controls.lobby.lostConnection.name = "Lost Connection";
  79. this.controls.lobby.lostConnection.id = 17;
  80.  
  81. this.controls.lobby.lostConnection.textBox = new Array();
  82. this.controls.lobby.lostConnection.textBox.lostConnection = [4,268,320,264,120];
  83. this.controls.lobby.lostConnection.textBox.lostConnection.key = [5351];
  84.  
  85. this.controls.lobby.lostConnection.button = new Array();
  86. this.controls.lobby.lostConnection.button.ok = [6,351,337,96,32];
  87.  
  88. this.controls.lobby.lostConnection.location = [
  89. this.controls.lobby.lostConnection.textBox.lostConnection,
  90. this.controls.lobby.lostConnection.button.ok,
  91. ];
  92.  
  93.  
  94. // Game Name Already Exists
  95. this.controls.lobby.gameExists = new Array();
  96. this.controls.lobby.gameExists.name = "Game Already Exists";
  97. this.controls.lobby.gameExists.id = 26;
  98.  
  99. this.controls.lobby.gameExists.textBox = new Array();
  100. this.controls.lobby.gameExists.textBox.gameExists = [4,438,300,326,150];
  101. this.controls.lobby.gameExists.textBox.gameExists.key = [5138];
  102.  
  103. this.controls.lobby.gameExists.location = [
  104. this.controls.lobby.gameExists.textBox.gameExists,
  105. ];
  106.  
  107.  
  108. // Game Does Not Exist (also A Game Already Exists With That Name and Server Down w/ different key)
  109. this.controls.lobby.gameDoesNotExist = new Array();
  110. this.controls.lobby.gameDoesNotExist.name = "Game Does Not Exist";
  111. this.controls.lobby.gameDoesNotExist.id = 28;
  112.  
  113. this.controls.lobby.gameDoesNotExist.textBox = new Array();
  114. this.controls.lobby.gameDoesNotExist.textBox.text = [4,438,300,326,150];
  115. this.controls.lobby.gameDoesNotExist.textBox.text.key = [5159];
  116.  
  117. this.controls.lobby.gameDoesNotExist.location = [
  118. this.controls.lobby.gameDoesNotExist.textBox.text,
  119. ];
  120.  
  121.  
  122. this.controls.lobby.chat = new Array();
  123. this.controls.lobby.chat.name = "Lobby Chat";
  124. this.controls.lobby.chat.id = 3;
  125.  
  126. this.controls.lobby.chat.button = new Array();
  127. this.controls.lobby.chat.button.send = [6,27,470,80,20];
  128. this.controls.lobby.chat.button.whisper = [6,107,470,80,20];
  129. this.controls.lobby.chat.button.help = [6,187,470,80,20];
  130. this.controls.lobby.chat.button.squelch = [6,27,490,72,20];
  131. this.controls.lobby.chat.button.unsquelch = [6,99,490,96,20];
  132. this.controls.lobby.chat.button.emote = [6,195,490,72,20];
  133.  
  134. this.controls.lobby.chat.textBox = new Array();
  135. this.controls.lobby.chat.textBox.channelName = [4,28,138,354,60];
  136. this.controls.lobby.chat.textBox.channelText = [4,28,410,354,298];
  137.  
  138.  
  139.  
  140. this.controls.lobby.chat.location = [
  141. this.controls.lobby.chat.button.send,
  142. this.controls.lobby.chat.button.whisper,
  143. this.controls.lobby.chat.button.help,
  144. ];
  145.  
  146.  
  147. this.controls.lobby.create = new Array();
  148. this.controls.lobby.create.name = "Create Game";
  149. this.controls.lobby.create.id = 4;
  150.  
  151. this.controls.lobby.create.textBox = new Array();
  152. this.controls.lobby.create.textBox.createGame = [4,496,111,200,22];
  153. this.controls.lobby.create.textBox.gameName = [4,427,134,150,12];
  154. this.controls.lobby.create.textBox.password = [4,427,188,300,12];
  155. this.controls.lobby.create.textBox.gameDescription = [4,427,243,300,12];
  156. this.controls.lobby.create.textBox.maxNumberOfPlayers = [4,632,306,300,12];
  157. this.controls.lobby.create.textBox.characterDifference = [4,632,342,300,12];
  158. this.controls.lobby.create.textBox.levels = [4,705,342,150,12];
  159. this.controls.lobby.create.textBox.normal = [4,723,380,150,12];
  160. this.controls.lobby.create.textBox.nightmare = [4,579,380,150,12];
  161. this.controls.lobby.create.textBox.hell = [4,459,380,150,12];
  162.  
  163. this.controls.lobby.create.editBox = new Array();
  164. this.controls.lobby.create.editBox.gameName = [1,432,162,158,20];
  165. this.controls.lobby.create.editBox.password = [1,432,217,158,20];
  166. this.controls.lobby.create.editBox.gameDescription = [1,432,268,333,20];
  167. this.controls.lobby.create.editBox.maxNumberOfPlayers = [1,657,308,27,20];
  168. this.controls.lobby.create.editBox.characterDifference = [1,657,342,27,20];
  169.  
  170. this.controls.lobby.create.button = new Array();
  171. this.controls.lobby.create.button.createGame = [6,594,433,172,32];
  172. this.controls.lobby.create.button.cancel = [6,433,433,96,32];
  173. this.controls.lobby.create.button.maxNumberOfPlayersUp = [0];
  174. this.controls.lobby.create.button.maxNumberOfPlayersDown = [0];
  175. this.controls.lobby.create.button.useCharacterDifference = [0];
  176. this.controls.lobby.create.button.characterDifferenceUp = [0];
  177. this.controls.lobby.create.button.characterDifferenceDown = [0];
  178. this.controls.lobby.create.button.normal = [6,430,381,16,16];
  179. this.controls.lobby.create.button.nightmare = [6,555,381,16,16];
  180. this.controls.lobby.create.button.hell = [6,698,381,16,16];
  181.  
  182. this.controls.lobby.create.location = [
  183. this.controls.lobby.create.editBox.gameName,
  184. this.controls.lobby.create.editBox.password,
  185. this.controls.lobby.create.editBox.gameDescription,
  186. ];
  187.  
  188.  
  189. // insert all game join controls here
  190. this.controls.lobby.join = new Array();
  191. this.controls.lobby.join.name = "Join Game";
  192. this.controls.lobby.join.id = 5;
  193.  
  194. this.controls.lobby.join.editBox = new Array();
  195. this.controls.lobby.join.editBox.gameName = [1,432,148,155,20];
  196. this.controls.lobby.join.editBox.password = [1,606,148,155,20];
  197.  
  198. this.controls.lobby.join.textBox = new Array();
  199. this.controls.lobby.join.textBox.joinGame = [4,496,106,200,22];
  200. this.controls.lobby.join.textBox.gameName = [4,428,121,150,12];
  201. this.controls.lobby.join.textBox.password = [4,602,121,150,12];
  202. this.controls.lobby.join.textBox.gameNamePlayers = [4,431,212,200,12];
  203. this.controls.lobby.join.textBox.gameList = [4,432,393,160,173]; // list is stored in extended text
  204. this.controls.lobby.join.textBox.gameDetails = [4,609,393,143,194]; // details is stored in extended text
  205.  
  206. this.controls.lobby.join.button = new Array();
  207. this.controls.lobby.join.button.joinGame = [6,594,433,172,32];
  208. this.controls.lobby.join.button.cancel = [6,433,433,96,32];
  209.  
  210. this.controls.lobby.join.location = [
  211. this.controls.lobby.join.editBox.gameName,
  212. this.controls.lobby.join.textBox.joinGame,
  213. this.controls.lobby.join.textBox.gameList,
  214. ];
  215.  
  216.  
  217. // insert all game ladder controls here
  218. this.controls.lobby.ladder = new Array();
  219. this.controls.lobby.ladder.name = "Ladder";
  220. this.controls.lobby.ladder.id = 6;
  221.  
  222. this.controls.lobby.ladder.textBox = new Array();
  223. this.controls.lobby.ladder.button = new Array();
  224. this.controls.lobby.ladder.list = new Array();
  225.  
  226.  
  227. // insert all game channel controls here
  228. this.controls.lobby.channel = new Array();
  229. this.controls.lobby.channel.name = "Channel List";
  230. this.controls.lobby.channel.id = 7;
  231.  
  232. this.controls.lobby.channel.textBox = new Array();
  233. this.controls.lobby.channel.editBox = new Array();
  234. this.controls.lobby.channel.button = new Array();
  235. this.controls.lobby.channel.list = new Array();
  236.  
  237.  
  238. // insert all main menu controls here
  239. this.controls.mainMenu = new Array();
  240. this.controls.mainMenu.name = "Main Menu";
  241. this.controls.mainMenu.id = 8;
  242.  
  243. this.controls.mainMenu.textBox = new Array();
  244. this.controls.mainMenu.textBox.d2Version = [4,0,599,200,40];
  245.  
  246. this.controls.mainMenu.button = new Array();
  247. this.controls.mainMenu.button.gateway = [6,264,391,272,25];
  248. this.controls.mainMenu.button.battleNet = [6,264,366,272,35];
  249. this.controls.mainMenu.button.otherMultiplayer = [6,264,433,272,35];
  250. this.controls.mainMenu.button.singlePlayer = [6,264,324,272,35];
  251. this.controls.mainMenu.button.credits = [6,264,528,135,25];
  252. this.controls.mainMenu.button.cinematics = [6,402,528,135,25];
  253. this.controls.mainMenu.button.exitDiabloII = [6,264,568,272,35];
  254.  
  255. this.controls.mainMenu.location = [
  256. this.controls.mainMenu.button.battleNet,
  257. this.controls.mainMenu.button.otherMultiplayer,
  258. this.controls.mainMenu.button.singlePlayer,
  259. ];
  260.  
  261.  
  262. // connecting to battle.net
  263. this.controls.mainMenu.connecting = new Array();
  264. this.controls.mainMenu.connecting.id = 21;
  265. this.controls.mainMenu.connecting.name = "Connecting to Battle.net";
  266.  
  267. this.controls.mainMenu.connecting.textBox = new Array();
  268. this.controls.mainMenu.connecting.textBox.connectingTo = [4,222,280,340,60];
  269. this.controls.mainMenu.connecting.textBox.body = [4,222,360,340,70]; // contains connecting to battle.net/fastest server, accessing your account, or checking versions
  270. this.controls.mainMenu.connecting.textBox.progress = [4,222,370,340,20]; // dots
  271.  
  272. this.controls.mainMenu.connecting.button = new Array();
  273. this.controls.mainMenu.connecting.button.cancel = [6,330,416,128,35];
  274.  
  275. this.controls.mainMenu.connecting.location = [
  276. this.controls.mainMenu.connecting.textBox.connectingTo,
  277. this.controls.mainMenu.connecting.textBox.body,
  278. this.controls.mainMenu.connecting.textBox.progress,
  279. this.controls.mainMenu.connecting.button.cancel,
  280. ];
  281.  
  282.  
  283. // startup screen
  284. this.controls.d2Splash = new Array();
  285. this.controls.d2Splash.name = "D2 Splash"
  286. this.controls.d2Splash.id = 18;
  287.  
  288. this.controls.d2Splash.textBox = new Array();
  289. this.controls.d2Splash.textBox.copyright = [4,100,580,600,80];
  290.  
  291. this.controls.d2Splash.location = [
  292. this.controls.d2Splash.textBox.copyright,
  293. ];
  294.  
  295.  
  296.  
  297. // insert all bnet login controls here (including account settings)
  298. // add: ACCOUNT SETTINGS, CHANGE PASSWORD, GET NEW PASSWORD, CHANGE EMAIL, CREATE NEW ACCOUNT agreement & form
  299. this.controls.login = new Array();
  300. this.controls.login.name = "Login";
  301. this.controls.login.id = 9;
  302.  
  303. this.controls.login.textBox = new Array();
  304. this.controls.login.textBox.accountName = [4,321,340,300,32];
  305. this.controls.login.textBox.password = [4,321,394,300,32];
  306. this.controls.login.textBox.heading = [4,200,350,400,100];
  307.  
  308. this.controls.login.editBox = new Array();
  309. this.controls.login.editBox.accountName = [1,322,342,162,19];
  310. this.controls.login.editBox.password = [1,322,396,162,19];
  311.  
  312. this.controls.login.button = new Array();
  313. this.controls.login.button.createNewAccount = [6,264,572,272,35];
  314. this.controls.login.button.accountSettings = [6,264,528,272,35];
  315. this.controls.login.button.logIn = [6,264,484,272,35];
  316. this.controls.login.button.exit = [6,33,572,128,35];
  317.  
  318. this.controls.login.location = [
  319. this.controls.login.textBox.accountName,
  320. this.controls.login.editBox.password,
  321. this.controls.login.editBox.accountName,
  322. this.controls.login.button.logIn,
  323. ];
  324.  
  325.  
  326. // login error, permanent failure, bad account or password
  327. this.controls.login.loginError = new Array();
  328. this.controls.login.loginError.name = "Login Error";
  329. this.controls.login.loginError.id = 10;
  330.  
  331. this.controls.login.loginError.textBox = new Array();
  332. this.controls.login.loginError.textBox.loginError = [4,195,237,410,40]; // used for invalid login/password popups
  333. this.controls.login.loginError.textBox.invalidPassword = [4,199,377,402,140];
  334. this.controls.login.loginError.textBox.invalidAccount = [4,199,377,402,140];
  335.  
  336. this.controls.login.loginError.button = new Array();
  337. this.controls.login.loginError.button.ok = [6,335,412,128,35]; // used for invalid login/password popups
  338.  
  339. this.controls.login.loginError.location = [
  340. this.controls.login.loginError.textBox.loginError,
  341. this.controls.login.loginError.button.ok,
  342. ];
  343.  
  344.  
  345. // unable to connect, related to ip-bans or no internet connection
  346. this.controls.login.unableToConnect = new Array();
  347. this.controls.login.unableToConnect.name = "Unable To Connect";
  348. this.controls.login.unableToConnect.id = 11;
  349.  
  350. this.controls.login.unableToConnect.textBox = new Array();
  351. this.controls.login.unableToConnect.textBox.title = [4,158,220,485,40];
  352. this.controls.login.unableToConnect.textBox.head = [4,162,320,477,100];
  353. this.controls.login.unableToConnect.textBox.body = [4,162,420,477,100];
  354.  
  355. this.controls.login.unableToConnect.button = new Array();
  356. this.controls.login.unableToConnect.button.ok = [6,335,450,128,35];
  357.  
  358. this.controls.login.unableToConnect.location = [
  359. this.controls.login.unableToConnect.textBox.title,
  360. this.controls.login.unableToConnect.textBox.head,
  361. this.controls.login.unableToConnect.button.ok,
  362. ];
  363.  
  364.  
  365. this.controls.login.cdkeyInUse = new Array();
  366. this.controls.login.cdkeyInUse.name = "Cdkey In Use";
  367. this.controls.login.cdkeyInUse.id = 19;
  368.  
  369. this.controls.login.cdkeyInUse.textBox = new Array();
  370. this.controls.login.cdkeyInUse.textBox.unableToConnect = [4,158,220,485,40];
  371. this.controls.login.cdkeyInUse.textBox.cdkeyInUse = [4,162,270,477,50];
  372. this.controls.login.cdkeyInUse.textBox.byWho = [4,158,310,485,40];
  373. this.controls.login.cdkeyInUse.textBox.onlyOneRegistered = [4,162,420,477,100];
  374.  
  375. this.controls.login.cdkeyInUse.button = new Array();
  376. this.controls.login.cdkeyInUse.button.ok = [6,335,450,128,35];
  377.  
  378. this.controls.login.cdkeyInUse.location = [
  379. this.controls.login.cdkeyInUse.textBox.unableToConnect,
  380. this.controls.login.cdkeyInUse.textBox.cdkeyInUse,
  381. this.controls.login.cdkeyInUse.textBox.byWho,
  382. ];
  383.  
  384.  
  385. // login - invalid cdkey
  386. this.controls.login.invalidCdkey = new Array();
  387. this.controls.login.invalidCdkey.id = 22;
  388. this.controls.login.invalidCdkey.name = "Invalid Cdkey";
  389.  
  390. this.controls.login.invalidCdkey.textBox = new Array();
  391. this.controls.login.invalidCdkey.textBox.unableToConnect = [4,158,220,485,40];
  392. this.controls.login.invalidCdkey.textBox.invalidCdkey = [4,162,320,477,100];
  393. this.controls.login.invalidCdkey.textBox.invalidCdkey.key = [5202, 10912];
  394. this.controls.login.invalidCdkey.textBox.uninstall = [4,162,420,477,100];
  395.  
  396. this.controls.login.invalidCdkey.button = new Array();
  397. this.controls.login.invalidCdkey.button.ok = [6,335,450,128,35];
  398.  
  399. this.controls.login.invalidCdkey.location = [
  400. this.controls.login.invalidCdkey.textBox.unableToConnect,
  401. this.controls.login.invalidCdkey.textBox.invalidCdkey,
  402. this.controls.login.invalidCdkey.textBox.uninstall,
  403. this.controls.login.invalidCdkey.button.ok
  404. ];
  405.  
  406.  
  407. // insert all character select screen controls here (including single player)
  408. this.controls.characterSelect = new Array();
  409. this.controls.characterSelect.name = "Character Select";
  410. this.controls.characterSelect.id = 12;
  411.  
  412. this.controls.characterSelect.textBox = new Array();
  413. this.controls.characterSelect.textBox.selectedCharName = [4,85,78,466,42];
  414. this.controls.characterSelect.textBox.currentRealm = [4,629,44,145,21];
  415. this.controls.characterSelect.textBox.selectedCurrentRealm = [4,626,100,151,44];
  416. this.controls.characterSelect.textBox.characters = new Array(8);
  417. this.controls.characterSelect.textBox.characters[0] = [4,237,178,72,93];
  418. this.controls.characterSelect.textBox.characters[1] = [4,509,178,72,93];
  419. this.controls.characterSelect.textBox.characters[2] = [4,237,271,72,93];
  420. this.controls.characterSelect.textBox.characters[3] = [4,509,271,72,93];
  421. this.controls.characterSelect.textBox.characters[4] = [4,237,364,72,93];
  422. this.controls.characterSelect.textBox.characters[5] = [4,509,364,72,93];
  423. this.controls.characterSelect.textBox.characters[6] = [4,237,457,72,93];
  424. this.controls.characterSelect.textBox.characters[7] = [4,509,457,72,93];
  425. this.controls.characterSelect.textBox.characterInfo = new Array(8);
  426. this.controls.characterSelect.textBox.characterInfo[0] = [4,37,178,200,92];
  427. this.controls.characterSelect.textBox.characterInfo[1] = [4,309,178,200,92];
  428. this.controls.characterSelect.textBox.characterInfo[2] = [4,37,271,200,92];
  429. this.controls.characterSelect.textBox.characterInfo[3] = [4,309,271,200,92];
  430. this.controls.characterSelect.textBox.characterInfo[4] = [4,37,364,200,92];
  431. this.controls.characterSelect.textBox.characterInfo[5] = [4,309,364,200,92];
  432. this.controls.characterSelect.textBox.characterInfo[6] = [4,37,457,200,92];
  433. this.controls.characterSelect.textBox.characterInfo[7] = [4,309,457,200,92];
  434. this.controls.characterSelect.textBox.deleteConfirmation = [];
  435.  
  436. this.controls.characterSelect.button = new Array();
  437. this.controls.characterSelect.button.ok = [6,627,572,128,35];
  438. this.controls.characterSelect.button.exit = [6,33,572,128,35];
  439. this.controls.characterSelect.button.createNew = [6,33,528,168,60];
  440. this.controls.characterSelect.button.convertTo = [6,233,528,168,60];
  441. this.controls.characterSelect.button.deleteChar = [6,433,528,168,60];
  442. this.controls.characterSelect.button.changeRealm = [6,609,113,182,30];
  443. this.controls.characterSelect.button.deleteYes = [];
  444. this.controls.characterSelect.button.deleteNo = [];
  445.  
  446. this.controls.characterSelect.location = [
  447. this.controls.characterSelect.textBox.selectedCharName,
  448. this.controls.characterSelect.textBox.characters[0],
  449. this.controls.characterSelect.textBox.characterInfo[7],
  450. ];
  451.  
  452.  
  453. this.controls.characterCreate = new Array();
  454. this.controls.characterCreate.name = "Character Create";
  455. this.controls.characterCreate.id = 29;
  456.  
  457. this.controls.characterCreate.editBox = new Array();
  458. this.controls.characterCreate.editBox.charName = [1,318,510,157,16];
  459.  
  460. this.controls.characterCreate.textBox = new Array();
  461. this.controls.characterCreate.textBox.selectHeroClass = [4,0,80,800,50];
  462. this.controls.characterCreate.textBox.charName = [4,321,512,200,32];
  463. this.controls.characterCreate.textBox.bottomText = [4,210,610,430,120];
  464. this.controls.characterCreate.textBox.expansionChar = [4,339,561,200,32];
  465. this.controls.characterCreate.textBox.hardcore = [4,339,581,100,32];
  466. this.controls.characterCreate.textBox.ladderChar = [4,339,601,200,32];
  467. this.controls.characterCreate.textBox.className = [4,0,180,800,100];
  468. this.controls.characterCreate.textBox.classDesc = [4,250,210,300,100];
  469.  
  470. this.controls.characterCreate.button = new Array();
  471. this.controls.characterCreate.button.exit = [6,33,572,128,35];
  472. this.controls.characterCreate.button.expansionChar = [6,319,540,15,16];
  473. this.controls.characterCreate.button.hardcore = [6,319,560,15,16];
  474. this.controls.characterCreate.button.ladderChar = [6,319,580,15,16];
  475. this.controls.characterCreate.button.ok = [6,627,572,128,35];
  476.  
  477. this.controls.characterCreate.chars = new Array(9);
  478. this.controls.characterCreate.chars[0] = [2,400,330,88,184];
  479. this.controls.characterCreate.chars[1] = [2,626,353,88,184];
  480. this.controls.characterCreate.chars[2] = [2,521,339,88,184];
  481. this.controls.characterCreate.chars[3] = [2,301,333,88,184];
  482. this.controls.characterCreate.chars[4] = [2,232,364,88,184];
  483. this.controls.characterCreate.chars[5] = [2,100,337,88,184];
  484. this.controls.characterCreate.chars[6] = [2,720,370,88,184];
  485. this.controls.characterCreate.chars[7] = [2,345,470,110,127];
  486. this.controls.characterCreate.chars[8] = [2,268,350,264,176];
  487.  
  488. this.controls.characterCreate.location = [
  489. this.controls.characterCreate.textBox.selectHeroClass,
  490. this.controls.characterCreate.textBox.bottomText,
  491. ];
  492.  
  493. /*
  494. this.controls.characterCreate.alreadyExists = new Array();
  495. this.controls.characterCreate.alreadyExists.name = "Character Create - Dupe Name";
  496. this.controls.characterCreate.alreadyExists.id = 30;
  497.  
  498. this.controls.characterCreate.alreadyExists.textBox = new Array();
  499. this.controls.characterCreate.alreadyExists.textBox.errorMsg = [4,268,320,264,120];
  500.  
  501. this.controls.characterCreate.alreadyExists.button = new Array();
  502. this.controls.characterCreate.alreadyExists.button.ok = [6,351,337,96,32];
  503.  
  504. this.controls.characterCreate.alreadyExists.location = [
  505. this.controls.characterCreate.alreadyExists.textBox.errorMsg,
  506. this.controls.characterCreate.alreadyExists.button.ok,
  507. ];
  508. */
  509.  
  510.  
  511. // realm down on char select screen
  512. this.controls.characterSelect.realmDown = new Array();
  513. this.controls.characterSelect.realmDown.name = "Realm Down";
  514. this.controls.characterSelect.realmDown.id = 13;
  515.  
  516. this.controls.characterSelect.realmDown.textBox = new Array();
  517. this.controls.characterSelect.realmDown.textBox.realmDown = [4,37,178,547,35];
  518. this.controls.characterSelect.realmDown.textBox.realmDown.key = [11162];
  519.  
  520. this.controls.characterSelect.realmDown.location = [
  521. this.controls.characterSelect.realmDown.textBox.realmDown,
  522. ];
  523. this.controls.characterSelect.realmDown.checkNullText = true;
  524.  
  525.  
  526. // Connecting on char select screen
  527. this.controls.characterSelect.connecting = new Array();
  528. this.controls.characterSelect.connecting.name = "Connecting...";
  529. this.controls.characterSelect.connecting.id = 23;
  530.  
  531. this.controls.characterSelect.connecting.textBox = new Array();
  532. this.controls.characterSelect.connecting.textBox.connecting = [4,37,178,547,35];
  533. this.controls.characterSelect.connecting.textBox.connecting.key = [11065];
  534.  
  535. this.controls.characterSelect.connecting.location = [
  536. this.controls.characterSelect.connecting.textBox.connecting,
  537. ];
  538. this.controls.characterSelect.connecting.checkNullText = true;
  539.  
  540.  
  541. // Popup: You were,disconnected from,battle.net. Please,reconnect.
  542. this.controls.characterSelect.disconnected = new Array();
  543. this.controls.characterSelect.disconnected.name = "Disconnected";
  544. this.controls.characterSelect.disconnected.id = 14;
  545.  
  546. this.controls.characterSelect.disconnected.textBox = new Array();
  547. this.controls.characterSelect.disconnected.textBox.disconnected = [4,268,300,264,100];
  548.  
  549. this.controls.characterSelect.disconnected.button = new Array();
  550. this.controls.characterSelect.disconnected.button.ok = [6,351,337,96,32];
  551.  
  552. this.controls.characterSelect.disconnected.location = [
  553. this.controls.characterSelect.disconnected.textBox.disconnected,
  554. this.controls.characterSelect.disconnected.button.ok,
  555. ];
  556.  
  557.  
  558. // Single Player - Difficulty Select
  559. this.controls.characterSelect.difficulty = new Array();
  560. this.controls.characterSelect.difficulty.name = "Select Difficulty";
  561. this.controls.characterSelect.difficulty.id = 20;
  562.  
  563. this.controls.characterSelect.difficulty.textBox = new Array();
  564. this.controls.characterSelect.difficulty.textBox.select = [4,264,260,272,35];
  565.  
  566. this.controls.characterSelect.difficulty.button = new Array();
  567. this.controls.characterSelect.difficulty.button.normal = [6,264,297,272,35];
  568. this.controls.characterSelect.difficulty.button.nightmare = [6,264,340,272,35];
  569. this.controls.characterSelect.difficulty.button.hell = [6,264,383,272,35];
  570.  
  571. this.controls.characterSelect.difficulty.location = [
  572. this.controls.characterSelect.difficulty.textBox.select,
  573. this.controls.characterSelect.difficulty.button.normal,
  574. this.controls.characterSelect.difficulty.button.nightmare,
  575. this.controls.characterSelect.difficulty.button.hell,
  576. ];
  577.  
  578.  
  579. // new character controls
  580. this.controls.newCharacter = new Array();
  581. this.controls.newCharacter.name = "New Character";
  582. this.controls.newCharacter.id = 15;
  583.  
  584. this.controls.newCharacter.textBox = new Array();
  585. this.controls.newCharacter.editBox = new Array();
  586. this.controls.newCharacter.button = new Array();
  587.  
  588.  
  589. // Please Wait control popup
  590. this.controls.characterSelect.pleaseWait = new Array();
  591. this.controls.characterSelect.pleaseWait.name = "Please Wait";
  592. this.controls.characterSelect.pleaseWait.id = 16;
  593.  
  594. this.controls.characterSelect.pleaseWait.textBox = new Array();
  595. this.controls.characterSelect.pleaseWait.textBox.pleaseWait = [4,268,300,264,100];
  596.  
  597. this.controls.characterSelect.pleaseWait.button = new Array();
  598. this.controls.characterSelect.pleaseWait.button.cancel = [6,351,337,96,32];
  599.  
  600. this.controls.characterSelect.pleaseWait.location = [
  601. this.controls.characterSelect.pleaseWait.textBox.pleaseWait,
  602. this.controls.characterSelect.pleaseWait.button.cancel,
  603. ];
  604.  
  605.  
  606. // select gateway (realm)
  607. this.controls.gateway = new Array();
  608. this.controls.gateway.name = "Select Gateway";
  609. this.controls.gateway.id = 27;
  610. this.controls.gateway.baseX = 285;
  611. this.controls.gateway.baseY = 352;
  612. this.controls.gateway.nextY = 24;
  613.  
  614. this.controls.gateway.textBox = new Array();
  615. this.controls.gateway.textBox.selectGateway = [4,237,270,340,35];
  616. this.controls.gateway.textBox.ifCurrentGateway = [4,257,345,320,84];
  617. this.controls.gateway.textBox.realmList = [4,257,500,292,160];
  618.  
  619. this.controls.gateway.button = new Array();
  620. this.controls.gateway.button.ok = [6,281,538,96,32];
  621. this.controls.gateway.button.cancel = [6,436,538,96,32];
  622.  
  623. this.controls.gateway.location = [
  624. this.controls.gateway.textBox.realmList,
  625. this.controls.gateway.button.ok,
  626. this.controls.gateway.button.cancel,
  627. ];
  628.  
  629.  
  630. // getLocation will iterate over these, in this order, do error checkers first
  631. this.locations = [
  632. this.controls.characterSelect.pleaseWait,
  633. this.controls.lobby.gameDoesNotExist,
  634. this.controls.lobby.gameExists,
  635. this.controls.lobby.lostConnection,
  636. this.controls.lobby.pleaseWait,
  637. this.controls.lobby.inLine,
  638. this.controls.lobby.serverDown,
  639. this.controls.characterSelect.realmDown,
  640. this.controls.characterSelect.connecting,
  641. this.controls.characterSelect.disconnected,
  642. this.controls.login.loginError,
  643. this.controls.login.invalidCdkey,
  644. this.controls.login.unableToConnect,
  645. this.controls.login.cdkeyInUse,
  646. this.controls.lobby.create,
  647. this.controls.lobby.join,
  648. // ladder
  649. // channel
  650. this.controls.lobby.chat,
  651. this.controls.lobby,
  652. this.controls.characterSelect.difficulty,
  653. this.controls.characterSelect,
  654. this.controls.login,
  655. this.controls.mainMenu.connecting,
  656. this.controls.gateway,
  657. this.controls.mainMenu,
  658. this.controls.d2Splash,
  659. this.controls.characterCreate,
  660. ];
  661.  
  662. this.gameTypes = [
  663. this.controls.mainMenu.button.singlePlayer,
  664. this.controls.mainMenu.button.battleNet,
  665. this.controls.mainMenu.button.otherMultiplayer,
  666. ];
  667.  
  668. this.gameDifficulties = [
  669. this.controls.lobby.create.button.normal,
  670. this.controls.lobby.create.button.nightmare,
  671. this.controls.lobby.create.button.hell,
  672. ];
  673.  
  674. this.singlePlayerDifficulties = [
  675. this.controls.characterSelect.difficulty.button.normal,
  676. this.controls.characterSelect.difficulty.button.nightmare,
  677. this.controls.characterSelect.difficulty.button.hell,
  678. ];
  679.  
  680. this.clickDelay = 250;
  681. this.textDelay = 100;
  682. this.clickDelayRandom = 0;
  683. this.textDelayRandom = 0;
  684.  
  685. this.realmNames = [];
  686. this.realmNames["U.S. WEST"] = 0;
  687. this.realmNames["U.S. EAST"] = 1;
  688. this.realmNames["ASIA"] = 2;
  689. this.realmNames["EUROPE"] = 3;
  690.  
  691.  
  692. // returns control object if exists, else null
  693. this.get = function( controlArray ) {
  694. retControl = 0;
  695. if( controlArray && controlArray.length==5 ) {
  696. retControl = GetControl( controlArray[0], controlArray[1], controlArray[2], controlArray[3], controlArray[4] );
  697. }
  698. return retControl;
  699. }
  700.  
  701. // clicks object, if it exists, return true if exists, false if not
  702. this.click = function( controlArray, _x, _y, _skipdelay ) {
  703. if( control = this.get( controlArray ) ) {
  704. if( _x || _y ) {
  705. control.Click( _x, _y );
  706. } else {
  707. control.Click( );
  708. }
  709.  
  710. if(!_skipdelay) Delay( this.clickDelay + Random( 0, this.clickDelayRandom ) );
  711. return true;
  712. }
  713. return false;
  714. }
  715.  
  716. // sets text on object, returns false if not exists
  717. this.setText = function( controlArray, str ) {
  718. if( controlArray[0]==1 ) {
  719. if( control = this.get( controlArray ) ) {
  720. control.SetText( str );
  721.  
  722. Delay( this.textDelay + Random( 0, this.textDelayRandom ) );
  723. return true;
  724. }
  725. }
  726. return false;
  727. }
  728.  
  729. // clicks a realm entry, this is 0 based! 0 = top entry (uswest)
  730. this.clickRealmEntry = function( realmEntryIndex ) {
  731. this.click( this.controls.gateway.textBox.realmList, 0, (realmEntryIndex*this.controls.gateway.nextY)+(this.controls.gateway.nextY/2) );
  732. }
  733.  
  734. // returns the 0 based index of the currently selected realm
  735. this.getCurrentRealmIndex = function( ) {
  736. retVal = -1;
  737. control = this.get( controlData.controls.mainMenu.button.gateway );
  738. if(control) {
  739. realmString = control.text.substring(control.text.indexOf(":")+2, control.text.length);
  740. if(realmString in this.realmNames) retVal = this.realmNames[realmString];
  741. }
  742. return retVal;
  743. }
  744.  
  745. this.getLocation = function( ) {
  746. for(_i=0; _i<this.locations.length; _i++) {
  747. found = 0;
  748. for(_j=0; _j<this.locations[_i].location.length; _j++) {
  749. if( (control = this.get( this.locations[_i].location[_j] )) && (!this.locations[_i].checkNullText || control.text!=null) ) {
  750. if(this.locations[_i].location[_j].key) {
  751. for(_k=0; _k<this.locations[_i].location[_j].key.length; _k++) {
  752. if((_s = control.GetText()) && GetLocaleString(this.locations[_i].location[_j].key[_k]) == String(_s.join(" ")) ) {
  753. found++;
  754. break;
  755. }
  756. }
  757. } else {
  758. found++;
  759. }
  760. }
  761. }
  762. if(found == this.locations[_i].location.length) return this.locations[_i];
  763. }
  764.  
  765. return 0; // no valid location found
  766.  
  767. }
  768.  
  769. // returns the current location, see locations array for listing
  770. this.getLocationQuick = function( ) {
  771. for(_i=0; _i<this.locations.length; _i++) {
  772. found = true;
  773. for(_j=0; _j<this.locations[_i].location.length; _j++) {
  774. if( !(control = this.get( this.locations[_i].location[_j] )) ||
  775. ( this.locations[_i].checkNullText && control.text==null ) ) {
  776. found = false;
  777. break;
  778. }
  779. }
  780. if(found) return this.locations[_i];
  781. }
  782.  
  783. return 0; // no valid location found
  784. }
  785. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement