# Crawl Init file # # On Unix systems (such as Mac OS X, Linux and the BSDs), you must copy # init.txt to ~/.crawlrc or ~/.crawl/init.txt as: # cp init.txt ~/.crawlrc # # Lines beginning with '#' are comments. The basic syntax is: # # field = value or field.subfield = value # # Only one specification is allowed per line. # # The terms are typically case-insensitive except in the fairly obvious # cases (the character's name and specifying files or directories when # on a system that has case-sensitive filenames). # # White space is stripped from the beginning and end of the line, as # well as immediately before and after the '='. If the option allows # multiple comma/semicolon-separated terms (such as # autopickup_exceptions), all whitespace around the separator is also # trimmed. All other whitespace is left intact. # # For descriptions concerning an option consult the file # options_guide.txt # in your /docs directory. Also note that the ordering of the options # is taken from that file; this is for presentational reasons only. # # Note that all boolean options (i.e. values of 'true' or 'false') have # their non-default value commented out. You can toggle these by just # uncommenting. # Options with several values, e.g. # confirm_butcher = (auto | always | never), # usually have the first value as default. # # The options for monster glyphs and item colours don't matter for Tiles. # Similarily, tile options are ignored in console games. ##### Ancient versions ############################################## # If you're used to the interface of ancient versions of Crawl, you may # get back parts of it by uncommenting the following options: # include = 034_command_keys.txt # clear_messages = true # # And to revert monster glyph and colouring changes: # include = 034_monster_glyphs.txt # include = 052_monster_glyphs.txt # include = 060_monster_glyphs.txt # include = 071_monster_glyphs.txt # include = 080_monster_glyphs.txt # include = 0.9_monster_glyphs.txt # include = 0.12_monster_glyphs.txt # include = 0.13_monster_glyphs.txt ##### 1- Starting Screen ############################################ # # name = Delilah # remember_name = false # weapon = (short sword | falchion | quarterstaff | hand axe | spear | mace # | trident | unarmed | random) # species = (Human |...| Vampire | random) # job = (Fighter |...| Wanderer | random) # random_pick = true # good_random = false # restart_after_game = true # default_manual_training = true ##### 2- File System ############################################### # # crawl_dir = # morgue_dir = morgue # save_dir = saves # macro_dir = settings/ # sound = : ##### 3- Interface ################################################# # ##### 3-a Picking up and Dropping ############### # # Rods are \ here. # autopickup = $?!:"/% # drop_filter += useless_item # default_autopickup = false # autopickup_no_burden = false # pickup_thrown = false # chunks_autopickup = false # assign_item_slot = (forward | backward) # # pickup_menu = false # pickup_menu_limit = 4 # drop_filter += skeleton, corpse, useless_item # default_friendly_pickup = (none | friend | player | all) ##### 3-b Targeting ############################ # # darken_beyond_range = false ##### 3-c Passive Sightings ##################### # # detected_monster_colour = lightred # detected_item_colour = green # remembered_monster_colour = darkgrey ##### 3-d Branding ############################## # # friend_brand = hi:green # neutral_brand = hi:lightgrey # stab_brand = hi:blue # may_stab_brand = hi:yellow # heap_brand = reverse # feature_item_brand = reverse # trap_item_brand = reverse ##### 3-e Level Map Functions ################### # # level_map_cursor_step = 7 # show_waypoints = false ##### 3-f Viewport Options ################### # # view_max_width = 33 # view_max_height = 21 # view_lock_x = false # view_lock_y = false # view_lock = false # center_on_scroll = true # symmetric_scroll = false # scroll_margin_x = 2 # scroll_margin_y = 2 # scroll_margin = 2 ##### 3-g Travel and Exploration ################# # # travel_delay = 20 (or -1 online) travel_delay = -1 # explore_delay = -1 # rest_delay = 0 (or -1 online) # travel_avoid_terrain = shallow water # # explore_greedy = false # explore_stop = items,stairs,shops,altars,portals,branches,runed_doors # explore_stop += greedy_pickup_smart,greedy_visited_item_stack # explore_stop += greedy_sacrificeable # sacrifice_before_explore = true # explore_improved = true # explore_wall_bias = 0 # travel_key_stop = false # auto_sacrifice = true # # explore_stop_pickup_ignore += curare # auto_exclude += oklob,statue,curse skull,roxanne,hyperactive,lightning spire # auto_exclude += mimic # tc_reachable = blue # tc_dangerous = cyan # tc_disconnected = darkgrey # tc_excluded = lightmagenta # tc_exclude_circle = red # Interrupting run and rest compound commands: # runrest_safe_poison = 80:100 # runrest_ignore_monster ^= butterfly:1 # runrest_ignore_monster ^= swamp worm:3 # runrest_stop_message += You hear a.* slurping noise # runrest_ignore_message += Jiyva's power touches on your attributes # A good number of runrest_messages are defined by default; you may want to # clear them or override some. # trapwalk_safe_hp = dart:20,needle:15,arrow:35,bolt:45,spear:40,blade:95 #rest_wait_both = true ##### 3-h Command Enhancements ################## # # auto_switch = true # travel_open_doors = false # easy_unequip = false # equip_unequip = true # easy_confirm = (none | safe | all) # allow_self_target = (yes | no | prompt) # confirm_butcher = (auto | always | never) # easy_eat_chunks = true # auto_eat_chunks = true # auto_drop_chunks = (never | rotten | yes) # prompt_for_swap = false # easy_quit_item_prompts = false # easy_exit_menu = true # sort_menus = pickup: true : art, ego, basename, qualname, curse, qty # sort_menus = inv: true : equipped, freshness, charged # autofight_stop = 30 # automagic_enable = false # automagic_stop = 0 # automagic_fight = false ##### 3-i Messages and Display Enhancements ##### # # hp_warning = 30 # mp_warning = 0 # hp_colour = 50:yellow, 25:red # mp_colour = 50:yellow, 25:red # stat_colour = 1:lightred, 3:red # status_caption_colour = yellow # mlist_min_height = 4 # msg_min_height = 7 # msg_max_height = 10 # mlist_allow_alternate_layout = true # messages_at_top = true # mlist_targeting = true # show_gold_turns = false # show_game_turns = false # show_newturn_mark = false # clear_messages = true # small_more = true # show_more = false # show_inventory_weights = (drop_pickup | true | false) # item_stack_summary_minimum = 4 # msg_condense_repeats = false # msg_condense_short = false # skill_focus = false # show_travel_trail = false (true for online) # view_delay = 600 ##### 3-j Colours (messages and menus) ########## # # Food is colour coded by default as follows: # # yellow = preferred food # darkgrey = cannot be eaten at all # lightred = causes rot # magenta = dangerous to use, mutagenic # red = considered "evil" by your deity # lightgreen = poisonous # brown = contaminated, may cause nausea # # You can change colours by using something like # menu_colour ^= magenta:contaminated # You can redefine inventory items like this: # menu_colour ^= inventory:magenta:shillelagh # or ones in pick-up dialogs: # menu_colour ^= pickup:green:god gift # Colouring of messages # Messages are colour coded as follows: # # lightred = really important messages # yellow = significant messages # lightred = item damaged/destroyed # darkgrey = boring, message clutter # # Notes also use, quite misnamed, menu_colour: # menu_colour ^= notes:white:Reached XP level # These lines will suppress extra feedback messages from travel/shift-running. # # message_colour ^= mute:monster_warning: # message_colour ^= mute:You start resting # message_colour ^= mute:(HP|Magic) restored # message_colour ^= mute:warning:Not with.*(in view|monsters around) # You can also enforce a --more-- prompt for messages ## Avoid wasting turns with aborted actions: # force_more_message += There are no visible monsters within range # force_more_message += This wand has no charges ##### 3-k Firing Commands ####################### # # fire_items_start = a # fire_order = launcher, return # fire_order += javelin / tomahawk / dart / stone / rock / net # fire_order += inscribed ##### 3-l Channels ############################## # # channel.multiturn = mute ##### 3-m Inscriptions ########################## # # autoinscribe += bad_item.*potion:!q # autoinscribe += potion.*mutation:!q # autoinscribe_cursed = false # autoinscribe += fruit:!e # show_god_gift = yes|unident|no ##### 3-n Macro related Options ################# # # flush.failure = false # flush.command = true # flush.message = true ##### 3-o Tile related Options ################## # # tile_show_items = !?/%=([)x}:|\ # tile_skip_title = true # tile_menu_icons = false ### The following lines define the colours of various objects within the ### tiles minimap. See options_guide.txt for more details. # tile_player_col = white # tile_monster_col = #660000 # tile_neutral_col = #660000 # tile_peaceful_col = #664400 # tile_friendly_col = #664400 # tile_plant_col = #446633 # tile_item_col = #005544 # tile_unseen_col = black # tile_floor_col = #333333 # tile_wall_col = #666666 # tile_mapped_floor_col = #222266 # tile_mapped_wall_col = #444499 # tile_door_col = #775544 # tile_downstairs_col = #ff00ff # tile_upstairs_col = cyan # tile_branchstairs_col = #ff7788 # tile_portal_col = #ffdd00 # tile_feature_col = #997700 # tile_trap_col = #aa6644 # tile_water_col = #114455 # tile_deep_water_col = #001122 # tile_lava_col = #552211 # tile_excluded_col = #552266 # tile_excl_centre_col = #552266 # tile_window_col = #558855 # If Crawl's response rate is too slow, try increasing the update rate. # tile_update_rate = 1000 # If Crawl is lagging when running or resting, try increasing this number. # tile_runrest_rate = 100 # tile_key_repeat_delay = 200 # tile_tooltip_ms = 500 # tile_tag_pref = enemy ### Note: setting window, map or font sizes to '0' implies auto-sizing. # tile_full_screen = true # tile_window_width = 1024 # tile_window_height = 768 # tile_use_small_layout = true # tile_map_pixels = 3 # tile_cell_pixels = 32 # tile_filter_scaling = true # tile_force_overlay = true # tile_layout_priority = minimap, inventory, gold_turn, command, spell # tile_layout_priority += ability, monster # tile_font_crt_file = VeraMono.ttf # tile_font_stat_file = VeraMono.ttf # tile_font_msg_file = VeraMono.ttf # tile_font_tip_file = VeraMono.ttf # tile_font_lbl_file = Vera.ttf # tile_font_ft_light = false # tile_font_crt_size = 15 # tile_font_stat_size = 16 # tile_font_msg_size = 14 # tile_font_tip_size = 15 # tile_font_lbl_size = 14 # tile_show_minihealthbar = false # tile_show_minimagicbar = false # tile_show_demon_tier = false # tile_water_anim = false # tile_misc_anim = false ### WebTiles only # tile_font_crt_family = monospace # tile_font_stat_family = monospace # tile_font_msg_family = monospace # tile_font_lbl_family = monospace # tile_realtime_anim = true # tile_display_mode = glyph # tile_level_map_hide_messages = false # tile_level_map_hide_sidebar = true ##### 4- Dump File ################################################# # ##### 4-a Saving ################################ # # dump_on_save = false ##### 4-b Items and Kill List ################### # # kill_map = friend:you, other:you # dump_kill_places = (single | all | none) # dump_kill_breakdowns = true # dump_item_origins = all,artifacts,ego_arm,ego_weap,jewellery,runes # dump_item_origin_price = -1 # dump_message_count = 20 # dump_order = header, hiscore, stats, misc, notes, inventory, # dump_order += turns_by_place, skills, spells, overview, mutations, # dump_order += messages, screenshot, monlist, kills_by_place, kills # dump_order += action_counts # dump_book_spells = false ##### 4-c Notes ################################# # # user_note_prefix=@@@ # note_hp_percent = 5 # note_skill_levels = 1,5,10,15,27 # note_all_skill_levels = true # note_skill_max = false # note_xom_effects = false # note_chat_messages = false # note_items += rod of, acquirement, preservation, running, of Zot # note_monsters += orb of fire, ancient lich, Sigmund ##### 5- Miscellaneous ############################################# # ##### 5-a All OS ################################ # # mouse_input = true # wiz_mode = no # char_set = ascii # use_fake_player_cursor = false # # Translation to use (descriptions only for now). # language = pl|fr|zh|ko|fi|ru|el|da|li|pt|de|lv|cs|hu # # Joke translations (complete!). # language = dwarven|jagerkin|kraut|runes|wide|grunt # # colour.lightgray = black # colour.lightcyan = cyan # colour.yellow = brown # # show_player_species = true # See options_guide.txt for the options # cset, feature, mon_glyph, item_glyph ## Highlight the edge of unexplored terrain. # feature = explore horizon {',,green} ##### 5-b Windows console ####################### # # dos_use_background_intensity = true # background = black ##### 5-c Unix console ########################## # # use_fake_cursor = false ##### 5-d Alternative keybinding files ########## # # Alternative vi bindings for Dvorak users. # include = dvorak_command_keys.txt # # Alternative vi bindings for Colemak users. # include = colemak_command_keys.txt # # Override the vi movement keys with a non-command. # include = no_vi_command_keys.txt # Changing colours of items in the inventory and other menus menu := menu_colour ae := autopickup_exceptions # Items currently not affecting you. menu += darkgrey:(melded) # Bad items menu += lightred:.*bad_item.* # Useless items, comes here to override artefacts etc. menu += darkgrey:.*useless_item.* : if you.race() == "Spriggan" then menu += darkgrey:.*jewellery.*(sustenance) ae += >ring.*(sustenance) :end # Items disliked by your god. menu += $forbidden:.*forbidden.* # Handle cursed and equipped items early to override other colour settings. menu += lightred:.*equipped.* cursed menu += red: (a|the) cursed menu += inventory:lightgreen:.*equipped.* # Important game items # menu += lightmagenta:.*misc.*rune( of Zot)? menu += lightmagenta:.*orb.*Zot # Artefacts # menu += white:.*artefact.* #menu += white:.*identified.*artefact.* #menu += lightblue:.*unidentified.*artefact.* # Ego items # menu += lightblue:(^identified armour.* pair of .* of ) menu += lightgrey:(^identified armour.* pair of ) menu += lightblue:(^identified (weapon|armour).* of ) menu += lightblue:(^identified weapon.* vampiric .*) menu += lightblue:(^identified weapon.* anti-magic .*) # Possible egos menu += lightblue:^unidentified .*weapon.*(runed|glowing) menu += lightblue:^unidentified .*armour.*(runed|glowing|embroidered|shiny|dyed) # Emergency items menu += yellow:.*emergency_item.* # Good items menu += cyan:.*good_item.* menu += cyan:.*misc.*[lL]antern # Dangerous (but still useful) items menu += $dangerous:.*dangerous_item.* # Defaults for normal items menu += lightblue:unidentified.*(potion|scroll|wand|jewellery) # : if you.god() == "Nemelex Xobeh" then # menu += lightblue:deck of cards # : end menu += green:uncursed # Colouring of autoinscribed god gifts menu_colour += pickup:green:god gift # Highlight (partly) selected items menu_colour += inventory:white:\w \+\s menu_colour += inventory:white:\w \#\s # Not really menu. menu_colour += notes:white:Reached XP level # 呪文のキー割り当て spell_slot += Flight:l spell_slot += Swift:s spell_slot += Repel Missiles:m spell_slot += Deflect Missles:M spell_slot += Regeneration:r spell_slot += Haste:h # 消費アイテムの追加カラー menu := menu_colour # 薬 menu += darkgrey:coagulated blood menu += lightblue:potions? of (might|agility|brilliance) menu += cyan:potions? of restore abilities # 巻物 menu += lightcyan:scrolls? of (vorpalise weapon|acquirement|amnesia) menu += cyan:scrolls? of (identify|enchant|recharging) menu += white:scrolls? of (remove curse) menu += brown:scrolls? of magic mapping menu += lightblue:scrolls? of (vulnerability|holy word|silence) # ワンド menu += magenta:wand of (confusion|enslavement|slowing|paralysis|polymorph) menu += brown:wand of digging menu += lightred:wand of (flame|fire) menu += lightblue:wand of (frost|cold) menu += white:wand of invisibility menu += lightcyan:wand of lightning # HP/MP警告 hp_warning = 50 mp_warning = 0 hp_colour = 70:yellow, 35:red mp_colour = 30:yellow, 10:red # 自動移動、自動探索 travel_delay = -1 explore_delay = -1 explore_stop = items,greedy_items,greedy_pickup,greedy_pickup_gold explore_stop += greedy_visited_item_stack,stairs,shops,altars,gates explore_stop += greedy_sacrificeable trapwalk_safe_hp = trapwalk_safe_hp += dart:10,needle:5,arrow:15,bolt:25,spear:20,axe:25,blade:35 sacrifice_before_explore = true auto_sacrifice = true stop := runrest_stop_message stop = ignore := runrest_ignore_message ignore = # 自動移動中に無視するメッセージや敵 ignore += You feel.*sick ignore += disappears in a puff of smoke ignore += engulfed in a cloud of smoke ignore += standing in the rain ignore += engulfed in white fluffiness ignore += safely over a trap ignore += A.*toadstool withers and dies ignore += toadstools? grow ignore += You walk carefully through the ignore += grinding sound ignore += contamination has completely ignore += chunks of flesh in your inventory.*rotted away runrest_ignore_poison = 2:10 runrest_ignore_monster += butterfly:-1 runrest_ignore_monster += fish:2 runrest_ignore_monster += shark:2 runrest_ignore_monster += swamp worm:3 # 自動移動を停止するメッセージ stop += found a trap stop += Wait a moment stop += You fall through a shaft stop += An alarm trap emits a blaring wail stop += (blundered into a|invokes the power of) Zot stop += hear a soft click stop += A huge blade swings out and slices into you! stop += sense of stasis stop += flesh start stop += (starving|devoid of blood) stop += wrath finds you stop += lose consciousness # 呪文の効力が切れる際のメッセージで停止 stop += You feel yourself slow down stop += less insulated stop += You are starting to lose your buoyancy stop += You lose control over your flight stop += Your hearing returns stop += Your transformation is almost over stop += back to life stop += uncertain stop += time is quickly running out stop += life is in your own hands stop += is no longer charmed # Ghouls : if you.race() == "Ghoul" then stop += smell.*(rott(ing|en)|decay) stop += something tasty in your inventory : end # ジーヴァ信仰:走り、休憩中のメッセージ無視 : if you.god() == "Jiyva" then ignore += Jiyva gurgles merrily ignore += Jiyva appreciates your sacrifice ignore += Jiyva says: Divide and consume ignore += You hear.*splatter : end # 神や仲間のアクションの無視or停止 ignore += pray: #ignore += talk: #ignore += talk_visual: ignore += friend_spell: ignore += friend_enchant: ignore += friend_action: ignore += sound: stop += god: stop += tutorial: # 自動探索除外 auto_exclude += # タイル版独自の表示関連 tile_title_screen = false tile_menu_icons = true tile_show_minihealthbar = true tile_show_minimagicbar = true tile_show_demon_tier = true tile_better_transparency = true tile_peaceful_col = lightred tile_force_overlay = false tile_tooltip_ms = 0 tile_tag_pref = named tile_layout_priority = gold_turn, minimap, inventory, spell, monster, command mlist_allow_alternate_layout = true show_travel_trail = true # ダンプ関連 dump_kill_places = all dump_item_origins = artefacts dump_item_origin_price = -1 dump_book_spells = false dump_message_count = 20 dump_order = header, hiscore, stats, misc, skills dump_order += spells, mutations, inventory, messages, screenshot dump_order += overview, turns_by_place, kills_by_place, kills dump_order += action_counts, notes, vaults # Note関連 user_note_prefix=You said: ood_interesting = 8 rare_interesting = 9 ood_interesting = 8 note_hp_percent = 5 note_all_skill_levels = true note_all_spells = true note_xom_effects = true note_items += rod of, acquirement, preservation, running, of Zot note_messages += You pass through the gate note_messages += [bB]anish.*Abyss note_messages += cast .* Abyss note_messages += Your scales start note_messages += protects you from harm note_messages += You fall through a shaft note_monsters += orb of fire, electric golem, ancient lich ##### 変更予定なしのオプション ############################################## restart_after_game = true default_manual_training = true skill_focus = false drop_mode = multi pickup_mode = multi default_friendly_pickup = none sort_menus = inv: true : equipped, freshness, art, ego, basename, identified, >qty, fullname auto_list = true msg_condense_repeats = true msg_condense_short = true clear_messages = true equip_unequip = true allow_self_target = no easy_confirm = all confirm_butcher = never auto_eat_chunks = true #auto_drop_chunks = yes easy_eat_contaminated = true ##### DO NOT TOUCH !! ######################################################## # 詠唱コマンドの簡易表示 : local function generic_cast_spell(cmd) : crawl.mpr('Cast which spell?') : crawl.flush_prev_message() : crawl.process_keys(cmd) : end # for some reason you can't pass arguments in the macro binding : function cast_spell() : generic_cast_spell('z') : end : function force_cast_spell() : generic_cast_spell('Z') : end # message_colour += mute:Cast which spell\? \(\? or \* to list\) # message_colour += mute:Casting.* message_colour += mute:Confirm with \. or Enter, or press \? or \* to list all spells\. message_colour += mute:Press\: \? - help, Shift-Dir - straight line, f - you # 防具の自動拾い { add_autopickup_func(function(it, name) if it.class(true) == "armour" then local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} st, _ = it.subtype() if good_slots[st] ~= nil and items.equipped_at(good_slots[st]) == nil then return true end end return false end) } # ------------------------------------------------ # AUTOMATIC # ------------------------------------------------ # -Track experience change- : local exp_tracker = true # -High damage taking warning- : local dmg_track = true # ------------------------------------------------ : local botstatus = "none" : local old_xl = 0 : local old_xl_progress = 0 : local dmg_old_hp = 0 # ------------------------------------------------ # EVERY TURN FUNCTION # ------------------------------------------------ < function ready() if dmg_track == true then DmgTrack() end if exp_tracker == true then ExpChangeTrack() end end > # ------------------------------------------------ # DAMAGE TRACK # ------------------------------------------------ : function DmgTrack() : local bot_hp, bot_mhp = you.hp() : local dmg_inturn = 0 : local huge_int = 0 : local percent_hp = 0 : local percent_old_hp = 0 : local percent_hp_txt = "--%" : if dmg_old_hp > 0 then : if bot_hp < dmg_old_hp then : dmg_inturn = dmg_old_hp - bot_hp : percent_old_hp = math.ceil((dmg_old_hp*100)/bot_mhp) : percent_hp = math.ceil((bot_hp*100)/bot_mhp) : percent_hp_txt = percent_hp .. "%" : if percent_hp < 30 then : percent_hp_txt = "" .. percent_hp_txt .. "" : elseif percent_hp < 55 then : percent_hp_txt = "" .. percent_hp_txt .. "" : elseif percent_hp < 75 then : percent_hp_txt = "" .. percent_hp_txt .. "" : end : percent_hp_txt = percent_hp_txt .. "(" .. bot_hp .. "hp)" : if dmg_inturn > (bot_hp*0.25) then : say("Huge Dmg: -" .. (percent_old_hp-percent_hp) .. "%(-" .. dmg_inturn .. "hp)" .. " Hp: " .. percent_hp_txt) : dmg_old_hp = bot_hp : crawl.flush_prev_message() : crawl.more() : crawl.more_autoclear() : else : if dmg_inturn > (bot_hp*0.15) then : say("Dmg: -" .. (percent_old_hp-percent_hp) .. "%(-" .. dmg_inturn .. "hp)" .. " Hp: " .. percent_hp_txt) : else : say("Dmg: -" .. (percent_old_hp-percent_hp) .. "%(-" .. dmg_inturn .. "hp)" .. " Hp: " .. percent_hp_txt) : end : end : crawl.flush_prev_message() : end : end : dmg_old_hp = bot_hp : end # ------------------------------------------------ # EXP TRACK # ------------------------------------------------ : function ExpChangeTrack() : local cur_xl = you.xl() : local cur_xl_progress = you.xl_progress() : local cur_change = 0 : local add_percent = 0 : local add_txt="" : if old_xl > 0 and cur_xl < 27 then : if not (old_xl == cur_xl and old_xl_progress == cur_xl_progress) then : add_percent = math.abs((cur_xl*100+cur_xl_progress) - (old_xl*100+old_xl_progress)) : if add_percent < 4 then : add_txt="~" : end : cur_change = GetExpirience(cur_xl,cur_xl_progress) - GetExpirience(old_xl,old_xl_progress) : if cur_change > 0 then : say("Exp: " .. add_txt .. cur_change .. "(" .. add_percent .. "%)") : elseif cur_change < 0 then : say("Drained exp: " .. add_txt .. cur_change .. "(" .. add_percent .. "%)") : end : crawl.flush_prev_message() : end : end : old_xl = cur_xl : old_xl_progress = cur_xl_progress : end # ------------------------------------------------ : function GetExpirience(level,l_progress) : local exp_points = 0 : local ExpTable = { : [1] = '0', : [2] = '10', : [3] = '30', : [4] = '70', : [5] = '140', : [6] = '270', : [7] = '520', : [8] = '1010', : [9] = '1980', : [10] = '3910', : [11] = '7760', : [12] = '15450', : [13] = '29000', : [14] = '48500', : [15] = '74000', : [16] = '105500', : [17] = '143000', : [18] = '186500', : [19] = '236000', : [20] = '291500', : [21] = '353000', : [22] = '420500', : [23] = '494000', : [24] = '573500', : [25] = '659000', : [26] = '750500', : [27] = '848000'} : exp_points = math.ceil((ExpTable[level+1] - ExpTable[level]) * l_progress / 100) : exp_points = ExpTable[level] + exp_points : return exp_points : end # ------------------------------------------------ # UTILS # ------------------------------------------------ : function FindEnemy(txt) : local x, y : local r = 8 : local i = 0 : local mname = "" : for x = -r,r do : for y = -r,r do : m = monster.get_monster_at(x, y) : if m and not m:is_safe() then : i = i + 1 : if i == 1 then : mname = m:desc() : else : mname = mname .. ", " .. m:desc() : end : end : end : end : if i > 0 then : if txt == true then : say("Enemy in LOS: " .. mname .. "") : end : end : return i : end # ------------------------------------------------ : function say(x) : crawl.mpr(x) : end # ------------------------------------------------ : function send_orders(command) : crawl.flush_input() : crawl.sendkeys(command) : crawl.flush_input() : end # ------------------------------------------------ : function FindEquipedWeapon() : local i : local it : local wfind = -1 : for i = 0,51 do : it = items.inslot(i) : if it and it.equipped and it.equip_type == 0 then : wfind = i : end : end : return wfind : end # ------------------------------------------------ : function stest() : mtest() : end # ------------------------------------------------ : function mtest() : local x, y : local r = 8 : local i = 0 : local xxx : for x = -r,r do : for y = -r,r do : m = monster.get_monster_at(x, y) : if m then : say("desc-" .. m:desc()) : say("Threat-" .. m:threat()) : say("attitude-" .. m:attitude()) : say("mname-" .. m:mname()) : say("type-" .. m:type()) : say("base_type-" .. m:base_type()) : say("number-" .. m:number()) : say("colour-" .. m:colour()) : say("damage_level-" .. m:damage_level()) : say("damage_desc-" .. m:damage_desc()) : crawl.flush_prev_message() : end : end : end : end # ------------------------------------------------