summaryrefslogblamecommitdiff
path: root/npc/025-2-4/tree.txt
blob: 08dc03f1cdacb0db71dd1a26ca287ecfd8d99a9f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11






                                                      



                           
                                   



                                                                                           
                                                        


                                                                                 
                                    


                      

                          
         



                        
                          
                                                                       
         











                                                           



                                   










                                                     





                   
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//   Pinkie Cave Tree is part of Legendary Weapons

025-2-4,39,33,0	script	Mana Tree	NPC_MANATREE,{
    function manatreeOff;
    function manatreeAgain;
    function manatreeAegis;

    setpcblock(PCBLOCK_HARD, true);
    mesc l("A tree glows in this dark cave, surrounded by mana lanes.");
    next;
    mesc l("This might be the place of a great secret, but yet, all you can do is stare.");
    next;
    if (getq(FortressQuest_ManaTree) < 2) manatreeOff();
    else if ($AEGIS_HOLDER$ == "" && @manacool < gettimetick(2)) manatreeAegis();
    else manatreeAgain();

    setpcblock(PCBLOCK_HARD, false);
    closeclientdialog;
    close;

function manatreeOff {
    mesc l("...for now.");
    next;
    return;
}

function manatreeAgain {
    mesc l("...for now.");
    // TODO: getitem Manapple, 1; // Maybe can obtain one daily/weekly?
    next;
    return;
}

function manatreeAegis {
    mesc l("For which player do you wish to pray?");
    next;
    input .@prayer$;
    if (.@prayer$ == strcharinfo(0)) {
        mesc l("The tree doesn't likes your selfishness.");
        percentheal -20, -50;
        return;
    }
    if (.@prayer$ == "") {
        mesc l("...Alright then.");
        return;
    }
    @manacool=gettimetick(2)+30;
    .@cid=getcharid(3, .@prayer$);
    if (.@cid < 1) {
        mesc l("Did you just make up that someone?");
        return;
    }
    02524_Tree_BlackBox(.@prayer$, .@cid);
    @manacool+=150;
    return;
}

OnInit:
    .sex = G_OTHER;
    .distance = 2;
    end;
}