summaryrefslogtreecommitdiff
path: root/world/map/npc/items/check_wand.txt
blob: 5284b3ace0770f73004bb5fee7ed8ade91ea4c36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Wands
// Author: Jesusalva

function|script|SweetTooth
{
    if (getequipid(equip_hand1) != SweetTooth) goto L_Return;
    set Sp, min(MaxSp, Sp + MaxSp / 20); // Restore up to 5% MP
    if (strcharinfo(1) == "follow the white rabbit")
        goto L_Cake;
    return;

L_Cake:
    if (@sweetooth > gettimetick(2)) goto L_Return;
    message strcharinfo(0), "The @@1170|@@ gave you cake. It was delicious! Your mana was restored.";
    set @sweetooth, gettimetick(2) + 160;
    return;

L_Return:
    return;
}