# github.com/refracta/dcss-webtiles-extension-module/blob/main/modules/sound-support/README.md sound_on = true one_SDL_sound_channel = true sound_volume = 0.07 sound_fade_time = 2.8 sound_pack += https://osp.nemelex.cards/build/latest.zip:["init.txt"] sound_pack += https://sound-packs.nemelex.cards/Autofire/BindTheEarth/BindTheEarth.zip < function ready() OpenSkills() AnnounceDamage() end > ########## # Turn 0 # ########## < local need_skills_opened = true function OpenSkills() if you.turns() == 0 and need_skills_opened then crawl.sendkeys("!d10" .. string.char(13) .. "Lair D11-12 Orc D13-15 S-Runes V1-4 Depths" .. string.char(13)) need_skills_opened = false you.set_training_target("Fighting",18) you.set_training_target("Maces & Flails",18) you.set_training_target("Axes",18) you.set_training_target("Polearms",20) you.set_training_target("Unarmed Combat",18) you.set_training_target("Throwing",9) you.set_training_target("Short Blades",18) you.set_training_target("Long Blades",18) you.set_training_target("Ranged Weapons",18) you.set_training_target("Armour",9) you.set_training_target("Dodging",9) you.set_training_target("Shields",9) you.set_training_target("Stealth",4) you.set_training_target("Spellcasting",6) you.set_training_target("Conjurations",20) you.set_training_target("Hexes",6) you.set_training_target("Summonings",6) you.set_training_target("Necromancy",6) you.set_training_target("Forgecraft",6) you.set_training_target("Translocations",9) you.set_training_target("Alchemy",3) you.set_training_target("Fire Magic",18) you.set_training_target("Air Magic",6) you.set_training_target("Ice Magic",18) you.set_training_target("Earth Magic",18) you.set_training_target("Invocations",6) you.set_training_target("Evocations",6) you.set_training_target("Shapeshifting",14) crawl.sendkeys("m","!") end end > ############### # Damage Calc # ############### < local previous_hp = 0 local previous_mp = 0 local previous_form = "" local was_berserk_last_turn = false function AnnounceDamage() local current_hp, max_hp = you.hp() local current_mp, max_mp = you.mp() --Things that increase hp/mp temporarily really mess with this local current_form = you.transform() local you_are_berserk = you.berserk() local max_hp_increased = false local max_hp_decreased = false if (current_form ~= previous_form) then if (previous_form:find("dragon") or previous_form:find("statue") or previous_form:find("tree") or previous_form:find("ice")) or previous_form:find("hydra")then max_hp_decreased = true elseif (current_form:find("dragon") or current_form:find("statue") or current_form:find("tree") or previous_form:find("ice")) or previous_form:find("hydra")then max_hp_increased = true end end if (was_berserk_last_turn and not you_are_berserk) then max_hp_decreased = true elseif (you_are_berserk and not was_berserk_last_turn) then max_hp_increased = true end --crawl.mpr(string.format("previous_form is: %s", previous_form)) --crawl.mpr(string.format("current_form is: %s", current_form)) --crawl.mpr(string.format("max_hp_increased is: %s", max_hp_increased and "True" or "False")) --crawl.mpr(string.format("max_hp_decreased is: %s", max_hp_decreased and "True" or "False")) --crawl.mpr(string:format("you_are_berserk is: %s", you_are_berserk and "True" or "False")) --crawl.mpr(string:format("was_berserk_last_turn is: %s", was_berserk_last_turn and "True" or "False")) --Skips message on initializing game if previous_hp > 0 then local hp_difference = previous_hp - current_hp local mp_difference = previous_mp - current_mp if max_hp_increased or max_hp_decreased then if max_hp_increased then crawl.mpr("You now have [" .. current_hp .. "/" .. max_hp .. "] hp.") else crawl.mpr("You now have [" .. current_hp .. "/" .. max_hp .. "] hp.") end else --On losing health if (current_hp < previous_hp) then if hp_difference >= (max_hp * 0.30) then crawl.mpr("MASSIVE DAMAGE!!") elseif hp_difference >= (max_hp * 0.20) then crawl.mpr("You take " .. hp_difference .. " damage, and have [" .. current_hp .. "/" .. max_hp .. "] hp.") elseif hp_difference >= (max_hp * 0.10) then crawl.mpr("You take " .. hp_difference .. " damage, and have [" .. current_hp .. "/" .. max_hp .. "] hp.") elseif hp_difference >= (max_hp * 0.05) then crawl.mpr("You take " .. hp_difference .. " damage, and have [" .. current_hp .. "/" .. max_hp .. "] hp.") else crawl.mpr("You take " .. hp_difference .. " damage, and have [" .. current_hp .. "/" .. max_hp .. "] hp.") end end --On gaining health if (current_hp > previous_hp) then --Removes the negative sign local health_inturn = (0 - hp_difference) if (health_inturn > 1) and not (current_hp == max_hp) then if current_hp <= (max_hp * 0.30) then crawl.mpr('You gain ' .. health_inturn .. ' hp, and have [' .. current_hp .. '/' .. max_hp .. '] hp.') elseif current_hp <= (max_hp * 0.50) then crawl.mpr('You gain ' .. health_inturn .. ' hp, and have [' .. current_hp .. '/' .. max_hp .. '] hp.') elseif current_hp <= (max_hp * 0.70) then crawl.mpr('You gain ' .. health_inturn .. ' hp, and have [' .. current_hp .. '/' .. max_hp .. '] hp.') elseif current_hp <= (max_hp * 0.90) then crawl.mpr('You gain ' .. health_inturn .. ' hp, and have [' .. current_hp .. '/' .. max_hp ..'] hp.') else crawl.mpr('You gain ' .. health_inturn .. ' hp, and have [' .. current_hp .. '/' .. max_hp .. '] hp.') end end if (current_hp == max_hp) then crawl.mpr('HP Full. [' .. current_hp .. '/' .. max_hp .. '] hp.') end end --On losing magic if current_mp < previous_mp then if current_mp <= (max_mp / 4) then crawl.mpr("You now have [" .. current_mp .. "/" ..max_mp .."] mp.") elseif current_mp <= (max_mp / 2) then crawl.mpr("You now have [" .. current_mp .. "/" ..max_mp .."] mp.") else crawl.mpr("You now have [" .. current_mp .. "/" ..max_mp .."] mp.") end end end end --Set previous hp/mp and form at end of turn previous_hp = current_hp previous_mp = current_mp previous_form = current_form was_berserk_last_turn = you_are_berserk end > ####################### ### Mini Map Colors ### ####################### # reddit.com/r/dcss/comments/gpz245/custom_minimap_color_scheme_for_better_clarity/ # tile_portal_col = #ff4f1a # tile_downstairs_col = red tile_downstairs_col = #ff1a1a tile_branchstairs_col = yellow # tile_branchstairs_col = #ff006a tile_upstairs_col = green # tile_upstairs_col = #99ff33 tile_explore_horizon_col = #bfbfbf tile_floor_col = #262626 tile_water_col = #0086b3 tile_deep_water_col = #1f1fed tile_lava_col = #6f0b00 tile_wall_col = #595959 tile_door_col = #cb7d4d # tile_feature_col = #d4be21 tile_plant_col = #5c8745 tile_transporter_col = #ff80bf tile_transporter_landing_col = #59ff89 tile_trap_col = #d24dff ############### ### Display ### ############### # github.com/crawl/crawl/blob/master/crawl-ref/source/dat/defaults/menu_colours.txt tile_font_crt_size = 21 tile_font_stat_size = 21 tile_font_msg_size = 21 tile_font_tip_size = 21 tile_font_lbl_size = 21 tile_font_ft_light = false tile_cell_pixels = 38 tile_font_crt_family = UD デジタル 教科書体 N-B tile_font_stat_family = UD デジタル 教科書体 N-B tile_font_msg_family = UD デジタル 教科書体 N-B tile_font_lbl_family = UD デジタル 教科書体 N-B tile_realtime_anim = true # Trunk 0.33 Crash caused by signal #6: Aborted tile_show_player_species = true tile_player_status_icons = slow, constr, fragile, petr, mark, will/2, haste, weak, corr, might, brill, -move action_panel_font_size = 19 action_panel_font_family = UD デジタル 教科書体 N-B action_panel_orientation = vertical action_panel_show = false menu := menu_colour # menu ^= lightgrey:potions? of (attraction|lignification|mutation) # menu ^= lightgrey:scrolls? of (poison|torment|immolation|vulnerability|noise) msc := message_colour msc ^= lightgrey:( miss | misses |no damage) hp_colour = 100:green, 99:lightgray, 75:yellow, 50:lightred, 25:red mp_colour = 100:green, 99:lightgray, 75:yellow, 50:lightred, 25:red hp_warning = 50 mp_warning = 30 # enemy_hp_colour = lightgrey lightgreen brown yellow lightmagenta lightred tile_show_threat_levels = tough nasty unusual tile_show_demon_tier = true always_show_zot = true always_show_gems = true more_gem_info = true ############# # Interface # ############# autofight_nomove_fires = false autofight_fire_stop = true autofight_caught = true autofight_wait = true autofight_stop = 40 rest_wait_both = true rest_wait_ancestor = true fire_order = spell, throwing, evokable fire_order_ability -= all fail_severity_to_quiver = 3 fail_severity_to_confirm = -1 spell_menu = true show_more = false easy_confirm = safe equip_unequip = true sort_menus = true:equipped,charged,art,ego,glowing,identified,basename stat_colour = 3:red, 7:lightred default_manual_training = true : if you.xl() <= 3 then skill_focus = true : end : if you.xl() >= 4 then skill_focus = false : end # travel_delay = 1 explore_delay = 15 view_delay = 550 # show_blood = false level_map_cursor_step = 8 warn_hatches = true travel_open_doors = approach explore_stop = greedy_pickup_smart explore_stop += stairs,shops,altars,portals,branches,runed_doors,glowing_items,artefacts,runes ########### # Prompts # ########### # github.com/crawl/crawl/blob/master/crawl-ref/source/dat/defaults/messages.txt # github.com/crawl/crawl/blob/master/crawl-ref/source/dat/defaults/runrest_messages.txt # github.com/crawl/crawl/blob/master/crawl-ref/source/dat/defaults/misc.txt ignore := runrest_ignore_message stop := runrest_stop_message more := force_more_message # ignore += duration: ignore += recovery: ignore += contamination has completely ignore += your breath back ignore += engulfed in a cloud of smoke ignore += engulfed in white fluffiness ignore += safely over a trap # Timed portals # very nearby: 7–13, nearby: 14–20, distant: 21–27, very distant: 28+ # crawl.chaosforge.org/Portal stop += timed_portal: stop += You hear.*(nearby|distant) more += Found.*(bazaar|trove|phantasmal|sand-covered|glowing drain|flagged portal|gauntlet|frozen archway|dark tunnel|ruined gateway|magical portal|ziggurat) more += The walls and floor vibrate strangely for a moment # Expiring effects more += Your transformation is almost over more += back to life more += You feel yourself slow down more += less insulated more += You are starting to lose your buoyancy more += You lose control over your flight more += Your hearing returns more += You have a feeling this form more += You feel yourself come back to life more += uncertain more += time is quickly running out more += life is in your own hands more += shroud falls apart more += You start to feel a little slower more += You flicker more += You feel less protected from missiles # Interrupts more += You don't.*that spell more += You fail to use your ability more += You miscast.*(Blink|Borgnjor|Door|Invisibility) more += You can't (read|drink|do) more += You cannot.*while unable to breathe more += You cannot.*in your current state more += when.*silenced more += too confused more += There's something in the way more += There's nothing to (close|open) nearby more += not good enough to have a special ability more += You are too berserk more += no means to grasp more += That item cannot be evoked more += You are held in a net more += You don't have any such object more += You can't unwield more += enough magic points more += You don't have the energy to cast that spell more += You are unable to access your magic more += There is a shaft here # Bad things # github.com/crawl/crawl/blob/master/crawl-ref/source/dat/database/monspell.txt # github.com/crawl/crawl/blob/master/crawl-ref/source/beam.cc flash_screen_message += mutation: more += You feel vulnerable to more += hell_effect: flash_screen_message += LOW HITPOINT WARNING flash_screen_message += MASSIVE DAMAGE!! flash_screen_message += LOW MAGIC WARNING more += A malevolent force fills more += An alarm trap emits a blaring wail more += A sentinel's mark forms upon you more += Your surroundings flicker more += You cannot teleport right now 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 += You convulse more += Your body is wracked with pain more += You are (blasted|electrocuted) more += You are.*confused more += wrath finds you more += god:(sends|finds|silent|anger) more += You feel a surge of divine spite more += disloyal to dabble more += lose consciousness more += You are too injured to fight blindly more += The blast of calcifying dust hits (?!your) more += Space warps horribly.*around you more += Space bends around you more += watched by something more += Your limbs have turned to stone more += lethally poison more += You are covered in intense liquid fire! more += Strange energies course through your body more += You feel strangely unstable more += (?= 26 then more += You add the spells?.*(Beckoning|Golubria|Vhi's Electric|Manifold Assault|Fugue of the|Animate Dead|Death Channel|Awaken Armour) : end # more += Your spellspark servitor fades away # Skills stop += skill increases to level (9|18|26) stop += Your Shields skill increases to level (4|6|9|15|21|25) stop += Your Short Blades skill increases to level (10|12|14) stop += Your Long Blades skill increases to level (14|16|18|24) stop += Your Maces & Flails skill increases to level (12|16|20|22) stop += Your Axes skill increases to level (16|18|20|26) stop += Your Polearms skill increases to level (14|16|20|26) stop += Your Staves skill increases to level (12|14) stop += Your Throwing skill increases to level (6|10|16) stop += Your Evocations skill increases to level (6|10|13|15|18|21) more += Your Invocations skill increases to level (6|10|11|12|13) more += Your Shapeshifting skill increases to level (14|19|23|26) more += Training target.*reached! more += You have finished (your manual|forgetting about) stop += You see here the stop += You see here.*(war axe|broad axe|whip|mace|flail|ningstar|trident|partisan).*holy : if you.xl() <= 24 then stop += You see here.*(granite talisman|talisman of death|crystal plate armour|golden dragon scales|sacred scourge|trishula) # more += The golden dragon scales are intact enough to wear : end : if you.xl() <= 16 then stop += You see here.*(scrolls? of identify|shadow dragon scales|pearl dragon scales|storm dragon scales) : end : if you.xl() <= 12 then stop += You see here.*(ring of|the ring|amulet|shield|hat|cloak|scarf|gloves|boots|plate armour) more += Found.*(Elyvilon|The Shining One) : end : if you.xl() <= 8 then stop += You see here.*(quicksilver dragon scales|ice dragon scales|chain mail|fire dragon scales|swamp dragon scales) stop += Found.*(Ashenzari|Cheibriados|Gozag|Jiyva|Makhleb|Okawaru|Qazlal|Ru|Trog|Uskayaw|Wu Jian|Yredelemnul|Zin) : end : if you.xl() > 18 then more += Found.*(Zin|The Shining One) : end # Uniques and baddies more += is (wielding|wearing) the more += (torpor snail|nekomata|doom hound|acid blob|entropy weaver|ghost moth) (?!zombie|skeleton|simulacrum).*into view flash_screen_message += (changes into|You hear a sizzling sound) more += (? 4 then ae += stone : end : if you.xl() > 18 then ae += vulnerability, wand of (polymorph|charming|paralysis), (datura|atropa)-tipped dart : end : if you.xl() > 24 then ae += identify, wand of mindburst : end : if you.xl() <= 10 then drop_disables_autopickup = true : end : if you.xl() >= 11 then drop_disables_autopickup = false : end # github.com/gammafunk/dcss-rc/blob/master/gammafunk_base.rc # reddit.com/r/dcss/comments/10u3q0z/whats_up_with_not_autopickingup_gloves_boots/ { -- Equipment autopickup local function pickup_equipment(it, name) if it.is_useless then return end local class = it.class(true) if class == "armour" then local good_slots = { cloak="cloak", helmet="helmet", gloves="gloves", boots="boots", barding="barding" } st = it.subtype() -- Autopickup found aux armour if (1) we don't have any or (2) it's -- artefact, or (3) if we don't have artefact or ego armour, and the -- found armour is ego. if good_slots[st] ~= nil then if good_slots[st] == "gloves" and you.has_claws() > 0 then return end if it.artefact then return true end local cur = items.equipped_at(good_slots[st]) return not cur or not cur.branded and not cur.artefact and it.branded -- Autopickup found body armour of the same kind we're wearing, -- according to conditions (2) and (3) above used for aux slots. elseif st == "body" then local cur = items.equipped_at("armour") if not cur or cur.name("qual") ~= it.name("qual") then return end if it.artefact or not cur.branded and not cur.artefact and it.branded then return true end end end end add_autopickup_func(pickup_equipment) } ################## ### Item Slots ### ################## # crawl.chaosforge.org/Inscriptions ai := autoinscribe ai += magical staff:!a ai += (large rock|silver javelin|throwing net|(curare|datura|atropa)-tipped dart|of disjunction):=f ai += potions? of heal wounds:@q1, 10-37HP ai += potions? of curing:@q2, 5-11HP ai += potions? of cancellation:@q3 ai += potions? of haste:@q4 ai += potions? of magic:@q5, 10-37MP ai += potions? of ambrosia:3-5HPMP/T ai += potions? of lignification:150%HP (20+XL/2)AC rPois TormImmu Ev0 -MoveBlinkTele GearShield ai += scrolls? of identify:@r1 ai += scrolls? of teleportation:@r2, 3-5T, Zot 8-14T ai += scrolls? of blinking:@r3 ai += enchant armour:@r4 ai += enchant weapon:@r5 ai += scrolls? of fear:Q*f, Will40 90% ai += scrolls? of silence:30T ai += scrolls? of noise:25, Shout 12 ai += wand of (iceblast|roots|warping):@v1, < ai += wand of (acid|light|quicksilver):@v2, > ai += wand of digging:@v3 ai += wand of flame:@v4@Q4, ) ai += wand of mindburst:@v5@Q5, ( ai += boomerang:@f1@Q1, F2 ai += (? 4 then ai += (? 8 then ai += (? 12 then ai += (? 14 then ai += (? 16 then ai += (? 20 then ai += (? 22 then ai += (? macros += M U X< macros += M _ *f<>\{32}&&\{32}!!abyss\{13} macros += M T G\{9} macros += M n x+ macros += M l x+v macros += M L x-v macros += M C X*e macros += M Y tt macros += M I II macros += M R \\- macros += M y ff macros += M : vf macros += M O aa macros += M K ab macros += M B af macros += M , *f@\{32}&&\{32}!!alta\{32}&&\{32}!!stai\{32}&&\{32}!!hatc\{32}&&\{32}!!trap\{32}&&\{32}!!moons\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} macros += M P *fin_shop\{32}&&\{32}!!moons\{32}&&\{32}!!carri\{13} macros += M S *f<>\{32}&&\{32}!!moons\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} macros += M % *f<>\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} macros += M " *f<>\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} macros += M [ *f<>\{32}&&\{32}!!orb\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} macros += M ` *f<>\{32}&&\{32}!!jewell\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} # macros += M & *f<>\{32}&&\{32}!!magica\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} # macros += M & *f<>\{32}&&\{32}!!magica\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} macros += M & *f<>\{32}&&\{32}!!magica\{32}&&\{32}!!zz\{32}&&\{32}!!carri\{13} # F1:\{-265}:poisoned dart, F2:\{-266}:boomerang, H:javelin, "(":wand of mindburst, ")":flame, "<":iceblast|roots|warping, ">":acid|light|quicksilver macros += M \{-265} F35 macros += M \{-266} F15 macros += M H F2 macros += M ( V55 macros += M ) V45 macros += M < V15 macros += M > V25 macros += M E zaf macros += M 1 za macros += M 2 zb macros += M 3 zc macros += M 4 zd macros += M 5 ze macros += M 6 zf macros += M 7 zg macros += M 8 zh macros += M 9 zi macros += M 0 zj bindkey = [NP5] CMD_WAIT bindkey = [NP5] CMD_TARGET_SELECT_ENDPOINT bindkey = [s] CMD_REST bindkey = [c] CMD_CLOSE_DOOR bindkey = [C] CMD_MAP_CLEAR_EXCLUDES bindkey = [W] CMD_WIELD_WEAPON bindkey = [w] CMD_WEAR_ARMOUR bindkey = [p] CMD_WEAR_JEWELLERY bindkey = [Tab] CMD_AUTOFIGHT_NOMOVE bindkey = [k] CMD_AUTOFIRE bindkey = [u] CMD_PREV_CMD_AGAIN bindkey = [i] CMD_RESISTS_SCREEN bindkey = [e] CMD_FULL_VIEW bindkey = [e] CMD_TARGET_FULL_DESCRIBE bindkey = [e] CMD_MAP_EXIT_MAP bindkey = [k] CMD_TARGET_EXCLUDE bindkey = [k] CMD_MAP_EXCLUDE_AREA bindkey = [\{13}] CMD_DISPLAY_INVENTORY bindkey = [NPenter] CMD_DISPLAY_INVENTORY bindkey = [\{NP+}] CMD_GO_DOWNSTAIRS bindkey = [\{NP-}] CMD_GO_UPSTAIRS bindkey = [\{NP+}] CMD_MAP_FIND_DOWNSTAIR bindkey = [\{NP-}] CMD_MAP_FIND_UPSTAIR bindkey = [\{NP*}] CMD_CYCLE_QUIVER_FORWARD bindkey = [\{NP/}] CMD_CYCLE_QUIVER_BACKWARD bindkey = [ ] CMD_TARGET_CANCEL bindkey = [ ] CMD_MAP_EXIT_MAP bindkey = [b] CMD_TARGET_CANCEL bindkey = [h] CMD_TARGET_CANCEL bindkey = [j] CMD_TARGET_CANCEL bindkey = [l] CMD_TARGET_CANCEL bindkey = [n] CMD_TARGET_CANCEL bindkey = [u] CMD_TARGET_CANCEL bindkey = [y] CMD_TARGET_CANCEL bindkey = [B] CMD_TARGET_CANCEL bindkey = [H] CMD_TARGET_CANCEL bindkey = [J] CMD_TARGET_CANCEL bindkey = [K] CMD_TARGET_CANCEL bindkey = [L] CMD_TARGET_CANCEL bindkey = [N] CMD_TARGET_CANCEL bindkey = [U] CMD_TARGET_CANCEL bindkey = [Y] CMD_TARGET_CANCEL bindkey = [b] CMD_MAP_EXIT_MAP bindkey = [h] CMD_MAP_EXIT_MAP bindkey = [j] CMD_MAP_EXIT_MAP bindkey = [l] CMD_MAP_EXIT_MAP bindkey = [n] CMD_MAP_EXIT_MAP bindkey = [u] CMD_MAP_EXIT_MAP bindkey = [y] CMD_MAP_EXIT_MAP bindkey = [B] CMD_MAP_EXIT_MAP bindkey = [H] CMD_MAP_EXIT_MAP bindkey = [J] CMD_MAP_EXIT_MAP bindkey = [K] CMD_MAP_EXIT_MAP bindkey = [L] CMD_MAP_EXIT_MAP bindkey = [N] CMD_MAP_EXIT_MAP bindkey = [U] CMD_MAP_EXIT_MAP bindkey = [Y] CMD_MAP_EXIT_MAP