summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/017-1/pet_detective.txt6
-rw-r--r--npc/functions/petsales.txt8
2 files changed, 11 insertions, 3 deletions
diff --git a/npc/017-1/pet_detective.txt b/npc/017-1/pet_detective.txt
index ba0b12693..7b3ec5691 100644
--- a/npc/017-1/pet_detective.txt
+++ b/npc/017-1/pet_detective.txt
@@ -62,9 +62,9 @@ L_Menu:
mesc l("So, you are the first and must contact Jesusalva %%g"), 1;
mes "";
select
- rif(GHMEMO[GHQ_GetQuestIDByMonsterID(Maggot)] >= 10000 && !countitem(MaggotCocoon), l("Cute Maggot")),
- rif(GHMEMO[GHQ_GetQuestIDByMonsterID(ForestMushroom)] >= 10000 && !countitem(ForestShroomEgg), l("Forest Mushroom")),
- rif(GHMEMO[GHQ_GetQuestIDByMonsterID(Fluffy)] >= 10000 && !countitem(FluffyEgg), l("Commmon Fluffy")),
+ rif(PDQ_CheckGHQ(Maggot) >= 10000 && !countitem(MaggotCocoon), l("Cute Maggot")),
+ rif(PDQ_CheckGHQ(ForestMushroom) >= 10000 && !countitem(ForestShroomEgg), l("Forest Mushroom")),
+ rif(PDQ_CheckGHQ(Fluffy) >= 10000 && !countitem(FluffyEgg), l("Commmon Fluffy")),
rif(#LOGIN_ALLTIME >= 12 && !countitem(PiouEgg), l("Piou")),
l("Nothing at the moment.");
diff --git a/npc/functions/petsales.txt b/npc/functions/petsales.txt
index 8e3715eae..b98634670 100644
--- a/npc/functions/petsales.txt
+++ b/npc/functions/petsales.txt
@@ -33,3 +33,11 @@ function script PDQ_InnerSwitch {
}
return 0;
}
+
+// Returns GHMEMO[GHQ_GetQuestIDByMonsterID(PetName)]
+// Arguments: PetName (eg. Maggot)
+function script PDQ_CheckGHQ {
+ .@mid=GHQ_GetQuestIDByMonsterID(getarg(0));
+ return GHMEMO[.@mid];
+}
+