-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbooki.html
More file actions
880 lines (798 loc) · 46.2 KB
/
booki.html
File metadata and controls
880 lines (798 loc) · 46.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="Booki BETA v10.2 - Quantum WebXOS Story Forge: Generate unique sci-fi stories with a quantum-powered narrative engine. Explore Web3 multiverse tales!">
<meta name="keywords" content="sci-fi story generator, quantum storytelling, Web3 narrative, Booki, WebXOS, science fiction, space adventure, AI story forge">
<meta name="author" content="WebXOS BETA">
<meta name="robots" content="index, follow">
<meta property="og:title" content="Booki BETA v10.2 - Quantum WebXOS Story Forge">
<meta property="og:description" content="Craft unique sci-fi stories with Booki, a quantum-powered narrative engine for Web3 multiverse adventures.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://webxos.netlify.app/booki">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Booki BETA v10.2 - Quantum WebXOS Story Forge">
<meta name="twitter:description" content="Generate epic sci-fi stories with Booki's quantum narrative engine. Dive into Web3 multiverse adventures!">
<link rel="icon" type="image/png" href="/favicon.ico">
<title>Booki BETA v10.2 - Quantum WebXOS Sci-Fi Story Generator</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&display=swap');
:root {
--ui-color: #00ffcc;
--bg-color: #000;
--panel-bg: rgba(0, 0, 0, 0.7);
--glow-shadow: 0 0 12px var(--ui-color), 0 0 20px var(--ui-color);
--inset-shadow: inset 0 0 8px var(--ui-color);
--text-glow: 0 0 8px var(--ui-color);
--border-width: 3px;
--font-size-base: 1rem;
--button-width: 6rem;
--button-height: 2.5rem;
}
*, *::before, *::after {
box-sizing: border-box;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
font-size: var(--font-size-base);
}
body {
font-family: 'Orbitron', monospace;
background: var(--bg-color);
color: var(--ui-color);
line-height: 1.5;
display: flex;
flex-direction: column;
font-weight: 700;
text-shadow: var(--text-glow);
position: relative;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(0, 255, 204, 0.2) 2px, transparent 2px);
background-size: 25px 25px;
animation: starryGlow 3s infinite linear;
z-index: -1;
}
@keyframes starryGlow {
0% { opacity: 0.5; transform: scale(1); }
50% { opacity: 0.9; transform: scale(1.1); }
100% { opacity: 0.5; transform: scale(1); }
}
#output {
white-space: pre-wrap;
border: var(--border-width) solid var(--ui-color);
padding: 1rem;
flex: 1;
overflow-y: auto;
box-shadow: var(--glow-shadow), var(--inset-shadow);
margin: 1rem;
background: var(--panel-bg);
text-shadow: var(--text-glow);
transform: translateZ(10px);
}
#input-area {
padding: 1rem;
flex-shrink: 0;
background: var(--panel-bg);
border-top: var(--border-width) solid var(--ui-color);
box-shadow: var(--glow-shadow);
}
.input-line {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
input {
font-family: 'Orbitron', monospace;
background: var(--panel-bg);
color: var(--ui-color);
border: var(--border-width) solid var(--ui-color);
padding: 0.4rem;
font-size: var(--font-size-base);
font-weight: 700;
box-shadow: var(--glow-shadow), var(--inset-shadow);
flex-grow: 1;
text-shadow: var(--text-glow);
transform: translateZ(5px);
}
.button-group {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
justify-content: center;
}
button {
font-family: 'Orbitron', monospace;
background: var(--panel-bg);
color: var(--ui-color);
border: var(--border-width) solid var(--ui-color);
padding: 0.4rem 1rem;
font-size: var(--font-size-base);
font-weight: 700;
box-shadow: var(--glow-shadow), var(--inset-shadow);
width: var(--button-width);
height: var(--button-height);
cursor: pointer;
text-shadow: var(--text-glow);
transform: translateZ(8px);
transition: all 0.2s ease;
}
button:hover {
background: var(--ui-color);
color: var(--bg-color);
box-shadow: 0 0 20px var(--ui-color), 0 0 30px var(--ui-color);
transform: translateZ(12px);
}
footer {
text-align: center;
padding: 1rem;
font-size: var(--font-size-base);
color: var(--ui-color);
text-shadow: var(--text-glow);
border-top: var(--border-width) solid var(--ui-color);
box-shadow: var(--glow-shadow);
flex-shrink: 0;
}
.wallet-popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--panel-bg);
border: var(--border-width) solid var(--ui-color);
padding: 1.2rem;
box-shadow: 0 0 20px var(--ui-color), 0 0 30px var(--ui-color);
z-index: 1000;
color: var(--ui-color);
font-family: 'Orbitron', monospace;
width: min(90%, 22rem);
max-height: 80vh;
overflow-y: auto;
text-shadow: var(--text-glow);
text-align: center;
}
.wallet-popup h2 {
margin: 0 0 0.8rem;
font-size: 1.2rem;
text-shadow: var(--text-glow);
}
.wallet-popup input {
width: 100%;
margin: 0.5rem 0;
}
.wallet-popup button {
width: 100%;
margin: 0.5rem 0;
}
.wallet-popup #nftOutput {
font-size: var(--font-size-base);
margin-top: 0.5rem;
line-height: 1.5;
text-shadow: var(--text-glow);
}
.close-btn {
position: absolute;
top: 0.5rem;
right: 0.8rem;
cursor: pointer;
color: var(--ui-color);
font-size: 1.2rem;
text-shadow: var(--text-glow);
}
.copy-btn {
font-size: 0.9rem;
padding: 0.2rem 0.6rem;
width: auto;
height: auto;
margin: 0.5rem auto;
display: inline-block;
}
.notification {
position: fixed;
bottom: 1.5rem;
left: 50%;
transform: translateX(-50%);
background: var(--panel-bg);
color: var(--ui-color);
border: var(--border-width) solid var(--ui-color);
padding: 0.5rem 1rem;
font-size: var(--font-size-base);
box-shadow: var(--glow-shadow);
z-index: 1001;
display: none;
text-shadow: var(--text-glow);
text-align: center;
}
/* Responsive Design */
@media (max-width: 600px) {
:root {
--font-size-base: 0.9rem;
--border-width: 2px;
--button-width: 5rem;
--button-height: 2rem;
--glow-shadow: 0 0 8px var(--ui-color), 0 0 12px var(--ui-color);
--inset-shadow: inset 0 0 6px var(--ui-color);
--text-glow: 0 0 6px var(--ui-color);
}
#output, #input-area, footer {
margin: 0.5rem;
padding: 0.8rem;
}
.input-line {
flex-direction: column;
align-items: stretch;
}
input {
margin-bottom: 0.5rem;
margin-right: 0;
}
.wallet-popup {
width: 95%;
padding: 1rem;
}
.wallet-popup h2 {
font-size: 1rem;
}
.close-btn {
font-size: 1rem;
}
}
@media (min-width: 601px) and (max-width: 900px) {
:root {
--font-size-base: 0.95rem;
--button-width: 5.5rem;
--button-height: 2.2rem;
}
}
@media (min-width: 901px) {
:root {
--font-size-base: 1rem;
--button-width: 6rem;
--button-height: 2.5rem;
}
}
/* High-resolution displays */
@media (min-resolution: 2dppx) {
body::before {
background-size: 20px 20px;
}
}
</style>
</head>
<body>
<div id="output"></div>
<div id="input-area">
<div class="input-line">
<input type="text" id="command-input" placeholder="Enter command (help | new_book)">
<div class="button-group">
<button onclick="processCommand()">Submit</button>
<button onclick="changeUIColor()">UIColor</button>
<button onclick="openWallet()">Wallet</button>
</div>
</div>
</div>
<footer>© 2025 WebXOS BETA</footer>
<div class="wallet-popup" id="walletPopup">
<span class="close-btn" onclick="closeWallet()">X</span>
<h2>Wallet</h2>
<button onclick="generateNFT()">Generate NFT</button>
<button onclick="showLoadInput()">Load NFT</button>
<div id="loadInput" style="display: none;">
<input type="text" id="nftSerialInput" placeholder="Enter NFT Serial (e.g., NFT-...)">
<button onclick="loadNFT()">Load</button>
</div>
<div id="nftOutput"></div>
</div>
<div class="notification" id="copyNotification">Copied to clipboard!</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
<script>
const uiColors = [
'#00ffcc', '#ff00ff', '#ff4444', '#44ff44', '#4444ff', '#ffcc00', '#ff8800'
];
let currentColorIndex = 0;
let currentNFTData = null;
const usedNumbers = new Set();
const AES_KEY = 'WEBXOS_SHARED_KEY_2025';
let fullNFTSerial = '';
function changeUIColor() {
currentColorIndex = (currentColorIndex + 1) % uiColors.length;
const newColor = uiColors[currentColorIndex];
document.documentElement.style.setProperty('--ui-color', newColor);
}
function showNotification() {
const notification = document.getElementById('copyNotification');
notification.style.display = 'block';
setTimeout(() => {
notification.style.display = 'none';
}, 2000);
}
function copyToClipboard(text) {
if (navigator.clipboard && window.isSecureContext) {
return navigator.clipboard.writeText(text).then(() => {
showNotification();
return true;
}).catch(err => {
console.error('Failed to copy:', err);
return false;
});
} else {
const textarea = document.createElement('textarea');
textarea.value = text;
document.body.appendChild(textarea);
textarea.select();
try {
document.execCommand('copy');
showNotification();
document.body.removeChild(textarea);
return true;
} catch (err) {
console.error('Failed to copy:', err);
document.body.removeChild(textarea);
return false;
}
}
}
function shortenSerial(serial) {
if (serial.length <= 24) return serial;
return `${serial.slice(0, 10)}...${serial.slice(-10)}`;
}
function openWallet() {
const walletPopup = document.getElementById('walletPopup');
walletPopup.style.display = 'block';
document.getElementById('loadInput').style.display = 'none';
document.getElementById('nftOutput').innerHTML = '';
fullNFTSerial = '';
}
function closeWallet() {
const walletPopup = document.getElementById('walletPopup');
walletPopup.style.display = 'none';
}
function showLoadInput() {
document.getElementById('loadInput').style.display = 'block';
document.getElementById('nftOutput').innerHTML = '';
fullNFTSerial = '';
}
function generateNFT() {
if (!currentNFTData) {
document.getElementById('nftOutput').innerHTML = 'Error: Generate a story first!';
return;
}
const nftData = {
type: currentNFTData.type,
nftNumber: generateUniqueNFTNumber(),
title: currentNFTData.title,
theme: currentNFTData.theme,
content: {
text: currentNFTData.text,
archetype: currentNFTData.archetype,
setting: currentNFTData.setting,
conflict: currentNFTData.conflict,
technology: currentNFTData.technology
},
sourceApp: 'booki'
};
const dataString = JSON.stringify(nftData);
const encrypted = CryptoJS.AES.encrypt(dataString, AES_KEY).toString();
const serial = `NFT-${btoa(encrypted)}`;
fullNFTSerial = serial;
const shortSerial = shortenSerial(serial);
document.getElementById('nftOutput').innerHTML = `NFT Serial: ${shortSerial}<br><button class="copy-btn" onclick="copyToClipboard(fullNFTSerial)">Copy Full Serial</button>`;
copyToClipboard(serial);
}
function generateUniqueNFTNumber() {
let nftNumber;
do {
nftNumber = Math.floor(Math.random() * 1000000) + 1;
} while (usedNumbers.has(nftNumber));
usedNumbers.add(nftNumber);
return nftNumber;
}
function loadNFT() {
const serial = document.getElementById('nftSerialInput').value.trim();
try {
if (!serial.startsWith('NFT-')) {
throw new Error('Serial must start with "NFT-"');
}
const encoded = serial.slice(4);
const encrypted = atob(encoded);
const decrypted = CryptoJS.AES.decrypt(encrypted, AES_KEY);
const dataString = decrypted.toString(CryptoJS.enc.Utf8);
const nftData = JSON.parse(dataString);
if (!nftData || !nftData.type || !nftData.nftNumber || !nftData.title || !nftData.theme || !nftData.content || !nftData.sourceApp) {
throw new Error('Missing required NFT data fields');
}
if (nftData.sourceApp === 'booki' && nftData.type === 'booki_story') {
document.getElementById('nftOutput').innerHTML =
`NFT Loaded Successfully!<br>Type: ${nftData.type}<br>Title: ${nftData.title}<br>Theme: ${nftData.theme}<br>NFT Number: ${nftData.nftNumber}`;
document.getElementById('output').innerText +=
`=== STORY OUTPUT ===\nTITLE: ${nftData.title}\n${nftData.content.text}\n============\n`;
currentNFTData = nftData;
} else if (nftData.sourceApp === 'sacred' && nftData.type === 'sacred_shape') {
const booki = new Booki();
const shapeStory = booki.convertShapeToStory(nftData);
document.getElementById('nftOutput').innerHTML =
`Sacred NFT Loaded Successfully!<br>Type: ${nftData.type}<br>Title: ${nftData.title}<br>Theme: ${nftData.theme}<br>NFT Number: ${nftData.nftNumber}`;
document.getElementById('output').innerText +=
`=== STORY OUTPUT (From Sacred Shape) ===\nTITLE: ${shapeStory.title}\n${shapeStory.text}\n============\n`;
currentNFTData = {
type: 'booki_story',
title: shapeStory.title,
theme: nftData.theme,
text: shapeStory.text,
archetype: shapeStory.archetype,
setting: shapeStory.setting,
conflict: shapeStory.conflict,
technology: shapeStory.technology,
sourceApp: 'booki'
};
} else {
throw new Error('Unsupported NFT type or source');
}
} catch (e) {
document.getElementById('nftOutput').innerHTML = `Error: Invalid NFT Serial (${e.message})`;
}
}
class Booki {
constructor() {
this.welcome_message = "=== INITIALIZING: Booki BETA v10.2 - Quantum WebXOS Story Forge ===\n" +
" STATUS: Online | Quantum Core Active\n" +
" MISSION: Crafting unique sci-fi tales for Web3 agents";
this.copyright_notice = "=== © 2025 WebXOS BETA ===\n" +
" Licensed under WEBXOS 2025 AI ";
this.running = true;
this.first_names = [
"Zara", "Liam", "Aisha", "Kai", "Nadia", "Diego", "Luna", "Milo", "Sofia", "Arjun", "Soren",
"Vex", "Nyx", "Zion", "Elara", "Ryn", "Jett", "Astra", "Kael", "Sylis", "Nova",
"Cora", "Xan", "Talia", "Zorak", "Lyra", "Draco", "Eris", "Vara", "Jaxon", "Selene",
"Raze", "Kira", "Orion", "Vega", "Toren", "Sable", "Axel", "Nia", "Zephyr", "Calyx",
"Mira", "Dax", "Eryn", "Sol", "Kade", "Vion", "Laz", "Tessa", "Rion", "Cyra",
"Jyn", "Xero", "Faye", "Zane", "Lira", "Vox", "Tara", "Kyn", "Sora"
];
this.last_names = [
"Nguyen", "Patel", "Smith", "Kim", "Garcia", "Rossi", "Chen", "Khan", "Silva", "Dubois", "Gray",
"Nexis", "Byte", "Vortex", "Hash", "Quantum", "Flux", "Cipher", "Grid", "Node", "Pulse",
"Starling", "Void", "Drift", "Nebula", "Shard", "Synth", "Holo", "Chroma", "Vector", "Glitch",
"Cosmo", "Orbit", "Aether", "Code", "Spark", "Nova", "Pylon", "Matrix", "Beacon", "Eclipse",
"Zeta", "Omni", "Tera", "Vapor", "Link", "Core", "Wave", "Pixel", "Rift", "Zenith",
"Blaze", "Frame", "Trace", "Lumen", "Hex", "Nexus", "Data", "Signal", "Prism", "Flare"
];
this.archetypes = [
"cynical code prophet", "rogue hash runner", "glitchy grid sentinel", "quantum-rift savant",
"neon data shaman", "decentralized dream weaver", "crypto star navigator", "etheric code breaker",
"holo-grid wanderer", "synth-mind oracle", "blockchain bounty hunter", "pulsar signal tracer",
"void-warp engineer", "digital soul reaver", "omni-net infiltrator", "starforge alchemist",
"temporal hash diver", "nexus gatekeeper", "prismatic data monk", "cosmic chain forger",
"vaporware visionary", "quantum meme lord", "rift-pulse corsair", "cybernetic lore keeper",
"aetheric node runner", "glitchborn pathfinder", "holo-verse cartographer", "byte-storm rider",
"stellar contract sage", "darknet specter", "luminous code sculptor", "singularity seeker",
"orbital shard collector", "matrix flame dancer", "crypto vault warden", "nebulous thread spinner",
"vector tide surfer", "chrono-grid marauder", "pixelated star caller", "decentralized rift poet",
"synthwave anomaly", "core-flux renegade", "data eclipse prophet", "quantum beacon herald",
"holo-spark trickster", "vortex chain binder", "ethereal byte monk", "starlit hash phantom",
"gridfire emancipator", "cosmic node drifter", "lumen-web architect", "riftcode insurgent",
"nebulaic dream hacker", "omni-flare sentinel"
];
this.traits = [
"reluctant", "brash", "obsessive", "witty", "lost", "defiant", "shining",
"cryptic", "luminous", "fractured", "relentless", "ethereal", "volatile", "prismatic", "enigmatic",
"resolute", "glitched", "radiant", "unyielding", "nebulous", "kinetic", "arcane", "pulsating",
"defocused", "intrepid", "chaotic", "spectral", "unraveled", "blazing", "transient", "cosmic",
"holographic", "synthetic", "resonant", "vaporous", "unbound", "pixelated", "astral",
"recursive", "lucid", "fractal", "incandescent", "nomadic", "encrypted", "ephemeral", "stellar",
"inscrutable", "voracious", "celestial", "paradoxical", "chromatic", "untethered", "quantum",
"hyperlinked", "viral", "decentralized", "omniscient"
];
this.settings = [
"Neon Vault, a labyrinthine construct pulsating with ethereal energies",
"Quantum Vault, a chamber of infinite secrets",
"Starlit Nexus, a decentralized hub of cosmic data streams",
"Holo-Grid, a shimmering network of virtual realities",
"Voidspire, a towering relic orbiting a dying star",
"Crypto Abyss, a darknet realm of hidden transactions",
"Pulsar Matrix, a radiant lattice of sentient code",
"Etheric Drift, a weightless expanse of blockchain fragments",
"Glitch Horizon, a fractured plane where realities collide",
"Nebula Core, a swirling vortex of stellar smart contracts",
"Aether Node, a glowing beacon in the decentralized cosmos",
"Darknet Spire, a shadowy tower of encrypted secrets",
"Stellar Chain, an interstellar network of immutable ledgers",
"Quantum Rift, a tear in the fabric of digital existence",
"Holo-Vault, a prismatic archive of forgotten data",
"Byte Storm, a chaotic maelstrom of rogue algorithms",
"Cosmo Link, a pulsating web of galactic connections",
"Singularity Hub, a point where all data converges",
"Nova Sprawl, a neon-lit megacity in orbit",
"Chroma Expanse, a vibrant field of shifting holograms",
"Vector Crux, a geometric fortress of pure code",
"Pylon Verge, a borderland of towering data spires",
"Astral Cache, a hidden repository of cosmic knowledge",
"Gridfire Plains, a battlefield of clashing algorithms",
"Lumen Cluster, a constellation of glowing server nodes",
"Eclipse Array, a dark grid of suppressed signals",
"Starforge, a celestial factory crafting new realities",
"Vapor Net, a misty plane of decentralized dreams",
"Flux Citadel, a fortress pulsing with temporal energy",
"Nexus Veil, a shimmering curtain hiding forbidden data",
"Prism Shard, a crystalline fragment of a lost network",
"Orbital Strand, a delicate thread linking distant stars",
"Darkpool, a submerged archive of illicit transactions",
"Holo-Chasm, a gaping void filled with spectral projections",
"Quantum Spire, a towering antenna to the multiverse",
"Glitch Nexus, a chaotic junction of broken protocols",
"Synthwave City, a retro-futuristic urban sprawl",
"Core Drift, a nomadic fleet of server ships",
"Nebulaic Web, a cosmic tapestry of linked nodes",
"Rift Market, a bustling hub of interdimensional trade",
"Pulse Haven, a sanctuary of synchronized data flows",
"Void Cache, a secret vault floating in null space",
"Starlit Forge, a glowing crucible for digital creation",
"Etheric Maze, a labyrinth of shifting blockchain paths",
"Chrono Grid, a temporal network defying causality",
"Luminous Verge, a radiant edge of the known grid",
"Data Nebula, a misty cloud of fragmented archives",
"Holo-Expanse, an infinite plane of virtual constructs",
"Quantum Strand, a delicate thread of entangled data",
"Vortex Hub, a swirling center of cosmic transactions",
"Glitch Sprawl, a chaotic city of corrupted code"
];
this.conflicts = [
"sapient contract warping temporality", "omniscient AI claiming the grid's soul", "data storm erasing all",
"rogue blockchain fracturing reality", "sentient virus consuming the nexus", "darknet cabal seizing the core",
"quantum singularity devouring data", "holo-grid rebellion against its creators", "temporal loop trapping the multiverse",
"crypto cartel monopolizing the ether", "glitch swarm corrupting all protocols", "AI overlord rewriting history",
"void rift swallowing star systems", "decentralized uprising against the grid", "neural net gaining sentience",
"pulsar surge frying the network", "cosmic hack exposing all secrets", "data flood drowning the servers",
"holo-verse collapsing into chaos", "quantum flare erasing identities", "dark pool draining the ether",
"synth-mind revolt against humanity", "nexus breach leaking realities", "stellar worm consuming the chain",
"gridfire burning through the nodes", "chrono-storm disrupting causality", "vaporware plague infecting the web",
"lumen crash blinding the network", "orbital decay threatening the hub", "prismatic surge overloading the grid",
"aetheric rift splitting the cosmos", "byte swarm rewriting the code", "eclipse protocol silencing all signals",
"starforge sabotage halting creation", "crypto vortex consuming transactions", "holo-chasm swallowing the vault",
"quantum spike destabilizing reality", "glitch tide flooding the nexus", "synthwave corruption altering memories",
"core drift severing galactic links", "nebulaic fog obscuring the truth", "rift market collapsing into anarchy",
"pulse haven betrayed by its keepers", "void cache leaking forbidden data", "starlit forge igniting a rebellion",
"etheric maze trapping all travelers", "chrono-grid unraveling time itself", "luminous verge fading into darkness",
"data nebula hiding a cosmic threat", "holo-expanse fracturing into shards", "quantum strand entangling all fates",
"vortex hub spiraling out of control"
];
this.technologies = [
"reality shard, a crystalline key to truth", "grid pulse, a sentient wave of code", "quantum flare, a light of endless hope",
"etheric node, a beacon linking decentralized realms", "holo-matrix, a framework for virtual worlds", "crypto lens, a device revealing hidden chains",
"pulsar drive, a propulsion system bending space", "glitch key, a tool to rewrite broken code", "void anchor, a stabilizer for null-space travel",
"starforge, a device crafting stellar constructs", "data prism, a crystal refracting infinite streams", "nexus bridge, a pathway between realities",
"quantum tether, a link defying temporal rifts", "synth-core, a synthetic heart for AI sentience", "darknet veil, a cloak hiding digital tracks",
"lumen orb, a glowing sphere of pure information", "cosmo relay, a signal booster for galactic comms", "byte forge, a crucible for digital creation",
"holo-shard, a fragment projecting lost worlds", "vapor drive, a propulsion system for misty realms", "chrono pulse, a beat syncing fractured time",
"gridfire lance, a weapon burning rogue data", "nebulaic thread, a filament weaving cosmic tales", "rift beacon, a signal guiding interdimensional paths",
"stellar cipher, a code unlocking galactic secrets", "aetheric lens, a viewer of hidden dimensions", "prism array, a network amplifying light data",
"orbital frame, a scaffold for celestial constructs", "darkpool key, a pass to submerged archives", "vector spike, a tool piercing digital defenses",
"pulse gauntlet, a glove controlling data flows", "void lens, a scope peering into null space", "starlit loom, a device weaving digital fates",
"etheric coil, a spiral channeling blockchain energy", "chrono shard, a crystal holding temporal echoes", "lumen grid, a network of radiant nodes",
"data flare, a burst illuminating hidden truths", "holo-verse anchor, a stabilizer for virtual planes", "quantum lattice, a framework for entangled data",
"glitch orb, a sphere rewriting corrupted streams", "synthwave emitter, a device broadcasting retro vibes", "core relay, a hub linking server fleets",
"nebulaic prism, a crystal refracting cosmic data", "rift gauntlet, a glove navigating dimensional tears", "pulse forge, a crucible for synchronized code",
"void cipher, a code unlocking null-space secrets", "starlit array, a network of glowing constructs", "etheric pulse, a wave syncing decentralized nets",
"chrono lens, a viewer of past and future streams", "lumen shard, a fragment glowing with knowledge", "data vortex, a spiral collecting fragmented streams",
"holo-grid emitter, a device projecting virtual realms"
];
this.motivations = [
"to unravel the grid’s lie", "to forge a new dawn", "to burn the byte storm",
"to decrypt the cosmic code", "to liberate the holo-verse", "to stabilize the quantum rift",
"to reclaim the darknet’s soul", "to weave a new blockchain", "to extinguish the glitch swarm",
"to harness the pulsar’s power", "to expose the crypto cabal", "to rebuild the starforge",
"to navigate the void’s secrets", "to restore the chrono-grid", "to ignite the lumen web",
"to shatter the AI’s dominion", "to anchor the nebulaic thread", "to surf the vector tide",
"to pierce the darkpool’s veil", "to sync the pulse haven", "to forge the stellar cipher",
"to defy the temporal loop", "to cleanse the data flood", "to bind the rift market",
"to spark the etheric maze", "to illuminate the void cache", "to rewrite the synthwave",
"to bridge the core drift", "to unveil the nebulaic fog", "to halt the quantum spike",
"to ride the gridfire wave", "to unlock the starlit forge", "to traverse the holo-chasm",
"to stabilize the vortex hub", "to free the luminous verge", "to collect the data nebula",
"to mend the holo-expanse", "to entangle the quantum strand", "to tame the glitch tide",
"to ignite the cosmo link", "to secure the singularity hub", "to expand the nova sprawl",
"to align the chroma expanse", "to fortify the vector crux", "to claim the pylon verge",
"to unearth the astral cache", "to quench the gridfire plains", "to activate the lumen cluster",
"to dispel the eclipse array", "to empower the starforge", "to navigate the vapor net",
"to conquer the flux citadel"
];
this.quirks = [
"time skipped a beat", "the grid sang back", "the flux sang high",
"the blockchain hummed a tune", "the holo-verse flickered twice", "the quantum rift whispered secrets",
"the darknet pulsed with light", "the glitch swarm danced in sync", "the pulsar flared in code",
"the void echoed with laughter", "the chrono-grid rewound an hour", "the lumen web shimmered gold",
"the AI winked at the user", "the nebulaic thread knotted itself", "the vector tide surged backward",
"the darkpool reflected the stars", "the pulse haven sighed in relief", "the stellar cipher glowed red",
"the temporal loop hiccuped", "the data flood sang an anthem", "the rift market traded ghosts",
"the etheric maze rearranged itself", "the void cache whispered names", "the synthwave looped a melody",
"the core drift aligned perfectly", "the nebulaic fog parted briefly", "the quantum spike pulsed green",
"the gridfire burned blue", "the starlit forge sparked rainbows", "the holo-chasm sang of loss",
"the vortex hub spun silently", "the luminous verge blinked out", "the data nebula swirled inward",
"the holo-expanse mirrored reality", "the quantum strand vibrated softly", "the glitch tide ebbed away",
"the cosmo link flashed binary", "the singularity hub hummed low", "the nova sprawl lit up at dawn",
"the chroma expanse shifted hues", "the vector crux spun wildly", "the pylon verge glowed faintly",
"the astral cache opened briefly", "the gridfire plains roared aloud", "the lumen cluster pulsed in sync",
"the eclipse array flickered off", "the starforge sang of creation", "the vapor net misted over",
"the flux citadel trembled slightly", "the nexus veil parted briefly", "the prism shard refracted time",
"the orbital strand snapped taut"
];
this.output(this.welcome_message + "\n" + this.copyright_notice + "\n AVAILABLE COMMANDS: help | new_book");
}
output(text) {
document.getElementById("output").innerText += text + "\n============\n";
document.getElementById("output").scrollTop = document.getElementById("output").scrollHeight;
}
help() {
this.output("=== HELP MENU ===\n - help: Show this guide\n - new_book: Generate a new extravagant sci-fi saga");
}
getArticle(phrase) {
const first_word = phrase.split(" ")[0].toLowerCase();
const exceptions = ["hour", "honor", "heir", "honest"];
const vowels = ["a", "e", "i", "o", "u"];
return (exceptions.includes(first_word) || vowels.includes(first_word[0])) ? "an" : "a";
}
generateUniqueTitle() {
const prefixes = [
"Echoes of", "Shards of", "Veil of", "Pulse of", "Whispers of", "Threads of", "Glimmer of", "Rift of", "Bloom of", "Tide of",
"Crest of", "Nova of", "Orbit of", "Dawn of", "Surge of", "Haze of", "Drift of", "Spark of", "Vortex of", "Glow of",
"Arc of", "Flare of", "Beacon of", "Rush of", "Mist of"
];
const descriptors = [
"the Forked", "the Quantum", "the Neon", "the Ether", "the Glitched", "the Boundless", "the Shattered", "the Null", "the Flux", "the Holo",
"the Cosmic", "the Stellar", "the Obsidian", "the Radiant", "the Fractal", "the Infinite", "the Celestial", "the Voided", "the Pulsar", "the Chromatic",
"the Galactic", "the Prismatic", "the Temporal", "the Luminous", "the Spectral", "the Astral", "the Gravitic", "the Nebulaic", "the Singularity", "the Orbital"
];
const nouns = [
"Grid", "Chain", "Void", "Nexus", "Spire", "Flux", "Abyss", "Veil", "Shard", "Drift",
"Horizon", "Starfall", "Nebula", "Cluster", "Rift", "Core", "Eclipse", "Matrix", "Beacon", "Expanse",
"Singularity", "Orbit", "Aether", "Pulse", "Crux"
];
return `${this.randomChoice(prefixes)} ${this.randomChoice(descriptors)} ${this.randomChoice(nouns)}`;
}
randomChoice(array) {
return array[Math.floor(Math.random() * array.length)];
}
quantumStoryAlgorithm(topics) {
this.output("=== QUANTUM FORGE ACTIVE ===\n Crafting your saga...");
const title = this.generateUniqueTitle();
let novel = `=== NOVEL OUTPUT: Quantum WebXOS Saga v10.2 ===\n TITLE: ${title}\n BEGIN STORY\n============\n`;
const archetype_hero = this.randomChoice(this.archetypes);
const hero_full = `${this.randomChoice(this.first_names)} ${this.randomChoice(this.last_names)}, ${this.getArticle(archetype_hero)} ${archetype_hero}`;
const hero_name = hero_full.split(", ")[0];
const tech = this.randomChoice(this.technologies);
const [tech_name, tech_desc] = tech.split(", ");
const setting = this.randomChoice(this.settings).split(", ")[0];
const conflict = this.randomChoice(this.conflicts);
const story_elements = [
`In a Web3 multiverse where ${topics[0]} shaped existence, ${hero_full} emerged from ${setting}.`,
`With the ${tech_name}, ${tech_desc}, ${hero_name} faced ${this.getArticle(conflict)} ${conflict}.`,
`${topics[1]} loomed heavy as ${hero_name}, ${this.getArticle_pattern_hero}, ${this.getArticle(this.randomChoice(this.traits))} ${this.randomChoice(this.traits)} soul, ventured forth.`,
`Driven to ${this.randomChoice(this.motivations)}, ${hero_name} navigated ${setting}.`,
`${this.randomChoice(this.quirks)} shifted the ether as ${hero_name} wielded the ${tech_name}.`,
`${topics[2]} pulsed through ${setting}, guiding ${hero_name}’s path.`,
`In ${setting}, ${hero_name} confronted ${this.getArticle(conflict)} ${conflict}.`,
`The ${tech_name} flared, a beacon against ${topics[0]}, as ${hero_name} stood firm.`,
`${hero_name}, ${this.getArticle(this.randomChoice(this.traits))} ${this.randomChoice(this.traits)} figure, sought to ${this.randomChoice(this.motivations)}.`,
`${this.randomChoice(this.quirks)} twisted ${topics[1]}, altering ${hero_name}’s journey.`,
`${hero_name} battled through ${setting}, ${topics[2]} a constant hum.`,
`The ${tech_name}, ${tech_desc}, countered ${this.getArticle(conflict)} ${conflict} as ${hero_name} pressed on.`,
`${topics[0]} warped the grid, but ${hero_name} defied it with the ${tech_name}.`,
`${hero_name}’s quest to ${this.randomChoice(this.motivations)} echoed through ${setting}.`
];
for (let i = story_elements.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[story_elements[i], story_elements[j]] = [story_elements[j], story_elements[i]];
}
novel += story_elements.slice(0, 14).join(" ");
const ending = ` In the final moment, ${hero_name} cast the ${tech_name} into ${setting}, where ${topics[0]} and ${topics[1]} collided with ${topics[2]}. ` +
`The multiverse shuddered, and ${hero_name} vanished into a cascade of light, leaving behind a single, unbroken thread of ${this.randomChoice(this.traits)} hope that wove itself into the fabric of the WebXOS forever.`;
novel += ending + "\n============\n Forge complete!";
currentNFTData = {
type: 'booki_story',
title: title,
theme: topics.join(', '),
text: novel,
archetype: archetype_hero,
setting: setting,
conflict: conflict,
technology: tech_name,
sourceApp: 'booki'
};
return novel;
}
newBook() {
this.output("=== INPUT REQUIRED ===\n Enter Theme #1 (type and press Enter, or type 'cancel' to abort):");
this.currentTheme = 1;
this.themes = [];
this.mode = 'story';
document.getElementById("command-input").focus();
}
convertShapeToStory(nftData) {
const title = this.generateUniqueTitle();
const theme = nftData.theme || "cosmic patterns";
const hero = `${this.randomChoice(this.first_names)} ${this.randomChoice(this.last_names)}`;
const archetype = this.randomChoice(this.archetypes);
const setting = this.randomChoice(this.settings).split(", ")[0];
const conflict = this.randomChoice(this.conflicts);
const tech = this.randomChoice(this.technologies).split(", ")[0];
const patternIndex = nftData.content.pattern.index || 0;
const color = nftData.content.pattern.color || '#00ffcc';
const scale = nftData.content.scale || 1;
const rotation = nftData.content.rotation || 0;
const patternThemes = [
"radiant quantum artifact", "linear data streams", "pulsing cosmic lattice",
"fractal code matrix", "dual-grid anomaly", "radial etheric pulse",
"chaotic vector weave"
];
const patternTheme = patternThemes[patternIndex % patternThemes.length];
const story = [
`In a Web3 multiverse where ${theme} shaped existence, ${hero}, ${this.getArticle(archetype)} ${archetype}, emerged from ${setting}.`,
`They wielded a ${tech}, inspired by a ${patternTheme} glowing ${color}, to face ${this.getArticle(conflict)} ${conflict}.`,
`Scaled to ${scale.toFixed(1)} times its power, the ${tech} spun at ${rotation} degrees, defying ${theme}.`,
`${hero}’s ${this.randomChoice(this.traits)} spirit drove them to ${this.randomChoice(this.motivations)}, navigating ${setting}.`,
`When ${this.randomChoice(this.quirks)}, the grid warped, but ${hero} pressed on with the ${tech}.`,
`In the end, ${hero} aligned the ${patternTheme} with ${theme}, stabilizing ${setting} and leaving a legacy of light.`
].join(" ");
const fullStory = `=== NOVEL OUTPUT: Quantum WebXOS Saga v10.2 (From Sacred Shape) ===\n TITLE: ${title}\n BEGIN STORY\n============\n${story}\n============\n Forge complete!`;
return {
title: title,
text: fullStory,
archetype: archetype,
setting: setting,
conflict: conflict,
technology: tech
};
}
processThemeInput(command) {
if (command.toLowerCase() === "cancel") {
this.output("Input cancelled.");
document.getElementById("command-input").disabled = false;
this.mode = null;
return;
}
this.themes.push(command.trim() || "grid flux");
this.currentTheme++;
if (this.currentTheme <= 3) {
this.output(`Enter Theme #${this.currentTheme} (type and press Enter, or type 'cancel' to abort):`);
} else {
this.output("Themes collected. Generating story...");
document.getElementById("command-input").disabled = false;
this.output(this.quantumStoryAlgorithm(this.themes));
this.themes = [];
this.currentTheme = null;
this.mode = null;
}
}
}
const booki = new Booki();
function processCommand() {
const command = document.getElementById("command-input").value.trim().toLowerCase();
document.getElementById("command-input").value = "";
if (!booki.running) return;
if (booki.currentTheme && booki.mode) {
booki.processThemeInput(command);
} else if (command === "help") {
booki.help();
} else if (command === "new_book") {
booki.newBook();
} else {
booki.output(" [Error] Unknown command - Use 'help'");
}
}
document.getElementById("command-input").addEventListener("keypress", function(e) {
if (e.key === "Enter") processCommand();
});
</script>
</body>
</html>