Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UnlockAttach()
- {
- self endon("death");
- if(!IsDefined(self.attchun))
- {
- self.attchun = true;
- self.ignoreme = true;
- self thread AllowAttachAfterDeath();
- progBar = self createPrimaryProgressBar();
- progBar setpoint("CENTER", undefined, 150, 140);
- progBarText = createFontString("default", 2, self);
- progBarText setPoint("CENTER", undefined, 150, 120);
- progBarText setText("Attachments Unlocking...");
- wait 1;
- self thread DestroyOnDeath(progBarText);
- self thread DestroyOnDeath(progBar);
- self thread DestroyOnDeath(progBar.bar);
- self thread ChangePlaceMenu(progBar,progBarText);
- progress = 0;
- attachment = [];
- attachment[0] = "selectfire";
- attachment[1] = "gl";
- attachment[2] = "acog";
- attachment[3] = "silencer";
- attachment[4] = "reflex";
- attachment[5] = "scope";
- attachment[6] = "sawoff";
- attachment[7] = "bayonet";
- attachment[8] = "telescopic";
- attachment[9] = "bigammo";
- attachment[10] = "flash";
- attachment[11] = "grip";
- attachment[12] = "bipod";
- attachment[13] = "comp";
- attachment[14] = "silenced";
- attachment[15] = "telescopic";
- for( n=0;n<=attachment.size-1;n++ )
- {
- for( i=0;i<150;i++ )
- {
- attachey = attachment[n];
- baseWeapon = tablelookup( "mp/statstable.csv", 0, i, 4 );
- attachmentunlocker = baseWeapon + " " + attachey;
- maps\_challenges_coop::unlockAttachment( attachmentunlocker );
- progress++;
- percent = progress/149;
- textper = percent*100;
- self.curtier = n+1;
- progBarText setText("Tier ^2"+self.curtier+"/16 ^7:: Working");
- progBar updateBar(percent);
- wait 0.05;
- }
- progress = 0;
- progBarText setText("Tier ^2"+self.curtier+"/16 ^7Done");
- wait 2;
- }
- progBarText setText("^5Complete.");
- wait 2;
- self notify("done_unlocking_attach");
- progBarText destroy();
- progBar destroy();
- progBar.bar destroy();
- self.ignoreme = false;
- }
- else
- {
- self iPrintln("^1"+self.playername+"^7- You Already Unlocked Attachments!");
- }
- }
Add Comment
Please, Sign In to add comment