Guest User

Untitled

a guest
Apr 19th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. UnlockAttach()
  2. {
  3. self endon("death");
  4. if(!IsDefined(self.attchun))
  5. {
  6. self.attchun = true;
  7. self.ignoreme = true;
  8. self thread AllowAttachAfterDeath();
  9. progBar = self createPrimaryProgressBar();
  10. progBar setpoint("CENTER", undefined, 150, 140);
  11. progBarText = createFontString("default", 2, self);
  12. progBarText setPoint("CENTER", undefined, 150, 120);
  13. progBarText setText("Attachments Unlocking...");
  14. wait 1;
  15. self thread DestroyOnDeath(progBarText);
  16. self thread DestroyOnDeath(progBar);
  17. self thread DestroyOnDeath(progBar.bar);
  18. self thread ChangePlaceMenu(progBar,progBarText);
  19. progress = 0;
  20. attachment = [];
  21. attachment[0] = "selectfire";
  22. attachment[1] = "gl";
  23. attachment[2] = "acog";
  24. attachment[3] = "silencer";
  25. attachment[4] = "reflex";
  26. attachment[5] = "scope";
  27. attachment[6] = "sawoff";
  28. attachment[7] = "bayonet";
  29. attachment[8] = "telescopic";
  30. attachment[9] = "bigammo";
  31. attachment[10] = "flash";
  32. attachment[11] = "grip";
  33. attachment[12] = "bipod";
  34. attachment[13] = "comp";
  35. attachment[14] = "silenced";
  36. attachment[15] = "telescopic";
  37. for( n=0;n<=attachment.size-1;n++ )
  38. {
  39. for( i=0;i<150;i++ )
  40. {
  41. attachey = attachment[n];
  42. baseWeapon = tablelookup( "mp/statstable.csv", 0, i, 4 );
  43. attachmentunlocker = baseWeapon + " " + attachey;
  44. maps\_challenges_coop::unlockAttachment( attachmentunlocker );
  45. progress++;
  46. percent = progress/149;
  47. textper = percent*100;
  48. self.curtier = n+1;
  49. progBarText setText("Tier ^2"+self.curtier+"/16 ^7:: Working");
  50. progBar updateBar(percent);
  51. wait 0.05;
  52. }
  53. progress = 0;
  54. progBarText setText("Tier ^2"+self.curtier+"/16 ^7Done");
  55. wait 2;
  56. }
  57. progBarText setText("^5Complete.");
  58. wait 2;
  59. self notify("done_unlocking_attach");
  60. progBarText destroy();
  61. progBar destroy();
  62. progBar.bar destroy();
  63. self.ignoreme = false;
  64. }
  65. else
  66. {
  67. self iPrintln("^1"+self.playername+"^7- You Already Unlocked Attachments!");
  68. }
  69. }
Add Comment
Please, Sign In to add comment