Spider Stomper
Posts: 186
Joined: Friday, 8th March 2013, 13:27
lua example
In the vault "M" is supoused to be transparent wall and disapear if you join Xom.
Questions, Explanations, Howtos
Spider Stomper
Posts: 186
Joined: Friday, 8th March 2013, 13:27
Ziggurat Zagger
Posts: 5382
Joined: Friday, 25th November 2011, 07:36
Spider Stomper
Posts: 186
Joined: Friday, 8th March 2013, 13:27
tasonir wrote:I'm afraid I can't help you, but I can recommend you post this in the contributions forum, where the people who know your answer are probably more likely to see it. They may see here too, but I'd try contributions.
Abyss Ambulator
Posts: 1111
Joined: Monday, 18th March 2013, 23:23
Slime Squisher
Posts: 418
Joined: Friday, 11th February 2011, 13:09
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
Abyss Ambulator
Posts: 1111
Joined: Monday, 18th March 2013, 23:23
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
Spider Stomper
Posts: 186
Joined: Friday, 8th March 2013, 13:27
mumra wrote:That won't hugely help with performing an action on joining a God.
But has the poster looked through the Lua triggerables documentation: https://crawl.develz.org/wiki/doku.php?id=dcss:help:maps:lua:triggerables
{{
function callback.xom_warn_stepped(data, triggerable, triggerer, marker, ev)
local x, y = marker:pos()
-- This checks to see if you worship Xom or are a demigod. If you do/are then
-- you get a negative message but if you don't, Xom invites you to worship
-- him in exchange for a small gift.
if you.god() == "Xom" then
crawl.god_speaks("Xom" , "No soup for you!")
elseif you.race() == "Demigod" then
crawl.god_speaks("Xom" , "Broken toy no fun!")
dgn.grid(x, y, "floor")
else
crawl.god_speaks("Xom" , "I want a new toy, come to me and take your price!")
end
end
}}
NAME: lua_test
TAGS: no_rtele_into no_item_gen no_monster gen temple_overflow_xom uniq_altar_xom
ORIENT: float
WEIGHT: 3
KFEAT: X = altar_xom
KITEM: ,= snozzcumber
{{
local tm2 = TriggerableFunction:new{func="callback.xom_warn_stepped",
repeated=false}
tm2:add_triggerer(DgnTriggerer:new{type="player_move"})
lua_marker('X', tm2)
}}
MAP
.......
.nnn...
.n,n.X.
.nnn...
.......
ENDMAP
Dungeon Master
Posts: 1531
Joined: Saturday, 5th March 2011, 06:29
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Users browsing this forum: No registered users and 19 guests