pizza = let's remove pizza in 0.17 { function search() -- macro '\{6}' (Ctrl-F) to this local ctrlf = string.char(6) local enter = string.char(13) local esc = string.char(27) local shortcuts = { -- map to skill letters on m* nil, 'short bl', 'long bl', 'axe', 'mace', 'polearm', 'stave', nil, '\\bbow', 'crossbow'} local function print_header() local line = '' local sep = ' ' local function printy(k, v) local entry = '' .. k .. ' ' .. v .. '' if line == '' then line = entry elseif #(line:gsub('', '') .. k .. v) >= 76 then crawl.mpr(line, 'prompt') line = entry else line = line .. sep .. entry end end crawl.clear_messages(true) for i = 1, 12 do -- 1,26 local k = string.char(64 + i) local v = shortcuts[i] if v then -- alias Ctrl-A and Shift-A, etc. shortcuts[string.char(i)] = v shortcuts[k] = v printy(k, v) end end local a,b,c a,b,c = '!', 'potion', 'potion' shortcuts[a] = b, printy(a, c) a,b,c = '?', 'scroll', 'scroll' shortcuts[a] = b, printy(a, c) a,b,c = '/', 'wand', 'wand' shortcuts[a] = b, printy(a, c) a,b,c = '=', 'ring && jewellery', 'ring' shortcuts[a] = b, printy(a, c) a,b,c = '"', 'amulet && jewellery', 'amulet' shortcuts[a] = b, printy(a, c) a,b,c = "'", 'jewellery', 'jewellery' shortcuts[a] = b, printy(a, c) a,b,c = '(', 'missile|throwable', 'ammo' shortcuts[a] = b, printy(a, c) a,b,c = ')', 'weapon&&ego', 'egoweapon' shortcuts[a] = b, printy(a, c) a,b,c = '[', 'armour', 'armour' shortcuts[a] = b, printy(a, c) a,b,c = ']', 'armour&&shield', 'shield' shortcuts[a] = b, printy(a, c) a,b,c = '&', 'corpse$', 'corpse' shortcuts[a] = b, printy(a, c) a,b,c = '_', 'altar', '^ altar' shortcuts[a] = b, printy(a, c) shortcuts['^'] = b -- `~!@#$%^&*()_+[]{};:'"\|,<.>/? " -- `~ * ; < > -- !? A A C C EEC a,b,c = '%', 'food', 'food' shortcuts[a] = b, printy(a, c) a,b,c = '{', 'miscellaneous', 'misc' shortcuts[a] = b, printy(a, c) a,b,c = '.', '.', 'onlevel' shortcuts[a] = b, printy(a, c) a,b,c = '*', '..', 'anywhere' -- all items everywhere shortcuts[a] = b, printy(a, c) a,b,c = '+', 'manual', 'manual' shortcuts[a] = b, printy(a, c) a,b,c = ':', 'book', 'book' shortcuts[a] = b, printy(a, c) a,b,c = '$', 'gold piece', 'gold' shortcuts[a] = b, printy(a, c) a,b,c = '|', 'rods|staves', '\\ staff' shortcuts[a] = b, printy(a, c) shortcuts['\\'] = b a,b,c = '}', 'cTele|teleport|blink', 'escape' --todo shortcuts[a] = b, printy(a, c) a,b,c = '1', 'ego', 'ego' shortcuts[a] = b, printy(a, c) a,b,c = '2', 'artifact', 'artifact' shortcuts[a] = b, printy(a, c) a,b,c = '3', 'heal wounds|curing|ambrosia', 'heal' shortcuts[a] = b, printy(a, c) a,b,c = '4', 'scroll.*enchant|recharg', 'enchant' shortcuts[a] = b, printy(a, c) a,b,c = '5', 'of slaying|Slay\\+', 'mikee_' shortcuts[a] = b, printy(a, c) a,b,c = '6', 'blowgun|needle', 'blow' shortcuts[a] = b, printy(a, c) a,b,c = '7', 'under plant', 'plant' shortcuts[a] = b, printy(a, c) a,b,c = '8', 'protection from', 'protection from' -- todo rN shortcuts[a] = b, printy(a, c) a,b,c = '9', 'evasion|protection|EV\\+|AC\\+', 'AC|EV' shortcuts[a] = b, printy(a, c) a,b,c = '0', 'rCorr|resist corr|rMut|resist mut', 'rA|rM' shortcuts[a] = b, printy(a, c) shortcuts['#'] = '?' -- rewire help shortcuts in custom pre-prompt if line then crawl.mpr(line, 'prompt') end end print_header() crawl.mpr('Search for what [# for help]? ', 'prompt') local letter = string.char(crawl.getch()) print_header() shortcuts[string.char(13)] = nil local sc = shortcuts[letter] crawl.sendkeys(ctrlf .. (sc and sc .. enter or letter)) end } include += skillto.rc show_inventory_glyphs = true #fake_lang = halls of mist #compact_hud = true #compact_hud_xs = true #show_skill_bar = true show_uncursed = false skill_focus = false status_caption_colour = darkgrey #stat_colour = 72:darkgrey, 3:white hp_colour = 100:darkgrey, 99:lightgrey, 75:white, 50:yellow, 25:lightred mp_colour = 100:darkgrey, 99:lightgrey # Credits # ------- # Wall coloring: crate # Item coloring: simmarine, gammafunk # Messages: MarvinPA # Armor autopickup: Medar # Xom nonsense: Ragdoll # good??: team z7bUgoodz3fUz3fUz7dU note_chat_messages = true default_manual_training = true small_more = true #clear_messages = true autopickup += $?!+"/%}|\ autopickup_exceptions ^= >rune of Zot : if you.god() == "Nemelex Xobeh" then autopickup_exceptions ^= <(plain|ornate|legendary) deck : else autopickup_exceptions ^= >(plain|ornate|legendary) deck : end # Hunger strike : if you.race() ~= "Vampire" then autopickup_exceptions ^= >of blood, >of coagulated blood : end : if you.race() == "Ogre" or you.race() == "Troll" then autopickup_exceptions ^= amnesia, >of flight, >berserk r, of random, >of magic da, >of slowin, >of confus autopickup_exceptions ^= ,,brown} #feature ^= gateway leading out of the Abyss {,,yellow,,yellow} feature ^= fountain {.,,lightgrey} feature ^= mangrove {7,,green} feature ^= tree {7,green} # To fix "floor" color of 'An escape hatch in the floor.' feature ^= escape hatch{,,brown,,brown} feature ^= deep water{≠,,blue} feature ^= lava{≠,,red} item_slot += bread ration:e item_slot += scroll of fog:f item_slot += scroll of identify:i item_slot += potion of magic:m item_slot += potion of curing:q item_slot += scroll of remove curse:r item_slot += scroll of teleportation:t item_slot += potion of cancellation:C item_slot += potion of agility:D item_slot += scroll of fear:F item_slot += potion of brilliance:I item_slot += scroll of magic mapping:M item_slot += potion of resistance:P item_slot += potion of heal wounds:Q item_slot += scroll of recharging:R item_slot += potion of might:S item_slot += scroll of blinking:T spell_slot += regeneration:s spell_slot += vampiric draining:v spell_slot += animate skeleton:z spell_slot += animate dead:zZ spell_slot += phase shift:wW spell_slot += swiftness:wW spell_slot += haste:hH spell_slot += flight:F spell_slot += control teleport:t spell_slot += blink:CV spell_slot += controlled blink:C spell_slot += repel missiles:rR spell_slot += deflect missiles:rR spell_slot += apportation:A spell_slot += dispel undead:D spell_slot += ensorcelled hibernation:x level_map_cursor_step = 6 rest_delay = -1 travel_delay = -1 explore_delay = -1 #explore_wall_bias = 3 view_delay = 0 use_animations = #hp_warning = 100 hp_warning = 0 autofight_stop = 0 # channel.pray = mute channel.talk = mute channel.talk_visual = mute # #channel.monster_spell = mute # channel.multiturn = mute channel.food = mute channel.rotten_meat = mute #channel.friend_spell = mute #channel.friend_action = mute #channel.friend_enchant = mute msg := message_colour #msg ^= mute: Lernaean hydra #msg ^= mute: LOW HITPOINT WARNING msg ^= mute: You continue putting on your.* msg ^= mute: You continue taking off your.* msg := message_colour msg ^= mute:No target in (view|range)! msg ^= mute:An? .* is nearby! msg ^= mute:There are monsters nearby! msg ^= mute:Failed to move towards target msg ^= mute:Why would you want to do that msg ^= mute:The .* burns! msg ^= mute:Your.*doesn't do any damage msg ^= mute:Your.*(barely |closely )?(misses|hits|bites|but does) msg ^= mute:misses.*your msg ^= mute:Your.*in a puff of smoke msg ^= mute:You swap places. msg ^= mute:Time to introduce.*shillelagh msg ^= mute:Visions of slaying msg ^= mute:(HP|Magic) restored msg ^= mute:You feel slightly less thirsty. # Gods # ---- : if you.god() == "Jiyva" then msg ^= mute:You hear a distant slurping noise. msg ^= mute:You hear a squelching noise. msg ^= mute:You feel a little less hungry. msg ^= mute:You feel a little better. : end msg ^= mute:god:accepts you.* kill. msg ^= mute:god:appreciates your sacrifice. # Q (these are not all on god channel) msg ^= mute:(You feel.*protected|Your protection) from (fire|cold|phys|elec) runrest_ignore_message ^= (You feel.*protected|Your protection) from (fire|cold|phys|elec) msg ^= mute:The (plant|fungus) is (engulfed in|struck by) runrest_ignore_message ^= The (plant|fungus) is (engulfed in|struck by) # Z msg ^= mute:god:You pay a tithe of # Go forth and spread the truth: Labs don't exist feature ^= labyrinth entrance {.,.,floor,.,blue} msg ^= mute:(Hark!|distant snort|labyrinth entrance|starvation awaits) msg ^= mute:tick(ing|s).*clock runrest_stop_message ^= Found .* stone staircase.* leading up #runrest_stop_message ^= There .* stone staircase.* leading up here interrupt_travel -= keypress more := force_more_message more = more += Found .* leading up more += You pick up the .* rune and feel its power more += interdimensional caravan more += Found a gateway leading out of the Abyss more += You have a vision of.*gates? # Bad things more += You miscast (Controlled Blink|Blink|Death's|Borg|Necromutation) more += Careful! more += Your surroundings flicker more += sense of stasis more += Your amulet of stasis more += You fall through a shaft more += You cannot teleport right now more += The writing blurs in front of your eyes more += You fall through a shaft more += A huge blade swings out and slices into you! more += (blundered into a|invokes the power of) Zot more += Ouch! That really hurt! more += dispelling energy hits you more += You convulse more += You are (blasted|electrocuted)! more += You are.*confused more += You are( more)? poisoned more += flesh start more += (starving|devoid of blood) more += wrath finds you more += lose consciousness more += calcifying dust hits more += Space (bends|warps horribly) around you more += hits you.*distortion more += watched by something # Hell more += hell_effect: # Expiring effects more += You feel yourself slow down more += You are starting to lose your buoyancy more += Your hearing returns more += You have a feeling this form more += You feel yourself come back to life more += no longer (invulnerable|charmed) more += time is quickly running out more += life is in your own hands # Others #more += Your scales start more += You feel monstrous : if you.god() == "Xom" then more += god : end autoinscribe += vampiric:!w : if you.god() ~= "Lugonu" then autoinscribe += distortion:!w : end autoinscribe += (bad|dangerous)_item.*potion:!q autoinscribe += (bad|dangerous)_item.*scroll:!r autoinscribe += of cure mut:!q autoinscribe += staff of (Wucad Mu|energy|channeling|wizardry|power):!a autoinscribe += rod of (the|cloud|venom|inacc|fiery|frigid|destr):!a autoinscribe += lightning rod:!a autoinscribe += manual of:!d : if you.god() == "Fedhas" then autoinscribe += \{fruit\}:!e : end : if you.race() == "Vine Stalker" then autoinscribe += potion of magic:heal wounds autoinscribe += potion of ambrosia:elixir : end autoinscribe += rune of:good?? autoinscribe += slay:mikee_ autoinscribe += cancellation:rMut autoinscribe += amethyst:neil autoinscribe += gauntlets of War:Fingolfin autoinscribe += of mutation:elliptic dump_message_count = 60 dump_order -= misc dump_order -= monlist dump_order -= kills dump_order += vaults dump_order += turns_by_place dump_book_spells = false dump_item_origins = none user_note_prefix = Note:  note_hp_percent = 20 note_all_skill_levels = true : if you.god() == "Jiyva" then mon_glyph ^= player: slime J : else show_player_species = true : end # Mimics are merfolk #mon_glyph ^= item mimic: lightmagenta m #mon_glyph ^= inept item mimic: lightmagenta m #mon_glyph ^= ravenous item mimic: lightmagenta m #mon_glyph ^= feature mimic: lightmagenta m #mon_glyph ^= inept feature mimic: lightmagenta m #mon_glyph ^= ravenous feature mimic: lightmagenta m # Empty I into E, and reletter some more or less stupid stuff to E also mon_glyph ^= ice beast: green E mon_glyph ^= sky beast: lightcyan E mon_glyph ^= death cob: lightgreen E mon_glyph ^= spatial maelstrom: yellow E mon_glyph ^= battlesphere: lightmagenta E mon_glyph ^= wretched star: magenta E # This is not a '6' mon_glyph ^= sixfirhy: ь # Fixup C mon_glyph ^= stone giant: white mon_glyph ^= fire giant: lightgreen # Some 4.1 goodies mon_glyph ^= hydra: lightgreen H mon_glyph ^= the Lernaean hydra: yellow H mon_glyph ^= jackal: yellow j mon_glyph ^= giant spore: green G mon_glyph ^= queen bee: yellow Q mon_glyph ^= queen ant: lightred Q mon_glyph ^= soldier ant: red Q # Fixup G mon_glyph ^= eye of draining: lightcyan mon_glyph ^= golden eye: lightblue # Secretly a giant spore mon_glyph ^= lurking horror: green G # Corpses are on & (as in inventory), so move this other stuff away mon_glyph ^= pandemonium lord: I mon_glyph ^= Geryon: I mon_glyph ^= Mnoleg: I mon_glyph ^= Lom Lobon: I mon_glyph ^= Cerebov: I mon_glyph ^= Gloorx Vloq: I mon_glyph ^= Asmodeus: I mon_glyph ^= Dispater: I mon_glyph ^= Ereshkigal: I # Plants mon_glyph ^= oklob plant: yellow mon_glyph ^= plant: lightgrey mon_glyph ^= briar patch: darkgrey # Un-elemental or otherwise easier to grasp colors # Note that some elemental colors were fixed in 0.15 glyph reform mon_glyph ^= reaper: lightcyan mon_glyph ^= shadow demon: white mon_glyph ^= Shadow Fiend: white mon_glyph ^= Ice Fiend: lightblue mon_glyph ^= profane servitor: lightred ∀ # Weapons are not items mon_glyph ^= dancing weapon: { mon_glyph ^= spectral weapon: { # Spires are weapons mon_glyph ^= lightning spire: { # 0.15 reform fixups and extension # ================================ # B into w mon_glyph ^= goliath beetle: w mon_glyph ^= boring beetle: w mon_glyph ^= boulder beetle: w mon_glyph ^= torpor snail: lightcyan # w into j (todo tentacles) # // worms and slugs ('j') # mon_glyph ^= giant slug: j # mon_glyph ^= elephant slug: j #mon_glyph ^= giant leech: j #mon_glyph ^= Gastronok: j #mon_glyph ^= swamp worm: j #mon_glyph ^= snaplasher vine: j #mon_glyph ^= starspawn tentacle: j #mon_glyph ^= worm: j #mon_glyph ^= brain worm: j #mon_glyph ^= lava worm: j #mon_glyph ^= tentacle: j #mon_glyph ^= eldritch tentacle: j # Easier colors mon_glyph ^= boring beetle: lightblue mon_glyph ^= boulder beetle: white # Bears are not dogs #mon_glyph ^= goliath beetle: j #mon_glyph ^= boring beetle: j #mon_glyph ^= boulder beetle: j #mon_glyph ^= black bear: B #mon_glyph ^= polar bear: B # Player glyphs, mostly mon_glyph ^= human: @ mon_glyph ^= halfling: @ mon_glyph ^= demigod: grey @ # Fix alligator colors (they appear in or around water, folks) mon_glyph ^= alligator: lightmagenta mon_glyph ^= baby alligator: yellow # Berserk draconians are scary mon_glyph ^= red draconian: lightred # Urug is not always berserk mon_glyph ^= Urug: lightgrey # Classed draconians are scary mon_glyph ^= draconian monk: white mon_glyph ^= draconian caller: yellow mon_glyph ^= draconian knight: lightmagenta #TODO Gargoyles mon_glyph ^= gargoyle: white F mon_glyph ^= molten gargoyle: lightred F mon_glyph ^= war gargoyle: lightmagenta F #mon_glyph ^= gargoyle: white 6 #mon_glyph ^= molten gargoyle: yellow 6 #mon_glyph ^= war gargoyle: lightmagenta 6 # Recolor some W just because mon_glyph ^= player ghost: lightmagenta W mon_glyph ^= phantom: lightred W mon_glyph ^= drowned soul: yellow W # eocrawl innovation: distinct derived undead # Note that you are only able to set glyphs here, colors are ignored mon_glyph ^= zombie: Z mon_glyph ^= skeleton: z mon_glyph ^= simulacrum: U mon_glyph ^= spectral thing: U # mon_glyph ^= spectral thing: B # Merge z into x for color zombification of z mon_glyph ^= ancient zyme: lightgreen x mon_glyph ^= wight: green x mon_glyph ^= skeletal warrior: cyan x mon_glyph ^= curse skull: lightblue x mon_glyph ^= Murray: red x mon_glyph ^= ancient champion: lightmagenta x mon_glyph ^= flying skull: lightgrey x mon_glyph ^= curse toe: white x # mon_glyph ^= small abomination: red X # mon_glyph ^= curse toe: lightred x # Disco : if you.god() == "Qazlal" then #cset_unicode ^= cloud: . : else #cset_unicode ^= cloud: ☡ : end # Carrion # ------- item_glyph ^= skeleton: darkgrey . item_glyph ^= corpse: & item_glyph ^= (corpse|chunk): lightgrey item_glyph ^= (inedible|poisonous|rot-inducing).*(corpse|chunk): darkgrey . item_glyph ^= mutagenic.*(corpse|chunk): magenta item_glyph ^= evil_eating.*(corpse|chunk): red # Less distraction item_glyph ^= gold piece: lightgrey # Food # ---- item_glyph ^= \{fruit\}: green item_glyph ^= bread ration: white item_glyph ^= ambrosia: lightblue menu_color ^= green: fruit menu_color ^= yellow:(pizza|cheese|honeycomb|royal jell) menu_color ^= brown: (meat ration|beef jerk|sausage) menu_color ^= lightgrey: bread ration menu_color ^= blue: ambrosia menu_color ^= darkgrey: (bad|useless)_item # Consumables # ----------- item_glyph ^= (potion|scroll|wand|jewellery): lightgrey item_glyph ^= unidentified.*(potion|scroll|wand|jewel).*: lightblue item_glyph ^= (good|emergency)_item.*(scroll|potion|wand|food): yellow item_glyph ^= (bad|dangerous|useless)_item.*(scroll|potion|food): lightgrey . # Potions # ------- menu_color ^= lightgreen: potion.*(agi|brill|might|porridge) menu_color ^= lightcyan: potion.*(cure mut|beneficial mut|experience) item_glyph ^= potion.*(agi|brill|might|porridge):lightgreen item_glyph ^= potion.*(cure mut|beneficial mut|experience):lightcyan # Scrolls # ------- menu_color ^= lightgreen: scroll.*(acquire|enchant|recharging|brand) menu_color ^= white: scroll.*(holy word|mapping|fog) item_glyph ^= scroll.*(acquire|enchant|recharging|brand): lightgreen item_glyph ^= scroll.*(holy word|mapping|fog): white # Wands # ----- menu_color ^= lightgreen: wand.*(polymorph|paralysis|invisibility) menu_color ^= white: wand.*(lightning|draining|cold|fire |fire$) menu_color ^= green: wand.*(digging|disintegration) # Jewelry # ------- menu_color ^= yellow: ring of (protection|poison res|evasion) menu_color ^= lightcyan: ring.*(slaying|regeneration|see invis) menu_color ^= lightcyan: amulet.*(regeneration) menu_color ^= yellow: amulet.*(faith|clarity) item_glyph ^= ring of (protection|poison res|evasion): yellow item_glyph ^= ring.*(slaying|regeneration|see invis): lightcyan item_glyph ^= amulet.*(faith|clarity): yellow item_glyph ^= amulet.*(regeneration): lightcyan # Inventory # --------- menu_color ^= cyan: (\(weapon|\(quiver|\(worn|\(around|\(left|\(right|\(on ) menu_color ^= darkgrey: (melded) # Make sure to prepend this last (highlight dropped things despite coloring) menu_color ^= inventory:blue: \w (\+|\#)\s # Shops # ----- menu_color ^= shop:white: manual #menu_color ^= shop:cyan: artefact.*spellbook menu_color ^= shop:white: unknown # Test: hide all unusable items # ----------------------------- # TODO felids see an empty ctrl-T because of how the coloring works here item_glyph ^= (bad|dangerous|useless)_item: lightgrey . # Pick up armor in slots you have not filled/fully enchanted/branded yet # ---------------------------------------------------------------------- # Armor copypasta cooked by Medar, thanks a bunch! { local function qname(it) return it.name("qual") end local function autopickup(it, name) if it.artefact then return true end local class = it.class(true) if class == "armour" then if it.is_useless then return end local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} st, _ = it.subtype() if good_slots[st] ~= nil then if it.branded then return true end local cur = items.equipped_at(good_slots[st]) if cur == nil then return true end if cur.branded or cur.artefact then return end if it.plus ~= nil then if it.plus > cur.plus then return true end --if qname(cur) == "hat" and qname(it) ~= "hat" then -- if it.plus + 1 > cur.plus then return true end --end else --if cur.plus < 2 then return true end if qname(cur) == "hat" and qname(it) ~= "hat" then return true end end elseif st == "body" then local cur = items.equipped_at("armour") if cur == nil then return end if qname(cur) == "animal skin" then return true end if qname(cur) ~= qname(it) then return end if it.branded and not (cur.branded or cur.artefact) then return true end if cur.branded or cur.artefact then return end if it.branded then return true end if it.plus ~= nil then if it.plus > cur.plus then return true end --else -- if cur.plus < 2 then return true end end elseif st == "shield" then if it.branded then return true end local cur = items.equipped_at("shield") if cur == nil then return end if qname(cur) ~= qname(it) then return end if cur.branded or cur.artefact then return end if it.plus ~= nil then if it.plus > cur.plus then return true end end end elseif class == "missile" then if name:find("curare") then return true end if you.race() == "Felid" then return false end elseif class == "weapon" then if you.race() == "Felid" then return false end if you.genus() == "draconian" and name:find("dragon slaying") then return true end if name:find("distortion") or name:find("chaos") then return true end if (you.xl() < 6) or (you.god():find("Nemelex") or (you.god():find("Yred")) or (you.god():find("Beogh"))) then if it.branded and not (it.name() == "club" or it.name() == "hammer") then return true end end local weapon = items.equipped_at("Weapon") if weapon then if (weapon.branded or weapon.artefact) then return end elseif (you.skill("Unarmed Combat") < 3) then if you.race() ~= "Ghoul" and you.race() ~= "Troll" then return true end end end end add_autopickup_func(autopickup) } message_colour += green:You kill.* message_colour += green:You destroy.* message_colour += lightgreen:You have reached level.* message_colour += lightgreen:Your .* skill increases .* message_colour += lightgreen:Your .* skill gained .* levels .* message_colour += lightred:Your .* skill decreases .* message_colour += lightred:Your .* skill lost .* levels .* #### Xom Nonsense (Ragdoll) #### # General Things message_colour += lightgreen:You freeze .* message_colour += lightgreen:You burn .* message_colour += lightgreen:You melt .* message_colour += lightgreen:You drain .* message_colour += lightgreen:There is a sudden explosion of sparks message_colour += lightgreen:.*convulses message_colour += lightgreen:You feel better. message_colour += lightgreen:.*is poisoned message_colour += lightgreen:.*looks even sicker. message_colour += lightgreen:.*is outlined in light. message_colour += lightgreen:.*glows brighter. # Good Things message_colour += cyan:.*seems to slow down message_colour += cyan:.*suddenly stops moving message_colour += cyan:.*evaporates and reforms.* message_colour += cyan:.*changes into a.* message_colour += cyan:.*appears confused message_colour += cyan:.*moving more slowly. # Bad Things #XXX healing dudes message_colour +=green:Your.*seems to speed up message_colour += lightred:.*seems to speed up message_colour += lightred:.*goes berserk message_colour += lightred:.*flickers and vanishes message_colour += lightred:.*is filled with an inner flame message_colour += lightred:.*you are electrocuted! # Force More #more += seems to speed up more += goes berserk more += flickers and vanishes more += is filled with an inner flame # Stuff stolen from elliptic { function control(c) return string.char(string.byte(c) - string.byte('a') + 1) end skill_list = {"Fighting","Short Blades","Long Blades","Axes","Maces & Flails", "Polearms","Staves","Unarmed Combat","Bows","Crossbows", "Throwing","Slings","Armour","Dodging","Shields","Spellcasting", "Conjurations","Hexes","Charms","Summonings","Necromancy", "Translocations","Transmutations","Fire Magic","Ice Magic", "Air Magic","Earth Magic","Poison Magic","Invocations", "Evocations","Stealth"} function record_current_skills(maxlev) c_persist.skill_list = { } for _,sk in ipairs(skill_list) do if you.train_skill(sk) > 0 and you.base_skill(sk) < (maxlev or 27) then table.insert(c_persist.skill_list, sk) end end end function check_skills() if not c_persist.skill_list or not c_persist.target_skill then return end for _,sk in ipairs(c_persist.skill_list) do if you.base_skill(sk) >= c_persist.target_skill then crawl.formatted_mpr(sk .. " reached " .. c_persist.target_skill .. ".", "prompt") crawl.more() c_persist.target_skill = nil set_new_skill_training() end end end function set_new_skill_training() c_persist.set_target_skill = 1 crawl.sendkeys('m') end function set_target_skill() record_current_skills() local str = "Currently training: " local first_skill = true for _,sk in ipairs(c_persist.skill_list) do val = you.base_skill(sk) if first_skill then str = str .. sk .. "(" .. val .. ")" else str = str .. ", " .. sk .. "(" .. val .. ")" end first_skill = false end str = str .. "." crawl.formatted_mpr(str, "prompt") crawl.formatted_mpr("Choose a target skill level: ", "prompt") c_persist.target_skill = tonumber(crawl.c_input_line()) record_current_skills(c_persist.target_skill) end function save_with_message() if you.turns() == 0 then crawl.sendkeys("S") return end crawl.formatted_mpr("Leave a message: ", "prompt") local res = crawl.c_input_line() c_persist.message = res crawl.sendkeys(control("s")) end function first_turn_of_game() for key,_ in pairs(c_persist) do if key ~= "record" then c_persist[key] = nil end end set_new_skill_training() end local did_first_turn = false function ready() if not did_first_turn then did_first_turn = true if you.turns() == 0 then first_turn_of_game() end if c_persist.message and c_persist.message ~= "nil" and c_persist.message ~= "" then crawl.mpr("Message: " .. c_persist.message) c_persist.message = nil end end check_skills() if c_persist.set_target_skill == 0 then set_target_skill() c_persist.set_target_skill = nil elseif c_persist.set_target_skill then c_persist.set_target_skill = c_persist.set_target_skill - 1 end end }