Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Progression2Main
- {
- function printMenu(%this,%menu)
- {
- switch$(%menu){
- case menu1:
- %this.centerPrint("\c3Welcome to SuperPowered! <br>\c3To close this, press your cancel brick key.<br>\c4Hat: \c5"@$Pref::Server::SavedHat[%this.bl_id]@" \c4Trail: \c5"@$Pref::Server::SavedTrail[%this.bl_id]@"<br>\c4 Hats<br>\c3 Trails<br>Admin");
- %this.isMenu = 1;
- %this.selectedOption = menu1;
- case menu2:
- %this.centerPrint("\c3Welcome to SuperPowered! <br>\c3To close this, press your cancel brick key.<br>\c4Hat: \c5"@$Pref::Server::SavedHat[%this.bl_id]@" \c4Trail: \c5"@$Pref::Server::SavedTrail[%this.bl_id]@"<br>\c3 Hats<br>\c4 Trails<br>Admin");
- %this.isMenu = 1;
- %this.selectedOption = menu2;
- case menu3:
- %this.centerPrint("\c3Welcome to SuperPowered! <br>\c3To close this, press your cancel brick key.<br>\c4Hat: \c5"@$Pref::Server::SavedHat[%this.bl_id]@" \c4Trail: \c5"@$Pref::Server::SavedTrail[%this.bl_id]@"<br>\c3 Hats<br>\c3 Trails<br>\c4Admin");
- %this.isMenu = 1;
- %this.selectedOption = menu3;
- case clear:
- %this.centerPrint("");
- %this.isMenu = 0;
- %this.selectedOption = 0;
- //Okay. Trail and Hat menus are shown to users only.
- case hatm:
- %this.centerPrint("\c3Current hats:<br>\c5Test1<br> \c3Test2<br> \c3Test3<br> \c3Back");
- %this.selectedOption = hat1;
- case hatm2:
- %this.centerPrint("\c3Current hats:<br>\c3Test1<br> \c5Test2<br> \c3Test3<br> \c3Back");
- %this.selectedOption = hat2;
- case hatm3:
- %this.centerPrint("\c3Current hats:<br>\c3Test1<br> \c3Test2<br> \c5Test3<br> \c3Back");
- %this.selectedOption = hat3;
- case hatmexit:
- %this.centerPrint("\c3Current hats:<br>\c3Test1<br> \c3Test2<br> \c3Test3<br> \c5Back");
- %this.selectedOption = hatexit;
- case trailm:
- %this.centerPrint("\c3Current trails:<br>\c5Sparkles<br> \c3Rainbows<br> \c3theJIDF.org<br> \c3Back");
- %this.selectedOption = trail1;
- case trailm2:
- %this.centerPrint("\c3Current trails:<br>\c3Sparkles<br> \c5Rainbows<br> \c3theJIDF.org<br> \c3Back");
- %this.selectedOption = trail2;
- case trailm3:
- %this.centerPrint("\c3Current trails:<br>\c3Sparkles<br> \c3Rainbows<br> \c5theJIDF.org<br> \c3Back");
- %this.selectedOption = trail3;
- case trailmexit:
- %this.centerPrint("\c3Current trails:<br>\c3Sparkles<br> \c3Rainbows<br> \c3theJIDF.org<br> \c5Back");
- %this.selectedOption = trailexit;
- case adminm:
- %this.centerPrint("\c4Fun<br>\c3Kick/Ban/Mute<br>\c3Music");
- %this.selectedOption = adminm;
- case adminm1:
- %this.centerPrint("\c3Fun<br>\c4Kick/Ban/Mute<br>\c3Music");
- %this.selectedOption = adminm1;
- case adminm2:
- %this.centerPrint("\c3Fun<br>\c3Kick/Ban/Mute<br>\c4Music");
- %this.selectedOption = adminm2;
- case funm:
- %this.centerPrint("\c4Fling<br>\c3Send to Hell<br>\c3Freeze<br>\c3Unfreeze<br>");
- %this.selectedOption = funFling;
- case funm1:
- %this.centerPrint("\c3Fling<br>\c4Send to Hell<br>\c3Freeze<br>\c3Unfreeze<br>");
- %this.selectedOption = funHell;
- case funm2:
- %this.centerPrint("\c3Fling<br>\c3Send to Hell<br>\c4Freeze<br>\c3Unfreeze<br>");
- %this.selectedOption = funFreeze;
- case funm3:
- %this.centerPrint("\c3Fling<br>\c3Send to Hell<br>\c3Freeze<br>\c4Unfreeze<br>");
- %this.selectedOption = funUnFreeze;
- case banm:
- %this.centerPrint("\c4Kick<br>\c3Ban<br>\c3Mute");
- %this.selectedOption = banKickm;
- case banm1:
- %this.centerPrint("\c3Kick<br>\c4Ban<br>\c3Mute");
- %this.selectedOption = banBanm;
- case banm2:
- %this.centerPrint("\c3Kick<br>\c3Ban<br>\c4Mute");
- %this.selectedOption = banMutem;
- case AskForName:
- %this.centerPrint("\c3Please say the ID/name of your target.");
- %this.catchChat = 1;
- case confirmy:
- %this.chatMessage("\c3Okay. We've attempted to apply the punishment to the specified individual. Returning you to the previous menu.");
- %this.waitForConfirm = 0;
- }
- }
- function serverCmdSuicide(%this)
- {
- if(%this.canSuicide = 0){
- return;
- }
- else Parent::serverCmdSuicide(%this);
- }
- function serverCmdMessageSent(%this,%msg)
- {
- if(%this.catchChat)
- {
- %ssmsg = stripMLControlChars(%msg);
- if(parseName(%ssmsg).bl_id = %ssmsg)
- %this.chatMessage("You said "@%ssmsg@", who is also known as "@parseName(%ssmsg).getPlayerName()@", is this correct? Please say Yes or No.");
- else if(parseName(%ssmsg).getPlayerName() $= %ssmsg)
- %this.chatMessage("You said "@%ssmsg@", who's ID (if any), is "@parseName(%ssmsg).bl_id@", is this correct? Please say Yes or No.");
- else
- {
- %this.chatMessage("There's no player with the name/ID "@%ssmsg@". Please try again.");
- return;
- }
- %this.ncName = %ssmsg;
- %this.waitForConfirm = 1;
- %this.catchChat = 0;
- return;
- }
- else if(%this.waitForConfirm)
- {
- if(%msg $= "Yes"){
- switch$(%this.requiresMoreInput){
- case 1:
- %this.chatMessage("\c3Okay, can you go into detail for the reason?");
- %this.catchChatR = 1;
- default:
- attemptPunishL(%this,%this.wantsTo,parseName(%this.ncName),%this.askedTime,%this.askedReason);
- printMenu(%this,confirmy);
- printMenu(%this,funm);
- return;
- }
- }
- else if(%msg $= "No"){
- printMenu(%this,AskForName);
- return;}
- }
- else if(%this.catchChatR)
- {
- %ssmsg = stripMLControlChars(%msg);
- %this.chatMessage("\c3Okay. Now, lastly, can you state the time (in milliseconds!!)");
- %this.reason = %ssmsg;
- %this.catchChatT = 1;
- %this.catchChatR = 0;
- return;
- }
- else if(%this.catchChatT)
- {
- %this.chatMessage("\c3Attempted to apply the punishment >:D");
- attemptPunishL(%this,%this.wantsTo,parseName(%this.ncName),%msg,%this.reason);
- %this.requiresMoreInput = 0;
- %this.catchChatT = 0;
- %this.catchChatR = 0;
- }
- Parent::serverCmdMessageSent(%this,%msg);
- }
- function serverCmdCancelBrick(%this)
- {
- if(%this.isMenu)
- printMenu(%this,clear);
- }
- function attemptPunishL(%this,%input,%target,%time,%reason)
- {
- switch$ (%input)
- {
- case Fling:
- %target.chatMessage("\c3"@%this.getPlayerName()@" attempted to fling you into the air.");
- %target.player.setVelocity("100 100 100");
- case Ban:
- if(%target.isAdmin)
- return;
- else BanBLID(%this,%target.bl_id, %time, %reason);
- case Kick:
- if(%target.isAdmin)
- return;
- else kick(%this,%target.bl_id);
- case StH:
- %target.chatMessage("\c3"@%this.getPlayerName()@" attempted to send you to hell.");
- %target.canSuicide = false;%target.player.positon = $HellPos;
- case Freeze:
- %target.chatMessage("\c3"@%this.getPlayerName()@" froze you.");
- %target.player.changeDataBlock(PlayerFrozen);%target.canSuicide = false;
- case unFreeze:
- %target.chatMessage("\c3"@%this.getPlayerName()@" unfroze you.");
- %target.player.changeDataBlock(PlayerStandardArmor);%target.canSuicide = true;
- }
- }
- function parseName(%input)
- {
- if(findclientbybl_id(%input) !$= "0")
- return findclientbybl_id(%input);
- else if(findclientbyname(%input) !$= "0")
- return findclientbyname(%input);
- }
- //ADD CHECKS HERE!
- //These display the text, and set the selectedOption value to the one you select.
- function serverCmdPlantBrick(%this)
- {
- if(%this.isMenu)
- {
- switch$(%this.selectedOption){
- case menu1:
- printMenu(%this,hatm);
- // in this case, menu2 and menu1 are to display trail+hat options
- case menu2:
- printMenu(%this,trailm);
- case menu3:
- if(%this.isSuperAdmin)
- printMenu(%this,adminm);
- else return;
- case hat1:
- //this is where the hat gets applied
- $Pref::Server::SavedHat[%this.bl_id] = "Test1";
- %this.chatMessage("\c3You've chosen Test1 as your hat.");
- printMenu(%this,menu1);
- case hat2:
- $Pref::Server::SavedHat[%this.bl_id] = "Test2";
- %this.chatMessage("\c3You've chosen Test2 as your hat.");
- printMenu(%this,menu1);
- case hat3:
- $Pref::Server::SavedHat[%this.bl_id] = "Test3";
- %this.chatMessage("\c3You've chosen Test3 as your hat.");
- printMenu(%this,menu1);
- case hatexit:
- printMenu(%this, menu1);
- %this.selectedOption = menu1;
- case trail1:
- // add trail commands here
- $Pref::Server::SavedTrail[%this.bl_id] = "Flame";
- %this.chatMessage("\c3You've chosen Flame for your trail.");
- printMenu(%this,menu1);
- case trail2:
- $Pref::Server::SavedTrail[%this.bl_id] = "Rainbow";
- %this.chatMessage("\c3You've chosen Rainbow for your trail. Good choice.");
- printMenu(%this,menu1);
- case trail3:
- if($Pref::Server::JIDF[%this.bl_id]){
- $Pref::Server::SavedTrail[%this.bl_id] = "theJIDF.org";
- %this.chatMessage("\c3You've chosen theJIDF.org for your trail. Donald Trump 2016. Fuck Shafee.");}
- else
- %this.chatMessage("\c3You aren't a JIDF member! Get out!");
- printMenu(%this,menu1);
- case trailexit:
- printMenu(%this,menu1);
- case adminm:
- printMenu(%this,funm);
- case adminm1:
- printMenu(%this,banm);
- case adminm2:
- printArtists(%this);
- case funFling:
- printMenu(%this,AskForName);%this.wantsTo="Fling";
- case funHell:
- printMenu(%this,AskForName);%this.wantsTo="StH";
- case funFreeze:
- printMenu(%this,AskForName);%this.wantsTo="Freeze";
- case funUnFreeze:
- printMenu(%this,AskForName);%this.wantsTo="Unfreeze";
- }
- }
- else printMenu(%this,menu1);
- }
- //This is for switching menu options dynamically. I'm using strStr because it's the one I like. Also it's pretty cool.
- function serverCmdShiftBrick(%this,%x,%y,%z)
- {
- //checking if main menu is open, if so, then use the options to move from there.
- //0 = it's open, -1 = it's closed or the person is in another menu.
- //i'm genius. (this took WAYYYY too long.)
- %this.isMMopen = strStr(%this.selectedOption,"menu");
- if(%this.isMMopen > -1)
- switch$(%x)
- {
- case 1:
- goUp(%this,mm);
- case -1:
- goDown(%this,mm);
- }
- else
- %this.isTMopen = strStr(%this.selectedOption, "trail");
- if(%this.isTMopen > -1)
- switch$(%x)
- {
- case 1:
- goUp(%this,trail);
- case -1:
- goDown(%this,trail);
- }
- else
- %this.isHMopen = strStr(%this.selectedOption, "hat");
- if(%this.isHMopen > -1)
- switch$(%x)
- {
- case 1:
- goUp(%this,hat);
- case -1:
- goDown(%this,hat);
- }
- else
- %this.isAMopen = strStr(%this.selectedOption, "admin");
- if(%this.AMopen > -1)
- switch$(%x)
- {
- case 1:
- goUp(%this,admin);
- case -1:
- goDown(%this,admin);
- }
- else
- %this.isFMopen = strStr(%this.selectedOption, "fun");
- if(%this.isFMopen > -1)
- switch$(%x)
- {
- case 1:
- goUp(%this,fun);
- case -1:
- goDown(%this,fun);
- }
- else
- %this.isBMopen = strStr(%this.selectedOption, "ban");
- if(%this.isBMopen > -1)
- switch$(%x)
- {
- case 1:
- goUp(%this,ban);
- case -1:
- goDown(%this,ban);
- }
- else
- %this.isMUMopen = strStr(%this.selectedOption, "music");
- if(%this.isMUMopen > -1)
- switch$ (%x)
- {
- case 1:
- goUp(%this,music);
- case -1:
- goDown(%this,music);
- }
- }
- };
- activatePackage(Progression2Main);
- package Progression2Movement
- {
- function goUp(%this,%location)
- {
- switch$(%location){
- case hat:
- switch$(%this.selectedOption){
- case hatexit:
- printMenu(%this,hatm3);
- case hat3:
- printMenu(%this,hatm2);
- case hat2:
- printMenu(%this,hatm);
- }
- case trail:
- switch$(%this.selectedOption){
- case trailexit:
- printMenu(%this,trailm3);
- case trail3:
- printMenu(%this,trailm2);
- case trail2:
- printMenu(%this,trailm);
- }
- case mm:
- switch$(%this.selectedOption){
- case menu3:
- printMenu(%this,menu2);
- case menu2:
- printMenu(%this,menu1);
- }
- case admin:
- switch$ (%this.selectedOption)
- {
- case adminm1:
- printMenu(%this,adminm);
- case adminm2:
- printMenu(%this,admin1);
- }
- case fun:
- switch$ (%this.selectedOption)
- {
- case funUnFreeze:
- printMenu(%this,funm2);
- case funFreeze:
- printMenu(%this,funm1);
- case funHell:
- printMenu(%this,funm);
- }
- case ban:
- switch$ (%this.selectedOption)
- {
- case banMutem:
- printMenu(%this,banm1);
- case banBanm:
- printMenu(%this,banm);
- }
- case Music:
- switch$ (%this.selectedOption)
- {
- case musicZedd:
- printArtists(%this,"Madeon");
- case musicMadeon:
- printArtists(%this);
- }
- }
- }
- function goDown(%this,%location)
- {
- switch$(%location){
- case hat:
- switch$(%this.selectedOption){
- case hat1:
- printMenu(%this,hatm2);
- case hat2:
- printMenu(%this,hatm3);
- case hat3:
- printMenu(%this,hatmexit);
- }
- case trail:
- switch$(%this.selectedOption){
- case trail1:
- printMenu(%this,trailm2);
- case trail2:
- printMenu(%this,trailm3);
- case trail3:
- printMenu(%this,trailmexit);
- }
- case mm:
- switch$(%this.selectedOption)
- {
- case menu1:
- printMenu(%this,menu2);
- case menu2:
- printMenu(%this,menu3);
- }
- case admin:
- switch$ (%this.selectedOption)
- {
- case adminm:
- printMenu(%this,adminm1);
- case adminm1:
- printMenu(%this,adminm2);
- }
- case fun:
- switch$ (%this.selectedOption)
- {
- case funFling:
- printMenu(%this,funm1);
- case funHell:
- printMenu(%this,funm2);
- case funFreeze:
- printMenu(%this,funm3);
- }
- case ban:
- switch$ (%this.selectedOption)
- {
- case kickBanm:
- printMenu(%this,banm1);
- case banBanm:
- printMenu(%this,banm2);
- }
- case music:
- switch$ (%this.selectedOption)
- {
- case musicJustice:
- printArtists(%this,"Madeon");
- case musicMadeon:
- printArtists(%this,"Zedd");
- }
- }
- }
- };
- activatePackage(Progression2Movement);
- package Progression2Music
- {
- function printArtists(%this,%m)
- {
- switch$ (%m)
- {
- case Madeon:
- %this.centerPrint("\c3Justice<br>\c4Madeon<br>\c3Zedd");
- %this.selectedOption = "musicMadeon";
- case Zedd:
- %this.centerPrint("\c3Justice<br>\c3Madeon<br>\c4Zedd");
- %this.selectedOption = "musicZedd";
- default:
- %this.centerPrint("\c4Justice<br>\c3Madeon<br>\c3Zedd");
- %this.selectedOption = "musicJustice";
- }
- }
- };
- activatePackage("Progression2Music");
- datablock PlayerData(PlayerFrozen : PlayerStandardArmor)
- {
- runForce = 0;
- runEnergyDrain = 0;
- minRunEnergy = 0;
- maxForwardSpeed = 0;
- maxBackwardSpeed = 0;
- maxSideSpeed = 0;
- maxForwardCrouchSpeed = 0;
- maxBackwardCrouchSpeed = 0;
- maxSideCrouchSpeed = 0;
- maxDamage = 2000;
- jumpEnergyDrain = 0;
- minJumpEnergy = 0;
- jumpDelay = 0;
- canJump = 0;
- minJetEnergy = 100;
- jetEnergyDrain = 0;
- canJet = 0;
- uiName = "Frozen Player";
- showEnergyBar = false;
- runSurfaceAngle = 0;
- jumpSurfaceAngle = 0;
- };
- // 1 = hats 2 = trails
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement