From 80262e1d1315c6231482c0b7eee00974ecc20ba2 Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 19:09:15 +0530 Subject: [PATCH 01/12] chore: Fix grammar Signed-off-by: txtsd --- config.js | 2 +- json2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 425099f..954f363 100644 --- a/config.js +++ b/config.js @@ -302,7 +302,7 @@ Number.prototype.div = function (divisor) { function LevelUpTime(level) { // seconds - // 20 minutes for for level 1 + // 20 minutes for level 1 // exponential increase after that return Math.round((20 + Math.pow(1.15, level)) * 60); } diff --git a/json2.js b/json2.js index a1a3b17..70acf48 100644 --- a/json2.js +++ b/json2.js @@ -210,7 +210,7 @@ if (!this.JSON) { // If the string contains no control characters, no quote characters, and no // backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape +// Otherwise, we must also replace the offending characters with safe escape // sequences. escapable.lastIndex = 0; From 45ad5009b2a9034d0115fb3ba6d8a19f6cd19547 Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 19:23:30 +0530 Subject: [PATCH 02/12] chore: Fix typos Signed-off-by: txtsd --- config.js | 10 +++++----- index.html | 4 ++-- main.js | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config.js b/config.js index 954f363..e8f9d92 100644 --- a/config.js +++ b/config.js @@ -342,7 +342,7 @@ K.Spells = [ "Sadness", "Seasick", "Shoelaces", - "Innoculate", + "Inoculate", "Cone of Annoyance", "Magnetic Orb", "Invisible Hands", @@ -379,7 +379,7 @@ K.Spells = [ "Animate Tunic", "Ursine Armor", "Holy Roller", - "Tonsilectomy", + "Tonsillectomy", "Curse Family", "Infinite Confusion"]; @@ -717,9 +717,9 @@ K.Monsters = [ "Pentasaurus|12|head", "Stegosaurus|18|plate", "Triceratops|16|horn", - "Tyranosauraus Rex|18|forearm", + "Tyrannosaurus Rex|18|forearm", "Djinn|7|lamp", - "Doppleganger|4|face", + "Doppelganger|4|face", "Black Dragon|7|*", "Plaid Dragon|7|sporrin", "Blue Dragon|9|*", @@ -788,7 +788,7 @@ K.Monsters = [ "Hippocampus|4|mane", "Hippogriff|3|egg", "Hobgoblin|1|patella", - "Homonculus|2|fluid", + "Homunculus|2|fluid", "Hydra|8|gyrum", "Imp|2|tail", "Invisible Stalker|8|*", diff --git a/index.html b/index.html index b5f6af5..c5c8d08 100644 --- a/index.html +++ b/index.html @@ -57,12 +57,12 @@ or install anything to play Progress Quest; just hit the button:

Does that sound easy to you? Well it wasn't; we started with hardware emulation of a 80386-equipped PC clone running a novel Windows XP -compatable operating system called ProgrOS, implemented in a clean +compatible operating system called ProgrOS, implemented in a clean room in the Seychelles by a team of people who had never programmed before (to keep the lawyers at bay).

-Unfortuantely that wan't fast enough (there was too much lag death), +Unfortunately that wasn't fast enough (there was too much lag death), so we instead emulated the much faster Cray-2 supercomputer and ran the 80386 emulator in that. But the 80386 kept getting hot, so we switched to a 6502 overclocked at 120GHz with emulated liquid helium diff --git a/main.js b/main.js index 6b757b6..cd0725d 100644 --- a/main.js +++ b/main.js @@ -156,13 +156,13 @@ function InterplotCinematic() { case 2: Q('task|2|You seem to gain the advantage over ' + nemesis); break; } } - Q('task|3|Victory! ' + nemesis + ' is slain! Exhausted, you lose conciousness'); + Q('task|3|Victory! ' + nemesis + ' is slain! Exhausted, you lose consciousness'); Q('task|2|You awake in a friendly place, but the road awaits'); break; case 2: var nemesis2 = ImpressiveGuy(); Q("task|2|Oh sweet relief! You've reached the kind protection of " + nemesis2); - Q('task|3|There is rejoicing, and an unnerving encouter with ' + nemesis2 + ' in private'); + Q('task|3|There is rejoicing, and an unnerving encounter with ' + nemesis2 + ' in private'); Q('task|2|You forget your ' + BoringItem() + ' and go back to get it'); Q("task|2|What's this!? You overhear something shocking!"); Q('task|2|Could ' + nemesis2 + ' be a dirty double-dealer?'); @@ -1195,7 +1195,7 @@ function FormKeyDown(e) { } if (e.key === 'g') { - Guildify(InputBox('Choose a guild.\n\nMake sure you undestand the guild rules before you join one. To learn more about guilds, visit http://progressquest.com/guilds.php\n', game.guild)); + Guildify(InputBox('Choose a guild.\n\nMake sure you understand the guild rules before you join one. To learn more about guilds, visit http://progressquest.com/guilds.php\n', game.guild)); } if (e.key === 'm') { @@ -1336,4 +1336,4 @@ function Guildify(guild) { s = parts.shift(); if (s) Navigate(s); }); -} \ No newline at end of file +} From 55180aaec995e575f11fd53997befd064d792609 Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 19:24:54 +0530 Subject: [PATCH 03/12] fix(css): Redundant unit for 0 Signed-off-by: txtsd --- newguy.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newguy.css b/newguy.css index fe421c3..f8d4a21 100644 --- a/newguy.css +++ b/newguy.css @@ -18,7 +18,7 @@ fieldset { fieldset table { width: 100px; - border: none 0px black; + border: none 0 black; border-right: none !IMPORTANT; border-spacing: 10px; border-collapse: separate; From 8586c18ca296228deb7cc1f47ee2ec2e80b5070e Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 19:36:36 +0530 Subject: [PATCH 04/12] fix(css): Add missing units Signed-off-by: txtsd --- progros.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progros.css b/progros.css index 947260b..c51fa58 100644 --- a/progros.css +++ b/progros.css @@ -76,7 +76,7 @@ th:first-child { #titlebar > img { vertical-align: bottom; - margin: 2 0 0 2; + margin: 2px 0 0 2px; } #quit { From 00b5d909f66dc0724b0b9441c5b7067330c6475c Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 19:37:44 +0530 Subject: [PATCH 05/12] fix(css): Fix misspelled property Signed-off-by: txtsd --- progros.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progros.css b/progros.css index c51fa58..1ff6911 100644 --- a/progros.css +++ b/progros.css @@ -89,7 +89,7 @@ th:first-child { } #quit:active img { - aopacity: 0; + opacity: 0; } .window { From 1e352089d9a0c327ce2f57a116d7ef94d9b41d9d Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 21:42:54 +0530 Subject: [PATCH 06/12] fix(css): Remove unused properties Signed-off-by: txtsd --- index.html | 4 ---- roster.html | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/index.html b/index.html index c5c8d08..03fdba6 100644 --- a/index.html +++ b/index.html @@ -22,9 +22,6 @@ p { color: #808080; text-decoration: none; } -.banter { - font-size: 11pt; -} #go { font-size: 30pt; } @@ -33,7 +30,6 @@ img { } th, td { text-align: left; padding-right: 2em; } .good { color: #2a2; } -.bad { color: #a22; } .ugly { color: #c82; } diff --git a/roster.html b/roster.html index e926027..1efa3a1 100644 --- a/roster.html +++ b/roster.html @@ -46,7 +46,7 @@ p { margin-right: 10%; text-align: left; } -#newc, #newm { +#newc { text-align: center; } .brag a, .brag a:visited { From c24fab7d0c6bea768ddb5c6257c1c58027005644 Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 21:49:58 +0530 Subject: [PATCH 07/12] fix(a11y): Add missing associated label Signed-off-by: txtsd --- newguy.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newguy.html b/newguy.html index da9fd96..28b8202 100644 --- a/newguy.html +++ b/newguy.html @@ -31,7 +31,7 @@ input, button { display: inline; }

- Name +
From ba02f8e1b09ff6205535a1228062719305113f3b Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 21:52:31 +0530 Subject: [PATCH 08/12] fix(a11y): Add missing required "alt" attribute Signed-off-by: txtsd --- main.html | 4 ++-- newguy.html | 4 ++-- roster.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.html b/main.html index 620f8d5..0dda9f7 100644 --- a/main.html +++ b/main.html @@ -24,9 +24,9 @@
- + Progress Quest Logo Progress Quest - + Close button
diff --git a/newguy.html b/newguy.html index 28b8202..d8028aa 100644 --- a/newguy.html +++ b/newguy.html @@ -24,9 +24,9 @@ input, button { display: inline; }
- + Progress Quest Logo Progress Quest - New Character - + Close button
diff --git a/roster.html b/roster.html index 1efa3a1..e89785f 100644 --- a/roster.html +++ b/roster.html @@ -101,7 +101,7 @@ img { New Character
-
+ four dice
From cb94d954b5641df5402d0015b45ebf289d437f22 Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 21:54:25 +0530 Subject: [PATCH 09/12] fix(a11y): Add missing required "lang" attribute Signed-off-by: txtsd --- index.html | 2 +- main.html | 2 +- newguy.html | 2 +- roster.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 03fdba6..ed89fb1 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + Play Progress Quest diff --git a/main.html b/main.html index 0dda9f7..4e9153e 100644 --- a/main.html +++ b/main.html @@ -1,5 +1,5 @@ - + diff --git a/newguy.html b/newguy.html index d8028aa..89b4ad0 100644 --- a/newguy.html +++ b/newguy.html @@ -1,5 +1,5 @@ - + diff --git a/roster.html b/roster.html index e89785f..c2c5cb8 100644 --- a/roster.html +++ b/roster.html @@ -1,5 +1,5 @@ - + From 7a3b48e3756c9aab45d03aa1551bcdd21dfda0cc Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 21:57:29 +0530 Subject: [PATCH 10/12] fix(html): Fix typo in meta attribute Signed-off-by: txtsd --- main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.html b/main.html index 4e9153e..ce08582 100644 --- a/main.html +++ b/main.html @@ -13,7 +13,7 @@ maximum-scale=1.0, minimum-scale=1.0, user-scalable=0" /> - + From ceed85cb5c47a9afb936c58d8028b600a9d529e1 Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 23:18:49 +0530 Subject: [PATCH 11/12] chore: Use Unix line endings Signed-off-by: txtsd --- main.html | 414 +++++++++++++++++++++++++-------------------------- newguy.js | 418 ++++++++++++++++++++++++++-------------------------- progros.css | 266 ++++++++++++++++----------------- 3 files changed, 549 insertions(+), 549 deletions(-) diff --git a/main.html b/main.html index ce08582..55349fe 100644 --- a/main.html +++ b/main.html @@ -1,207 +1,207 @@ - - - - - - - -Progress Quest - - - - - - - - - -
- -
- -
- Progress Quest Logo - Progress Quest - Close button -
- - - - - - -
-
- - Character Sheet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TraitValue
Name
Race
Class
Level1
StatValue
STR
CON
DEX
INT
WIS
CHA
HP Max
MP Max
- -
Experience
- -
-
-
-
- - Spell Book -
- - - - - - - - - -
SpellLevel
-
-
- -
- Equipment - - - - - - - - - - - - - - - -
Weapon
Shield
Helm
Hauberk
Brassairts
Vambraces
Gauntlets
Gambeson
Cuisses
Greaves
Sollerets
- - Inventory -
- - - - - - - - - -
ItemQty
-
- -
Encumbrance
-
-
-
-
-
- - -
- - Plot Development -
- - - -
-
- -
-
-
-
- - Quests -
- - - -
-
- -
-
-
-
-
- -
- -
- -
-
-
-
- -
- -
-
-

 Progress Quest  -

  -

An error has occurred. -

Error: -

-

In at : -

-

Press any key to continue...

-
-
- -

PAUSED
- - - - - + + + + + + + +Progress Quest + + + + + + + + + +
+ +
+ +
+ Progress Quest Logo + Progress Quest + Close button +
+ + + + + + +
+
+ + Character Sheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TraitValue
Name
Race
Class
Level1
StatValue
STR
CON
DEX
INT
WIS
CHA
HP Max
MP Max
+ +
Experience
+ +
+
+
+
+ + Spell Book +
+ + + + + + + + + +
SpellLevel
+
+
+ +
+ Equipment + + + + + + + + + + + + + + + +
Weapon
Shield
Helm
Hauberk
Brassairts
Vambraces
Gauntlets
Gambeson
Cuisses
Greaves
Sollerets
+ + Inventory +
+ + + + + + + + + +
ItemQty
+
+ +
Encumbrance
+
+
+
+
+
+ + +
+ + Plot Development +
+ + + +
+
+ +
+
+
+
+ + Quests +
+ + + +
+
+ +
+
+
+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+

 Progress Quest  +

  +

An error has occurred. +

Error: +

+

In at : +

+

Press any key to continue...

+
+
+ +

PAUSED
+ + + + + diff --git a/newguy.js b/newguy.js index 39647f4..2193585 100644 --- a/newguy.js +++ b/newguy.js @@ -1,209 +1,209 @@ -/* copyright (c)2002-2010 Eric Fredricksen all rights reserved */ - - -function Roll(stat) { - stats[stat] = 3 + Random(6) + Random(6) + Random(6); - if (document) - $("#"+stat).text(stats[stat]); - return stats[stat]; -} - -function Choose(n, k) { - var result = n; - var d = 1; - for (var i = 2; i <= k; ++i) { - result *= (1+n-i); - d = d * i; - } - return result / d; -} - -var stats = {}; -var traits = {}; -var total = 0; -var seedHistory = []; - -function RollEm() { - stats.seed = randseed(); - total = 0; - var best = -1; - $.each(K.PrimeStats, function () { - total += Roll(this); - if (best < stats[this]) { - best = stats[this]; - stats.best = this; - } - }); - stats['HP Max'] = Random(8) + stats.CON.div(6); - stats['MP Max'] = Random(8) + stats.INT.div(6); - - var color = - (total >= (63+18)) ? 'red' : - (total > (4 * 18)) ? 'yellow' : - (total <= (63-18)) ? 'grey' : - (total < (3 * 18)) ? 'silver' : - 'white'; - - if (document) { - var Total = $("#Total"); - Total.text(total); - Total.css("background-color", color); - - $("#Unroll").attr("disabled", !seedHistory.length); - } -} - -function RerollClick() { - seedHistory.push(stats.seed); - RollEm(); -} - - -function UnrollClick() { - randseed(seedHistory.pop()); - RollEm(); -} - -function fill(e, a, n) { - var def = Random(a.length); - for (var i = 0; i < a.length; ++i) { - var v = a[i].split("|")[0]; - var check = (def == i) ? " checked " : " "; - if (def == i) traits[n] = v; - if (document) { - $("
").appendTo(e); - } - } -} - -function NewGuyFormLoad() { - seed = new Alea(); - RollEm(); - GenClick(); - - fill("#races", K.Races, "Race"); - fill("#classes", K.Klasses, "Class"); - - if (document) { - $("#Reroll").click(RerollClick); - $("#Unroll").click(UnrollClick); - $("#RandomName").click(GenClick); - $('#Sold').click(sold); - $('#quit').click(cancel); - - //var caption = 'Progress Quest - New Character'; - //if (MainForm.GetHostName != '') - // caption = caption + ' [' + MainForm.GetHostName + ']'; - - $("#Name").focus(); - $("#Name").select(); - } - - if (window.location.href.indexOf("?sold") > 0) - sold(); // TODO: cheesy -} - - -if (document) - $(document).ready(NewGuyFormLoad); - - -function sold() { - var newguy = { - Traits: traits, - dna: stats.seed, - seed: stats.seed, - birthday: ''+new Date(), - birthstamp: +new Date(), - Stats: stats, - beststat: stats.best + " " + stats[stats.best], - task: "", - tasks: 0, - elapsed: 0, - bestequip: "Sharp Rock", - Equips: {}, - Inventory: [['Gold', 0]], - Spells: [], - act: 0, - bestplot: "Prologue", - Quests: [], - questmonster: "", - kill: "Loading....", - ExpBar: { position: 0, max: LevelUpTime(1) }, - EncumBar: { position: 0, max: stats.STR + 10 }, - PlotBar: { position: 0, max: 26 }, - QuestBar: { position: 0, max: 1 }, - TaskBar: { position: 0, max: 2000 }, - queue: [ - 'task|10|Experiencing an enigmatic and foreboding night vision', - "task|6|Much is revealed about that wise old bastard you'd underestimated", - 'task|6|A shocking series of events leaves you alone and bewildered, but resolute', - 'task|4|Drawing upon an unrealized reserve of determination, you set out on a long and dangerous journey', - 'plot|2|Loading' - ] - }; - - if (document) { - newguy.Traits.Name = $("#Name").val(); - newguy.Traits.Race = $("input:radio[name=Race]:checked").val(); - newguy.Traits.Class = $("input:radio[name=Class]:checked").val(); - } - newguy.Traits.Level = 1; - - newguy.date = newguy.birthday; - newguy.stamp = newguy.birthstamp; - - $.each(K.Equips, function (i,equip) { newguy.Equips[equip] = ''; }); - newguy.Equips.Weapon = newguy.bestequip; - newguy.Equips.Hauberk = "-3 Burlap"; - - - if ($("#multiplayer:checked").length > 0) { - newguy.online = { - realm: "Alpaquil", - host: "http://progressquest.com/alpaquil.php?", - // host: "http://localhost:9001/alpaquil.php?", - } - - $("#sold").prop("disabled", true); - $("body").css("cursor", "progress"); - - let url = newguy.online.host; - url += 'cmd=create' + - '&name=' + UrlEncode(newguy.Traits.Name) + - '&realm=' + UrlEncode(newguy.online.realm) + - RevString; - $.ajax(url) - .done(body => { - if (body.split('|')[0].toLowerCase() == 'ok') { - newguy.online.passkey = parseInt(body.split('|')[1]); - charIsBorn(newguy); - } else { - $("#sold").prop("disabled", false); - $("body").css("cursor", "default"); - alert(body); - } - }); - } else { - charIsBorn(newguy); - } -} - - -function charIsBorn(newguy) { - storage.addToRoster(newguy, function () { - window.location.href = "main.html#" + escape(newguy.Traits.Name); - }); -} - -function cancel() { - window.location.href = "roster.html"; -} - -function GenClick() { - traits.Name = GenerateName(); - if (document) - $("#Name").attr("value", traits.Name); -} - +/* copyright (c)2002-2010 Eric Fredricksen all rights reserved */ + + +function Roll(stat) { + stats[stat] = 3 + Random(6) + Random(6) + Random(6); + if (document) + $("#"+stat).text(stats[stat]); + return stats[stat]; +} + +function Choose(n, k) { + var result = n; + var d = 1; + for (var i = 2; i <= k; ++i) { + result *= (1+n-i); + d = d * i; + } + return result / d; +} + +var stats = {}; +var traits = {}; +var total = 0; +var seedHistory = []; + +function RollEm() { + stats.seed = randseed(); + total = 0; + var best = -1; + $.each(K.PrimeStats, function () { + total += Roll(this); + if (best < stats[this]) { + best = stats[this]; + stats.best = this; + } + }); + stats['HP Max'] = Random(8) + stats.CON.div(6); + stats['MP Max'] = Random(8) + stats.INT.div(6); + + var color = + (total >= (63+18)) ? 'red' : + (total > (4 * 18)) ? 'yellow' : + (total <= (63-18)) ? 'grey' : + (total < (3 * 18)) ? 'silver' : + 'white'; + + if (document) { + var Total = $("#Total"); + Total.text(total); + Total.css("background-color", color); + + $("#Unroll").attr("disabled", !seedHistory.length); + } +} + +function RerollClick() { + seedHistory.push(stats.seed); + RollEm(); +} + + +function UnrollClick() { + randseed(seedHistory.pop()); + RollEm(); +} + +function fill(e, a, n) { + var def = Random(a.length); + for (var i = 0; i < a.length; ++i) { + var v = a[i].split("|")[0]; + var check = (def == i) ? " checked " : " "; + if (def == i) traits[n] = v; + if (document) { + $("
").appendTo(e); + } + } +} + +function NewGuyFormLoad() { + seed = new Alea(); + RollEm(); + GenClick(); + + fill("#races", K.Races, "Race"); + fill("#classes", K.Klasses, "Class"); + + if (document) { + $("#Reroll").click(RerollClick); + $("#Unroll").click(UnrollClick); + $("#RandomName").click(GenClick); + $('#Sold').click(sold); + $('#quit').click(cancel); + + //var caption = 'Progress Quest - New Character'; + //if (MainForm.GetHostName != '') + // caption = caption + ' [' + MainForm.GetHostName + ']'; + + $("#Name").focus(); + $("#Name").select(); + } + + if (window.location.href.indexOf("?sold") > 0) + sold(); // TODO: cheesy +} + + +if (document) + $(document).ready(NewGuyFormLoad); + + +function sold() { + var newguy = { + Traits: traits, + dna: stats.seed, + seed: stats.seed, + birthday: ''+new Date(), + birthstamp: +new Date(), + Stats: stats, + beststat: stats.best + " " + stats[stats.best], + task: "", + tasks: 0, + elapsed: 0, + bestequip: "Sharp Rock", + Equips: {}, + Inventory: [['Gold', 0]], + Spells: [], + act: 0, + bestplot: "Prologue", + Quests: [], + questmonster: "", + kill: "Loading....", + ExpBar: { position: 0, max: LevelUpTime(1) }, + EncumBar: { position: 0, max: stats.STR + 10 }, + PlotBar: { position: 0, max: 26 }, + QuestBar: { position: 0, max: 1 }, + TaskBar: { position: 0, max: 2000 }, + queue: [ + 'task|10|Experiencing an enigmatic and foreboding night vision', + "task|6|Much is revealed about that wise old bastard you'd underestimated", + 'task|6|A shocking series of events leaves you alone and bewildered, but resolute', + 'task|4|Drawing upon an unrealized reserve of determination, you set out on a long and dangerous journey', + 'plot|2|Loading' + ] + }; + + if (document) { + newguy.Traits.Name = $("#Name").val(); + newguy.Traits.Race = $("input:radio[name=Race]:checked").val(); + newguy.Traits.Class = $("input:radio[name=Class]:checked").val(); + } + newguy.Traits.Level = 1; + + newguy.date = newguy.birthday; + newguy.stamp = newguy.birthstamp; + + $.each(K.Equips, function (i,equip) { newguy.Equips[equip] = ''; }); + newguy.Equips.Weapon = newguy.bestequip; + newguy.Equips.Hauberk = "-3 Burlap"; + + + if ($("#multiplayer:checked").length > 0) { + newguy.online = { + realm: "Alpaquil", + host: "http://progressquest.com/alpaquil.php?", + // host: "http://localhost:9001/alpaquil.php?", + } + + $("#sold").prop("disabled", true); + $("body").css("cursor", "progress"); + + let url = newguy.online.host; + url += 'cmd=create' + + '&name=' + UrlEncode(newguy.Traits.Name) + + '&realm=' + UrlEncode(newguy.online.realm) + + RevString; + $.ajax(url) + .done(body => { + if (body.split('|')[0].toLowerCase() == 'ok') { + newguy.online.passkey = parseInt(body.split('|')[1]); + charIsBorn(newguy); + } else { + $("#sold").prop("disabled", false); + $("body").css("cursor", "default"); + alert(body); + } + }); + } else { + charIsBorn(newguy); + } +} + + +function charIsBorn(newguy) { + storage.addToRoster(newguy, function () { + window.location.href = "main.html#" + escape(newguy.Traits.Name); + }); +} + +function cancel() { + window.location.href = "roster.html"; +} + +function GenClick() { + traits.Name = GenerateName(); + if (document) + $("#Name").attr("value", traits.Name); +} + diff --git a/progros.css b/progros.css index 1ff6911..6075e82 100644 --- a/progros.css +++ b/progros.css @@ -1,133 +1,133 @@ -/* RESET (via Boilerplate via Eric Meyer) */ - -html, body, div, span, applet, object, iframe, h1, h2, h3, h4, -h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, -code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, -strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, -ol, ul, li, fieldset, form, label, legend, table, caption, tbody, -tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - vertical-align: baseline; - background: transparent; -} -body { line-height: 1; } -ol, ul { list-style: none; } -blockquote, q { quotes: none; } -blockquote:before, blockquote:after, q:before, q:after { - content: ''; content: none; -} -:focus { outline: 0; } -ins { text-decoration: none; } -del { text-decoration: line-through; } -table { border-collapse: collapse; border-spacing: 0; } - -/* XULish */ - -.hbox > * { - vertical-align: middle; -} - -.vbox > * { - display: block; -} - - -.hbox > *, .horizontal > *, td > * { - display: inline-block; -} - - -.vbox { - vertical-align: top; -} - -td, th, .label, tr input, #titlebar, div { - font-family: Tahoma, Helvetica, sans-serif; - font-size: 8pt; -} - -td, th { - padding-left: 1ex; -} - -th { - border-bottom: solid 1px grey; - text-align: left; - font-weight: normal; -} - -th:first-child { - border-right: solid 1px grey; -} - - -#titlebar { - background-color: #008; - color: white; - font-weight: bold; - font-size: 9pt; - padding-bottom: 4px; - margin-bottom: 1ex; -} - -#titlebar > img { - vertical-align: bottom; - margin: 2px 0 0 2px; -} - -#quit { - float: right; - background: url(closedown.png); - text-decoration: none; - margin: 2px 2px 0 0; - width: 16px; - padding: 0; -} - -#quit:active img { - opacity: 0; -} - -.window { - background-color: #e7e7e7; - border: outset 2px silver; - padding: 2px; - text-align: left; - display: inline-block; -} - - -body { - background: url(back.jpg) no-repeat; - background-size: 100% 100%; - -webkit-background-size: 100% 100%; - -o-background-size: 100% 100%; - -moz-background-size: 100% 100%; - background-attachment: fixed; - text-align: center; - margin-top: 1em; -} - -body.bare { - background: silver; -} - -div.scroll { - overflow: scroll; - height: 100px; - width: 250px; - overflow-x: hidden; -} - -div.scroll > table { - width: 234px; -} - -.selected { - background-color: yellow; -} - +/* RESET (via Boilerplate via Eric Meyer) */ + +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, +h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, +code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, +strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, +ol, ul, li, fieldset, form, label, legend, table, caption, tbody, +tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { line-height: 1; } +ol, ul { list-style: none; } +blockquote, q { quotes: none; } +blockquote:before, blockquote:after, q:before, q:after { + content: ''; content: none; +} +:focus { outline: 0; } +ins { text-decoration: none; } +del { text-decoration: line-through; } +table { border-collapse: collapse; border-spacing: 0; } + +/* XULish */ + +.hbox > * { + vertical-align: middle; +} + +.vbox > * { + display: block; +} + + +.hbox > *, .horizontal > *, td > * { + display: inline-block; +} + + +.vbox { + vertical-align: top; +} + +td, th, .label, tr input, #titlebar, div { + font-family: Tahoma, Helvetica, sans-serif; + font-size: 8pt; +} + +td, th { + padding-left: 1ex; +} + +th { + border-bottom: solid 1px grey; + text-align: left; + font-weight: normal; +} + +th:first-child { + border-right: solid 1px grey; +} + + +#titlebar { + background-color: #008; + color: white; + font-weight: bold; + font-size: 9pt; + padding-bottom: 4px; + margin-bottom: 1ex; +} + +#titlebar > img { + vertical-align: bottom; + margin: 2px 0 0 2px; +} + +#quit { + float: right; + background: url(closedown.png); + text-decoration: none; + margin: 2px 2px 0 0; + width: 16px; + padding: 0; +} + +#quit:active img { + opacity: 0; +} + +.window { + background-color: #e7e7e7; + border: outset 2px silver; + padding: 2px; + text-align: left; + display: inline-block; +} + + +body { + background: url(back.jpg) no-repeat; + background-size: 100% 100%; + -webkit-background-size: 100% 100%; + -o-background-size: 100% 100%; + -moz-background-size: 100% 100%; + background-attachment: fixed; + text-align: center; + margin-top: 1em; +} + +body.bare { + background: silver; +} + +div.scroll { + overflow: scroll; + height: 100px; + width: 250px; + overflow-x: hidden; +} + +div.scroll > table { + width: 234px; +} + +.selected { + background-color: yellow; +} + From f760f17daa40e4affe191ee238e73debccc99b0c Mon Sep 17 00:00:00 2001 From: txtsd Date: Wed, 9 Nov 2022 23:24:44 +0530 Subject: [PATCH 12/12] chore: Convert from WINDOWS-1252 to UTF-8 Signed-off-by: txtsd --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index cd0725d..6363560 100644 --- a/main.js +++ b/main.js @@ -90,7 +90,7 @@ function Split(s, field, separator) { function Indefinite(s, qty) { if (qty == 1) { - if (Pos(s.charAt(0), 'AEIOUÜaeiouü') > 0) + if (Pos(s.charAt(0), 'AEIOUÜaeiouü') > 0) return 'an ' + s; else return 'a ' + s;