Who are you? If you found this and liked it, send me an email! clintemsley@gmail.com. \n\nOr you can get me on [[Twitter\n|https://twitter.com/virtualclint]]\n\nTHE END!
try { macros['randomp'] = { \n\n handler: function(place,macroName,params,parser) {\n var state = 0;\n var passageflag = false;\n var chance = 100;\n var r = Math.random() * 100;\n \n for(var i = 0; i < params.length; i++) {\n switch(state) {\n case 0:\n if(params[i] == 'passage') {\n passageflag = true;\n state = 1;\n break;\n }\n //No break !!! fall through if keyword 'passage' is not used\n \n case 1:\n chance -= params[i];\n state = 2;\n break;\n \n case 2:\n if(r >= chance) {\n if(passageflag) macros.display.handler(place,macroName,[ params[i] ]); \n else new Wikifier(place, params[i]);\n return;\n }\n state = 0;\n break;\n }\n }\n },\n\n init: function() { }\n \n};} catch(e) { \n throwError(place,"Macro Randomp Error: "+e.message); \n}
You scream in the old man's face and he looks extremely unsettled. He has probably seen worse than this, though, so he just turns around and walks away, looking offended.\n\nThat was really crappy of you! You feel bad and go home.\n\nAlso you forgot your milk. \n\n[[THE END|me]]
Dear Prince,\n\nI think you are quite wonderful and beautiful. I don't know if you really noticed me while you were here, but I noticed you and I'd like to get a chance to know you better! Would you like to be pen pals?\n\nLove,\n\n[[me]]
<<cycle a4>><<randomp 1 "is all this ''really'' worth it?" 10 "scanning the carpet..." 10 "maybe they're on the sidewalk..." 10 "none under the bed..." 10 "digging in the couch cushions..." 10 "peering under the fridge..." passage 999 "found" >><<endcycle>>\n\n<<revise a4 "Look for marbles">>
He holds out a styrofoam cup with pieces missing from the top and says "Got any change for an old man?" \n\n[[Yes I do]]\n[[No I don't]]\n[[AUUUUUUGH]]
Wikifier.formatters.push({name:"char",match:".",handler:function(a){insertElement(a.output,"span",null,"char",a.matchText);\n}});Wikifier.formatters.forEach(function(e){if(e.name=="emdash"){e.handler=function(a){var b=insertElement(a.output,"span",null,"char",String.fromCharCode(8212));\n};}else{if(e.name=="prettyLink"){e.handler=function(a){var b=new RegExp(e.lookahead,"mg");\nb.lastIndex=a.matchStart;var c=b.exec(a.source);if(c&&c.index==a.matchStart&&c[2]){var d=Wikifier.createInternalLink(a.output,c[1]);\nsetPageElement(d,null,c[1]);a.nextMatch+=c[1].length+2;}else{if(c&&c.index==a.matchStart&&c[3]){var f;\nif(tale.has(c[4])){f=Wikifier.createInternalLink(a.output,c[4]);}else{f=Wikifier.createExternalLink(a.output,c[4]);\n}setPageElement(f,null,c[1]);a.nextMatch=c.index+c[0].length;}}};}}});\n\n(function(){version.extensions["replaceMacrosCombined"]={major:1,minor:0,revision:0};\nvar nullobj={handler:function(){}};function showVer(n,notrans){n.innerHTML="";\nnew Wikifier(n,n.tweecode);n.setAttribute("data-enabled","true");\nn.style.display="inline";n.classList.remove("revision-span-out");\nif(!notrans){n.classList.add("revision-span-in");if(n.timeout){clearTimeout(n.timeout)\n}n.timeout=setTimeout(function(){n.classList.remove("revision-span-in")\n},1)}}function hideVer(n,notrans){n.setAttribute("data-enabled","false");\nn.classList.remove("revision-span-in");if(n.timeout){clearTimeout(n.timeout)\n}if(!notrans){n.classList.add("revision-span-out");n.timeout=setTimeout(function(){if(n.getAttribute("data-enabled")=="false"){n.classList.remove("revision-span-out");\nn.style.display="none";n.innerHTML=""}},1000)}else{n.style.display="none";\nn.innerHTML=""}}function tagcontents(b,starttags,desttags,endtags,k){var l=0,c="",tg,a,i;\nfunction tagfound(i,e){for(var j=0;j<e.length;j++){if(a.indexOf("<<"+e[j],i)==i){return e[j]\n}}}a=b.source.slice(k);for(i=0;i<a.length;i++){if(tg=tagfound(i,starttags)){l++\n}else{if((tg=tagfound(i,desttags))&&l==0){b.nextMatch=k+i+tg.length+4;\nreturn[c,tg]}else{if(tg=tagfound(i,endtags)){l--;if(l<0){return null\n}}}}c+=a.charAt(i)}return null}var begintags=[];var endtags=[];\nfunction revisionSpanHandler(g,e,f,b){var k=b.source.indexOf(">>",b.matchStart)+2,vsns=[],vtype=e,flen=f.length,becomes,c,cn,m,h,vsn;\nfunction mkspan(vtype){h=insertElement(m,"span",null,"revision-span "+vtype);\nh.setAttribute("data-enabled",false);h.style.display="none";h.tweecode="";\nreturn h}if(this.shorthand&&flen){while(f.length>0){vsns.push([f.shift(),(this.flavour=="insert"?"gains":"becomes")])\n}}else{if(this.flavour=="insert"||(this.flavour=="continue"&&this.trigger=="time")){vsns.push(["","becomes"])\n}}if(this.flavour=="continue"&&flen){b.nextMatch=k+b.source.slice(k).length;\nvsns.push([b.source.slice(k),vtype])}else{becomes=["becomes","gains"];\nc=tagcontents(b,begintags,becomes.concat(endtags),endtags,k);\nif(c&&endtags.indexOf(c[1])==-1){while(c){vsns.push(c);c=tagcontents(b,begintags,becomes,endtags,b.nextMatch)\n}c=tagcontents(b,begintags,["end"+e],endtags,b.nextMatch)}if(!c){throwError(g,"can't find matching end"+e);\nreturn}vsns.push(c);if(this.flavour=="continue"){k=b.nextMatch;\nb.nextMatch=k+b.source.slice(k).length;vsns.push([b.source.slice(k),""])\n}}if(this.flavour=="remove"){vsns.push(["","becomes"])}console.log(JSON.stringify(vsns));\ncn=0;m=insertElement(g,"span",null,e);m.setAttribute("data-flavour",this.flavour);\nh=mkspan("initial");vsn=vsns.shift();console.log(e+" "+vsn[0]);\nh.tweecode=vsn[0];showVer(h,true);while(vsns.length>0){if(vsn){vtype=vsn[1]\n}vsn=vsns.shift();h=mkspan(vtype);h.tweecode=vsn[0]}if(typeof this.setup=="function"){this.setup(m,g,f)\n}}function quantity(m){return(m.children.length-1)+(m.getAttribute("data-flavour")=="remove")\n}function revisionSetup(m,g,f){m.className+=" "+f[0].replace(" ","_");\nshowVer(m.firstChild,true)}function timeSetup(m,g,f){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return Number(s.slice(0,-2))||0\n}else{if(s.slice(-1).toLowerCase()=="s"){return Number(s.slice(0,-1))*1000||0\n}}}throwError(g,s+" isn't a CSS time unit");return 0}var fl=this.flavour;\nvar tm=cssTimeUnit(f[0]);setTimeout(function timefn(){var done=!revise("revise",m);\nif(!done){setTimeout(timefn,tm)}},tm)}function hoverSetup(m){m.onmouseover=function(){revise("revise",m)\n};m.onmouseout=function(){revise("revert",m)}}function mouseSetup(m){var fl=this.flavour;\nm.onmouseenter=function(){var done=!revise("revise",m);if(done){this.onmouseenter=null\n}}}function linkSetup(m,g,f){var fl=this.flavour,l=Wikifier.createInternalLink(),p=m.parentNode;\nl.className="internalLink replaceLink";p.insertBefore(l,m);l.insertBefore(m,null);\nl.onclick=function(){var p,done=false;if(m&&m.parentNode==this){done=!revise("revise",m);\nscrollWindowTo(m)}if(done){this.parentNode.insertBefore(m,this);\nthis.parentNode.removeChild(this)}}}function visitedSetup(m,g,f){var i,done,shv=state.history[0].variables,os="once seen",d=(m.firstChild&&(this.flavour=="insert"?m.firstChild.nextSibling:m.firstChild).tweecode);\nshv[os]=shv[os]||{};if(d&&!shv[os].hasOwnProperty(d)){shv[os][d]=1\n}else{for(i=shv[os][d];i>0&&!done;i--){done=!revise("revise",m,true)\n}if(shv[os].hasOwnProperty(d)){shv[os][d]+=1}}}[{name:"insert",flavour:"insert",trigger:"link",setup:linkSetup},{name:"timedinsert",flavour:"insert",trigger:"time",setup:timeSetup},{name:"insertion",flavour:"insert",trigger:"revisemacro",setup:revisionSetup},{name:"later",flavour:"insert",trigger:"visited",setup:visitedSetup},{name:"replace",flavour:"replace",trigger:"link",setup:linkSetup},{name:"timedreplace",flavour:"replace",trigger:"time",setup:timeSetup},{name:"mousereplace",flavour:"replace",trigger:"mouse",setup:mouseSetup},{name:"hoverreplace",flavour:"replace",trigger:"hover",setup:hoverSetup},{name:"revision",flavour:"replace",trigger:"revisemacro",setup:revisionSetup},{name:"timedremove",flavour:"remove",trigger:"time",setup:timeSetup},{name:"mouseremove",flavour:"remove",trigger:"mouse",setup:mouseSetup},{name:"hoverremove",flavour:"remove",trigger:"hover",setup:hoverSetup},{name:"removal",flavour:"remove",trigger:"revisemacro",setup:revisionSetup},{name:"once",flavour:"remove",trigger:"visited",setup:visitedSetup},{name:"continue",flavour:"continue",trigger:"link",setup:linkSetup},{name:"timedcontinue",flavour:"continue",trigger:"time",setup:timeSetup},{name:"mousecontinue",flavour:"continue",trigger:"mouse",setup:mouseSetup},{name:"cycle",flavour:"cycle",trigger:"revisemacro",setup:revisionSetup},{name:"mousecycle",flavour:"cycle",trigger:"mouse",setup:mouseSetup},{name:"timedcycle",flavour:"cycle",trigger:"time",setup:timeSetup}].forEach(function(e){e.handler=revisionSpanHandler;\ne.shorthand=(["link","mouse","hover"].indexOf(e.trigger)>-1);\nmacros[e.name]=e;macros["end"+e.name]=nullobj;begintags.push(e.name);\nendtags.push("end"+e.name)});function reviseAll(rt,rname){var rall=document.querySelectorAll(".passage ."+rname),ret=false;\nfor(var i=0;i<rall.length;i++){ret=ret||revise(rt,rall[i])}return ret\n}function revise(rt,r,notrans){var ind2,curr,next,ind=-1,rev=(rt=="revert"),rnd=(rt.indexOf("random")>-1),fl=r.getAttribute("data-flavour"),rc=r.childNodes,cyc=(fl=="cycle"),rcl=rc.length-1;\nfunction doToGainerSpans(n,fn){for(var k=n-1;k>=0;k--){if(rc[k+1].classList.contains("gains")){fn(rc[k],notrans)\n}else{break}}}for(var k=0;k<=rcl;k++){if(rc[k].getAttribute("data-enabled")=="true"){ind=k\n}}if(rev){ind-=1}curr=(ind>=0?rc[ind]:(cyc?rc[rcl]:null));ind2=ind;\nif(rnd){ind2=(ind+(Math.floor(Math.random()*rcl)))%rcl}next=((ind2<rcl)?rc[ind2+1]:(cyc?rc[0]:null));\nvar docurr=(rev?showVer:hideVer);var donext=(rev?hideVer:showVer);\nif(curr){if(!(next&&next.classList.contains("gains"))||rnd){docurr(curr,notrans);\ndoToGainerSpans(ind,docurr,notrans)}}if(next){donext(next,notrans);\nif(rnd){doToGainerSpans(ind2+1,donext,notrans)}}return(cyc?true:(rev?(ind>0):(ind2<rcl-1)))\n}macros["revert"]=macros["revise"]=macros["randomise"]=macros["randomize"]={handler:function(a,b,c){var l,rev,rname;\nfunction disableLink(l){l.style.display="none"}function enableLink(l){l.style.display="inline"\n}function updateLink(l){if(l.className.indexOf("random")>-1){enableLink(l);\nreturn}var rall=document.querySelectorAll(".passage ."+rname),cannext,canprev,i,ind,r,fl;\nfor(i=0;i<rall.length;i++){r=rall[i],fl=r.getAttribute("data-flavour");\nif(fl=="cycle"){cannext=canprev=true}else{if(r.firstChild.getAttribute("data-enabled")==!1+""){canprev=true\n}if(r.lastChild.getAttribute("data-enabled")==!1+""){cannext=true\n}}}var can=(l.classList.contains("revert")?canprev:cannext);(can?enableLink:disableLink)(l)\n}function toggleText(w){w.classList.toggle(rl+"Enabled");w.classList.toggle(rl+"Disabled");\nw.style.display=((w.style.display=="none")?"inline":"none")}var rl="reviseLink";\nif(c.length<2){throwError(a,b+" macro needs 2 parameters");return\n}rname=c.shift().replace(" ","_");l=Wikifier.createInternalLink(a,null);\nl.className="internalLink "+rl+" "+rl+"_"+rname+" "+b;var v="";\nvar end=false;var out=false;if(c.length>1&&c[0][0]=="$"){v=c[0].slice(1);\nc.shift()}switch(c[c.length-1]){case"end":end=true;c.pop();break;\ncase"out":out=true;c.pop();break}var h=state.history[0].variables;\nfor(var i=0;i<c.length;i++){var on=(i==Math.max(c.indexOf(h[v]),0));\nvar d=insertElement(null,"span",null,rl+((on)?"En":"Dis")+"abled");\nif(on){h[v]=c[i];l.setAttribute("data-cycle",i)}else{d.style.display="none"\n}insertText(d,c[i]);l.appendChild(d)}l.onclick=function(){reviseAll(b,rname);\nvar t=this.childNodes,u=this.getAttribute("data-cycle")-0,m=t.length,n,lall,i;\nif((end||out)&&u==m-(end?2:1)){if(end){n=this.removeChild(t[u+1]);\nn.className=rl+"End";n.style.display="inline";this.parentNode.replaceChild(n,this)\n}else{this.parentNode.removeChild(this);return}}else{toggleText(t[u]);\nu=(u+1)%m;if(v){h[v]=c[u]}toggleText(t[u]);this.setAttribute("data-cycle",u)\n}lall=document.getElementsByClassName(rl+"_"+rname);for(i=0;i<lall.length;\ni++){updateLink(lall[i])}};disableLink(l);setTimeout(function(){updateLink(l)\n},1)}};macros["mouserevise"]=macros["hoverrevise"]={handler:function(a,b,c,d){var endtags=["end"+b];\nvar t=tagcontents(d,[b],endtags,endtags,d.source.indexOf(">>",d.matchStart)+2);\nif(t){var rname=c[0].replace(" ","_"),h=insertElement(a,"span",null,"hoverrevise hoverrevise_"+rname),f=function(){var done=!reviseAll("revise",rname);\nif(b!="hoverrevise"&&done){this.onmouseenter=null}};new Wikifier(h,t[0]);\nif(b=="hoverrevise"){h.onmouseover=f;h.onmouseout=function(){reviseAll("revert",rname)\n}}else{h.onmouseenter=f}}}};macros["endmouserevise"]=nullobj;\nmacros["endhoverrevise"]=nullobj}());
<html> <del>Dear Prince,\n<br><br>\nI really loved your first album the best and</del></html>\n\nWrong [[prince|prince2]]
The prince doesn't need saving, silly! He just decided that he doesn't want the pressure of royalty so he's taking a vacation to a small town in Ireland where he's learning the ins and outs of subsistence farming!\n\nYou could, however, [[write him a letter]].
You have searched long and hard for the file, but unfortunately, it was not found. \n\nInstead, you decide to go on a [[quest]].\n\n<<set $marbles = 0>>
What kind of quest would you like to go on?\n\n[[the quest to get some milk|milk]]\n[[the quest to save the prince|prince]]\n[[the quest to find 404 marbles|marbles]]
"No, sorry, I don't carry cash since the one time I got mugged" you smoothly lie. You think you've fooled him, but the look on his face says otherwise.\n\nHe turns away from you to chase down someone else.\n\nYou get your milk and go home. Well done! Tomorrow is another day, and maybe you won't lie to the homeless guy this time!\n\n[[THE END|me]]
He looks a bit dirty, missing a few teeth, smells a lot like the oldest cigarettes in the world. He's holding out a styrofoam cup.\n\n<<display "do">>
File Not Found (404)
<<set $marbles = $marbles + 1>>Found one! You have <<print $marbles>> now. <<if $marbles gte 404>>\n\n\n[[YOU WIN!!!|me]]\n<<endif>>
You dig in your pockets and grab the quarters you had from buying candy. "Here you go" you say as you toss them in the cup. You feel good about yourself for a split second.\n\n"Thanks kid!" he says somewhat sincerely before turning away to chase someone else down.\n\nYou go to the store and buy milk. Well done!\n\n[[The End!!!|me]]
You walk down to the store to get some more milk. It would be really nice to have some cheerios right about now.\n\nYou are accosted by a [[homeless man who wants change|homeless]]!! What do you [[do]]?!