Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- le._apps["crazy"] = {
- categories: "Amusement",
- name: "Crazy arror",
- icon: "/c/sys/skins/w93/error.png",
- exec: function(url, opt) {
- $loader(["/c/libs/MIDIFile/dist/MIDIFile.js"], function() {
- var cont = le._dom.desktop;
- ////////////////////////////////////////////////
- var styleTopppp =
- " position: absolute;" +
- " top: 0;" +
- " bottom: 0;" +
- " left: 0;" +
- " right: 0;" +
- " width: auto;" +
- " height: auto;" +
- " z-index: 500;" +
- " background-repeat: no-repeat;" +
- " background-size: contain;" +
- " image-rendering: pixelated;" +
- " background-position: center;";
- var bsodEl = document.createElement("div");
- bsodEl.id = "CE_BSOD";
- bsodEl.className = "hide";
- var loginEl = document.createElement("div");
- loginEl.id = "CE_LOGIN";
- loginEl.className = "hide";
- var styles = document.createElement("style");
- styles.innerHTML =
- "#CE_BSOD{" +
- styleTopppp +
- " background-color: #0102AC;" +
- ' background-image: url("/c/programs/crazyError/BSoD.png");' +
- "}#CE_LOGIN{" +
- styleTopppp +
- " background-color: #000;" +
- " background-size: initial;" +
- ' background-image: url("/c/sys/img/progress_bar.gif");' +
- "}";
- cont.appendChild(styles);
- cont.appendChild(bsodEl);
- cont.appendChild(loginEl);
- // console.log(cont.offsetWidth)
- var folders = [
- "/c/",
- "/c/sys/cursors/",
- "/c/files/images/icons/",
- "/c/sys/skins/w93/",
- "/c/sys/skins/w93/16/",
- "/c/sys/skins/w93/ext/",
- "/c/libs/",
- "/a/",
- "/c/sys/fonts/C64_TrueType_v1.2-STYLE/",
- "/c/files/music/modules/ACID/",
- "/c/programs/filter",
- "/c/sys/img/",
- ];
- var sequences;
- // var bsodEl = document.get
- var bsod = {
- show: function() {
- bsodEl.classList.remove("hide");
- },
- hide: function() {
- bsodEl.classList.add("hide");
- },
- };
- var login = {
- show: function() {
- loginEl.classList.remove("hide");
- },
- hide: function() {
- loginEl.classList.add("hide");
- },
- };
- // ENGINE
- /////////
- var w2 = cont.offsetWidth / 2;
- var h2 = cont.offsetHeight / 2;
- function pointFromPointAngleRadius(myPoint, myAngle, myRadius) {
- var newPoint = [0.0, 0.0];
- newPoint[0] =
- myPoint[0] +
- Math.cos(myAngle * 3.14 / 180.0) * Math.floor(myRadius);
- newPoint[1] =
- myPoint[1] +
- Math.sin(myAngle * 3.14 / 180.0) * Math.floor(myRadius);
- return newPoint;
- }
- var trigo = {
- cnt: 0,
- exec: function(total) {
- var xy = pointFromPointAngleRadius(
- [w2, h2],
- this.cnt * (360 / total) - 90,
- cont.offsetWidth / 5
- );
- this.cnt++;
- var cnt = this.cnt;
- return {
- left: xy[0] - 380 / 2,
- top: xy[1] - 110 / 2,
- };
- },
- };
- var spin = {
- cnt: 0,
- exec: function(total) {
- var xy = pointFromPointAngleRadius(
- [w2, h2],
- this.cnt * (360 / total) - 90,
- cont.offsetWidth / 5
- );
- this.cnt++;
- var cnt = this.cnt;
- return {
- left: xy[0] - 380 / 2,
- top: xy[1] - 110 / 2,
- baseClass: "ui_alert fx_spin",
- };
- },
- };
- var OK = {
- cnt: 0,
- exec: function() {
- var xy = pointFromPointAngleRadius(
- [w2, h2],
- this.cnt * (360 / 10) - 90,
- cont.offsetWidth / 5
- );
- this.cnt++;
- var cnt = this.cnt;
- return {
- left: xy[0] - 380 / 2,
- top: xy[1] - 110 / 2,
- style: {
- transform: "scale(" + cnt / 2 + ")",
- },
- };
- },
- };
- function resetSeq() {
- trigo.cnt = 0;
- spin.cnt = 0;
- OK.cnt = 0;
- sequences = [
- { top: 200, left: 200, noOut: true },
- { top: 23, left: 23, noOut: true },
- { top: 23, left: cont.offsetWidth - 380 - 23, noOut: true },
- ];
- }
- resetSeq();
- var sounds = {};
- var notes = {
- 24: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/24.mp3').play()
- sounds[24].play();
- $alert(
- $extend(
- {
- title: "Error",
- msg:
- "Cock and ball torture (CBT), penis torture or dick torture is a sexual activity involving application of pain or constriction to the penis or testicles. This may involve directly painful activities, such as genital piercing, wax play, genital spanking, squeezing, ball-busting, genital flogging, urethral play, tickle torture, erotic electrostimulation, kneeing or kicking. The recipient of such activities may receive direct physical pleasure via masochism, or emotional pleasure through erotic humiliation, or knowledge that the play is pleasing to a sadistic dominant. Many of these practices carry significant health risks.",
- img: "/c/sys/skins/w93/error.png",
- center: false,
- sound: null,
- animationIn: "slideInLeft",
- onready: function() {
- if (this.cfg.maxTop && this.cfg.maxLeft) resetSeq();
- },
- },
- seq
- )
- );
- },
- 25: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/25.mp3').play()
- sounds[25].play();
- $alert(
- $extend(
- {
- title: "TADAAAA",
- msg: "†¥bˇYf˜˜gYiugb§76©§§¶§§›¶•¶•5RÁF•¶°Ô·˙´·¸µ≤",
- img: "/c/sys/skins/w93/trophy.gif",
- btnOk: "¥¥¥¥§¶∞§¶¥",
- sound: null,
- center: true,
- animationIn: "tada",
- },
- seq
- )
- );
- },
- 26: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/26.mp3').play()
- sounds[26].play();
- $alert(
- $extend(
- {
- title: "ãåÅÅÅÅ‚¨ãƒ©ãƒ¼",
- msg: "ã‚÷¿¿÷÷÷¿ã‚¹ã‚¯ãŒæ£å¸¸ã«å“«]“:”Ú‘'æ‘æ]OP∏lplp¬¬˚ø˚¬¬∆∆˙˙©ÓÔK¤±æ•—ã—ã¾ã—ãŸ",
- img: "/c/sys/skins/w93/alert.png",
- btnOk: "ワオ",
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 27: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/27.mp3').play()
- sounds[27].play();
- $alert(
- $extend(
- {
- title: "エラー",
- msg: "タスクãŒæ£å¸¸ã«å¤±æ•—ã—ã¾ã—ãŸ",
- img: "/c/sys/skins/w93/info.png",
- btnOk: "ワオ",
- sound: null,
- center: false,
- style: {
- transform: "scale(2)",
- },
- onready: function() {
- var ttt = this;
- setTimeout(function() {
- ttt.destroy();
- }, 100);
- },
- },
- seq
- )
- );
- },
- 28: function(seq) {
- // truc aleatoire
- // $audio('/c/programs/crazyError/SOUNDS/28.mp3').play()
- sounds[28].play();
- $alert(
- $extend(
- {
- title: "エラー",
- msg: "タスクãŒæ£å¸¸ã«å¤±æ•—ã—ã¾ã—ãŸ",
- img: "/c/sys/skins/w93/error.png",
- btnOk: "ワオ",
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 29: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/29.mp3').play()
- sounds[29].play();
- $alert(
- $extend(
- {
- title: "MOUP",
- msg: "タスクãŒæ£å¸¸ã«å¤±æ•—ã—ã¾ã—ãŸ",
- img: "/c/files/images/icons/no.png",
- btnOk: "ワオ",
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 30: function(seq) {
- // console.log('left')
- // $audio('/c/programs/crazyError/SOUNDS/30.mp3').play()
- sounds[30].play();
- $alert(
- $extend(
- {
- title: "KAHCT",
- msg: '何ã‹å•é¡Œã§ã‚‚ "C:\\Program Files" 笑',
- img: "/c/sys/skins/w93/install.png",
- btnOk: "ã„ã„ãˆ",
- btnCancel: "ã†ã‚“",
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 31: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/31.mp3').play()
- sounds[31].play();
- $alert(
- $extend(
- {
- title: "ウィンドウ",
- msg:
- "曖昧ã•å›žé¿ ã“ã®é …ç›®ã§ã¯ã€ã‚³ãƒ³ãƒ”ュータã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚·ã‚¹ãƒ†ãƒ ã«ãŠã‘るウィンドウã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚一般的ãªã€Œçª“ã€ã«ã¤ã„ã¦ã¯ã€Œçª“ã€ã‚’ã”覧ãã ã•ã„。フãƒãƒ¼åˆ¶å¾¡ã«ãŠã‘るウィンドウã«ã¤ã„ã¦ã¯ã€Œã‚¹ãƒ©ã‚¤ãƒ‡ã‚£ãƒ³ã‚°ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã€ã‚’ã”覧ãã ã•ã„。シャープã®æ¶²æ™¶ãƒ†ãƒ¬ãƒ“ã®ãƒ–ランドå称ã«ã¤ã„ã¦ã¯ã€Œã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ (シャープã®è£½å“)ã€ã‚’ã”覧ãã ã•ã„。芸能事務所ã«ã¤ã„ã¦ã¯ã€Œã‚¦ã‚£ãƒ³ãƒ‰ãƒ¼ (芸能プãƒãƒ€ã‚¯ã‚·ãƒ§ãƒ³)ã€ã‚’ã”覧ãã ã•ã„。PEARLã®ã‚¢ãƒ«ãƒãƒ ã«ã¤ã„ã¦ã¯ã€ŒWINDOWã€ã‚’ã”覧ãã ã•ã„。",
- img: "/c/files/images/icons/lol.png",
- btnOk: "ã„ã„ãˆ",
- btnCancel: "ã†ã‚“",
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 32: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/32.mp3').play()
- sounds[32].play();
- $alert(
- $extend(
- {
- title: "エラー",
- msg: '何ã‹å•é¡Œã§ã‚‚ "C:\\Program Files" 笑',
- img: "/c/files/images/icons/yea.png",
- btnOk: "ã„ã„ãˆ",
- btnCancel: "ã†ã‚“",
- // ,baseClass: 'fx_spin ui_alert'
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 33: function(seq) {
- // notif
- // $audio('/c/programs/crazyError/SOUNDS/33.mp3').play()
- sounds[33].play();
- $notif(
- $extend(
- {
- text: "ã‚ã¾ã‚Šã«ã‚‚多ãã®ã‚¨ãƒ©ãƒ¼ç¬‘",
- speed: 1,
- },
- seq
- )
- );
- },
- 34: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/34.mp3').play()
- sounds[34].play();
- $alert(
- $extend(
- {
- title: "エラー",
- msg: '何ã‹å•é¡Œã§ã‚‚ "C:\\Program Files" 笑',
- img: "/c/sys/skins/w93/floppy-format.png",
- btnOk: "ã„ã„ãˆ",
- btnCancel: "ã†ã‚“",
- sound: null,
- center: false,
- },
- seq
- )
- );
- },
- 35: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/35.mp3').play()
- sounds[35].play();
- $alert(
- $extend(
- {
- title: "ã‚ã¾ã‚Šã«ã‚‚多ãã®ã‚¨ãƒ©ãƒ¼ç¬‘",
- msg: "Windowsエクスプãƒãƒ¼ãƒ©ãŒå‹•ä½œã‚’åœæ¢ã—ã¾ã—ãŸ",
- img: "/c/sys/skins/w93/alert.png",
- btnOk: "ã„ã„ãˆ",
- btnCancel: "ã†ã‚“",
- center: false,
- sound: null,
- width: 200,
- },
- seq
- )
- );
- },
- 36: function(seq) {
- // shutdown
- // $audio('/c/programs/crazyError/SOUNDS/36.mp3').play()
- sounds[36].play();
- $alert(
- $extend(
- {
- title: "ã‚ã¾ã‚Šã«ã‚‚多ãã®ã‚¨ãƒ©ãƒ¼ç¬‘",
- msg: "Windowsエクスプãƒãƒ¼ãƒ©ãŒå‹•ä½œã‚’åœæ¢ã—ã¾ã—ãŸ",
- img: "/c/sys/skins/w93/question.png",
- btnOk: "ã„ã„ãˆ",
- btnCancel: "ã†ã‚“",
- center: false,
- sound: null,
- },
- seq
- )
- );
- },
- 37: function(seq) {
- // bonjour
- // $audio('/c/programs/crazyError/SOUNDS/37.mp3').play()
- sounds[37].play();
- $alert(
- $extend(
- {
- title: "エラー",
- msg:
- '曖昧ã•å›žé¿ "C:\\WINDOWS" ç§ã¯ä½•ã‚’入力ã—ã¦ã„ã‚‹ã®ã‹åˆ†ã‹ã‚Šã¾ã›ã‚“',
- img: "/c/sys/skins/w93/error.png",
- center: false,
- sound: null,
- },
- seq
- )
- );
- },
- 38: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/38.mp3').play()
- sounds[38].play();
- $prompt(
- {
- msg: "Enter your Credit card number",
- center: false,
- },
- ""
- );
- },
- 39: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/39.mp3').play()
- sounds[39].play();
- $alert(
- $extend(
- {
- title: "エラー",
- msg:
- '曖昧ã•å›žé¿ "C:\\WINDOWS" ç§ã¯ä½•ã‚’入力ã—ã¦ã„ã‚‹ã®ã‹åˆ†ã‹ã‚Šã¾ã›ã‚“',
- img: "/c/files/images/icons/derp.png",
- btnOk: "OK",
- center: false,
- sound: null,
- onready: function() {
- var ttt = this;
- setTimeout(function() {
- ttt.destroy();
- }, 500);
- },
- },
- seq
- )
- );
- },
- 40: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/40.mp3').play()
- sounds[40].play();
- $explorer(folders[~~(Math.random() * folders.length)], {
- window: {
- width: 100 + Math.random() * 400,
- height: 100 + Math.random() * 300,
- },
- });
- },
- 41: function(seq) {
- // $audio('/c/programs/crazyError/SOUNDS/41.mp3').play()
- sounds[41].play();
- $alert(
- $extend(
- {
- title: "Error",
- msg:
- "Windows has detected that your monitor<br>is not plugined in.",
- img: "/c/sys/skins/w93/settings.png",
- btnOk: "wat",
- center: false,
- sound: null,
- },
- seq
- )
- );
- },
- };
- // RUN
- //////
- function loadSound(url) {
- return new Promise(function(resolve, reject) {
- var sound = new Howl({
- buffer: false,
- urls: [url],
- onload: function() {
- resolve(sound);
- },
- });
- });
- }
- var all = [
- fetch("/c/programs/crazyError/CRAZY-ERROR-170BPM.mid", {
- credentials: "include",
- }),
- new Promise(function(resolve, reject) {
- var sound = new Howl({
- buffer: true,
- urls: ["/c/programs/crazyError/CRAZY-ERROR-170BPM.wav"],
- onload: function() {
- resolve(sound);
- },
- });
- }),
- ];
- for (var i = 24; i < 42; i++) {
- all.push(loadSound("/c/programs/crazyError/SOUNDS/" + i + ".mp3"));
- }
- Promise.all(all).then(function(assets) {
- var midi = assets.shift();
- var track = assets.shift();
- assets.forEach(function(sound, i) {
- sounds[24 + i] = sound;
- });
- // console.log(sounds)
- track.volume(0.5);
- midi.arrayBuffer().then(function(buffer) {
- var midiFile = new MIDIFile(buffer);
- midiFile.header.setTicksPerBeat(
- midiFile.header.getTicksPerBeat() / 120 * 170
- );
- var events = midiFile.getMidiEvents();
- var curTime = 0; // performance.now();
- var eventBytes = [];
- // return
- var seqNum = {};
- var seqStart = {};
- var seqCursor = {};
- var lastParam;
- var lastSeq;
- function getTotal(param) {
- var total = seqNum[param][seqCursor[param]];
- // console.log(total)
- return total;
- }
- // return
- var gom = 0;
- for (var i = 0, j = events.length; i < j; i++) {
- var ev = events[i];
- if (ev.param2 > 70 && ev.param1 !== 0) {
- if (lastParam !== ev.param1) {
- seqCursor[ev.param1] = -1;
- seqStart[i] = ev.param1;
- if (!seqNum[ev.param1]) seqNum[ev.param1] = [0];
- else seqNum[ev.param1].push(0);
- }
- lastParam = ev.param1;
- seqNum[ev.param1][seqNum[ev.param1].length - 1]++;
- }
- //////////////////////
- !(function(ev, i) {
- if (i === 0)
- setTimeout(function() {
- track.play();
- }, curTime + ev.playTime);
- setTimeout(function() {
- if (seqStart[i]) seqCursor[seqStart[i]]++;
- // console.log(JSON.stringify(ev))
- // console.log(i)
- if (ev.param1 === 0 && ev.param2 >= 70) {
- // $exe('fx ' + le._fx)
- // $exe('fx ' + le._fx[~~(Math.random() * le._fx.length)])
- // gom++
- resetSeq();
- $window.instances.forEach(function(item) {
- if (item && item.destroy) item.close();
- });
- $window.instances.length = 0;
- }
- if (ev.param1 === 24) {
- if (ev.param2 >= 70 && notes[ev.param1]) {
- sequences[0].top += 23;
- sequences[0].left += 23;
- notes[ev.param1](sequences[0]);
- // console.log(seqCursor[ev.param1])
- // notes[ev.param1](spin.exec(getTotal(ev.param1)))
- // notes[39](OK.exec())
- }
- } else if (ev.param1 === 39) {
- if (ev.param2 >= 70 && notes[ev.param1]) {
- notes[ev.param1](OK.exec());
- }
- } else if (ev.param1 === 35) {
- if (ev.param2 >= 70 && notes[ev.param1]) {
- var tt = getTotal(ev.param1);
- if (tt > 5) {
- notes[ev.param1](spin.exec(getTotal(ev.param1)));
- } else {
- // notes[ev.param1](trigo.exec(getTotal(ev.param1)))
- notes[ev.param1]();
- }
- // notes[ev.param1](spin.exec(getTotal(ev.param1)))
- }
- } else if (ev.param1 === 26) {
- if (ev.param2 < 70) bsod.hide();
- else bsod.show();
- } else if (ev.param1 === 41) {
- if (ev.param2 < 70) login.hide();
- else login.show();
- } else if (ev.param1 === 42) {
- if (ev.param2 < 70) login.hide();
- else login.show();
- } else if (ev.param1 === 29) {
- if (ev.param2 >= 70 && notes[ev.param1]) {
- sequences[1].top += 23;
- sequences[1].left += 23;
- notes[ev.param1](sequences[1]);
- }
- } else if (ev.param1 === 30) {
- if (ev.param2 >= 70 && notes[ev.param1]) {
- sequences[2].top += 23;
- sequences[2].left -= 23;
- notes[ev.param1](sequences[2]);
- }
- } else if (ev.param1 === 32) {
- if (ev.param2 >= 70 && notes[ev.param1]) {
- notes[ev.param1](trigo.exec(getTotal(ev.param1)));
- }
- } else {
- if (ev.param2 > 100 && notes[ev.param1]) notes[ev.param1]();
- }
- }, curTime + ev.playTime);
- })(events[i], i);
- //////////////////////
- }
- });
- });
- //////////////////////////
- });
- },
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement