diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-02 22:10:00 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:25 +0200 |
commit | 3215bb6521aca21af4d48f0598e1322ef8d8773c (patch) | |
tree | a7d53e5689b35f04c7ae0bdea67a6b289b508f09 /lib/mods | |
parent | 65a41a0ef06a606927a6b2866e0172f0d5c98e11 (diff) |
Lua: Move Bounty Hunter quest to C
Diffstat (limited to 'lib/mods')
-rw-r--r-- | lib/mods/theme/scpt/bounty.lua | 90 | ||||
-rw-r--r-- | lib/mods/theme/scpt/init.lua | 1 |
2 files changed, 0 insertions, 91 deletions
diff --git a/lib/mods/theme/scpt/bounty.lua b/lib/mods/theme/scpt/bounty.lua deleted file mode 100644 index 94c15598..00000000 --- a/lib/mods/theme/scpt/bounty.lua +++ /dev/null @@ -1,90 +0,0 @@ --- The bounty quest! bring back corpses to increase your monster lore skill - -add_quest -{ - ["global"] = "BOUNTY_QUEST", - ["name"] = "Bounty quest", - ["desc"] = function() - if quest(BOUNTY_QUEST).status == QUEST_STATUS_TAKEN then - print_hook("#####yBounty quest!\n") - print_hook("You must bring back "..monster_race_desc(bounty_quest_monster, 0).." corpse to the beastmaster.\n") - print_hook("\n") - end - end, - ["level"] = -1, - ["data"] = { - ["bounty_quest_monster"] = 0, - }, - ["hooks"] = { - -- Start the game without the quest, need to request it - [HOOK_BIRTH_OBJECTS] = function() - quest(BOUNTY_QUEST).status = QUEST_STATUS_UNTAKEN - end, - }, -} - -add_building_action -{ - -- Index is used in ba_info.txt to set the actions - ["index"] = 54, - ["action"] = function() - if quest(BOUNTY_QUEST).status == QUEST_STATUS_UNTAKEN then - quest(BOUNTY_QUEST).status = QUEST_STATUS_TAKEN - bounty_quest_monster = get_new_bounty_monster(3 + ((player.lev * 3) / 2)) - - msg_print("You must bring me back "..monster_race_desc(bounty_quest_monster, 0).." corpse.") - else - msg_print("You still must bring me back "..monster_race_desc(bounty_quest_monster, 0).." corpse.") - end - end -} - -add_building_action -{ - -- Index is used in ba_info.txt to set the actions - ["index"] = 55, - ["action"] = function() - if quest(BOUNTY_QUEST).status == QUEST_STATUS_TAKEN then - local ret, item - - -- Ask for an item - ret, item = get_item("What corpse to return?", - "You have no corpse to return.", - bor(USE_INVEN), - function (obj) - if (obj.tval == TV_CORPSE) and (obj.pval2 == bounty_quest_monster) then - return TRUE - end - return FALSE - end - ) - - -- Ok we got the corpse! - if ret == TRUE then - -- Take the corpse from the inventory - inven_item_increase(item, -1) - inven_item_optimize(item) - - msg_print("Ah well done adventurer!") - msg_print("As a reward I will teach you a bit of monster lore.") - - if skill(SKILL_LORE).mod == 0 then - skill(SKILL_LORE).mod = 900 - skill(SKILL_LORE).dev = TRUE - end - skill(SKILL_LORE).value = skill(SKILL_LORE).value + skill(SKILL_LORE).mod - if skill(SKILL_PRESERVATION).mod == 0 then - skill(SKILL_PRESERVATION).value = 800 - skill(SKILL_PRESERVATION).mod = 800 - skill(SKILL_PRESERVATION).dev = TRUE - msg_print("I see you don't know the corpse preservation skill, I shall teach you it too.") - end - - quest(BOUNTY_QUEST).status = QUEST_STATUS_UNTAKEN - bounty_quest_monster = 0 - end - else - msg_print("You do not have any bounty quest yet.") - end - end -} diff --git a/lib/mods/theme/scpt/init.lua b/lib/mods/theme/scpt/init.lua index 958d8f7d..19649da7 100644 --- a/lib/mods/theme/scpt/init.lua +++ b/lib/mods/theme/scpt/init.lua @@ -31,7 +31,6 @@ tome_dofile("gods_new.lua") tome_dofile("spells.lua") -- Add some quests -tome_dofile("bounty.lua") tome_dofile("god.lua") tome_dofile("fireprof.lua") tome_dofile("library.lua") |