From 5cc1535c48a2f255e5449fd4b7cce62a37d46761 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 14 Jan 2019 11:06:11 -0200 Subject: Redesign mob hunter quest entirely. It's now fully dependent on Pet Detective. --- npc/001-8/hub.txt | 1 + npc/003-1/aidan.txt | 5 -- npc/009-1/guards.txt | 2 +- npc/012-1/luffyx.txt | 2 +- npc/017-1/pet_detective.txt | 15 +++--- npc/019-1-1/miler.txt | 2 +- npc/020-1/serge.txt | 2 +- npc/functions/mobhunter.txt | 122 ++++++++++++++------------------------------ 8 files changed, 53 insertions(+), 98 deletions(-) (limited to 'npc') diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt index 7e217c93a..061ef5061 100644 --- a/npc/001-8/hub.txt +++ b/npc/001-8/hub.txt @@ -418,6 +418,7 @@ OnPCLogoutEvent: // This allows code to override death penalty, just once: // @deathpenalty_override // Valid values: 1- No penalty. 2- Halved penalty. + // You must also set: @deathpenalty_realvalue and @deathpenalty_realvaljob if (@deathpenalty_override && @qhub_died) { if (is_staff()) debugmes("Old values: %d %d Current Values: %d %d", @deathpenalty_realvalue, @deathpenalty_realvaljob, readparam(BaseExp), readparam(JobExp)); diff --git a/npc/003-1/aidan.txt b/npc/003-1/aidan.txt index 8d7d4f481..398e0723e 100644 --- a/npc/003-1/aidan.txt +++ b/npc/003-1/aidan.txt @@ -76,7 +76,6 @@ if (getq(General_Hunter) == 0 && !GHQUEST) goto L_Register; if (getq(General_Hunter) == 0) goto L_Assign; mes ""; - if (getq2(General_Hunter) >= 10000) goto L_Finish; goto L_Assign; close; // Will never be reach. @@ -112,10 +111,6 @@ L_Assign: end; -L_Finish: - GHQ_GetRewardsOnCompletion(); - close; - OnInit: .@npcId = getnpcid(.name$); setunitdata(.@npcId, UDT_HEADTOP, NPCEyes); diff --git a/npc/009-1/guards.txt b/npc/009-1/guards.txt index 16b367897..bfa5942f5 100644 --- a/npc/009-1/guards.txt +++ b/npc/009-1/guards.txt @@ -16,7 +16,7 @@ mesn; mesq l("Various people already went missing. We are not allowing anyone to pass, not even GMs!"); if (GHQUEST) - GHQ_Assign(Snake, "Halinarzo", "300.000 GP, 80 "+getitemlink(StrangeCoin)); + GHQ_Assign(Snake, "Halinarzo"); end; L_MKControl: diff --git a/npc/012-1/luffyx.txt b/npc/012-1/luffyx.txt index 67c6b69e4..d2cb2395a 100644 --- a/npc/012-1/luffyx.txt +++ b/npc/012-1/luffyx.txt @@ -17,7 +17,7 @@ L_Main: if (GHQUEST) - GHQ_Assign(ForestMushroom, "Hurnscald", "175.000 GP, 60 "+getitemlink(StrangeCoin)); + GHQ_Assign(ForestMushroom, "Hurnscald"); close; L_SummerQuest: diff --git a/npc/017-1/pet_detective.txt b/npc/017-1/pet_detective.txt index 5d65fc0b8..a96e2caad 100644 --- a/npc/017-1/pet_detective.txt +++ b/npc/017-1/pet_detective.txt @@ -16,14 +16,14 @@ mesq l("The Pet Caring Guild will collect them after a while, and capture many others."); next; mesn l("Ace Ventura"); - mesq l("So, what do you say about a deal? I'll affiliate you on the Pet Caring Guild for only 150.000 GP!"); - if (Zeny < 150000) + mesq l("So, what do you say about a deal? I'll affiliate you on the Pet Caring Guild for only 5.000 GP!"); + if (Zeny < 5000) close; next; if (askyesno() == ASK_NO) close; mes ""; - if (Zeny < 150000) { + if (Zeny < 5000) { mesn l("Ace Ventura"); mesq l("Oh, but we are affiliated with Jesusalva, whom hates cheaters. So, meet your dismissal!"); percentheal -100, 0; @@ -34,10 +34,10 @@ */ close; } - Zeny=Zeny-150000; + Zeny=Zeny-5000; getexp 0, 500; setq LoFQuest_Pets, 1; - setarray PETMEMO, 0, 1; + setarray PETMEMO, 0, 0; mesn l("Ace Ventura"); mesq l("Congrats! You are now part from the Pet Caring Guild. You can now buy pets! %%G"); close; @@ -48,6 +48,9 @@ L_Menu: mesn l("Ace Ventura"); mesq l("I currently have some pets with me. For most, you need to finish their Grand Hunter Quest, of course."); mes ""; + mesc l("Note: some pets still weren't implemented!"); + mesc l("NYI: @@, @@, @@, @@", getmonsterlink(Snake), getmonsterlink(Scorpion), getmonsterlink(Moggun), getmonsterlink(Fluffy)); + mes ""; select rif(GHMEMO[GHQ_GetQuestIDByMonsterID(Maggot)] >= 10000 && !countitem(MaggotCocoon), l("Cute Maggot")), rif(GHMEMO[GHQ_GetQuestIDByMonsterID(ForestMushroom)] >= 10000 && !countitem(ForestShroomEgg), l("Forest Mushroom")), @@ -90,7 +93,7 @@ OnInit: OnSun0000: OnWed1200: - .stock+=1; + .stock+=2; end; } diff --git a/npc/019-1-1/miler.txt b/npc/019-1-1/miler.txt index 20c856cb7..a4ecfd6bc 100644 --- a/npc/019-1-1/miler.txt +++ b/npc/019-1-1/miler.txt @@ -175,7 +175,7 @@ L_Success: close; L_GHQ: - GHQ_Assign(Moggun, "Nivalis", "150,000 GP, 60x "+getitemlink(StrangeCoin)); + GHQ_Assign(Moggun, "Nivalis"); close; OnInit: diff --git a/npc/020-1/serge.txt b/npc/020-1/serge.txt index 6b7ccc97c..ffc465c1a 100644 --- a/npc/020-1/serge.txt +++ b/npc/020-1/serge.txt @@ -21,7 +21,7 @@ L_Main: if (GHQUEST) - GHQ_Assign(Fluffy, "Nivalis", "125.000 GP, 60 "+getitemlink(StrangeCoin)); + GHQ_Assign(Fluffy, "Nivalis"); close; L_OutOfSeason: diff --git a/npc/functions/mobhunter.txt b/npc/functions/mobhunter.txt index 65513fa22..21bb55516 100644 --- a/npc/functions/mobhunter.txt +++ b/npc/functions/mobhunter.txt @@ -71,18 +71,26 @@ function script GHQ_GetMonsterIDByQuestID { ///////////////////////////////////////////////////////////////////////////////// // Handle milestone rewards; it does NOT update stuff +// Syntax: GHQ_GetRewardsOnMilestone ( rewardoverrideid ) function script GHQ_GetRewardsOnMilestone { // Check if you can store a Strange Coin (you really should) // Another item too, which I'm sure you won't get it anywhere. inventoryplace StrangeCoin, 1, NPCEyes, 1; + + // Global setup + .@q=getq(General_Hunter); + .@k=getq2(General_Hunter); + .@monsterId=GHQ_GetMonsterIDByQuestID(getq(General_Hunter)); + // Setup .@old=GHMEMO[getq(General_Hunter)]; .@new=getq2(General_Hunter); - .@blv=atoi(strmobinfo(3, GHQ_GetMonsterIDByQuestID(getq(General_Hunter)))); - .@bhp=atoi(strmobinfo(4, GHQ_GetMonsterIDByQuestID(getq(General_Hunter)))); + .@blv=atoi(strmobinfo(3, .@monsterId)); + .@bhp=atoi(strmobinfo(4, .@monsterId)); .@xp=0; .@gp=0; .@jp=0; + //if (getq2(General_Hunter) >= 10000) goto L_Finish; // 1st step: 1000 kills if (VarDiffValue(.@old, .@new, 1000)) { @@ -127,7 +135,22 @@ function script GHQ_GetRewardsOnMilestone { // 5th step: 10000 kills if (VarDiffValue(.@old, .@new, 10000)) { mesc l("Goal: @@/@@ reached!", .@new, 10000), 2; - mesc l("You must talk to Aidan to claim rewards!"); + + // Main reward + getitem StrangeCoin, .@blv*2; + Zeny=Zeny+.@bhp*25; // Maggot: 10.000 gp. That's plenty. + getexp .@bhp*BaseLevel, .@bhp; // The monster hp, once again, drastically affects + + // Grand Prize + switch (.@monsterId) { + case Pinkie: + getitem PinkHelmet, 1; + mesc l("And here's a rare for you, a @@! Good job!", getitemlink(PinkHelmet)); + break; + default: + mesc l("A new pet has been unlocked on the @@!", l("Pet Detective")); + } + } // Get reward (must have Job Exp) @@ -135,17 +158,21 @@ function script GHQ_GetRewardsOnMilestone { getexp .@xp, .@jp; Zeny=Zeny+.@gp; } + + // Update Grand Hunter memory + GHMEMO[.@q]=.@k; + return; } ///////////////////////////////////////////////////////////////////////////////// -// MobID, Place, Prize +// MobID, Place, Prize Override function script GHQ_Assign { // Arguments .@mobId =getarg(0); .@loc$ =getarg(1); - .@prize$=getarg(2); + .@prize$=getarg(2, ""); // Current Quest Status + vars .@id=GHQ_GetQuestIDByMonsterID(.@mobId); @@ -155,10 +182,15 @@ function script GHQ_Assign { //mesq l("Current Quest Progress: @@/10,000 kills", .@p); mesn; mes l("I represent the @@ Hunters. We hunt @@.", .@loc$, getmonsterlink(.@mobId)); - mes l("The great prize is @@. It can be claimed with Aidan, on Tulimshar.", .@prize$); + if (.@prize$ != "") + mes l("The great prize is @@.", .@prize$); + else + mes l("The great prize is to unlock a pet!"); + + GHQ_GetRewardsOnMilestone(); if (.@q == .@id) { .@m=GHQ_GetMonsterIDByQuestID(.@q); - mes l("You are currently hunting @@/10000 @@. When done, remember to claim rewards with Aidan, on Tulimshar!", .@p, getmonsterlink(.@m)); + mes l("You are currently hunting @@/10000 @@.", .@p, getmonsterlink(.@m)); next; closedialog; goodbye; @@ -173,7 +205,6 @@ function script GHQ_Assign { switch (@menu) { case 2: - GHQ_GetRewardsOnMilestone(); GHMEMO[getq(General_Hunter)]=getq2(General_Hunter); setq(General_Hunter, .@id, GHMEMO[.@id]); mesn; @@ -186,81 +217,6 @@ function script GHQ_Assign { } -// Handle rewards (must check beforehand) -function script GHQ_GetRewardsOnCompletion { - // Check if you can store a Strange Coin (you really should) - // Another item too, which I'm sure you won't get it anywhere. - inventoryplace StrangeCoin, 1, NPCEyes, 1; - mes l("Current progress: @@/10000 @@", getq2(General_Hunter), getmonsterlink(GHQ_GetMonsterIDByQuestID(getq(General_Hunter)))); - mes ""; - GHQ_GetRewardsOnMilestone(); - - GHMEMO[getq(General_Hunter)]=getq2(General_Hunter); - .@xp=atoi(strmobinfo(3, GHQ_GetMonsterIDByQuestID(getq(General_Hunter))))*3150; - getexp .@xp, 100; - switch (GHQ_GetMonsterIDByQuestID(getq(General_Hunter))) { - case Maggot: - setq General_Hunter, 0, 0; - Zeny=Zeny+25000; - inventoryplace MaggotCocoon, 1; - makepet(Maggot); // Works the same, even if I'm using mob_db constant - mesn; - mesq l("Good job, here is 25,000 GP and 15,750 EXP."); - mesq l("And your rare, a @@! Enjoy!", getitemlink(MaggotCocoon)); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - case Snake: - setq General_Hunter, 0, 0; - Zeny=Zeny+300000; - getitem StrangeCoin, 80; - mesn; - mesq l("Good job, here is @@ GP and @@ @@!", format_number(300000), format_number(80), getitemlink(StrangeCoin)); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - case Scorpion: - setq General_Hunter, 0, 0; - Zeny=Zeny+100000; - mesn; - mesq l("Good job, here is 100,000 GP!"); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - case ForestMushroom: - setq General_Hunter, 0, 0; - Zeny=Zeny+175000; - getitem StrangeCoin, 60; - mesn; - mesq l("Good job, here is @@ GP and @@ @@!", format_number(175000), format_number(60), getitemlink(StrangeCoin)); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - case Pinkie: - setq General_Hunter, 0, 0; - getitem PinkHelmet, 1; - getexp 15750, 100; - mesn; - mesq l("And your rare, a @@! Enjoy!", getitemlink(PinkHelmet)); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - case Moggun: - setq General_Hunter, 0, 0; - Zeny=Zeny+150000; - getitem StrangeCoin, 60; - mesn; - mesq l("Good job, here is @@ GP and @@ @@!", format_number(150000), format_number(60), getitemlink(StrangeCoin)); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - case Fluffy: - setq General_Hunter, 0, 0; - Zeny=Zeny+125000; - getitem StrangeCoin, 60; - mesn; - mesq l("Good job, here is @@ GP and @@ @@!", format_number(125000), format_number(60), getitemlink(StrangeCoin)); - mesc l("Gained @@ XP", format_number(.@xp)); - close; - } - mesc l("ILLEGAL SCRIPT LOGIC REACHED, PLEASE REPORT. (GHQ_GROC)", 1); - return; -} - function script mobhunter { if (getq(General_Hunter) == 0) return; -- cgit v1.2.3-60-g2f50