summaryrefslogblamecommitdiff
path: root/npc/items/purification_potion.txt
blob: 47f84f3b0d7da1d7f2a10c23cec271915717f2da (plain) (tree)

























                                                                         
function	script	usePurificationPotion	{
    if (isat("011-1", 88,67))
        goto L_Wyara_Pond;
    goto L_NoUse;

L_NoUse:
    message strcharinfo(0), "You don't know what to do with this.";
    getitem "PurificationPotion", 1;
    return;

L_Wyara_Pond:
    @Q_MASK = NIBBLE_2_MASK;
    @Q_SHIFT = NIBBLE_2_SHIFT;
    @Q_status = (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;

    if (@Q_status < 1)
        goto L_NoUse;
    if (@Q_status <= 2)
        @Q_status = @Q_status + 1;

    message strcharinfo(0), "You pour the potion into the pond.";

    QUEST_MAGIC2 = (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT));
    return;
}