Dungeon Dilettante
Posts: 3
Joined: Friday, 30th March 2012, 22:06
Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.
Dungeon Dilettante
Posts: 3
Joined: Friday, 30th March 2012, 22:06
Abyss Ambulator
Posts: 1249
Joined: Sunday, 18th September 2011, 02:11
local function ammo_pickup(it, name)
local class = it.class(true)
local sp = init_spells()
local top_ranged_skill = math.max(
you.skill("Slings"),
you.skill("Bows"),
you.skill("Crossbows"))
if pickup_missile then
-- Pick up ammunition needed by our skills
if class == "missile" then
if you.skill("Slings") > top_ranged_skill / 3 then
if name:find("stone") then return true end
if name:find("bullet") then return true end
end
if you.skill("Bows") > top_ranged_skill / 3 then
if name:find("arrow") then return true end
end
if you.skill("Crossbows") > top_ranged_skill / 3 then
if name:find("bolt") then return true end
end
end
end
if pickup_snakable then
if sp["Sticks to Snakes"] and it.snakable then
if name:find("arrow") then
return true
end
end
end
if pickup_sandblast then
if sp["Sandblast"] then
if name:find("stone") then
return true
end
end
end
return false
end
Dungeon Dilettante
Posts: 3
Joined: Friday, 30th March 2012, 22:06
Spider Stomper
Posts: 231
Joined: Saturday, 1st October 2011, 18:32
Dungeon Master
Posts: 1613
Joined: Thursday, 16th December 2010, 21:54
{
local function ammo_pickup(it, name)
local class = it.class(true)
if class == "missile" then
if you.skill("Slings") >= 3 then
if name:find("stone") then return true end
if name:find("bullet") then return true end
end
if you.skill("Bows") >= 3 then
if name:find("arrow") then return true end
end
if you.skill("Crossbows") >= 3 then
if name:find("bolt") then return true end
end
end
return false
end
add_autopickup_func(ammo_pickup)
}
Users browsing this forum: No registered users and 26 guests