summaryrefslogtreecommitdiff
path: root/npc/custom/quests
diff options
context:
space:
mode:
Diffstat (limited to 'npc/custom/quests')
-rw-r--r--npc/custom/quests/quest_shop.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index a6ae634a7..539c29f23 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -165,13 +165,13 @@ function Add {
debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
return;
}
- for(set .@i,2; .@i<getargcount(); set .@i,.@i+1)
- set .@j[.@i-2],getarg(.@i);
- for(set .@i,3; .@i<getarraysize(.@j); set .@i,.@i+2) {
- if (getitemname(.@j[.@i]) == "null") {
- debugmes "Quest requirement #"+.@j[.@i]+" invalid (skipped).";
+ setarray .@j[0],getarg(2),getarg(3),getarg(4);
+ for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
+ if (getitemname(getarg(.@i)) == "null") {
+ debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
return;
- }
+ } else
+ setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
}
copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);