From e14789728c21fa71438b7cdbd04de00de5e302df Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 22 Jun 2018 12:10:22 -0300 Subject: ShoppaKep stock change --- npc/012-1/shoppakep.txt | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'npc/012-1') 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; } -- cgit v1.2.3-70-g09d2