Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check()
- local counter = 0
- for alcoveitem in findEntity("redalcove"):containedItems() do
- if alcoveitem.name == "red_gem" then
- counter = counter + 1
- break
- end
- end
- for alcoveitem in findEntity("greenalcove"):containedItems() do
- if alcoveitem.name == "green_gem" then
- counter = counter + 1
- break
- end
- end
- for alcoveitem in findEntity("bluealcove"):containedItems() do
- if alcoveitem.name == "blue_gem" then
- counter = counter + 1
- break
- end
- end
- if counter == 3 then
- findEntity("exitdoor1"):open()
- findEntity("exitdoor2"):open()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement