summaryrefslogtreecommitdiff
path: root/npc/functions/petsales.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-01-17 18:07:27 -0300
committerJesusaves <cpntb1@ymail.com>2020-01-17 18:07:27 -0300
commit8354b22e70f5bab38942dfd43725476c82bf9acf (patch)
treef8693e5ca30920d497ea86471fd5b14de5f90736 /npc/functions/petsales.txt
parent477fb1f582e517502cbd0fa30d5591be0f684765 (diff)
downloadserverdata-8354b22e70f5bab38942dfd43725476c82bf9acf.tar.gz
serverdata-8354b22e70f5bab38942dfd43725476c82bf9acf.tar.bz2
serverdata-8354b22e70f5bab38942dfd43725476c82bf9acf.tar.xz
serverdata-8354b22e70f5bab38942dfd43725476c82bf9acf.zip
Improve readability on pet sales scripts
Diffstat (limited to 'npc/functions/petsales.txt')
-rw-r--r--npc/functions/petsales.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/npc/functions/petsales.txt b/npc/functions/petsales.txt
index c23712be4..8e3715eae 100644
--- a/npc/functions/petsales.txt
+++ b/npc/functions/petsales.txt
@@ -11,7 +11,9 @@ function script PDQ_InnerSwitch {
.@iid=getarg(1);
.@val=getarg(2, 30);
- .@price=.@val*(PETMEMO[GHQ_GetQuestIDByMonsterID(.@mid)]+1)+PETMEMO[GHQ_GetQuestIDByMonsterID(.@mid)];
+ .@qid=GHQ_GetQuestIDByMonsterID(.@mid);
+ .@price=.@val*(PETMEMO[.@qid]+1)+PETMEMO[.@qid];
+
mesn;
mesq l("That'll cost you @@/@@ @@.", countitem(.@iid), .@price, getitemlink(.@iid));
next;
@@ -20,7 +22,7 @@ function script PDQ_InnerSwitch {
delitem .@iid, .@price;
makepet .@mid;
getexp .@price*BaseLevel, 0;
- PETMEMO[GHQ_GetQuestIDByMonsterID(.@mid)]+=1;
+ PETMEMO[.@qid]+=1;
mesn;
mesq l("There you go!");
return 1;