Would it be (/is it currently) possible to have say, a hidden skills scroll.
When viewed by a character it's text showing that characters hidden skillz0rs.
Hidden Skills Scroll
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

you mean, when a character read a special scroll, he is able to cast a spell that was forbidden before?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
This is just a quick hack, I'm sure it could be done better.
However, as a demonstration, here's a scroll to display someone's hidden wizard skills on a scroll, using a subrenderer.
(Note: What Adamo was talking about is also pretty easily doable, by adding an on_look event to the scroll)
However, as a demonstration, here's a scroll to display someone's hidden wizard skills on a scroll, using a subrenderer.
Code: Select all
obj.skillscroll = {
name="SCROLL",
type="THING",
class="SCROLL",
mass=1,
icon=gfx.icons[31],
alt_icon=gfx.icons[30],
dungeon=gfx.scroll,
to_r_hand = alticon,
from_r_hand = normicon,
fit_chest=true
}
function obj.skillscroll:subrenderer(id)
local ch, who = dsb_get_coords(id)
if (ch == MOUSE_HAND) then
who = dsb_ppos_char(dsb_get_leader())
end
local names = { "FUL", "IR", "DES", "VEN" }
local lines = { "SCROLL OF", "WIZARDRY", "" }
for i=1,4 do
local skillnum = dsb_xp_level(who, CLASS_WIZARD, i)
local s_skill
if (skillnum == 0) then
s_skill = "NO SKILL IN " .. names[i]
else
s_skill = names[i] .. " " .. xp_levelnames[skillnum]
end
lines[3+i] = s_skill
end
local num_lines = 7
local y_base = 72 - (num_lines*7) + (num_lines % 2)
local sr = dsb_subrenderer_target()
dsb_bitmap_blit(gfx.scroll_inside, sr, 0, 0, 0, 0, 246, 146)
for i=1,num_lines do
dsb_bitmap_textout(sr, gfx.scroll_font, lines[i],
124, y_base+((i-1)*14), CENTER, scroll_color)
end
end