######################## # gameplay options # ######################## default_manual_training = true #skill_focus = false autofight_stop = 50 auto_butcher = true auto_eat_chunks = true easy_eat_chunks = true show_more = false ############## # Autopickup # ############## ae := autopickup_exceptions # autopickup artifacts ae += scroll of amnesia ae += >scroll of holy word #ae ^= wand of random effects # ae += >wand of paralysis # ae += >wand of lightning # ae += >wand of confusion # ae += >wand of digging # ae += >wand of disintegration # ae += >wand of polymorph # ae += >wand of flame # ae += >wand of enslavement ae += ring of stealth ae += >ring of positive energy # ae += >ring of fire # ae += >ring of ice # ae += >ring of magical power # ae += >ring of strength # ae += >ring of intelligence # ae += >ring of dexterity # ae += >ring of wizardry ############# # Interface # ############# autofight_throw = false autofight_throw_nomove = false explore_stop -= stairs show_travel_trail = true travel_delay = -1 rest_delay = -1 auto_sacrifice = true sacrifice_before_explore = true show_game_time = true warn_hatches = true jewellery_prompt = false equip_unequip = true allow_self_target = never confirm_butcher = never easy_eat_gourmand = true sort_menus = true : equipped, identified, basename, qualname, charged #hp_warning = 50 # auto_hide_spells = true wall_jump_move = false : if you.race() == "Felid" then tile_player_tile = mons:Doom hound : elseif you.race() == "Vampire" then tile_player_tile = mons:Jory : elseif you.race() == "Mummy" then tile_player_tile = mons:Boris : elseif you.race() == "Formicid" then tile_player_tile = mons:Giant centipede #: elseif you.race() == "Tengu" then #tile_player_tile = playermons : elseif you.race() == "Centaur" then tile_player_tile = mons:Nessos #: elseif you.race() == "Deep Elf" then #tile_player_tile = mons:Deep elf elementalist : elseif you.race() == "Octopode" then tile_player_tile = mons:Tentacled monstrosity : end ######################## # Lua # ######################## { -- Disable all training function reset_skill_training() --crawl.mpr("Resetting skill training.") 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"} for i,sk2 in ipairs(skill_list) do you.train_skill(sk2, 0) end end -- find out skill for current weapon function get_weapon_skill() weap = items.equipped_at("Weapon") if weap then return weap.weap_skill else return "Unarmed Combat" end end function get_spell_type() list_of_spellcaster_classes = { ["Skald"] = "Charms", ["Transmuter"] = "Transmutations", ["Warper"] = "Translocations", ["Arcane Marksman"] = "Hexes", ["Enchanter"] = "Hexes", ["Wizard"] = "Conjurations", ["Conjurer"] = "Conjurations", ["Summoner"] = "Summonings", ["Necromancer"] = "Necromancy", ["Fire Elementalist"] = "Fire Magic", ["Ice Elementalist"] = "Ice Magic", ["Air Elementalist"] = "Air Magic", ["Earth Elementalist"] = "Earth Magic", ["Venom Mage"] = "Poison Magic"} character_class = you.class() for sc_class, spell_type in pairs(list_of_spellcaster_classes) do if character_class == sc_class then return spell_type end end return false end function is_elemental_caster_class(spell_type) list_of_spellcaster_classes = { "Fire Magic", "Ice Magic", "Air Magic", "Earth Magic", "Poison Magic"} for i, elemental_spell_type in ipairs(list_of_spellcaster_classes) do if spell_type == elemental_spell_type then return true end end return false end function set_skills() reset_skill_training() start_weapon_skill = get_weapon_skill() you.train_skill(start_weapon_skill, 1.0) if you.race() == "Felid" then you.train_skill("Stealth", 1) you.set_training_target("Stealth", 6.0, true); else you.train_skill("Fighting", 1) you.set_training_target("Fighting", 13.0, true); end spell_type = get_spell_type() if spell_type then you.train_skill("Spellcasting", 2) you.set_training_target("Spellcasting", 15, true); you.train_skill(spell_type, 2) you.set_training_target(spell_type, 12, true); if is_elemental_caster_class(spell_type) then you.train_skill("Conjurations", 2) you.set_training_target("Conjurations", 12.0, true); end you.train_skill("Dodging", 1) you.set_training_target("Dodging", 12.0, true); end if you.class() == "Assassin" or you.class() == "Enchanter" then you.train_skill("Stealth", 2) you.set_training_target("Stealth", 12.0, true); you.train_skill("Dodging", 2) you.set_training_target("Dodging", 12.0, true); end -- you.train_skill("Dodging", 1) -- you.set_training_target("Dodging", 4.0, true); -- you.train_skill("Armour", 1) -- you.set_training_target("Armour", 6.0, true); -- you.train_skill("Shields", 1) -- you.set_training_target("Shields", 11.0, true); -- you.train_skill("Throwing", 1) end } ----------------------------------------------------------------------------------- -- Armour/Weapon autopickup by rwbarton, enhanced by HDA with fixes from Bloaxor -- ----------------------------------------------------------------------------------- { add_autopickup_func(function(it, name) -- if name:find("throwing net") then return true end local class = it.class(true) local armour_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots", body="Armour", shield="Shield"} if (class == "armour") then if it.is_useless then return false end sub_type = it.subtype() equipped_item = items.equipped_at(armour_slots[sub_type]) if (sub_type == "cloak") or (sub_type == "helmet") or (sub_type == "gloves") or (sub_type == "boots") then if not equipped_item then return true else return it.artefact or it.branded or it.ego end end if (sub_type == "body") then if equipped_item then local armourname = equipped_item.name() if equipped_item.artefact or equipped_item.branded or equipped_item.ego or (equipped_item.plus > 2) or armourname:find("dragon") or armourname:find("troll") then return it.artefact else return it.artefact or it.branded or it.ego end end return true end -- if (sub_type == "shield") then -- if equipped_item then -- return it.artefact or it.branded or it.ego -- end -- end end end) } ------------------------- -- Dynamic Force Mores -- ------------------------- { last_turn = you.turns() fm_patterns = { {name = "XL5", cond = "xl", cutoff = 5, pattern = "adder|gnoll"}, -- {name = "XL8", cond = "xl", cutoff = 8, pattern = "ogre|centaur|orc wizard|scorpion|worker ant"}, -- {name = "XL15", cond = "xl", cutoff = 15, pattern = "two-headed ogre|centaur warrior|orc (warlord|knight)"}, -- {name = "50mhp", cond = "maxhp", cutoff = 50, pattern = "orc priest|electric eel"}, -- {name = "60mhp", cond = "maxhp", cutoff = 60, pattern = "acid dragon|steam dragon|manticore"}, -- {name = "70mhp", cond = "maxhp", cutoff = 70, pattern = "meliai"} } -- end fm_patterns active_fm = {} -- Set to true to get a message when the fm change notify_fm = false function init_force_mores() for i,v in ipairs(fm_patterns) do active_fm[#active_fm + 1] = false end end function update_force_mores() local activated = {} local deactivated = {} local hp, maxhp = you.hp() for i,v in ipairs(fm_patterns) do local msg = "(" .. v.pattern .. ").*into view" local action = nil local fm_name = v.pattern if v.name then fm_name = v.name end if not v.cond and not active_fm[i] then action = "+" elseif v.cond == "xl" then if active_fm[i] and you.xl() >= v.cutoff then action = "-" elseif not active_fm[i] and you.xl() < v.cutoff then action = "+" end elseif v.cond == "rf" then if active_fm[i] and you.res_fire() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_fire() < v.cutoff then action = "+" end elseif v.cond == "rc" then if active_fm[i] and you.res_cold() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_cold() < v.cutoff then action = "+" end elseif v.cond == "relec" then if active_fm[i] and you.res_shock() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_shock() < v.cutoff then action = "+" end elseif v.cond == "rpois" then if active_fm[i] and you.res_poison() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_poison() < v.cutoff then action = "+" end elseif v.cond == "rcorr" then if active_fm[i] and you.res_corr() then action = "-" elseif not active_fm[i] and not you.res_corr() then action = "+" end elseif v.cond == "rn" then if active_fm[i] and you.res_draining() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_draining() < v.cutoff then action = "+" end elseif v.cond == "fly" then if active_fm[i] and not you.flying() then action = "-" elseif not active_fm[i] and you.flying() then action = "+" end elseif v.cond == "mhp" then if active_fm[i] and maxhp >= v.cutoff then action = "-" elseif not active_fm[i] and maxhp < v.cutoff then action = "+" end end if action == "+" then activated[#activated + 1] = fm_name elseif action == "-" then deactivated[#deactivated + 1] = fm_name end if action ~= nil then local opt = "force_more_message " .. action .. "= " .. msg crawl.setopt(opt) active_fm[i] = not active_fm[i] end end if #activated > 0 and notify_fm then mpr("Activating force_mores: " .. table.concat(activated, ", ")) end if #deactivated > 0 and notify_fm then mpr("Deactivating force_mores: " .. table.concat(deactivated, ", ")) end end local last_turn = nil function force_mores() if last_turn ~= you.turns() then update_force_mores() last_turn = you.turns() end end init_force_mores() } ################## # Ready Function # ################## { local need_skills_opened = true function ready() force_mores() -- Skill menu at game start by rwbarton if you.turns() == 0 and need_skills_opened then set_skills() need_skills_opened = false crawl.sendkeys("m") end end } ######################## # Macros # ######################## macros += M 0 o macros += M p cey # -- pets macros += M \{-1017} ta macros += M \{-1018} tf # -- spells : if get_spell_type() then macros += M \{-1011} Za. macros += M \{-1012} Zb macros += M \{-1013} Zc macros += M \{-1014} Zd macros += M \{-1015} Ze macros += M \{-1016} Zf : elseif you.class() == "Assassin" then macros += M \{-1011} wa macros += M \{-1012} wb macros += M \{-1013} wc macros += M \{-1014} wd macros += M \{-1015} f. : else : crawl.mpr("Class " .. you.class() .. " has no macros set.") : end