From 246961dbd69b262e96792a88c8f8a02c08df4828 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 26 Dec 2021 12:42:19 -0300 Subject: Clean up a bit the Grimorium information regarding yourself. --- npc/items/books.txt | 385 ++++++++++++++++++++++++++++------------------------ 1 file changed, 209 insertions(+), 176 deletions(-) (limited to 'npc') diff --git a/npc/items/books.txt b/npc/items/books.txt index 6bca65edf..3532d962b 100644 --- a/npc/items/books.txt +++ b/npc/items/books.txt @@ -160,189 +160,222 @@ OnInit: - script #Book-JGrimorium NPC_HIDDEN,{ + end; - function read_book { +function myself { + mes ".:: " + strcharinfo(0) + " ::."; + mesc l("Char Name: @@", strcharinfo(0)); + 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"); + mesc l("Born %s ago", FuzzyTime(#REG_DATE)); + dnext; + + + mes ".:: " + l("Magic Status") + " ::."; + mesc l("Current magic rank: %d", MAGIC_LVL); + 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 (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") + " ::."; + mesc l("Monster Points: %s", fnum(Mobpt)); + mesc l("Times died: %s", fnum(PC_DIE_COUNTER)); + mesc l("Times reborn: %d", REBIRTH); + mesc l("Total Gold: %s", fnum((Zeny+BankVault))); + mesc l("Honor Points: %s", fnum(HONOR)); + 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)); + 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("Mercenary Quests completed: %s", fnum(MERCENARY_DAILYQUEST)); + mesc l("Easter Eggs found: %d", getq3(General_EasterEggs)); + // TODO: Total players invited to ML + // TODO: Most used skill + //mes ".:: " + l("Achievements") + " ::."; + return; +} - setnpcdialogtitle l(.book_name$); +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."); + 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 + @menu = 0; // reset for the rif - do + 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) { - 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: - mes ".:: " + l("Magic Status") + " ::."; - mesc l("Current magic rank: %d", MAGIC_LVL); - 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); - next; - mes ".:: " + l("Rogue Status") + " ::."; - mesc l("Your current rank: %s", thiefrank()); - if (THIEF_EXP > (THIEF_RANK*2)**5) - mesc l("An upgrade is available."), 2; - next; - 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); - next; - mes ".:: " + l("Miscellaneous Status") + " ::."; - mesc l("Monster Points: %s", fnum(Mobpt)); - mesc l("Times died: %s", fnum(PC_DIE_COUNTER)); - mesc l("Times reborn: %d", REBIRTH); - mesc l("Total Gold: %s", fnum((Zeny+BankVault))); - mesc l("Honor Points: %s", fnum(HONOR)); - 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)); - 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); - mes ""; - 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("Mercenary Quests completed: %s", fnum(MERCENARY_DAILYQUEST)); - // TODO: Total players invited to ML - // TODO: Most used skill - 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); + 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 - end; - } + 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()) -- cgit v1.2.3-70-g09d2