summaryrefslogtreecommitdiff
path: root/lib/mods/theme
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-07 21:11:58 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-07 21:18:12 +0200
commit92a7621e525ead5f41715efb92499cf289d2eea5 (patch)
tree8f462d7f951a720201a3c399635850866256efc3 /lib/mods/theme
parent5ea970c82ba3119ca3a5ee68037aee7cdda6dfa3 (diff)
Lua: Move Library Quest building action to C
Diffstat (limited to 'lib/mods/theme')
-rw-r--r--lib/mods/theme/scpt/library.lua42
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/mods/theme/scpt/library.lua b/lib/mods/theme/scpt/library.lua
index 38c26599..d2851a23 100644
--- a/lib/mods/theme/scpt/library.lua
+++ b/lib/mods/theme/scpt/library.lua
@@ -160,45 +160,3 @@ add_quest
end,
},
}
-
--- Library store action
-add_building_action
-{
- ["index"] = 61,
- ["action"] = function()
- -- the quest hasn't been requested already, right?
- if quest(LIBRARY_QUEST).status == QUEST_STATUS_UNTAKEN then
- -- quest has been taken now
- quest(LIBRARY_QUEST).status = QUEST_STATUS_TAKEN
-
- -- issue instructions
- msg_print("I need get some stock from my main library, but it is infested with monsters!")
- msg_print("Please use the side entrance and vanquish the intruders for me.")
-
- return TRUE, FALSE, TRUE
- -- if quest completed
- elseif (quest(LIBRARY_QUEST).status == QUEST_STATUS_COMPLETED) then
- msg_print("Thank you! Let me make a special book for you.")
- msg_print("Tell me three spells and I will write them in the book.")
- library_quest_fill_book()
- if library_quest_book_slots_left() == 0 then
- quest(LIBRARY_QUEST).status = QUEST_STATUS_REWARDED
- book = create_object(TV_BOOK, 61)
- book.art_name = quark_add(player_name())
- book.found = OBJ_FOUND_REWARD
- set_aware(book)
- set_known(book)
- inven_carry(book, FALSE)
- end
-
- -- if the player asks for a quest when they already have it, but haven't failed it, give them some extra instructions
- elseif (quest(LIBRARY_QUEST).status == QUEST_STATUS_TAKEN) then
- msg_print("Please use the side entrance and vanquish the intruders for me.")
-
- -- quest failed or completed, then give no more quests
- elseif (quest(LIBRARY_QUEST).status == QUEST_STATUS_FAILED) or (quest(LIBRARY_QUEST).status == QUEST_STATUS_REWARDED) then
- msg_print("I have no more quests for you.")
- end
- return TRUE
- end,
-}