summaryrefslogblamecommitdiff
path: root/npc/items/books.txt
blob: 0fae0a04fcf8604c2348d8a0fc4e63814fbfd00f (plain) (tree)
1
2
3
4
5
6
7
8







                                              



                                                                                                
 
                                   
 



                                          
 
               
 
              





                                                           
               
 
                     
         
                   
                                     



                                                                                                                                
                                     









                                                                                                           
                                     





                                                                                                                       
                                     




                                                                                                 
                                     






                                                                                                                               
 
                                            
 



                                         



















                                                

 
                                         





                                 










                                                                                                                                                                                                      




























































































                                                                                         
                                                                     












                                                           


           
                                            
                        

                        
     
 
















                                                        





















 
                                                    
        
 
                 





                                              
                            
                                         




                                                                                   









                                                 

                                            



                                                                          





                                                

                                                           








                                                                
                                               










                                                                                                  

                                               

                                                   

                                                      
                                            
                                                         




                                                          

                                                                                  











                                                                               
                                                                     
                                                                         
                                                        
                                                               









                                                                                     



                                                                                     


















                                                                                
                                        



                                     
                            
                                                              


                                              
 











                                                                         





                                                                                               









                                                                                                             


                                     
 

                                                                                                                 
 
                                   
 




















                                                                              
         















                                                                                                             
 





























































































                                                                                                          






                        
              


        
                                                  

                   
                                                           


        
// TMW-2 script.
// Author:
//    Jesusalva
//    gumi
//    Tirifto
// Description:
//    Books used by TMW-2. Some are from evol.

function	script	FishingBook	{
    narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
        l("To get started with fishing, you'll need two things: a fishing rod and a bait."),
        l("You just need one fishing rod, although you should take more than one single bait.");

    @menu = 0; // reset for the rif

    do
    {
        narrator S_NO_NPC_NAME,
            l("Please select a chapter:");

        mes "";

        select
            rif2(1, true, l("Ch 1 — Fishing apparatus")),
            rif2(2, true, l("Ch 2 — Baits")),
            rif2(3, true, l("Ch 3 — Location")),
            rif2(4, true, l("Ch 4 — Casting")),
            rif2(5, true, l("Ch 5 — Reeling")),
            l("Close");
        mes "";

        switch(@menu)
        {
            case 1:
                narrator S_LAST_NEXT,
                    l("You'll want your fishing rod to be flexible but solid."),
                    l("Comfortable grip is important especially for newcomers, since they'll be holding it for quite a while.");
                break;
            case 2:
                narrator S_LAST_NEXT,
                    l("You can use many diverse items to lure fishes."),
                    l("Most common and widely popular in the fish realm are @@ and pieces of @@.",
                        getitemlink(SmallTentacles), getitemlink(Bread)),
                    l("Some types of fish also enjoy @@ quite a bit.",
                        getitemlink(Aquada)),
                    l("Some people, however, prefer to fish with more unorthodox baits, such as @@ or @@.",
                        getitemlink(RoastedMaggot), getitemlink(CaveSnakeTongue)),
                    l("Other food can be used as a bait, too.");
                break;
            case 3:
                narrator S_LAST_NEXT,
                    l("Find yourself a nice dry spot on a coast where you can easily reach into deep water."),
                    l("Fishing next to shallow water is not going to work well, because fishes seldom go there."),
                    l("You can easily identify fishing spots, small bubbles and fishes are visible from the surface."),
                    l("Don't forget to come as close as possible to these spots!");
                break;
            case 4:
                narrator S_LAST_NEXT,
                    l("Toss the hook into deep water by clicking on where you want to cast it."),
                    l("Make sure to put on a bait after you click, though!"),
                    l("After that, stay still and be patient, but also alert!");
                break;
            case 5:
                narrator S_LAST_NEXT,
                    l("To successfully catch a fish, you need to pull up your hook by clicking it, right after it submerges."),
                    l("Should you be too quick or wait too long, you will most likely fail.");
                break;
        }
    } while (@menu != 6);
    return;
}

-	script	#Book-Fishing1	NPC_HIDDEN,{

    function read_book {
        setnpcdialogtitle l(.book_name$);
        FishingBook();
        closeclientdialog;
        end;
    }

OnShelfUse:
    if (openbookshelf())
        read_book;
    bye;

OnUse:
    if (openbook())
        read_book;
    bye;

OnInit:
    .book_name$ = getitemname(FishingGuideVolI);
    .sex = G_OTHER;
    .distance = 1;
    end;
}



function	script	PetcaringBook	{
    select
        l("General Information"),
        l("Pet Summary");
    mes "";
    if (@menu == 1) {
        narrator 1,
    l("So you have now a pet, who is loyal to you. It'll follow you everywhere, but there are two things you must know."),
    l("Do not let intimacy and hunger get to zero. If any of those get to zero, it'll leave you forever."),
    l("Pets must keep a strict diet. Pious eats Piberries, Bhoppers eat Aquadas, and Maggots eats Bug Legs."),
    l("White Cats drink Milk, Forest Mushroom eats Moss, Black Cats eats marshmallow. Keep in mind whatever they eat."),
    l("However, you should only give food when it's hungry, otherwise it'll believe you're a bad owner and intimacy will decrease."),
    l("Dying will also decrease the pet intimacy, and there are bonuses when your intimacy is high!"),
    l("To perform most actions, like feeding and renaming, just right-click it. You can even put it back on the egg if its following gets too annoying. When in the egg, they will not feel hunger."),
    l("Give your pet a nice name, and keep it healthy, and you'll be a successful pet owner!"),
    l("Some pets will also collect loot for you, right click on it so it drop whatever it is holding for you."),
    l("...And if you're still trying to check your pet stats, just hover it with your mouse. Thanks."),
    l("-- Animals Protection Agency of Hurnscald");
    } else {
        mes l("%s", getitemlink(PiouEgg));
        mesc b(l("Acquisition: ")) + l("Login Bonus");
        mesc b(l("Food: ")) + getitemlink(Piberries);
        mesc b(l("Bonus: ")) + l("Loot 10, Luck +2, Luck Dance");

        dnext;
        mes "";
        mes l("%s", getitemlink(Ratte));
        mesc b(l("Acquisition: ")) + l("Unobtanium");
        mesc b(l("Food: ")) + getitemlink(Cheese);
        mesc b(l("Bonus: ")) + l("Loot 3, Dex +5");

        dnext;
        mes "";
        mes l("%s", getitemlink(DuckEgg));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(CherryCake);
        mesc b(l("Bonus: ")) + l("Loot 3, Steal +15%, Passive HP Regen (1)");

        dnext;
        mes "";
        mes l("%s", getitemlink(FluffyEgg));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(LettuceLeaf);
        mesc b(l("Bonus: ")) + l("Loot 3, Max MP +250");

        dnext;
        mes "";
        mes l("%s", getitemlink(MaggotCocoon));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(BugLeg);
        mesc b(l("Bonus: ")) + l("Loot 3, Max HP +250");

        dnext;
        mes "";
        mes l("%s", getitemlink(BatEgg));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(RoastedMaggot);
        mesc b(l("Bonus: ")) + l("Loot 3, ASPD +5%");

        dnext;
        mes "";
        mes l("%s", getitemlink(ForestShroomEgg));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(Moss);
        mesc b(l("Bonus: ")) + l("Loot 3, STR +4, AGI +1");

        dnext;
        mes "";
        mes l("%s", getitemlink(MoggunEgg));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(MoubooSteak);
        mesc b(l("Bonus: ")) + l("Loot 3, DEF +5");

        dnext;
        mes "";
        mes l("%s", getitemlink(TamedSnakeEgg));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(MoubooSteak);
        mesc b(l("Bonus: ")) + l("Loot 3, Evasion +7");

        dnext;
        mes "";
        mes l("%s", getitemlink(DragonHorn));
        mesc b(l("Acquisition: ")) + l("Grand Hunter Quest");
        mesc b(l("Food: ")) + getitemlink(Dragonfruit);
        mesc b(l("Bonus: ")) + l("Loot 4, Str +1, Gold Drop (4%)");

        dnext;
        mes "";
        mes l("%s", getitemlink(BhopEgg));
        mesc b(l("Acquisition: ")) + l("Easter Top 1 Prize");
        mesc b(l("Food: ")) + getitemlink(Aquada);
        mesc b(l("Bonus: ")) + l("Loot 3, Luck +5, Luck Dance, Passive MP Regen (1)");

        dnext;
        mes "";
        mes l("%s", getitemlink(DoggyDog));
        mesc b(l("Acquisition: ")) + l("Valentine Top 1 Prize");
        mesc b(l("Food: ")) + getitemlink(AnimalBones);
        mesc b(l("Bonus: ")) + l("Loot 3, STR +5, Vitality Dance, Passive HP Regen (1)");

        dnext;
        mes "";
        mes l("%s", getitemlink(CattyCat));
        mesc b(l("Acquisition: ")) + l("Christmas Top 1 Prize");
        mesc b(l("Food: ")) + getitemlink(Milk);
        mesc b(l("Bonus: ")) + l("Loot 3, Agi +5, Agility Dance, Passive MP Regen (1)");

        dnext;
        mes "";
        mes l("%s", getitemlink(BlackyCat));
        mesc b(l("Acquisition: ")) + l("Magic Olympics Top 1 Prize");
        mesc b(l("Food: ")) + getitemlink(Mashmallow);
        mesc b(l("Bonus: ")) + l("Loot 3, Int +5, Agi +1");

        dnext;
        mes "";
        mes l("%s", getitemlink(PinkieCrystal));
        mesc b(l("Acquisition: ")) + l("Ultra Rare Drop");
        mesc b(l("Food: ")) + getitemlink(CherryCake);
        mesc b(l("Bonus: ")) + l("Loot 3, Agi +5");

        next;
        mes l("-- Animals Protection Agency of Hurnscald");
    }
    return;
}

-	script	#Book-Petcaring	NPC_HIDDEN,{
    function read_book {
        PetcaringBook();
        close;
    }

OnShelfUse:
    @book_name$ = .bookname$;
    if (openbookshelf ())
        read_book;
    close;
OnUse:
    @book_name$ = .bookname$;
    if (openbook ())
        read_book;
    close;
OnInit:
    .bookname$ = "Fluffy Animals who Love Their Owners";
    .sex = G_OTHER;
    .distance = 1;
    end;
}























-	script	#Book-JGrimorium	NPC_HIDDEN,{
    end;

function myself {
    // TODO: Save the variables in temp vars
    // If getarg(1) is not your charid, detach
    // Then attach the getarg(1) instead
    // Display then using the temp vars
    // For scrying, myself(false, .@me)
    // While still using attachrid
    .@all = getarg(0, true);
    mes ".:: " + strcharinfo(0) + " ::.";
    if (is_staff())
        mesc l("%s is currently a staff member.", strcharinfo(0)), 3;
    else if (is_sponsor())
        mesc l("%s is currently sponsoring the High Alliance.", strcharinfo(0)), 3;
    mes "";
    if (getcharid(1))
        mesc l("Party Name: @@", strcharinfo(1));
    if (getcharid(2))
        mesc l("Guild Name: @@", strcharinfo(2));
    if (getcharid(5))
        mesc l("Clan Name: @@", strcharinfo(4));
    if (getpartnerid())
        mesc l("Civil status: Married");
    else
        mesc l("Civil status: Single");
    if (islegendary())
        mesc l("You are a legendary hero.");
    if (getpetinfo(0))
        mesc l("Proud owner of %s the %s.", getpetinfo(2), getpetinfo(1));
    if (gethominfo(0))
        mesc l("Proud owner of %s the Homunculus.", gethominfo(2));
    mesc l("Born %s ago", FuzzyTime(#REG_DATE));
    dnext;


    mes ".:: " + l("Magic Status") + " ::.";
    mesc l("Current magic rank: %d", MAGIC_LVL);
    if (.@all)
     mesc l("You have @@/@@ magic skill points available.",
            b(sk_points()), sk_maxpoints());
    mesc l("Your current scholar rank: %s (%s Research Points)",
            academicrank(), fnum(MAGIC_RP));
    ShowAbizit(true);
    dnext;


    mes ".:: " + l("Rogue Status") + " ::.";
    mesc l("Your current rank: %s", thiefrank());
    if (.@all && THIEF_EXP > (THIEF_RANK*2)**5)
        mesc l("An upgrade is available."), 2;
    dnext;


    mes ".:: " + l("Crafting Status") + " ::.";
    mesc l("Skill Level: %d", getskilllv(TMW2_CRAFT));
    mesc l("Crafting Score: %d.%02d", CRAFTING_SCORE_COMPLETE/40, CRAFTING_SCORE_COMPLETE%40*100);
    dnext;


    mes ".:: " + l("Miscellaneous Status") + " ::.";
    if (.@all)
     mesc l("Monster Points: %s", fnum(Mobpt));
    mesc l("Times died: %s", fnum(PC_DIE_COUNTER));
    mesc l("Times reborn: %d", REBIRTH);
    if (.@all)
     mesc l("Total Gold: %s", fnum((Zeny+BankVault)));
    mesc l("Honor Points: %s", fnum(HONOR));
    mesc l("Monsters killed: %s", fnum(MONSTERS_KILLED));
    if (getcharid(2) > 0) {
        .@gid=getcharid(2);
        .@pos=getguildrole(.@gid, getcharid(3));
        mesc l("Current Guild: %s", getguildname(.@gid));
        mesc l("Guild Master: @@", getguildmaster(.@gid));
        if (.@all)
         mesc l("You are the guild's \"%s\", and you contribute with %02d%% EXP.",
                getguildpostitle(.@gid, .@pos),
                getguildpostax(.@gid, .@pos));
    }
    mesc l("Total time AFK'ed in Tulimshar: %d hours and %d minutes",
            AFKING/1200, AFKING%1200/60*3);
    dnext;


    mes ".:: " + l("Personal Records") + " ::.";
    mesc l("Candor Battle Score: %s", fnum(CRAZYPOINTS));
    mesc l("Candor Bloodbath Score: %s", FuzzyTime(gettimetick(2)+SCANDORPTS));
    mesc l("Times won Capture the Flag: %s", fnum(CAPTURE_FLAG));
    mesc l("Times won Call of Dusty: %s", fnum(getq2(LoFQuest_COD)));
    mesc l("Mercenary Quests completed: %s", fnum(MERCENARY_DAILYQUEST));
    mesc l("Doppelganger Waves Won: %s", fnum(UDTRANK));
    mesc l("Easter Eggs found: %d", getq3(General_EasterEggs));
    dnext;


    mes ".:: " + l("Personal Feats") + " ::.";
    if (YETIKING_WINNER)
        mesc l("Cleared the Yeti King Challenge %s ago", FuzzyTime(YETIKING_WINNER));
    if (HEROESHOLD_WINNER)
        mesc l("Cleared Heroes Hold %s ago", FuzzyTime(YETIKING_WINNER));
    if (REBIRTH_WINNER)
        mesc l("First reborn %s ago", FuzzyTime(REBIRTH_WINNER));
    if (QUIRINO_WINNER)
        mesc l("Won Quirino Voraz Arena %s ago", FuzzyTime(QUIRINO_WINNER));
    if (GHQ_WINNER)
        mesc l("First Grand Hunter challenge cleared %s ago", FuzzyTime(GHQ_WINNER));
    if (FORT_1ST_VISIT)
        mesc l("First visit to Fortress Is. %s ago", FuzzyTime(FORT_1ST_VISIT));

    if (reputation("Candor") >= 100)
        mesc l("%s Hero", l("Candor"));
    if (reputation("Tulim") >= 100)
        mesc l("%s Hero", l("Tulimshar"));
    if (reputation("Halin") >= 100)
        mesc l("%s Hero", l("Halinarzo"));
    if (reputation("Hurns") >= 100)
        mesc l("%s Hero", l("Hurnscald"));
    if (reputation("LoF") >= 100)
        mesc l("%s Hero", l("Land Of Fire"));
    if (reputation("Nival") >= 100)
        mesc l("%s Hero", l("Nivalis"));
    if (reputation("Frostia") >= 100)
        mesc l("%s Hero", l("Frostia"));
    if (reputation("Fortress") >= 100)
        mesc l("%s Hero", l("Fortress Town"));
    // TODO: Total players invited to ML
    // TODO: Houses owned
    // TODO: Times elected
    // TODO: Admin of how many towns?
    // TODO: First election won date
    // TODO: Most used skill
    // TODO: Remember the position attained on previous events
    //mes ".:: " + l("Achievements") + " ::.";
    return;
}

OnScry:
    if (!countitem(JesusalvaGrimorium) && !is_staff())
        end;
    .@w$ = implode(.@atcmd_parameters$, " ");
    if (.@w$ == "")
        .@w$ = strcharinfo(0);
    .@me = getcharid(3);
    .@id = getcharid(3, .@w$);
    if (!.@id) {
        mesc l("The requested char is not online or does not exist."), 1;
        close;
    }
    /* attachrid() + mes() is a no-go for this */
    if (!is_staff()) {
        mesc l("Scrying others has been temporarily restricted to staff only due to bugs."), 1;
        close;
    }
    /* attachrid() + mes() is a no-go for this */
    setnpcdialogtitle sprintf("@scry %s", .@w$);
    attachrid(.@id);
    if (!GSET_NOSCRY)
        myself(false);
    else
        mesc l("%s has protected themselves from prying eyes. Your scry attempt failed.", strcharinfo(0)), 1;
    detachrid();
    attachrid(.@me);
    close;

function read_book {

    setnpcdialogtitle l(.book_name$);

    narrator S_FIRST_BLANK_LINE | S_LAST_NEXT,
        l("I, second sage of Fate, write this book. The knowledge on it shall guide you to the Secret Of Mana.");

    @menu = 0; // reset for the rif

    do
    {
        narrator S_NO_NPC_NAME,
            l("Please select a chapter:");

        mes "";

        select
            rif2(1, MAGIC_LVL, l("Ch 1 — Prologue")),
            rif2(2, MAGIC_EXP, l("Ch 2 — About Magic Skills")),
            rif2(3, MAGIC_LVL, l("Ch 3 — Status Ailments")),
            rif2(4, true, l("Ch 4 — Information About You")),
            rif2(5, true, l("Open Fishing Book")),
            rif2(6, true, l("Open Petcaring Book")),
            rif2(7, getq(LoFQuest_Pets), l("List of Unlocked Pets and Food")),
            rif2(8, CRAFTQUEST, l("Open Recipe Book")),
            rif2(9, true, l("Read Rules")),
            l("Close");
        mes "";

        switch(@menu)
        {
            case 1:
                mesc l("You have @@/@@ magic skill points available.", b(sk_points()), sk_maxpoints());
                mesc l("Your current scholar rank: %s (%d Research Points)",
        academicrank(), fnum(MAGIC_RP));
                next;
                narrator S_LAST_NEXT,
                    l("Mana is something which existed since the being, but nobody knows much about."),
                    l("This book will write itself, and reveal you the Secret Of Mana."),
                    l("Give it time, increase your magic power, and you'll find out the truth."),
                    l("You are a @@º degree mage. This book allows you many new possibilities.", MAGIC_LVL);
                break;
            case 2:
                narrator S_LAST_NEXT,
                    l("Re-casting the same magic spell or skill won't give you magic experience."),
                    l("Summoning and Homunculus (H) skills can be raised from skill window directly.");
                // TODO: We could show you all the skills via loop? Meh

                ShowAbizit(true);
                next;
                break;
            case 3:
                mes l("There are several minor status conditions, which may buff or debuff you.");
                mes l("An example is dec agi, which lowers your agility.");
                mes l("The most aggressive and main ones are:");
                next;
                mesf("##B%s##b - %s", l("Blind"), l("Acc. and Evade -25%%"));
                mesf("##B%s##b - %s", l("Burning"), l("Damage over time, MDF -25%%"));
                mesf("##B%s##b - %s", l("Curse"), l("ATK = 25%%, LUK = 0, Slow down"));
                mesf("##B%s##b - %s", l("Freeze"), l("Can't move, DEF-, no evade, Water element"));
                mesf("##B%s##b - %s", l("Poison"), l("DEF-, Damage over time, no MP regen"));
                mesf("##B%s##b - %s", l("Silence"), l("Can't use skills"));
                mesf("##B%s##b - %s", l("Sleep"), l("Can't move nor attack, crit def -100%"));
                mesf("##B%s##b - %s", l("Stone"), l("Can't move, DEF-, Damage over time, Earth element"));
                mesf("##B%s##b - %s", l("Stun"), l("Can't move nor evade."));
                next;
                mes l("There are also less common ailments:");
                next;
                mesf("##B%s##b - %s", l("Bleed"), l("Lethal damage over time, no regen."));
                mesf("##B%s##b - %s", l("Confuse"), l("Random movement and extra desync"));
                mesf("##B%s##b - %s", l("Cold"), l("Total slow down, DEF-, may freeze"));
                mesf("##B%s##b - %s", l("Deadly Poison"), l("Lower MAXHP, Damage over time"));
                mesf("##B%s##b - %s", l("Deep Sleep"), l("Can't chat, recover HP over time"));
                mesf("##B%s##b - %s", l("Fear"), l("Can't move, Acc. and Evade -20%%"));
                next;
                break;
            case 4:
                myself();
                break;
            case 5:
                FishingBook();
                break;
            case 6:
                PetcaringBook();
                break;
            case 7:
                mesf(".:: %s ::.", l("Grand Hunter Quest"));
                if (PDQ_CheckGHQ(Maggot) >= 10000)
                    mesf("%s - %s",
                        getmonsterlink(Maggot), getitemlink(BugLeg));
                if (PDQ_CheckGHQ(ForestMushroom) >= 10000)
                    mesf("%s - %s",
                        getmonsterlink(ForestMushroom), getitemlink(Moss));
                if (PDQ_CheckGHQ(Fluffy) >= 10000)
                    mesf("%s - %s",
                        getmonsterlink(Fluffy), getitemlink(LettuceLeaf));
                if (PDQ_CheckGHQ(Duck) >= 10000)
                    mesf("%s - %s",
                        getmonsterlink(Duck), getitemlink(CherryCake));
                if (PDQ_CheckGHQ(Bat) >= 10000)
                    mesf("%s - %s",
                        getmonsterlink(Bat), getitemlink(RoastedMaggot));
                if (PDQ_CheckGHQ(Moggun) >= 10000)
                    mesf("%s - %s",
                        getmonsterlink(Moggun), getitemlink(MoubooSteak));
                if (#LOGIN_ALLTIME >= 6)
                    mesf("%s - %s",
                        getmonsterlink(Piou), getitemlink(Piberries));
                next;
                mesf(".:: %s ::.", l("Special Event Pets"));
                if (countitem(Ratte))
                    mesf("%s - %s",
                        getmonsterlink(Ratto), getitemlink(Cheese));
                if (countitem(BhopEgg))
                    mesf("%s - %s",
                        getmonsterlink(BhopFluffy), getitemlink(Aquada));
                if (countitem(DoggyDog))
                    mesf("%s - %s",
                        getmonsterlink(Toto), getitemlink(AnimalBones));
                if (countitem(CattyCat))
                    mesf("%s - %s",
                        getmonsterlink(WhiteCat), getitemlink(Milk));
                if (countitem(BlackyCat))
                    mesf("%s - %s",
                        getmonsterlink(BlackCat), getitemlink(Mashmallow));
                next;
                break;
            case 8:
                closeclientdialog;
                doevent("#RecipeBook::OnUse");
                end;
                break;
            case 9:
                GameRules();
                break;
            default:
                close;
        }
    } while (true);

    end;
}

OnShelfUse:
    if (openbookshelf())
        read_book;
    bye;

OnUse:
    read_book;
    bye;

OnInit:
    .book_name$ = getitemname(JesusalvaGrimorium);
    .sex = G_OTHER;
    .distance = 1;
    bindatcmd "scry", "#Book-JGrimorium::OnScry", 0, 99, 0;
    end;
}