From 14f7af0b7b3839f0e1b35c31bf3bd17e70cf366f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 17 Apr 2021 16:07:04 -0300 Subject: Refactor Sagatha functions. Add shear spell (reusing ML code) --- npc/013-1/sagatha.txt | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'npc/013-1/sagatha.txt') diff --git a/npc/013-1/sagatha.txt b/npc/013-1/sagatha.txt index 786da773..702e261c 100644 --- a/npc/013-1/sagatha.txt +++ b/npc/013-1/sagatha.txt @@ -1,26 +1,4 @@ - -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; -} +// (C) The Mana World Developers function script SagathaStatus { if (isequippedcnt(MoubooHead, FluffyHat)) @@ -242,7 +220,8 @@ L_Teach_N14: mes "\"Some forest creatures sometimes overgrow their fur or hide. That makes them uncomfortable.\""; next; mesn .@n$; - mesq l("You can help them with shearing magic. Press your hands together and say '" + get(.invocation$, "shear") + "'. Then touch them with your hands, and brush off any excess."); + mesq l("You can help them with shearing magic. Press your hands together and say '%s'. Then touch them with your hands, and brush off any excess.", b("Chipchip")); + learnskill SKILL_CHIPCHIP; next; mesn .@n$; mesq l("The spell is strong, so you only need to do this once. Be careful not to cut them. Some things they shed are useful. Often they will leave them to you as a thank-you."); -- cgit v1.2.3-70-g09d2