Jump to content

I am Bored

Member
  • Posts

    706
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by I am Bored

  1. When I went to open it, I got this: parent.dlgNotif("numbercapsule-clue","request");Duplicate entry '191885-numbercapsule-clue-A' for key 'PRIMARY' Trying again results in it working correctly.
  2. After a short discussion with Chewett, it has been determined that the script I used to do the image replacements for this will not be shared.
  3. When attempting to access any functionality that uses the the file manager, it doesn't even come remotely close to working, and instead spews: Strict Standards: Non-static method SpawVars::getServerVar() should not be called statically in /home/magicdue/public_html/lib/spaw/config/config.php on line 7 Strict Standards: Non-static method SpawConfig::setStaticConfigItem() should not be called statically in /home/magicdue/public_html/lib/spaw/config/config.php on line 7 for various lines, an absurd number of times. Simplest URL to reproduce it, the URL of the file containing the dialogs: http://magicduel.com/lib/spaw/dialogs/dialog.php This is likely heavily related to: http://magicduel.invisionzone.com/topic/16233-personal-papers-editing/
  4. And, after modifying an image or two, I present to you a more usable version of the dark theme. Edit: Second screenshot is the last I will post on the subject. It represents an "almost completely cleaned up" state.
  5. After a mention of a black interface for MD I did a bit of digging, and found it quite quickly. I present to you, MD (mostly) styled to a darker theme.
  6. Assuming what Ary says is correct, then the correct solution would be to remove the second influence. Edit: After some discussion with Chewett, it appears that both influences should be getting applied. This means that my original solution, proposing that they should be combined into an "attackbonus2" influence, is still valid.
  7. The Imperial Aramor Warrior (species 32, level 2) has the "attackbonus" special influence applied on itself twice. I believe that either the second influence should be removed, or else they should be combined into an "attackbonus2". "attackbonus2" would increase attack damage by 125% (attackbonus is 50% and 1.5 * 1.5 = 2.25).
  8. Actually, I think MP2 illusions have this issue as well... Setting a ritual allows you to attack properly, but it just claims that you don't have any creatures (even if you have recruited some) if you use a random ritual.
  9. I just tested in chrome, firefox, and Opera (classic) and did not get this issue.
  10. In the options panel, as accessible via the right-side panel, there is a setting for "Creature Tabular View". You can check it, but it will be unchecked after you hit save. I propose that this option is either disabled, or hidden.
  11. Well, as it says to report it, here's the report. I believe the sky visibility should instead be No Visibility for all locations.
  12. At least, it still shows the button if you've already grabbed them (select a different user then the fugitive again), and will still claim in the chat that you've grabbed them again.
  13. I actually have no problem with it, I only noticed because I'm recording some information about the scenes of MD, and that included the subtitles. I'm mostly just curious what methods were used to attempt to contact me.
  14. http://magicduel.invisionzone.com/topic/5217-name-that-pub/
  15. Well, somehow, I've managed to fail to notice over the last 3-4 years, that my pub had been taken over. I am curious though as-to who the pub was purchased from? I also am interested in what methods were tried to contact me, because there definitely aren't any forum PMs about it. (It's rare for me to delete any forum PMs)
  16. Well, I suppose I can put my name out there for this. I'm already working through the AL, but, due to the scale of the problems with it early on, the changes will probably have to be manually approved by Mur, which, as reviewing the changes is probably just about as fun (and as slow) as figuring out how to word the entries nicely in the first place, probably won't happen anytime soon.
  17. More than 3 years after Announcement 2030, although there are research level 3 clues in existence, it's not currently possible to unlock level 3 clues without wishpoints, and even then, you have to make sure you've unlocked all the level 2 clues, or you are pretty likely to unlock one of them instead. The team of people to review research submissions, as claimed in Announcement 2043 also never materialized.
  18. The issue with locate no longer appears to be present. (Only tested locate1)
  19. First off, I do intend to clean up this post a bit later and make the tool a bit more usable, but that will have to wait until I'm not asleep. First up, the sane code. Looks like pretty normal PHP to me. <? (locations 1_-1x3_1) // This is the key we give the user. $MDS_Key = "iab-quiz-key"; // This is the key used for the storage. $Storage_Key = "iabTestKey"; // All answers should be stored lowercase. $Questions = array( 1 => array( "What is this?", "clicky" ), 2 => array( "Who made this?", "orvid" ) ); // List of users who have completed the quiz. $usersFinished = mds_storage($Storage_Key, "toau", array()); if (uv("name") == "Orvid") { if (count($usersFinished) > 0) { echo "<p>The following users have completed the challenge:<br/>"; for ($i = 0; $i < count($usersFinished); $i++) { echo $usersFinished[$i] . "<br/>"; } echo "</p><br/><br/>"; } // Uncomment the next line to reset the storage to remove all users. //$usersFinished = array(); } if (mds_has_rpcq_keys($MDS_Key)) { // Uncomment the ne_xt line to reset your key sta_te for testing. //mds_take_rpcq_keys($MDS_Key); echo "You have already completed the quiz!"; } else { echo "<form method='post' action=''>"; $currentQuestion = 0; if (isset($input['page']) AND $input['page'] == "front") { $currentQuestion = 1; } else if (isset($input['q'])) { $currentQuestion = $input['q']; if (!isset($Questions[$currentQuestion])) $currentQuestion = 0; } if (isset($input['answer'])) { if ($Questions[$currentQuestion][1] == strtolower($input['answer'])) { // Check if this was the last question if (!isset($Questions[$currentQuestion + 1])) { // This was the last question, so add the users' name to our // list, and give them a key to prevent them from re-taking // the quiz. echo "<p>Congratulations! You've completed the quiz!</p>"; $currentQuestion = -1; $usersFinished[] = uv("name"); mds_give_rpcq_keys($MDS_Key); } else { // Not the last question, continue. echo "<p>You answered correctly!</p><br/><br/>"; $currentQuestion++; } } else { echo "<p>Incorrect! Try again!</p><br/><br/>"; } } if ($currentQuestion > 0 && isset($Questions[$currentQuestion])) { echo $Questions[$currentQuestion][0]; ?> <br /> <input type='text' id='answer' name='answer' value='' /><br /> <input type='hidden' name='q' value='<?=$currentQuestion?>' /> <input name='button' type='submit' value='Submit Answer' /> <script type="application/javascript"> $('#answer').focus(); </script> <? } else if ($currentQuestion != -1) { ?> Welcome!<br/> <input type="hidden" name="page" value="front" /> <input name="button" type="submit" value="Continue" /> <? } echo "</form>"; } ?> Now, the code to transform this into a form that MDScript will accept. This code could be trivially accomplished in most other languages with a regex engine, but I chose to write it in D. It is currently hard coded to a specific file, and is only really intended as a reference for those looking to write their own form of the tool. module main; import std.algorithm : any, filter, map; import std.array : array, join, split; import std.conv : to; import std.datetime : nsecs, StopWatch; import std.file : readText, write; import std.regex : ctRegex, regex, replaceAll; import std.stdio : writeln, writefln; import std.string : strip, toLower; enum InputFile = `F:\MD\ClickableQuiz.omds`; void main(string[] args) { processFile(InputFile); } template cRegex(string pattern, string flags) { debug enum cRegex = regex(pattern, flags); else alias cRegex = ctRegex!(pattern, flags); } __gshared contentEqualRegex = cRegex!(`\?>([^]*?)<\?=([^]*?)(?=\?>)`, "g"); __gshared contentRegex = cRegex!(`\?>([^]*?)<\?(?!=)`, "g"); __gshared storageRegex = cRegex!(`\$([a-zA-Z0-9_]+)\s*=\s*mds_storage\(([^]*?),\s*("[at]o[at]u")\s*,([^]*?)\)\s*;`, "g"); __gshared variableRegex = cRegex!(`\$([a-zA-Z0-9_]+)`, "g"); __gshared stringRegex = cRegex!(`"(?:\"|.)*?"`, "g"); __gshared commentRegex = cRegex!(`//.*?$`, "gm"); __gshared documentStartRegex = cRegex!(`^\s*<\?`, "g"); __gshared documentEndRegex = cRegex!(`\?>\s*$`, "g"); string generateRegexTree(string[] str) { static class Node { char leaf; Node[] children; this() { this.leaf = '\0'; } this(char c) { this.leaf = c; } static Node buildNode(string child, Node parent) { if (child == "") { auto n = new Node('\0'); parent.children ~= n; return n; } foreach (c; parent.children) { if (c.leaf == child[0]) return buildNode(child[1..$], c); } auto n = new Node(child[0]); parent.children ~= n; return buildNode(child[1..$], n); } string build() { string ret = ""; if (leaf != '\0') ret ~= leaf; bool hasEndNode = children.any!(c => c.leaf == '\0'); if (children.length == 1 && hasEndNode) hasEndNode = false; bool addGrouping = children.length > 1 || hasEndNode; if (addGrouping) ret ~= "(?:"; ret ~= children.filter!(c => c.leaf != '\0').map!(c => c.build()).join('|'); if (addGrouping) ret ~= ')'; if (hasEndNode) ret ~= "?"; return ret; } } Node root = new Node(); foreach (c; str) root.buildNode(c, root); return root.build(); } enum knownReservedWords = import("KnownReservedWords.txt").split('\n').map!(i => i.strip()).array; __gshared knownReservedWordsRegex = cRegex!(generateRegexTree(knownReservedWords), "gi"); void processFile(string inputFile) { auto sw = StopWatch(); auto txt = readText(inputFile); sw.start(); // First, extract the content sections. string[] contentSections; txt = txt.replaceAll!((match) { contentSections ~= match[1]; auto tmp = `echo @content[` ~ (contentSections.length - 1).to!string() ~ "];\r\n"; return tmp ~ `echo "" . (` ~ match[2] ~ ");\r\n"; })(contentEqualRegex); txt = txt.replaceAll!((match) { contentSections ~= match[1]; return `echo @content[` ~ (contentSections.length - 1).to!string() ~ "];\r\n"; })(contentRegex); // And remove the opening and closing tags of the document (if present). txt = txt.replaceAll(documentStartRegex, ""); txt = txt.replaceAll(documentEndRegex, ""); // Next, remap the variables, with special handling for storage. string[string] variableMap = [ "input": "@input", ]; txt = txt.replaceAll!((match) { if (match[1] in variableMap) throw new Exception("Already mapped variable '" ~ match[1] ~ "'!"); auto vIdx = `@va[` ~ variableMap.length.to!string() ~ `]`; auto tmp = vIdx ~ ` = mds_storage(` ~ match[2] ~ `, ` ~ match[3] ~ ");\r\n"; tmp ~= `if (!isset(@storage[` ~ vIdx ~ "]))\r\n"; tmp ~= "\t@storage[" ~ vIdx ~ `] = ` ~ match[4] ~ ";\r\n"; variableMap[match[1]] = `@storage[` ~ vIdx ~ `]`; return tmp; })(storageRegex); txt = txt.replaceAll!((match) { if (match[1] in variableMap) return variableMap[match[1]]; return (variableMap[match[1]] = `@va[` ~ variableMap.length.to!string() ~ `]`); })(variableRegex); // Now to deal with reserved words. txt = txt.replaceAll!((match) { return match[0].replaceAll!((match) { auto half = match[0].length / 2; return match[0][0..half] ~ `" . "` ~ match[0][half..$]; })(knownReservedWordsRegex); })(stringRegex); txt = txt.replaceAll!((match) { return match[0].replaceAll!((match) { auto half = match[0].length / 2; return match[0][0..half] ~ `_` ~ match[0][half..$]; })(knownReservedWordsRegex); })(commentRegex); sw.stop(); writefln("Took %s ms to format '%s'", cast(real)sw.peek().nsecs / 1_000_000f, inputFile); write(inputFile ~ ".html", contentSections.join("<!-- content separator -->")); write(inputFile ~ ".php", txt); } And, lastly, the content of KnownReservedWords.txt: call error ext fprintf inf ini is_a mod move open parse read split sprintf stat t_as t_sr try use val Have fun, and may all your vars be @va.
  20. Well, it would be nice if we could get 'int' as an allowed function, as I don't like implicit conversions.
  21. I believe it was fixed a long time ago, but it's probably worth checking if the infinite EP bug still exists with that interface.
  22. Because, regardless of the language, exceptions are expensive. Of course, depending on the language, *cough*MaxScript*cough* returns, breaks, and continues can also be expensive... (for some absurd reason Autodesk implemented them using C++ exceptions internally)
  23. The overall layout of the search page for md, (http://magicduel.com/google_results.php) is broken, and looks terrible.
  24. When you pick up a heat pebble a Javascript error is displayed: <magicduel.com> Error: SyntaxError Err description: undefined Err number: undefined Err message: at line 4, column 77: expected ';', got '66343' Ajax response: parent.dlgAlert('U3VjY2Vzc2Z1bGx5IHBpY2tlZCBIZWF0IFBlYmJsZSEgQ2hlY2sgeW91ciBpbnZlbnRvcnk='); location.reload(true); parent.document.getElementById('bar').src = 'bar/inventory.php'; Directitem 66343 does not have public tag
×
×
  • Create New...