Skip to content

Instantly share code, notes, and snippets.

N4IgzghgbgpgajATmAlgewHYgFwEYCsANCIjGGgK6IDGZOA2qBhALYw4jUQAuGKADiGJQIAGwrtsADgAsANlkAmXAHYADADoAzCq1yCM4hQyi01ANYwAJjm6IJxFGAASKK1ZhZsdiQF9CTKySIADuaGg2wmISOIpaWmoAnFIqiYoaiSpyiXKKUkYmZpY23vYwji5uHl4+MP6BbBwsKBhIYmBCICLikoqJ+Gp9KvhyGqlq+opyhiDGphbWtmUVru6eS34BIMyN2JxoYp3dMdgDif39+Boyarjx0/gzc0WLpQ4gTqvVOABm7XVbHbBFCITBHaK9JJSPqKPpjC5SLRxArzYobcofSprLx/URgAENYLcFDcCB8CgscE9WL4fBTAiJDRSaY3GRpfKzQoLEq1FZVdZvAnbIIcADmaFEkS6EJwKlkzNwUg0+DSUMSuBRLx5y0xXwFtXqwt2IDQKFEVJO/RUMgG1vS8TUzNumu56L52PRhqBHCoZJQFItkgSajU6hU1z0mWmci0LrRgvd32wuPxXpFe2MaAARqSWv7KVFqdgclo2UqJmoZDJVHI6XHXrzdfycf808aWGT+GgQkhAzhcLhplJNPhdJWkiHBvXte9Ps3PYD0+BqChPLQ+3h8HpFPhmbD9MqiJzUQ2dXOPYK28FqBRRNwqOxCydcJl2coNLldIpq6Xp26mxeBqLsafwkgAFhuA5srgMgaCGqTDjCKh/gmAFJkBhIcOYJLcJ4HRPpIUhSIkKGNueSYpkK3p7AAXjAWaIBA+HSkWGrHlq/7kfqZRXhwYCkjQYEQIg3AbioqhylMyjQukihqFobHPK6qFcTUPHAcEZLEh23C4YgkF2tochyFkKoKTuOikWeWIUa2GkcLhLBdoxogAGLiAAHhuUwyJZ7HKWRNkCpRvF7KKPymPwzHHL0pbWhodznElegKbG/nxoFeotniVFLkJYBgYxuHRTKeCOpcuAZHJk5EckVmzkF2WpvZew/FQJWsVIMGMrkiQ3MRVawsh6Wng1
if [[ ! -e /tmp/xwolf/wolf3d ]]; then
rm -rf /tmp/xwolf
git clone https://github.com/DamianDominoDavis/xwolf.git /tmp/xwolf
make -C /tmp/xwolf do
fi
cd /tmp/xwolf
./wolf3d ./maps/good.map
./wolf3d ./maps/simple.map
from random import random, randrange, choice, sample
from math import gcd
comebacks = (1,2,3,4,5,6,7,8)
# shorthand probability test
def p(r):
return random() < r
# imperative: like the wiki says
I didn't personalize this for a wider audience;
there's going to be a thing or two that doesn't apply to you
and a thing or seven I left out
STASH
bundle of firewood
PREP
jarlsberg's key lime pie,
TRADITIONAL ANIMATION
The Sword in the Stone
The Flight of Dragons
The Last Unicorn
Little Nemo: Adventures in Slumberland
The Princess and the Goblin
Rock-A-Doodle
The Hobbit (1977)
Return of the King (1980)
Wind in the Willows
N4IgzghgbgpgajATmAlgewHYgFwEYCsANCIjGGgK6IDGZOA2qBhALYw4jUQAuGKADiGJQIAGwrtsAJgAsuAOz4ZAOnwBmKVIBs+LWrUBOLcQoZRaagGsYAExzdEE4ijAAJFDZsws2AGZiwGABfQiZWSRAAdzQ0O2ExCRxcAA4NAyllbS0jAAZ1bRMzC2s7bAcnEBd3T28cf1FAkLC2DhYUDCQAoRARcUkZAwNkg3xVKVxxtS0CXELzK1t7RxhnNw8vH3rG0JBmFuxONDFu3sTsYeSc5VwhmRkdGXwcxTnixbLl1eqNuoDgnb2ERQiEwJwS/XkySk8mU8lwal0yUe2gMrwWpXKK0qaxqmz+TV24Q43BQ3AgfAoLDBfSSahU02SWi0sjhank8mMIFM8xKSwqVXWtT8+IBRIOAHM0KI4j1wThJqp5FIkfgDAjBozUVyiui+ViBbjfg1/s0ImgUKJqWcJrJRlocnl8LgUjokWjeR9+TifsLjQTARwqOSUJSrZIcu73lt9d6hdH/WLtWgAEZk9ohqnxGnYCPanlRv5fQV4v2i/Ygckklg8bhIMM4XPct6laNFw2+7am1rk/hoSJ1rPWvJaVQyZJItWDAyQtSRjGfbHfOMirsHMDUFDeWj1vC4HIzOd6ts++NliLUCiibhUdiDyTTLQqFI5KQ5NlspSzPPNo+L4tGztCXLfxSQACx3FJ8DtPcoPwC4x2GQ9PRjJcS0AgMDksUlawwMAIP3JDMWPZdS1XEAAC8YGTRAIDwu8GyQ1s/3bU8yLAMkaFAiBEG4Hc9CuGQpAMfdXwdMSvybXVkOItCTSAiJaxYXsaNEAAxcQAA8dzheRCIXA0TxXeSOHFXxzH4OjZWzRsdQ9JiDJI9DEy4sBQJo2tLNOcNGMLZjDNI4yDl8KhPLlaQCAMa5UjpFIBiZLRdO/KSiL8xy5IwyooDQRAAE8d20N8EuUN9DHGJk4NnJKPRShzZITcswH4FBt3o7BBMuZJlBkOFcGyHJknkAwJNs94at
# itemguard -- un/closet pvpables by value, with managed exceptions
# configuration
int closet_value_higher_than = 1000;
boolean[item] always_bag = $items[Freddy Kruegerand]; # list "none" rather than empty!
boolean[item] always_closet = $items[sand dollar, hobo nickel, bowling ball];
# donfiguration
boolean pvpable(item it) {
return it.tradeable && it.discardable && !it.gift; # && !it.quest
# abbreviate a number as thousands, millions, billions
string kmb_num(float x) {
if (x<0)
return '-'+kmb_num(0-x);
for i from 9 to 3
if (x >= 10**i)
return (x.to_float()/10**(3*(i/3))).to_string('%'+(i-(i%3))+'.'+(2-i%3)+'f') + string[]{'k','M','B'}[i/3-1];
return (x.to_int().to_float() != x && x.to_int().to_string('%d').length() < 3)
? x.to_string('%1.2f')
: x.to_int().to_string('%d');
# the best things in life are free.
# of other definitely-not-the-best things in life, some stay cheap.
int mall_min(item it) {
return it.tradeable? max(100, 2*it.autosell_price()) : -1;
}
void historic_mins() {
string[string,int] thems;
string category;
string kmb_num(float x) {
for i from 9 to 3 by 3
if (x >= 10**i)
return to_int(x / 10**i) + string[]{'k','M','B'}[i/3 - 1];
return x.to_int();
}
boolean have_familiar_or_pocket(familiar f) {
static buffer b = visit_url('familiarnames.php');
return f.have_familiar() || b.contains_text('the ' + f);