summaryrefslogblamecommitdiff
path: root/world/map/npc/xmas/2011/illHelper.txt
blob: 48f8600d4e89502f081c55c59bf9d31d8916b95a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                              

                                                                                                                
                       

                                                                                                               




























































                                                                                         
                                                                                         






















                                                                                               
// This file is part of Christmas Event 2011
// author: Jenalya
// Ismo is ill and can't work because of that, asks for a small healing potion
// bad: give him a cactus potion instead
// 00 not talked
// 10 asked for powders
// 01 done in good way
// 11 done in bad way

030-2.gat,127,89,0|script|Ismo|329,{

    if (!(gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_start_day)
        && !(gettime(7) == ($@xmas2011_year + 1) && gettime(6) == 1 && gettime(5) <= $@xmas2011_reward_end_day))
        goto L_NoEvent;
    if ((gettime(7) == $@xmas2011_year && gettime(6) == 12 && gettime(5) >= $@xmas2011_reward_start_day)
        || (gettime(7) == ($@xmas2011_year + 1) && gettime(6) == 1 && gettime(5) <= $@xmas2011_reward_end_day))
        goto L_RewardTime;

    if (xmas11 & $@xmas11_PotionDone) goto L_Done;
    if (xmas11 & $@xmas11_Potion) goto L_Asked;
    if (xmas11 & $@xmas11_talkedToChief) goto L_Helping;

    mes "[Ill Helper]";
    mes "\"Uh, my head.\"";
    goto L_Close;

L_Helping:
    mes "[Ismo]";
    mes "\"Hello. I'm not feeling well. My head hurts so bad and I'm all weary.\"";
    next;
    mes "\"Could you bring me a Small Healing Potion?\"";
    set xmas11, xmas11 | $@xmas11_Potion;
    goto L_Close;

L_Asked:
    mes "[Ismo]";
    mes "\"Ah, you're back. Do you have a Small Healing Potion for me? I feel so bad.\"";
    if ((countitem("SmallHealingPotion") >= 1) && (countitem("CactusPotion") >= 1))
        menu
            "Yeah, here it is. (Give the Small Healing Potion.)",L_Heal,
            "Sure, here it is. (Give the Cactus Potion.)",L_Cactus,
            "Not yet, sorry.",L_Close;
    if (countitem("SmallHealingPotion") >= 1)
        menu
            "Yeah, here it is. (Give the Small Healing Potion.)",L_Heal,
            "Not yet, sorry.",L_Close;
    if (countitem("CactusPotion") >= 1)
        menu
            "Sure, here it is. (Give Cactus Potion.)",L_Cactus,
            "Not yet, sorry.",L_Close;
    goto L_Close;

L_Heal:
    if (countitem("SmallHealingPotion") < 1)
        goto L_NoItems;
    delitem "SmallHealingPotion", 1;
    set xmas11, xmas11 & ~$@xmas11_Potion;
    set xmas11, xmas11 | $@xmas11_PotionDone;
    mes "[Ismo]";
    mes "\"Ah, thank you.\"";
    mes "He drinks the potion.";
    goto L_Close;

L_Cactus:
    if (countitem("CactusPotion") < 1)
        goto L_NoItems;
    delitem "CactusPotion", 1;
    set xmas11, xmas11 | $@xmas11_PotionDone;
    mes "He doesn't notice that you're giving him a Cactus Potion.";
    mes "[Ismo]";
    mes "\"Ah, thank you.\"";
    mes "He drinks the potion.";
    goto L_Close;

L_Done:
    mes "[Ismo]";
    if (xmas11 & $@xmas11_Potion)
        mes "\"I don't really feel better yet. Maybe it takes a while to take effect?\"";
    if (!(xmas11 & $@xmas11_Potion))
        mes "\"Thanks for bringing me the Small Healing Potion, I feel slightly better now.\"";
    goto L_Close;

L_NoEvent:
    mes "[Ismo]";
    mes "\"How did you come in? At this time of the year the door should be locked!\"";
    warp "030-1.gat", 99, 55;
    goto L_Close;

L_RewardTime:
    mes "[Ismo]";
    mes "\"I'm getting better.\"";
    goto L_Close;

L_NoItems:
    mes "[Ismo]";
    mes "\"Where is it?\"";
    goto L_Close;

L_Close:
    close;
}