multiple specific items on an altar
Posted: Sun Nov 04, 2012 11:55 pm
hello!
I parsed through the check items in an alcove thread and messed around with some of the scripts but i cannot get the outcome i desire.
What i am looking for is an altar that requires 6 specific items be placed upon it to open a door.
I tried this script:
but it opens the door when any one of the three items is placed upon it. I need all three items to be placed on the altar in order for the door to open.
I apologize if I'm a bit slow in getting the script to do my bidding but it i just can't it to work!
All help is greatly appreciated. My dungeon is nearly complete, just need a few more tweaks and fixes!
I parsed through the check items in an alcove thread and messed around with some of the scripts but i cannot get the outcome i desire.
What i am looking for is an altar that requires 6 specific items be placed upon it to open a door.
I tried this script:
Code: Select all
function altarCheck()
local offeringlist = { "golden_chalice", "golden_orb", "golden_dragon" }
if offeringaltar:getItemCount() == 0
then
offeringdoor:close()
else
for j=1,3 do
for i in offeringaltar:containedItems() do
if i.name == offeringlist[j]
then
offeringdoor:open()
return
end
end
end
offeringdoor:close()
end
end
I apologize if I'm a bit slow in getting the script to do my bidding but it i just can't it to work!
All help is greatly appreciated. My dungeon is nearly complete, just need a few more tweaks and fixes!