Advertisement
metario

fuk u bread

May 28th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 16.15 KB | None | 0 0
  1. package Progression2Main
  2. {
  3.   function printMenu(%this,%menu)
  4.   {
  5.     switch$(%menu){
  6.       case menu1:
  7.     %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");
  8.       %this.isMenu = 1;
  9.       %this.selectedOption = menu1;
  10.  
  11.       case menu2:
  12.       %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");
  13.       %this.isMenu = 1;
  14.       %this.selectedOption = menu2;
  15.  
  16.       case menu3:
  17.       %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");
  18.       %this.isMenu = 1;
  19.       %this.selectedOption = menu3;
  20.  
  21.       case clear:
  22.       %this.centerPrint("");
  23.       %this.isMenu = 0;
  24.       %this.selectedOption = 0;
  25.       //Okay. Trail and Hat menus are shown to users only.
  26.       case hatm:
  27.       %this.centerPrint("\c3Current hats:<br>\c5Test1<br> \c3Test2<br> \c3Test3<br> \c3Back");
  28.       %this.selectedOption = hat1;
  29.  
  30.       case hatm2:
  31.       %this.centerPrint("\c3Current hats:<br>\c3Test1<br> \c5Test2<br> \c3Test3<br> \c3Back");
  32.       %this.selectedOption = hat2;
  33.  
  34.       case hatm3:
  35.       %this.centerPrint("\c3Current hats:<br>\c3Test1<br> \c3Test2<br> \c5Test3<br> \c3Back");
  36.       %this.selectedOption = hat3;
  37.  
  38.       case hatmexit:
  39.       %this.centerPrint("\c3Current hats:<br>\c3Test1<br> \c3Test2<br> \c3Test3<br> \c5Back");
  40.       %this.selectedOption = hatexit;
  41.  
  42.       case trailm:
  43.       %this.centerPrint("\c3Current trails:<br>\c5Sparkles<br> \c3Rainbows<br> \c3theJIDF.org<br> \c3Back");
  44.       %this.selectedOption = trail1;
  45.  
  46.       case trailm2:
  47.       %this.centerPrint("\c3Current trails:<br>\c3Sparkles<br> \c5Rainbows<br> \c3theJIDF.org<br> \c3Back");
  48.       %this.selectedOption = trail2;
  49.  
  50.       case trailm3:
  51.       %this.centerPrint("\c3Current trails:<br>\c3Sparkles<br> \c3Rainbows<br> \c5theJIDF.org<br> \c3Back");
  52.       %this.selectedOption = trail3;
  53.  
  54.       case trailmexit:
  55.       %this.centerPrint("\c3Current trails:<br>\c3Sparkles<br> \c3Rainbows<br> \c3theJIDF.org<br> \c5Back");
  56.       %this.selectedOption = trailexit;
  57.  
  58.       case adminm:
  59.       %this.centerPrint("\c4Fun<br>\c3Kick/Ban/Mute<br>\c3Music");
  60.       %this.selectedOption = adminm;
  61.  
  62.       case adminm1:
  63.       %this.centerPrint("\c3Fun<br>\c4Kick/Ban/Mute<br>\c3Music");
  64.       %this.selectedOption = adminm1;
  65.  
  66.       case adminm2:
  67.       %this.centerPrint("\c3Fun<br>\c3Kick/Ban/Mute<br>\c4Music");
  68.       %this.selectedOption = adminm2;
  69.  
  70.       case funm:
  71.       %this.centerPrint("\c4Fling<br>\c3Send to Hell<br>\c3Freeze<br>\c3Unfreeze<br>");
  72.       %this.selectedOption = funFling;
  73.  
  74.       case funm1:
  75.       %this.centerPrint("\c3Fling<br>\c4Send to Hell<br>\c3Freeze<br>\c3Unfreeze<br>");
  76.       %this.selectedOption = funHell;
  77.  
  78.       case funm2:
  79.       %this.centerPrint("\c3Fling<br>\c3Send to Hell<br>\c4Freeze<br>\c3Unfreeze<br>");
  80.       %this.selectedOption = funFreeze;
  81.  
  82.       case funm3:
  83.       %this.centerPrint("\c3Fling<br>\c3Send to Hell<br>\c3Freeze<br>\c4Unfreeze<br>");
  84.       %this.selectedOption = funUnFreeze;
  85.  
  86.       case banm:
  87.       %this.centerPrint("\c4Kick<br>\c3Ban<br>\c3Mute");
  88.       %this.selectedOption = banKickm;
  89.  
  90.       case banm1:
  91.       %this.centerPrint("\c3Kick<br>\c4Ban<br>\c3Mute");
  92.       %this.selectedOption = banBanm;
  93.  
  94.       case banm2:
  95.       %this.centerPrint("\c3Kick<br>\c3Ban<br>\c4Mute");
  96.       %this.selectedOption = banMutem;
  97.  
  98.       case AskForName:
  99.       %this.centerPrint("\c3Please say the ID/name of your target.");
  100.       %this.catchChat = 1;
  101.  
  102.       case confirmy:
  103.       %this.chatMessage("\c3Okay. We've attempted to apply the punishment to the specified individual. Returning you to the previous menu.");
  104.       %this.waitForConfirm = 0;
  105.     }
  106.   }
  107.   function serverCmdSuicide(%this)
  108.   {
  109.     if(%this.canSuicide = 0){
  110.     return;
  111.     }
  112.     else Parent::serverCmdSuicide(%this);
  113.   }
  114.   function serverCmdMessageSent(%this,%msg)
  115.   {
  116.     if(%this.catchChat)
  117.     {
  118.       %ssmsg = stripMLControlChars(%msg);
  119.       if(parseName(%ssmsg).bl_id = %ssmsg)
  120.       %this.chatMessage("You said "@%ssmsg@", who is also known as "@parseName(%ssmsg).getPlayerName()@", is this correct? Please say Yes or No.");
  121.       else if(parseName(%ssmsg).getPlayerName() $= %ssmsg)
  122.       %this.chatMessage("You said "@%ssmsg@", who's ID (if any), is "@parseName(%ssmsg).bl_id@", is this correct? Please say Yes or No.");
  123.       else
  124.       {
  125.         %this.chatMessage("There's no player with the name/ID "@%ssmsg@". Please try again.");
  126.         return;
  127.       }
  128.       %this.ncName = %ssmsg;
  129.       %this.waitForConfirm = 1;
  130.       %this.catchChat = 0;
  131.       return;
  132.     }
  133.     else if(%this.waitForConfirm)
  134.     {
  135.         if(%msg $= "Yes"){
  136.         switch$(%this.requiresMoreInput){
  137.         case 1:
  138.         %this.chatMessage("\c3Okay, can you go into detail for the reason?");
  139.         %this.catchChatR = 1;
  140.  
  141.         default:
  142.         attemptPunishL(%this,%this.wantsTo,parseName(%this.ncName),%this.askedTime,%this.askedReason);
  143.         printMenu(%this,confirmy);
  144.         printMenu(%this,funm);
  145.         return;
  146.       }
  147.     }
  148.  
  149.         else if(%msg $= "No"){
  150.         printMenu(%this,AskForName);
  151.         return;}
  152.       }
  153.     else if(%this.catchChatR)
  154.     {
  155.       %ssmsg = stripMLControlChars(%msg);
  156.       %this.chatMessage("\c3Okay. Now, lastly, can you state the time (in milliseconds!!)");
  157.       %this.reason = %ssmsg;
  158.       %this.catchChatT = 1;
  159.       %this.catchChatR = 0;
  160.       return;
  161.     }
  162.     else if(%this.catchChatT)
  163.     {
  164.       %this.chatMessage("\c3Attempted to apply the punishment >:D");
  165.       attemptPunishL(%this,%this.wantsTo,parseName(%this.ncName),%msg,%this.reason);
  166.       %this.requiresMoreInput = 0;
  167.       %this.catchChatT = 0;
  168.       %this.catchChatR = 0;
  169.     }
  170.     Parent::serverCmdMessageSent(%this,%msg);
  171.   }
  172.   function serverCmdCancelBrick(%this)
  173.   {
  174.     if(%this.isMenu)
  175.     printMenu(%this,clear);
  176.   }
  177.   function attemptPunishL(%this,%input,%target,%time,%reason)
  178.   {
  179.     switch$ (%input)
  180.     {
  181.       case Fling:
  182.       %target.chatMessage("\c3"@%this.getPlayerName()@" attempted to fling you into the air.");
  183.       %target.player.setVelocity("100 100 100");
  184.  
  185.       case Ban:
  186.       if(%target.isAdmin)
  187.       return;
  188.       else BanBLID(%this,%target.bl_id, %time, %reason);
  189.  
  190.       case Kick:
  191.       if(%target.isAdmin)
  192.       return;
  193.       else kick(%this,%target.bl_id);
  194.  
  195.       case StH:
  196.       %target.chatMessage("\c3"@%this.getPlayerName()@" attempted to send you to hell.");
  197.       %target.canSuicide = false;%target.player.positon = $HellPos;
  198.  
  199.       case Freeze:
  200.       %target.chatMessage("\c3"@%this.getPlayerName()@" froze you.");
  201.       %target.player.changeDataBlock(PlayerFrozen);%target.canSuicide = false;
  202.  
  203.       case unFreeze:
  204.       %target.chatMessage("\c3"@%this.getPlayerName()@" unfroze you.");
  205.       %target.player.changeDataBlock(PlayerStandardArmor);%target.canSuicide = true;
  206.     }
  207.   }
  208.   function parseName(%input)
  209.   {
  210.     if(findclientbybl_id(%input) !$= "0")
  211.       return findclientbybl_id(%input);
  212.     else if(findclientbyname(%input) !$= "0")
  213.       return findclientbyname(%input);
  214.  
  215.   }
  216.   //ADD CHECKS HERE!
  217.   //These display the text, and set the selectedOption value to the one you select.
  218.   function serverCmdPlantBrick(%this)
  219.   {
  220.     if(%this.isMenu)
  221.     {
  222.       switch$(%this.selectedOption){
  223.         case menu1:
  224.         printMenu(%this,hatm);
  225.         // in this case, menu2 and menu1 are to display trail+hat options
  226.         case menu2:
  227.           printMenu(%this,trailm);
  228.  
  229.         case menu3:
  230.           if(%this.isSuperAdmin)
  231.           printMenu(%this,adminm);
  232.           else return;
  233.  
  234.           case hat1:
  235.           //this is where the hat gets applied
  236.           $Pref::Server::SavedHat[%this.bl_id] = "Test1";
  237.           %this.chatMessage("\c3You've chosen Test1 as your hat.");
  238.           printMenu(%this,menu1);
  239.  
  240.           case hat2:
  241.           $Pref::Server::SavedHat[%this.bl_id] = "Test2";
  242.           %this.chatMessage("\c3You've chosen Test2 as your hat.");
  243.           printMenu(%this,menu1);
  244.  
  245.           case hat3:
  246.           $Pref::Server::SavedHat[%this.bl_id] = "Test3";
  247.           %this.chatMessage("\c3You've chosen Test3 as your hat.");
  248.           printMenu(%this,menu1);
  249.  
  250.         case hatexit:
  251.           printMenu(%this,    menu1);
  252.           %this.selectedOption = menu1;
  253.  
  254.         case trail1:
  255.         // add trail commands here
  256.         $Pref::Server::SavedTrail[%this.bl_id] = "Flame";
  257.         %this.chatMessage("\c3You've chosen Flame for your trail.");
  258.         printMenu(%this,menu1);
  259.  
  260.         case trail2:
  261.         $Pref::Server::SavedTrail[%this.bl_id] = "Rainbow";
  262.         %this.chatMessage("\c3You've chosen Rainbow for your trail. Good choice.");
  263.         printMenu(%this,menu1);
  264.  
  265.         case trail3:
  266.         if($Pref::Server::JIDF[%this.bl_id]){
  267.         $Pref::Server::SavedTrail[%this.bl_id] = "theJIDF.org";
  268.         %this.chatMessage("\c3You've chosen theJIDF.org for your trail. Donald Trump 2016. Fuck Shafee.");}
  269.         else
  270.         %this.chatMessage("\c3You aren't a JIDF member! Get out!");
  271.         printMenu(%this,menu1);
  272.  
  273.         case trailexit:
  274.         printMenu(%this,menu1);
  275.  
  276.         case adminm:
  277.         printMenu(%this,funm);
  278.  
  279.         case adminm1:
  280.         printMenu(%this,banm);
  281.  
  282.         case adminm2:
  283.         printArtists(%this);
  284.  
  285.         case funFling:
  286.         printMenu(%this,AskForName);%this.wantsTo="Fling";
  287.  
  288.         case funHell:
  289.         printMenu(%this,AskForName);%this.wantsTo="StH";
  290.  
  291.         case funFreeze:
  292.         printMenu(%this,AskForName);%this.wantsTo="Freeze";
  293.  
  294.         case funUnFreeze:
  295.         printMenu(%this,AskForName);%this.wantsTo="Unfreeze";
  296.  
  297.         }
  298.       }
  299.       else printMenu(%this,menu1);
  300.     }
  301.     //This is for switching menu options dynamically. I'm using strStr because it's the one I like. Also it's pretty cool.
  302. function serverCmdShiftBrick(%this,%x,%y,%z)
  303.     {
  304.       //checking if main menu is open, if so, then use the options to move from there.
  305.       //0 = it's open, -1 = it's closed or the person is in another menu.
  306.       //i'm genius. (this took WAYYYY too long.)
  307.  
  308.       %this.isMMopen = strStr(%this.selectedOption,"menu");
  309.       if(%this.isMMopen > -1)
  310.       switch$(%x)
  311.       {
  312.        case 1:
  313.        goUp(%this,mm);
  314.  
  315.    case -1:
  316.      goDown(%this,mm);
  317.      }
  318.       else
  319.       %this.isTMopen = strStr(%this.selectedOption, "trail");
  320.       if(%this.isTMopen > -1)
  321.       switch$(%x)
  322.       {
  323.         case 1:
  324.        goUp(%this,trail);
  325.  
  326.        case -1:
  327.        goDown(%this,trail);
  328.       }
  329.       else
  330.       %this.isHMopen = strStr(%this.selectedOption, "hat");
  331.       if(%this.isHMopen > -1)
  332.       switch$(%x)
  333.       {
  334.         case 1:
  335.         goUp(%this,hat);
  336.  
  337.         case -1:
  338.         goDown(%this,hat);
  339.       }
  340.       else
  341.       %this.isAMopen = strStr(%this.selectedOption, "admin");
  342.       if(%this.AMopen > -1)
  343.       switch$(%x)
  344.       {
  345.         case 1:
  346.         goUp(%this,admin);
  347.  
  348.         case -1:
  349.         goDown(%this,admin);
  350.       }
  351.       else
  352.       %this.isFMopen = strStr(%this.selectedOption, "fun");
  353.       if(%this.isFMopen > -1)
  354.       switch$(%x)
  355.       {
  356.         case 1:
  357.         goUp(%this,fun);
  358.  
  359.         case -1:
  360.         goDown(%this,fun);
  361.       }
  362.       else
  363.       %this.isBMopen = strStr(%this.selectedOption, "ban");
  364.       if(%this.isBMopen > -1)
  365.       switch$(%x)
  366.       {
  367.         case 1:
  368.         goUp(%this,ban);
  369.  
  370.         case -1:
  371.         goDown(%this,ban);
  372.       }
  373.       else
  374.       %this.isMUMopen = strStr(%this.selectedOption, "music");
  375.       if(%this.isMUMopen > -1)
  376.       switch$ (%x)
  377.       {
  378.          case 1:
  379.          goUp(%this,music);
  380.  
  381.          case -1:
  382.          goDown(%this,music);
  383.       }
  384.  
  385. }
  386. };
  387. activatePackage(Progression2Main);
  388. package Progression2Movement
  389. {
  390.   function goUp(%this,%location)
  391.   {
  392.     switch$(%location){
  393.     case hat:
  394.     switch$(%this.selectedOption){
  395.       case hatexit:
  396.       printMenu(%this,hatm3);
  397.  
  398.       case hat3:
  399.       printMenu(%this,hatm2);
  400.  
  401.       case hat2:
  402.       printMenu(%this,hatm);
  403.     }
  404.  
  405.     case trail:
  406.     switch$(%this.selectedOption){
  407.       case trailexit:
  408.       printMenu(%this,trailm3);
  409.  
  410.       case trail3:
  411.       printMenu(%this,trailm2);
  412.  
  413.       case trail2:
  414.       printMenu(%this,trailm);
  415.     }
  416.  
  417.     case mm:
  418.     switch$(%this.selectedOption){
  419.       case menu3:
  420.       printMenu(%this,menu2);
  421.  
  422.       case menu2:
  423.       printMenu(%this,menu1);
  424.     }
  425.  
  426.     case admin:
  427.     switch$ (%this.selectedOption)
  428.     {
  429.       case adminm1:
  430.       printMenu(%this,adminm);
  431.  
  432.       case adminm2:
  433.       printMenu(%this,admin1);
  434.     }
  435.  
  436.     case fun:
  437.     switch$ (%this.selectedOption)
  438.     {
  439.       case funUnFreeze:
  440.       printMenu(%this,funm2);
  441.  
  442.       case funFreeze:
  443.       printMenu(%this,funm1);
  444.  
  445.       case funHell:
  446.       printMenu(%this,funm);
  447.     }
  448.  
  449.     case ban:
  450.     switch$ (%this.selectedOption)
  451.     {
  452.       case banMutem:
  453.       printMenu(%this,banm1);
  454.  
  455.       case banBanm:
  456.         printMenu(%this,banm);
  457.  
  458.     }
  459.  
  460.     case Music:
  461.     switch$ (%this.selectedOption)
  462.     {
  463.       case musicZedd:
  464.       printArtists(%this,"Madeon");
  465.  
  466.       case musicMadeon:
  467.       printArtists(%this);
  468.     }
  469.  
  470.  
  471.   }
  472.   }
  473.   function goDown(%this,%location)
  474.   {
  475.     switch$(%location){
  476.     case hat:
  477.     switch$(%this.selectedOption){
  478.       case hat1:
  479.       printMenu(%this,hatm2);
  480.  
  481.       case hat2:
  482.       printMenu(%this,hatm3);
  483.  
  484.       case hat3:
  485.       printMenu(%this,hatmexit);
  486.     }
  487.  
  488.     case trail:
  489.     switch$(%this.selectedOption){
  490.       case trail1:
  491.       printMenu(%this,trailm2);
  492.  
  493.       case trail2:
  494.       printMenu(%this,trailm3);
  495.  
  496.       case trail3:
  497.       printMenu(%this,trailmexit);
  498.     }
  499.  
  500.     case mm:
  501.     switch$(%this.selectedOption)
  502.     {
  503.       case menu1:
  504.       printMenu(%this,menu2);
  505.  
  506.       case menu2:
  507.       printMenu(%this,menu3);
  508.     }
  509.  
  510.     case admin:
  511.     switch$ (%this.selectedOption)
  512.     {
  513.       case adminm:
  514.       printMenu(%this,adminm1);
  515.  
  516.       case adminm1:
  517.       printMenu(%this,adminm2);
  518.     }
  519.  
  520.     case fun:
  521.     switch$ (%this.selectedOption)
  522.     {
  523.       case funFling:
  524.       printMenu(%this,funm1);
  525.  
  526.       case funHell:
  527.       printMenu(%this,funm2);
  528.  
  529.       case funFreeze:
  530.         printMenu(%this,funm3);
  531.  
  532.     }
  533.     case ban:
  534.     switch$ (%this.selectedOption)
  535.     {
  536.       case kickBanm:
  537.         printMenu(%this,banm1);
  538.  
  539.         case banBanm:
  540.           printMenu(%this,banm2);
  541.  
  542.     }
  543.     case music:
  544.     switch$ (%this.selectedOption)
  545.     {
  546.       case musicJustice:
  547.       printArtists(%this,"Madeon");
  548.  
  549.       case musicMadeon:
  550.       printArtists(%this,"Zedd");
  551.     }
  552.  
  553.  
  554.   }
  555.   }
  556. };
  557. activatePackage(Progression2Movement);
  558. package Progression2Music
  559. {
  560.   function printArtists(%this,%m)
  561.   {
  562.     switch$ (%m)
  563.     {
  564.       case Madeon:
  565.       %this.centerPrint("\c3Justice<br>\c4Madeon<br>\c3Zedd");
  566.       %this.selectedOption = "musicMadeon";
  567.  
  568.       case Zedd:
  569.       %this.centerPrint("\c3Justice<br>\c3Madeon<br>\c4Zedd");
  570.       %this.selectedOption = "musicZedd";
  571.  
  572.       default:
  573.       %this.centerPrint("\c4Justice<br>\c3Madeon<br>\c3Zedd");
  574.       %this.selectedOption = "musicJustice";
  575.   }
  576. }
  577. };
  578. activatePackage("Progression2Music");
  579. datablock PlayerData(PlayerFrozen : PlayerStandardArmor)
  580. {
  581.   runForce = 0;
  582.   runEnergyDrain = 0;
  583.   minRunEnergy = 0;
  584.   maxForwardSpeed = 0;
  585.   maxBackwardSpeed = 0;
  586.   maxSideSpeed = 0;
  587.  
  588.   maxForwardCrouchSpeed = 0;
  589.   maxBackwardCrouchSpeed = 0;
  590.   maxSideCrouchSpeed = 0;
  591.  
  592.   maxDamage = 2000;
  593.  
  594.   jumpEnergyDrain = 0;
  595.   minJumpEnergy = 0;
  596.   jumpDelay = 0;
  597.   canJump = 0;
  598.  
  599.  minJetEnergy = 100;
  600.  jetEnergyDrain = 0;
  601.  canJet = 0;
  602.  
  603.  uiName = "Frozen Player";
  604.  showEnergyBar = false;
  605.  
  606.   runSurfaceAngle  = 0;
  607.   jumpSurfaceAngle = 0;
  608. };
  609.  
  610.  
  611. // 1 = hats 2 = trails
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement