diff options
Diffstat (limited to 'npc/functions/quests.txt')
-rw-r--r-- | npc/functions/quests.txt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/npc/functions/quests.txt b/npc/functions/quests.txt new file mode 100644 index 00000000..3f0c40ef --- /dev/null +++ b/npc/functions/quests.txt @@ -0,0 +1,37 @@ +// The Mana World quest functions script + +function script QuestSagathaHappy { + .@value = getarg(0, @value); + .@unhappiness = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + if (.@unhappiness < .@value) + .@unhappiness = 0; + + .@unhappiness = .@unhappiness - .@value; + + QUEST_MAGIC = (QUEST_MAGIC & ~NIBBLE_3_MASK) | (.@unhappiness << NIBBLE_3_SHIFT); + return; +} + +function script QuestSagathaAnnoy { + .@value = getarg(0, @value); + .@unhappiness = (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + if ((.@unhappiness + .@value) > 15) + .@unhappiness = 15; + + .@unhappiness = .@unhappiness + .@value; + QUEST_MAGIC = (QUEST_MAGIC & ~NIBBLE_3_MASK) | (.@unhappiness << NIBBLE_3_SHIFT); + return; +} + +function script elanore_decrease_exp { + .@heal_exp = getq2(MagicQuest_Healing); + + if (.@heal_exp < 8) + .@heal_exp = 0; + else + .@heal_exp -= 8; + + setq2(MagicQuest_Healing, .@heal_exp); + return; +} + |