Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.60 KB | None | 0 0
  1. # Information to log:
  2.  
  3. ## References:
  4. # https://github.com/elliptic/qw/blob/master/qw.rc
  5. # http://doc.dcss.io/
  6.  
  7. show_more = false
  8. autofight_stop = 0
  9.  
  10. {
  11.  
  12. function get_mons(x, y)
  13. mon = monster.get_monster_at(x, y)
  14. crawl.stderr("Monster" .. "[" .. x .. "]" .. "[" .. y .. "] " .. tostring(mon:name()) .. "|" ..
  15. tostring(mon:is_unique()) .. "|" .. tostring(mon:damage_level()) .. "|" .. tostring(mon:threat())
  16. .. "|" .. tostring(mon:attitude()) .. "|" .. tostring(mon:is_firewood()))
  17. end
  18.  
  19. function output(prompt)
  20. local hp, mhp = you.hp()
  21.  
  22. for x = -9, 9 do
  23. for y = -9, 9 do
  24. if items.get_items_at(x,y) == Nil then
  25. crawl.stderr("Floor_Items" .. "[" .. x .. "]" .. "[" .. y .. "]" .. "0")
  26. else
  27. Floor_Item = items.get_items_at(x,y)
  28. items_at_loc = ''
  29. for ind,i in pairs(Floor_Item) do
  30. items_at_loc = items_at_loc .. '|' .. i.name()
  31. end
  32. crawl.stderr("Floor_Items" .. "[" .. x .. "]" .. "[" .. y .. "] " .. items_at_loc)
  33. end
  34. if you.see_cell_no_trans(x,y) == Nil then
  35. crawl.stderr("Can_See" .. "[" .. x .. "]" .. "[" .. y .. "] " .. 0)
  36. else
  37. crawl.stderr("Can_See" .. "[" .. x .. "]" .. "[" .. y .. "] " .. tostring(you.see_cell_no_trans(x, y)))
  38. end
  39. if you.see_cell_no_trans(x,y) == Nil or tostring(you.see_cell_no_trans(x, y)) == "false" then
  40. crawl.stderr("Monster" .. "[" .. x .. "]" .. "[" .. y .. "] " .. 0)
  41. else
  42. if monster.get_monster_at(x, y) == Nil then
  43. crawl.stderr("Monster" .. "[" .. x .. "]" .. "[" .. y .. "] " .. 0)
  44. else
  45. get_mons(x, y)
  46. end
  47. end
  48. crawl.stderr("Feature" .. "[" .. x .. "]" .. "[" .. y .. "] " .. view.feature_at(x, y))
  49. crawl.stderr("Invis_Mon" .. "[" .. x .. "]" .. "[" .. y .. "] " .. tostring(view.invisible_monster(x, y)))
  50. end
  51. end
  52.  
  53. for it in iter.invent_iterator:new(items.inventory()) do
  54. if it.class(true) == "weapon" then
  55. temp = it.damage .. "|" .. it.accuracy .. "|" .. it.delay .. "|" ..
  56. tostring(it.plus) .. "|" .. it.weap_skill .. "|" .. tostring(it.equipped)
  57. elseif it.class(true) == "armour" then
  58. temp = it.ac .. "|" .. it.encumbrance .. "|" .. it.equip_type .. "|" ..
  59. tostring(it.worn) .. "|" .. tostring(it.plus)
  60. else
  61. temp = ""
  62. end
  63. crawl.stderr("Inventory_Item[" .. it.slot .. "]" .. items.index_to_letter(it.slot) .. "|" .. " |" ..
  64. it.class(true) .. "|" .. it.name(true) .. "|" .. temp)
  65. end
  66.  
  67.  
  68. crawl.stderr(
  69.  
  70. "[\"HP\",\"" .. hp .. "\", \"" .. mhp .. "\"],\n" ..
  71. "[\"Turns\",\"" .. you.turns() .. "\"],\n" ..
  72. "[\"Gold\",\"" .. you.gold() .. "\"],\n" ..
  73. "[\"Feel safe\",\"" .. tostring(you.feel_safe()) .. "\"],\n" ..
  74. "[\"Hunger\",\"" .. you.hunger() .. "\"],\n" ..
  75. "[\"Strength\",\"" .. you.strength() .. "\"],\n" ..
  76. "[\"Intelligence\",\"" .. you.intelligence() .. "\"],\n" ..
  77. "[\"Dexterity\",\"" .. you.dexterity() .. "\"],\n" ..
  78. "[\"Safe\",\"" .. tostring(you.feel_safe()) .. "\"],\n" ..
  79.  
  80. "[\"Prompt\",\"" .. tostring(prompt) .. "\"],\n" ..
  81.  
  82. "[\"Confused\",\"" .. tostring(you.confused()) .. "\"],\n" ..
  83. "[\"Transform\",\"" .. tostring(you.transform()) .. "\"],\n" ..
  84. "[\"Berserk\",\"" .. tostring(you.berserk()) .. "\"],\n" ..
  85. "[\"Status\",\"" .. tostring(you.status()) .. "\"],\n" ..
  86.  
  87. "[\"Cold Resistance\",\"" .. tostring(you.res_cold()) .. "\"],\n" ..
  88. "[\"Corrosion Resistance\",\"" .. tostring(you.res_corr()) .. "\"],\n" ..
  89. "[\"Negative energy Resistance\",\"" .. tostring(you.res_draining()) .. "\"],\n" ..
  90. "[\"Drowning Resistance\",\"" .. tostring(you.res_drowning()) .. "\"],\n" ..
  91. "[\"Fire Resistance\",\"" .. tostring(you.res_fire()) .. "\"],\n" ..
  92. "[\"Mutation Resistance\",\"" .. tostring(you.res_mutation()) .. "\"],\n" ..
  93. "[\"Poison Resistance\",\"" .. tostring(you.res_poison()) .. "\"],\n" ..
  94. "[\"Electric Resistance\",\"" .. tostring(you.res_shock()) .. "\"],\n" ..
  95.  
  96. "[\"Branch\",\"" .. you.branch() .. "\"],\n" ..
  97. "[\"Branch depth\",\"" .. you.depth() .. "\"],\n" ..
  98. "[\"Branch depth percent\",\"" .. you.depth_fraction() .. "\"],\n" ..
  99. "[\"Absolute depth\",\"" .. you.absdepth() .. "\"],\n" ..
  100. "[\"Temple depth\",\"" .. travel.find_deepest_explored("Temple") .. "\"],\n" ..
  101. "[\"Dungeon depth\",\"" .. travel.find_deepest_explored("D") .. "\"],\n" ..
  102. "[\"Lair depth\",\"" .. travel.find_deepest_explored("Lair") .. "\"],\n" ..
  103. "[\"Swamp depth\",\"" .. travel.find_deepest_explored("Swamp") .. "\"],\n" ..
  104. "[\"Shoals depth\",\"" .. travel.find_deepest_explored("Shoals") .. "\"],\n" ..
  105. "[\"Snake Pit depth\",\"" .. travel.find_deepest_explored("Snake") .. "\"],\n" ..
  106. "[\"Spiders Nest depth\",\"" .. travel.find_deepest_explored("Spider") .. "\"],\n" ..
  107. "[\"Slime Pits depth\",\"" .. travel.find_deepest_explored("Slime") .. "\"],\n" ..
  108. "[\"Orcish Mines depth\",\"" .. travel.find_deepest_explored("Orc") .. "\"],\n" ..
  109. "[\"Elven Halls depth\",\"" .. travel.find_deepest_explored("Elf") .. "\"],\n" ..
  110. "[\"The Vaults depth\",\"" .. travel.find_deepest_explored("Vaults") .. "\"],\n" ..
  111. "[\"The Crypt depth\",\"" .. travel.find_deepest_explored("Crypt") .. "\"],\n" ..
  112. "[\"The Tomb depth\",\"" .. travel.find_deepest_explored("Tomb") .. "\"],\n" ..
  113. "[\"The Depths depth\",\"" .. travel.find_deepest_explored("Depths") .. "\"],\n" ..
  114. "[\"The Vestibule of Hell depth\",\"" .. travel.find_deepest_explored("Hell") .. "\"],\n" ..
  115. "[\"The Abyss depth\",\"" .. travel.find_deepest_explored("Abyss") .. "\"],\n" ..
  116. "[\"Realm of Zot depth\",\"" .. travel.find_deepest_explored("Zot") .. "\"],\n" ..
  117.  
  118. "[\"Messages\",\n" .. crawl.messages(10) .. "]"
  119.  
  120. )
  121. end
  122.  
  123. function ready()
  124. output()
  125. end
  126.  
  127. function choose_stat_gain()
  128. output()
  129. end
  130.  
  131. function c_answer_prompt(prompt)
  132. output(prompt)
  133. end
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement