From f4807bf1dd414d8fbc0c6e45e65b34b216368bb7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 4 May 2019 13:04:59 -0300 Subject: Shaabty and [Leather Trousers] (rather simple) (lorewise small relevance) quest. --- npc/018-5-3/shaabty.txt | 135 +++++++++++++++++++++++++++++++++++++++++++++++- npc/018-5/_mobs.txt | 2 +- 2 files changed, 134 insertions(+), 3 deletions(-) (limited to 'npc') diff --git a/npc/018-5-3/shaabty.txt b/npc/018-5-3/shaabty.txt index 42e47ea69..8b9ba3590 100644 --- a/npc/018-5-3/shaabty.txt +++ b/npc/018-5-3/shaabty.txt @@ -3,18 +3,149 @@ // Jesusalva // Description: // Leather Trousers quest (lv 48) +// Variable: +// LilitQuest_Shaabty +// 0 - Not enough level +// 1 - Quest assigned +// 2 - Requested the material +// 3 - Craft is in progress +// 4 - Quest Complete +// Var2: +// Controls how many snakes you killed down there. +// It counts regardless of quest state. +// Var3: +// Timer for state 3 -018-5,29,38,0 script Shaabty the Fairy NPC_FAIRY_A,{ +018-5-3,29,38,0 script Shaabty the Fairy NPC_FAIRY_A,{ + function LTask; + .@q=getq(LilitQuest_Shaabty); + switch (.@q) { + case 0: + goto L_Start; break; + case 1: + goto L_Return; break; + case 2: + goto L_Craft; break; + case 3: + goto L_Craft2; break; + case 4: + goto L_Start; break; + } + Exception(l("Invalid quest state: @@", .@q), RB_DEFAULT|RB_SPEECH|RB_ISFATAL^RB_DISPBOTTOM); + close; + +L_Start: mesn; mesq l("I always wanted to live in this town. I'm glad I managed to move from LoF Village to here."); next; mesn; mesq l("A shame there are snakes below the ground. I really, really hate snakes, like every fairy."); + if (BaseLevel < 45 || .@q >= 3) + close; + next; + mesn; + mesq l("Maybe you could do me a favour, though?"); + setq1 LilitQuest_Shaabty, 1; + LTask(); close; +function LTask { + mesn; + mesq l("I would love to see the skin of two @@.", getmonsterlink(MountainSnake)); + next; + mesn; + mesq l("They live below this town. Can you do this for me?"); + next; + return; +} + +L_Return: + LTask(); + .@q2=getq2(LilitQuest_Shaabty); + // 0.98% DR (skin) - Reference is 0.32% + // 2 snake skins should take ~200 kills + if (countitem(MountainSnakeSkin) >= 2) { + if (.@q2 < 150) { + mesn; + mesq l("I see two snake skins, but you didn't killed them down there. That defeats the whole purpose."); + } else { + goto L_Finish; + } + } else { + mesn; + mesq l("That's not a couple of skins."); + } + close; + +L_Finish: + mesc l("Deliver @@ @@ to @@?", 2, getitemlink(MountainSnakeSkin), .name$), 1; + next; + if (askyesno() == ASK_YES) { + delitem MountainSnakeSkin, 2; + setq1 LilitQuest_Shaabty, 2; + getexp 20000, 200; + mesn; + mesq l("Thanks. Please come back later, there is something I want to do for you."); + } + close; + +L_Craft: + mesn; + mesq l("So, I was thinking in crafting a @@ for you.", getitemlink(LeatherTrousers)); + next; + mesn; + mes l("For that, I'll need @@/@@ @@.", countitem(LeatherPatch), 10, getitemlink(LeatherPatch)); + mes l("And a commission of @@/@@ GP.", format_number(Zeny), format_number(8000)); + if (countitem(LeatherPatch) < 10 || + Zeny < 8000) + close; + next; + mesc l("Pay for her handi-work?"); + if (askyesno() == ASK_YES) { + delitem LeatherPatch, 10; + Zeny-=8000; + setq1 LilitQuest_Shaabty, 3; + //setq3 LilitQuest_Shaabty, gettimeparam(GETTIME_HOUR)+2; + setq3 LilitQuest_Shaabty, gettimetick(2)+7200; + mesn; + mesq l("Thanks! Please come back in two hours, then I'll have the trousers ready."); + } + close; + +// Each time you bother her, she loses the line; +L_Craft2: + .@q3=getq3(LilitQuest_Shaabty); + if (gettimetick(2) < .@q3) { + mesn; + .@mg$=any(l("stop interrupting me while I make your trousers."), l("stop making me lose the line by talking to me.")); + mesq l("Please be patient and "+.@mg$); + mesc l("Remaining time: @@", FuzzyTime(.@q3)); + setq3 LilitQuest_Shaabty, .@q3+rand(1,3); + } else { + inventoryplace LeatherTrousers, 1; + getitem LeatherTrousers, 1; + getexp 0, 1000; + setq3 LilitQuest_Shaabty, 0; + setq1 LilitQuest_Shaabty, 4; + mesn; + mesq l("Here you go. Please enjoy and thanks for making this town better to live. Maybe one day the snakes leave ^.^"); + } + close; + +///////////////////////////////////////////////////////// +OnKillSnake: + .@q1=getq(LilitQuest_Shaabty); + .@q2=getq2(LilitQuest_Shaabty); + setq2 LilitQuest_Shaabty, .@q2+1; + if (.@q1 == 1) { + if (! (.@q2+1) % 10) + dispbottom l("@@ @@ killed.", .@q2+1, getmonsterlink(MountainSnake)); + } + doevent "#mobptsys::OnNPCKillEvent"; + end; + OnInit: .sex = G_OTHER; .distance = 5; - .reward=LeatherTrousers; end; } diff --git a/npc/018-5/_mobs.txt b/npc/018-5/_mobs.txt index a6671a216..953b0a326 100644 --- a/npc/018-5/_mobs.txt +++ b/npc/018-5/_mobs.txt @@ -4,6 +4,6 @@ 018-5,66,84,25,18 monster Grass Snake 1169,8,10000,10000 018-5,82,88,41,15 monster Wind Fairy 1185,8,40000,20000 018-5,99,47,22,14 monster Poison Fairy 1186,6,30000,30000 -018-5,58,146,26,12 monster Mountain Snake 1123,6,120000,0 +018-5,58,146,26,12 monster Mountain Snake 1123,6,120000,0,Shaabty::OnKillSnake 018-5,58,83,18,22 monster Green Dragon 1195,2,120000,0 018-5,100,52,21,18 monster Squirrel 1055,6,30000,30000 -- cgit v1.2.3-60-g2f50