diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-17 16:07:04 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-17 16:07:04 -0300 |
commit | 14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f (patch) | |
tree | d9a501ffc748bca4cf19a56942d91bdd82d5eeb5 /npc/functions/quests.txt | |
parent | bd9d7c6142986a30f6fcd355efe22704f5bf4be4 (diff) | |
download | serverdata-14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f.tar.gz serverdata-14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f.tar.bz2 serverdata-14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f.tar.xz serverdata-14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f.zip |
Refactor Sagatha functions. Add shear spell (reusing ML code)
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; +} + |