summaryrefslogblamecommitdiff
path: root/npc/020-1/hocus.txt
blob: fcfbe73c1d538d11cf1eedd314b24a275f2778cd (plain) (tree)





































































































































































                                                                                                                                                                                                                                                         
// Evol scripts.
// Author:
//    Micksha
// Description:
//    Hocus, the Nature Mage and Academy Grandmaster. More interested in food than in nature magic, sometimes.
//    "Hocus: the mages here? They just think they work for me, they never understod that i am just one of them.. no idea why they follow me"
// THIS IS A PLACEHOLDER!

020-1,73,91,0	script	Hocus	NPC_MAGE_BROWN,{
    function anwarNotMe;
    function anwarFirstAid;
    function anwarGift;

    setq2 TonoriQuest_Kylian, getq2(TonoriQuest_Kylian) | KYLIAN_HOCUS;
    speech
        l("Hi!"),
        l("You should eat more salad. I see in your face that your nutrition is not good."),
        l("Can you bug Jesusalva? I really would like to teach you something.");
    if (getq(HurnscaldQuests_Rossy) == 8) {
        next;
        mesn;
        mesq l("I see you are helping the little girl, Rossy I believe? Her profesor, Mr. David, is on the west wing of the magic academy building.");
    }
    next;
    select
        rif(getq(General_Cooking) == 15, l("Please enlighten me, O Grandmaster, where can I find Salad to improve my eating habits?")),
        rif(getq(General_Cooking) == 16, l("I've brought you the promised.")),
        rif(getq(TulimsharQuest_AnwarField) == 1, l("Hello, do you make Fertility Potions?")),
        rif(getq(TulimsharQuest_AnwarField) == 7, l("HELP! Anwar field is under worm attack!!")),
        rif(getq(TulimsharQuest_AnwarField) == 10, l("Anwar sent you a gift.")),
        l("Thanks for your wise words.");
    mes "";
    switch (@menu) {
    /* Food Questline */
    case 1:
        mesn;
        mesq l("Here. But you probably won't be coming here to eat all the time, so I will teach you a salad recipe.");
        next;
        select
            l("Do you need some monster killed?"),
            l("Do you need some sort of item?"),
            l("Do you need money?");
        mes "";
        mesn;
        mesq l("Hm, not really...");
        next;
        mesn strcharinfo(0);
        // FIXME: Carrot Cake? Really??
        mesq l("I'll bring you 6 %s, 6 %s, and a %s just wait here. I'll also clean up all monsters on the proximity and pay you 1000 E. Wait for my return, Grandmaster!", getitemlink(RoastedAcorn), getitemlink(Carrot), getitemlink(CarrotCake));
        setq1 General_Cooking, 16;
        break;
    case 2:
        if (countitem(RoastedAcorn) < 6 ||
            countitem(Carrot) < 6 ||
            countitem(CarrotCake) < 1 ||
            Zeny < 1000) {
            mesn strcharinfo(0);
            mesc l("I promised to bring him 6 %s, 6 %s, and a %s. I also promised clean up all monsters on the proximity and pay him 1000 E. I'll make the Grandmaster proud!", getitemlink(RoastedAcorn), getitemlink(Carrot), getitemlink(CarrotCake));
            close;
        }
        mesn;
        mesq l("Child, I do not need your money nor your items. I told you I would teach you the recipe. It is free.");
        next;
        mesn;
        mesq l("I am already happy enough that you want to improve your own eating habits. You don't need to give me anything.");
        next;
        mesn;
        mesq l("Besides, helping each other, even without a compensation is a good thing and accepting help is nothing to be ashamed of. Here. Go in peace, child.");
        // FIXME: Probably wrong recipe
        RECIPES[CraftBlueberryCake]=true;
        RECIPES[CraftCarrotCake]=true;
        getitem BlueberryCake, 1;
        setq1 General_Cooking, 17;
        break;
    // Anwar Quest
    case 3:
        anwarNotMe();
        break;
    case 4:
        anwarFirstAid();
        break;
    case 5:
        anwarGift();
        break;
    }
    close;

function anwarNotMe {
    mesn strcharinfo(0);
    mesq l("Hello Mr. Hocus, kind sir Anwar sent me to fetch some fertilizers to save Tulimshar from famine, if you may?");
    next;
    mesn;
    mesq l("Sorry kind friend @@, but no.", strcharinfo(0));
    next;
    mesn;
    mesq l("Or rather, I can't. I would love to help you, just like everybody else, but I don't know how to make fertilizers, only Salad.");
    next;
    mesn;
    mesq l("Eomie probably could do that, she is young but very talented. If you help her, she'll likely help you back.");
    setq TulimsharQuest_AnwarField, 2;
    return;
}

function anwarFirstAid {
    mesn;
    mesq l("The crops are under attack? That's terrible!");
    next;
    mesn;
    mesq l("I can do a Certified Purification Potion right away, the warranty covers it. But I still need a few things for it!");
    next;
    mesn;
    mesq l("Do you, perchance, have 2 @@, 2 @@ and 3 @@?", getitemlink(LeftScorpionClaw), getitemlink(RightScorpionClaw), getitemlink(Moss));
    if (askyesno() != ASK_YES)
        close;
    mes "";

    if (countitem(LeftScorpionClaw) < 2 ||
        countitem(RightScorpionClaw) < 2 ||
        countitem(Moss) < 3) {
        mesn;
        mesq l("Why are you lying? We must cooperate with each other if we want to strive. Otherwise, just like the plants, we will wither and die out. Go fetch the items!");
        close;
    }

    inventoryplace PurificationPotion, 1;
    delitem LeftScorpionClaw, 2;
    delitem RightScorpionClaw, 2;
    delitem Moss, 3;
    getitembound(PurificationPotion, 1, IBT_CHARACTER);
    setq TulimsharQuest_AnwarField, 8;

    mesn;
    mesq l("Quick, deliver this to Anwar!");
    return;
}

function anwarGift {
    .@q2=getq2(TulimsharQuest_AnwarField);
    if (.@q2 & 2) {
        mesn;
        mesq l("Thanks for the nice gift!");
        close;
    }
    // Tip. WHAT DID YOU DID WITH THE BOUND ITEM? IT SHOULD BE HARD TO GET RID OF IT...
    if (countitem(SilverBell) < 1) {
        mesn;
        mesq l("Ah, I wish I got something for helping people out...");
        close;
    }
    mesn strcharinfo(0);
    mesq l("Anwar sent you this, erm, hum... @@.", getitemlink(SilverBell));
    next;
    setq2 TulimsharQuest_AnwarField, .@q2+2;
    delitem SilverBell, 1;
    getexp 75, 10;
    mesn;
    mesq l("WOW, THIS IS AWESOME! Many, many thanks!!");
    return;
}

OnInit:
    .distance = 4;
    end;
}