summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/012-1/shoppakep.txt26
1 files changed, 17 insertions, 9 deletions
diff --git a/npc/012-1/shoppakep.txt b/npc/012-1/shoppakep.txt
index 6037576e7..b18dadc66 100644
--- a/npc/012-1/shoppakep.txt
+++ b/npc/012-1/shoppakep.txt
@@ -12,8 +12,18 @@
shop .name$;
close;
+ function ShoppaKepItem {
+ .@i=rand(0,100);
+ if (.@i > 70)
+ return Coal;
+ else if (.@i < 30)
+ return IronOre;
+ else
+ return HalfEggshell;
+ }
+
OnInit:
- .ThisRebootRand=rand(0,100);
+ .CurrentItem=ShoppaKepItem();
.ThisRebootAmou=rand(30,70);
.sex = G_FEMALE;
@@ -33,14 +43,12 @@ OnInit:
sellitem Chagashroom, -1, 3;
sellitem PiouFeathers, -1, .ThisRebootAmou;
- if (.ThisRebootRand > 70)
- sellitem Coal, -1, 1;
- else if (.ThisRebootRand < 30)
- sellitem IronOre, -1, 1;
+ sellitem .CurrentItem, -1, rand(1,4);
end;
OnClock1759:
+OnClock0546:
restoreshopitem LeatherShirt, 125000, 1;
restoreshopitem JeansShorts, 125000, 1;
restoreshopitem CottonSkirt, 100000, 1;
@@ -53,9 +61,9 @@ OnClock1759:
restoreshopitem Chagashroom, -1, 3;
restoreshopitem PiouFeathers, -1, .ThisRebootAmou;
- if (.ThisRebootRand > 70)
- restoreshopitem Coal, -1, 1;
- else if (.ThisRebootRand < 30)
- restoreshopitem IronOre, -1, 1;
+
+ stopselling(.CurrentItem);
+ .CurrentItem=ShoppaKepItem();
+ sellitem .CurrentItem, -1, rand(1,4);
end;
}