Script options to check if party has various items or not

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Script options to check if party has various items or no

Post by Komag »

yeah, that's getMouseItem()
Finished Dungeons - complete mods to play
User avatar
Eleven Warrior
Posts: 745
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Script options to check if party has various items or no

Post by Eleven Warrior »

Hi Kogmag..

I love the Script and was wondering how after the door opens, do I destroy the Sack and orb with it..

Even if the Orb is inside the Sack or in the Inventory or in the Champs hand...

I have a puzzle that requires this function..
With My Shop when the player picks up the Sack,Box etc.. there will be a coin inside it and when the Shop is activated both the Sack and Coin are Destroyed.

My way of a Treasure for the player LOL... I have Cloned a new Coin with new Text on it eg: (100 pces of Gold) which gets added to the Shop money Tally..

Thxs..

PS: this script Works but everytime the players walks over the Pressure plate the Text comes up even after the door is Opened.. I need the text to stop after
the door is open, and I need to destroy the Sack and Orb (as above Question)....

function checkGoldOrb()
local goldOrb = false
local n = "golden_orb"

for i = 1, 4 do
for j = 1, 31 do
local item = party:getChampion(i):getItem(j)
if item then
if item.name == "sack" or
item.name == "mortar" or
item.name == "wooden_box" then
for x in item:containedItems() do
if x then
if x.name == "mortar" then
for y in x:containedItems() do
if y then if y.name == n then goldOrb = true end end
end end
if x.name == n then goldOrb = true end
end end end
if item.name == n then goldOrb = true end
end end end

if goldOrb then door1a:open()
hudPrint("The Orbs Magic opens the way")
else
door1a:close()
hudPrint("You dont have the Golden Orb")
end
end

THXS......
Eleven Warrior
Post Reply