-- Utility Functions { function version() return tonumber(string.sub(crawl.version("major"), 3, 4)) end } -- Equipment Auto-pickup Function { add_autopickup_func(function(it, name) if it.is_useless then return false end if it.artefact then if name:find("%*Rage") then if you.god() == "Trog" or (you.god() == "Ashenzari" and you.piety_rank() >= 3) or you.get_base_mutation_level("Clarity") == 1 or items.equipped_at("Amulet") and items.equipped_at("Amulet").name():find("Clar") or items.equipped_at("Body Armour") and items.equipped_at("Body Armour").name():find("Clar") then return true end return false end if name:find("Harm") or name:find("%*Noise") or name:find("%*Corrode") then return false end if name:find("%*Slow") then if you.race() == "Formicid" then return true end return false end if name:find("slick") then return false end if name:find("Mesm") then return false end if name:find("Charlatan") then return false end if name:find("mace of Variability") then if you.god() ~= "Xom" then return false end end return true end local class = it.class(true) local sub_type = it.subtype() if (class == "armour") then local armour_slots = { boots="Boots", cloak="Cloak", gloves="Gloves", helmet="Helmet", shield="Shield" } local equipped_item = items.equipped_at(armour_slots[sub_type]) if (sub_type == "boots") then if equipped_item then local plus = items.equipped_at("Boots").plus local nobrand = items.equipped_at("Boots").branded == false if nobrand then if plus < 2 and name:find("[" .. (plus + 1) .. "-2].*boots") then return true end if plus < 4 and name:find("[" .. (plus + 1) .. "-4].*barding") then return true end end return it.branded or it.ego else return true end end if (sub_type == "cloak") then if name:find("scarf.*harm") then return false elseif equipped_item then local plus = items.equipped_at("Cloak").plus local nobrand = items.equipped_at("Cloak").branded == false if plus < 2 and nobrand and name:find("[" .. (plus + 1) .. "-2].*cloak") then return true end return it.branded or it.ego else return true end end if (sub_type == "gloves") then if equipped_item then local plus = items.equipped_at("Gloves").plus local nobrand = items.equipped_at("Gloves").branded == false if plus < 2 and nobrand and name:find("[" .. (plus + 1) .. "-2].*gloves") then return true end return it.branded or it.ego elseif you.has_claws() ~= 0 then return it.branded or it.ego else return true end end if (sub_type == "helmet") then if equipped_item then local plus = items.equipped_at("Helmet").plus local a_hat = items.equipped_at("Helmet").ac local nobrand = items.equipped_at("Helmet").branded == false if plus < 2 and nobrand then if a_hat == 0 and plus < 2 and name:find("[" .. (plus + 1) .. "-2].*hat") then return true end if a_hat == 0 and name:find("[0-2].*helmet") then return true end if a_hat == 1 and plus < 2 and name:find("[" .. (plus + 1) .. "-2].*helmet") then return true end end return it.branded or it.ego else return true end end if (sub_type == "shield") then if equipped_item then local light = items.equipped_at("Shield").name():find("orb.*light") local buck = items.equipped_at("Shield").name():find("buck") local kite = items.equipped_at("Shield").name():find("kite") local plus = items.equipped_at("Shield").plus local ac = items.equipped_at("Shield").ac local nobrand = (items.equipped_at("Shield").branded) == false if nobrand then if ac == 3 and plus < 3 and name:find("[" .. (plus + 1) .. "-3].*buck") then return true end if ac == 8 and plus < 5 and name:find("[" .. (plus + 1) .. "-5].*kite") then return true end if ac == 13 and plus < 8 and name:find("[" .. (plus + 1) .. "-8].*tower") then return true end end if light and name:find("buck") then return true end if buck and name:find("buck") then return it.branded or it.ego end if buck and name:find("kite") then return true end if kite and name:find("kite") then return it.branded or it.ego end if name:find("tower") then return true end if name:find("orb") then return false end return it.branded or it.ego elseif name:find("buck") then return true else return false end end end if (class == "weapon") then local equipped_weapon = items.equipped_at("Weapon") if equipped_weapon then if equipped_weapon.weap_skill == "Short Blades" then if equipped_weapon.name():find("dagger") then if you.class():find("Wizard") and name:find("staff.*conj") then return true elseif you.class() == "Summoner" and name:find("staff.*summoning") then return true elseif you.class() == "Necromancer" and name:find("staff.*death") then return true elseif you.class() == "Fire Elementalist" and name:find("staff.*fire") then return true elseif you.class() == "Ice Elementalist" and name:find("staff.*cold") then return true elseif you.class() == "Air Elementalist" and name:find("staff.*air") then return true elseif you.class() == "Earth Elementalist" and name:find("staff.*earth") then return true elseif you.class() == "Venom Mage" and name:find("staff.*poison") then return true elseif you.class() == "Alchemist" and name:find("staff.*alchemy") then return true end end else return false end elseif you.class():find("Wizard") and name:find("staff.*conj") then return true elseif you.class() == "Summoner" and name:find("staff.*summoning") then return true elseif you.class() == "Necromancer" and name:find("staff.*death") then return true elseif you.class() == "Fire Elementalist" and name:find("staff.*fire") then return true elseif you.class() == "Ice Elementalist" and name:find("staff.*cold") then return true elseif you.class() == "Air Elementalist" and name:find("staff.*air") then return true elseif you.class() == "Earth Elementalist" and name:find("staff.*earth") then return true elseif you.class() == "Venom Mage" and name:find("staff.*poison") then return true elseif you.class() == "Alchemist" and name:find("staff.*alchemy") then return true elseif you.base_skill("Unarmed Combat") == 0 and name:find("[0-9].*dagger") then return true else return false end end end) } { local bin_head = true local bin_hand = true local bin_foot = true local bin_back = true local bin_buck = true local bin_dagg = true local bin_staf = true function ctrl_bag() local acq_slot = false local exp_slot = false local fully_id_not = false local id_slot = nil local cu_slot = nil local tele_slot = nil local heal_slot = nil local useless_scroll_slot = nil local useless_potion_slot = nil local bin_hat_slot = nil local bin_hel_slot = nil local bin_hand_slot = nil local bin_foot_slot = nil local bin_back_slot = nil local bin_buck_slot = nil local bin_dagg_slot = nil local bin_staf_slot = nil for slot = 0, 51 do key = items.inslot(slot) if key then acq = key.name():find("scroll.*acq") exp = key.name():find("potion.*exp") id = key.name():find("scroll.*id") cu = key.name():find("potion.*cu") tele = key.name():find("scroll.*tele") heal = key.name():find("potion.*heal") useless_scroll = key.name():find("scroll.*noise") useless_potion = key.name():find("potion.*degen") no_bin_hat = key.name():find("hat") no_bin_hel = key.name():find("helmet") no_bin_hand = key.name():find("pair.*glov") no_bin_foot = key.name():find("pair.*boots") no_bin_bard = key.name():find("barding") no_bin_back = key.name():find("cloak") no_bin_buck = key.name():find("buck") no_bin_dagg = key.name():find("dagg") no_bin_staf = key.name():find("staff") fully_id = key.fully_identified if acq then if slot ~= 17 then if items.inslot(17) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 17) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(slot, 17) end else items.swap_slots(slot, 17) end end acq_slot = true end if exp then if slot ~= 16 then if items.inslot(16) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 16) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(slot, 16) end else items.swap_slots(slot, 16) end end exp_slot = true end if fully_id == false then fully_id_not = true end if id then id_slot = slot end if cu then cu_slot = slot end if tele then tele_slot = slot end if heal then heal_slot = slot end if useless_scroll then useless_scroll_slot = slot end if useless_potion then useless_potion_slot = slot end if not (key.artefact) then if not (key.branded) then if bin_foot then if no_bin_bard then bin_foot_slot = slot elseif no_bin_foot then bin_foot_slot = slot end end if bin_back and no_bin_back then bin_back_slot = slot end if bin_hand and no_bin_hand then bin_hand_slot = slot end if bin_head and no_bin_hat then bin_hat_slot = slot end if bin_head and no_bin_hel then bin_hel_slot = slot end if bin_buck and no_bin_buck then bin_buck_slot = slot end if bin_dagg and no_bin_dagg then bin_dagg_slot = slot end if bin_staf and no_bin_staf then bin_staf_slot = slot end end end end end local function ctrl_slot(name,slot) if name and name ~= slot then if items.inslot(slot) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, slot) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(name, slot) end else items.swap_slots(name, slot) end end end local function ctrl_swap(name1,slot1,name2,slot2) if name1 and name1 == slot2 and name2 and name2 == slot1 then items.swap_slots(name1, name2) end ctrl_slot(name1,slot1) ctrl_slot(name2,slot2) end if not acq_slot then if you.feel_safe() then ctrl_swap(id_slot, 17, tele_slot, 43) else ctrl_swap(id_slot, 43, tele_slot, 17) end end if not exp_slot then if you.poisoned() or you.confused() then ctrl_swap(cu_slot, 16, heal_slot, 42) else ctrl_swap(cu_slot, 42, heal_slot, 16) end end end } -- Spell Fail Rate Check { safe = 10 spellTable = {} function checkSpellFailRate() for index, spellName in pairs(you.spells()) do fail = spells.fail(spellName) if rawget(spellTable, spellName) == nil then spellTable[spellName] = 0 end if rawget(spellTable, spellName) == 0 and fail < safe then crawl.mpr(string.format("%s spell is stabilized!", spellName)) spellTable[spellName] = 1 end end end } -- Prompt Handling Functions { function c_answer_prompt(prompt) if prompt == "Die?" or prompt == "Annotate level on other end of current stairs?" or prompt == "Are you sure you want to leave the Dungeon? This will make you lose the game!" then return false end if version() < 25 and prompt:find("Memorise Iskenderun's Mystic Blast") then return false end if version() < 27 and prompt:find("Memorise Chain Lightning") then return false end if version() < 32 and prompt:find("Memorise Teleport Other") then return false end if prompt:find("vortices") or prompt:find("vortex") or prompt:find("battlesphere") then return true end if prompt:find("Really.*into that cloud of flame?") and you.res_fire() == 3 then return true end if prompt:find("Really.*into that cloud of freezing vapour?") and you.res_cold() == 3 then return true end end } -- Initialize skill menu on game start { local need_skills_opened = true function skill() if you.turns() == 0 and need_skills_opened then need_skills_opened = false --시작 m키하고 메뉴얼 설정 skill_focus = true default_manual_training = true crawl.sendkeys("m") end end } { function with_gdr() local armour_class = you.ac() local gdr = math.floor(16 * math.sqrt(math.sqrt(math.max(0, armour_class)))) crawl.formatted_mpr(string.format("GDR: %d%%", gdr)) crawl.sendkeys('@') end crawl.setopt("macros += M \@ ===with_gdr") } -- Main ready function { function ready() ctrl_bag() checkSpellFailRate() skill() end } ### 편리하고 안전한 던전 탐험을 위한 메시지 로그창 최적화 ####################################################################### ## 너무 긴 메시지 넘기기 show_more = false ## 매뉴얼 다 썼을 때 다음장 출력 force_more_message += You have finished your manual ## 변신 풀릴 때 다음장 출력 force_more_message += Your transformation is almost over. ## 특이한 상황이 발생하면 강제적으로 -다음 장-을 띄워주는 기능 force_more_message += Ouch! That really hurt! force_more_message += LOW HITPOINT WARNING force_more_message += The mighty Pandemonium lord .* resides here force_more_message += Your transformation is almost over force_more_message += A sentinel's mark forms upon you force_more_message += god:(sends|finds|silent|anger) force_more_message += watched by something force_more_message += flickers and vanishes! force_more_message += You feel yourself slow down force_more_message += hell_effect: force_more_message += You feel less protected from missiles force_more_message += skill increases to level ## 디스펠언데드 피격시 force_more_message += You convulse ## 조트함정 발동 force_more_message += (blundered into a|invokes the power of) Zot ## 데스도어 관련 confirm_action += Death's Door # 데스도어 지속 만료 경고 force_more_message += time is quickly running out flash_screen_message += time is quickly running out ## 데미지 18이상 들어온 공격에 –more- force_more_message += you!! force_more_message += you with.*!! ## 위험한 상황이나 급박한 변화인 경우 more 출력 force_more_message -= You finish merging with the rock force_more_message += You have reached level force_more_message += You fall through a shaft force_more_message += You enter a teleport trap force_more_message += You are suddenly yanked force_more_message += interdimensional caravan force_more_message += distant snort force_more_message += You hear the loud beating of a very distant drum force_more_message += Found a gateway leading out of the Abyss force_more_message += Found a gateway leading deeper into the Abyss force_more_message += Found .* abyssal rune of Zot force_more_message += Careful! force_more_message += You are starting to lose your buoyancy force_more_message += You miscast Flight force_more_message += filled with .* inner flame force_more_message += grabs you force_more_message += starts rolling force_more_message += looks more exp force_more_message += vile air hits you force_more_message += engulfs you in water force_more_message += breathes miasma force_more_message += You feel your flesh start force_more_message += Found * staircase leading down force_more_message += You are engulfed in seething chaos force_more_message += You are slowing down force_more_message += You are confused force_more_message += fire storm spell force_more_message += Your guardian golem overheats force_more_message += offers itself force_more_message += volcano erupts force_more_message += Uskayaw prepares the audience for your solo force_more_message += Something reaches out for you force_more_message += You become entangled in the net force_more_message += wield.* blowgun force_more_message += (the weather|forecast) force_more_message += you cannot.* because force_more_message += pie hits you force_more_message += goes berserk force_more_message += venomous gases force_more_message += vanishes in a puff force_more_message += weaves a glowing orb force_more_message += Your transformation is almost over force_more_message += The ironbrand convoker begins to recite a word of recall force_more_message += Something unseen opens the door force_more_message += Your unholy channel is weakening runrest_stop_message += Your unholy channel is weakening ## 유니크 몬스터가 출현했을 때 more를 강제로 띄워줌 force_more_message += (?!An|As|You|There)(?-i:[A-Z]{1}[a-z]+).*(come.*into.*view|open.*door|break.*door) ## 위험한 몬스터 출현 시 more를 강제로 띄워줌 # 패치로 위험한 몬스터가 추가되면 맞춰서 수정해줘야함 force_more_message += ((giant|floating|shining) eye|eye of draining).*into view force_more_message += (moth of wrath|ghost moth|torpor snail).*into view force_more_message += (guardian serpent|draconian shifter|convoker).*into view force_more_message += (flayed ghost|royal mummy|mummy priest|fiend|tzitzimitl).*into view force_more_message += (tormentor|curse toe|curse skull).*into view force_more_message += (hellion|hell sentinel|deep elf sorcerer).*into view force_more_message += (deep elf high priest|scorcher).*into view force_more_message += (ancient lich|orb of fire|executioner|juggernaut|shrike).*into view force_more_message += (wretched star|lurking horror).*into view force_more_message += (neqoxec|cacodemon|doom hound).*into view force_more_message += 27-headed.* comes? into view force_more_message += (radroach|entropy weaver|meliai).*into view force_more_message += (salamander tyrant|ironbound frostheart).*into view force_more_message += (walking crystal tome|walking divine tome|walking earthen tome|walking frostbound tome).*into view ## 몬스터가 위험한 몬스터로 변신 시 more를 강제로 띄워줌 # 패치로 위험한 몬스터가 추가되면 맞춰서 수정해줘야함 force_more_message += changes into.*((giant|floating|shining) eye|eye of draining) force_more_message += changes into.*(moth of wrath|ghost moth|torpor snail) force_more_message += changes into.*(guardian serpent|draconian shifter|convoker) force_more_message += changes into.*(flayed ghost|royal mummy|mummy priest|fiend|tzitzimitl) force_more_message += changes into.*(tormentor|curse toe|curse skull) force_more_message += changes into.*(hellion|hell sentinel|deep elf sorcerer) force_more_message += changes into.*(deep elf high priest|scorcher) force_more_message += changes into.*(ancient lich|orb of fire|executioner|juggernaut|shrike) force_more_message += changes into.*(wretched star|lurking horror) force_more_message += changes into.*(neqoxec|cacodemon|doom hound) force_more_message += changes into.*(radroach|entropy weaver|meliai) force_more_message += changes into.*(salamander tyrant|ironbound frostheart) force_more_message += changes into.*(walking crystal tome|walking divine tome|walking earthen tome|walking frostbound tome) ## 왜곡무기 장비한 몬스터, 춤추는 왜곡무기 출현 시 more를 띄워주고 화면이 번쩍이는 효과를 줌 force_more_message += It is wielding.*of distortion force_more_message += She is wielding.*of distortion force_more_message += He is wielding.*of distortion force_more_message += wielding.* distortion.* comes? into view flash_screen_message += It is wielding.*of distortion flash_screen_message += She is wielding.*of distortion flash_screen_message += He is wielding.*of distortion flash_screen_message += wielding.* distortion.* comes? into view flash_screen_message += distortion.* comes? into view ## Portals 관련 more 출력 force_more_message += ticking.*clock force_more_message += dying ticks force_more_message += distant snort force_more_message += coins.*counted force_more_message += tolling.*bell force_more_message += roar of battle force_more_message += creaking.*portcullis force_more_message += portcullis is probably force_more_message += wave of frost force_more_message += crackling.*melting force_more_message += hiss.*sand force_more_message += sound.*rushing water force_more_message += rusting.*drain force_more_message += drain falling apart force_more_message += heat about you force_more_message += falling.*rocks force_more_message += rumble.*avalanche of rocks force_more_message += crackle.*arcane power force_more_message += crackle.*magical portal force_more_message += distant wind force_more_message += whistling.*wind force_more_message += rapidly growing quiet ## 기타 유용 more 출력 # 몬스터 목격시 멈춤 # force_more_message += (?-i:[A-Z]).* comes? into view force_more_message += Found a gate leading to another region of Pandemonium force_more_message += You found a shaft runrest_stop_message += You found a shaft flash_screen_message += You are slowing down flash_screen_message += wielding.* distortion.* comes? into view flash_screen_message += Ashenzari invites you to partake flash_screen_message += Ru believes you are ready to make a new sacrifice flash_screen_message += Vehumet offers you knowledge ## 종족 중 상관 없는 디버프 무시하고 나머지는 걸리게 : if you.race() ~= "Gargoyle" and you.race() ~= "Ghoul" and you.race() ~= "Mummy" and you.race() ~= "Djinni" then force_more_message += dream sheep.* comes? into view :end : if you.race() ~= "Gargoyle" then force_more_message += plume of calc :end ## 원하는 레벨 스킬 도달 시 more 출력 force_more_message += Training target.*for.*reached! ## 잘 살펴봐야 하는 메시지인 경우 다른 색으로 표현 msc := message_colour channel.monster_damage = plain channel.god = plain channel.monster_spell = plain channel.monster_enchant = plain channel.friend_spell = darkgrey channel.friend_enchant = darkgrey channel.monster_warning = yellow channel.timed_portal = lightgreen ## Danger msc ^= red: you shout at msc ^= red: carrying a wand msc ^= red: distortion.* comes? into view msc ^= red: floating eye.* comes? into view msc ^= red: You are slowing down msc ^= red: you cannot.* because msc ^= red: (the weather|forecast) msc ^= red: you will pay msc ^= magenta: cacodemon.* comes? into view msc ^= magenta: neqoxec.* comes? into view msc ^= magenta: wretched star.* comes? into view msc ^= magenta: shining eye.* comes? into view : if you.race() == "Mummy" then msc ^= red: golden eye : end ## Kills (is there a universal way to colour this?) ## msc ^= brown: you kill msc ^= brown: you destroy msc ^= brown: dies msc ^= brown: you blow up msc ^= brown: is destroyed ## Misc msc ^= green: more experienced msc ^= green: pick up a manual msc ^= green: you have finished your manual msc ^= green: Training target msc ^= darkgrey: you are exhausted msc ^= yellow: is nearby msc ^= yellow: there are.* nearby msc ^= darkgrey: You now have ## mute useless messages ## msc ^= mute: begine reading ### CNC 서버 모듈 ############################################################################################################ ## 사운드 관련 sound_on = true sound_volume = 0.5 sound_pack += https://osp.nemelex.cards/build/latest.zip:["init.txt"] one_SDL_sound_channel = true sound_fade_time = 0.5 ## 기타 인터페이스 관련 redirect_chat = true show_gold_status = true disable_clear_chat = true lab_use_click_to_send_chat = true ## 한글화 translation_language = ko ### 그래픽 및 UI 관련 ################################################################################################################## ## 작은 스크린 용 폰트 설정 #tile_font_crt_family = Arial #tile_font_stat_family = Arial #tile_font_msg_family = Arial #tile_font_tip_family = Arial #tile_font_lbl_family = Arial #tile_font_stat_size = 11 #tile_font_msg_size = 11 #tile_font_crt_size = 11 #tile_font_tip_size = 11 #tile_font_lbl_size = 11 #msg_max_height = 5 ## 모바일 키보드 활성화 #tile_web_mobile_input_helper = true ## 폰트를 바꾸기 # Consolas, DejaVu Sans Mono, Arial, Open Sans tile_font_crt_family = Consolas tile_font_stat_family = Consolas tile_font_msg_family = Consolas tile_font_tip_family = Consolas tile_font_lbl_family = Consolas ## 타일 크기 tile_viewport_scale = 1.5 ## 타일을 몬스터 종족 타일로 변경 tile_show_player_species = false ## 투사체 애니매이션 view_delay = 200 ## 메뉴 순서 sort_menus = true:equipped,identified,basename,art,ego,glowing,qualname,curse,charged,slot ## EN0N's Mini-Map Color Scheme 미니맵 색 꾸미기 tile_upstairs_col = green tile_downstairs_col = red tile_branchstairs_col = #ffa500 tile_door_col = #c27149 tile_wall_col = #5a524c tile_explore_horizon_col = #aaaaaa tile_floor_col = #1e1b1a tile_item_col = #1e1b1a tile_feature_col = #d4be21 tile_plant_col = #4b6d39 tile_water_col = #0b5d79 tile_deep_water_col = #1212b3 tile_trap_col = #f447ff tile_transporter_col = #ff5656 tile_transporter_landing_col = #59ff89 tile_lava_col = #5f0a00 ### 자동줍기 관련 ############################################################################################################# ae := autopickup_exceptions ## Allows easily dropping multiple items drop_mode += multi ## Always show the full list of items when you pick up a stack pickup_mode += multi ## Allows followers to pick up ANYTHING (take care not to lose artefacts) default_friendly_pickup += all ## Set Alias for Autopickup Exceptions ae += useless_item, dangerous_item, evil_item ## Autopickup artefacts and God's gift ae += scrolls? of (amn|noise) ae += >ring of (protection from (mag|fire|cold)|mag|ste|ice|fire|pos|wil|wiz) ae += >ring of (dex|int|str) #ae ^= scroll.*(torment|vulnerability|imolation) ae ^= >potion.*berserk ae ^= >potion.*lignification ## 확인 된 지팡이는 줍지 않도록 함 ae += >staff of (fire|cold|air|earth|conj|alchem|death) ## 확인 된 아뮬렛은 줍지 않도록 함 ae += >amulet of (faith|regen|reflect|the acrobat|guardian|magic) ## 종족이 문어가 아닐 경우 확인 된 반지는 줍지 않도록 함 : if you.race() ~= "Octopode" then ae += >ring of protection from (magic|fire|cold) ae += >ring of (fire|ice|pois|positive|resist corr|see) ae += >ring of (mag|flight|wiz|int|str|dex|slay|prot|eva) : end ## 종족이 오우거, 트롤 일 경우 바위도 자동줍기 목록에 포함시킴 ## : if you.race() == "Ogre" or you.race() == "Troll" then ae += ## . , 에 계단 오르고, 내리고 지정 macros += M . > macros += M , < ## 마법 편의 macros += M z Z macros += M 1 za\{13} macros += M 2 zb\{13} ## for BaIE #ae +=