diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-22 13:04:57 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-22 13:04:57 -0300 |
commit | 72ce1f8218902a796c8bd45ae8b7d69e8a1f46bf (patch) | |
tree | c73205ea867e0bc1220d7b704135ce0bf990cb34 | |
parent | 204bfd20a235f3eb5eb538e0df71da3e339c7661 (diff) | |
download | serverdata-72ce1f8218902a796c8bd45ae8b7d69e8a1f46bf.tar.gz serverdata-72ce1f8218902a796c8bd45ae8b7d69e8a1f46bf.tar.bz2 serverdata-72ce1f8218902a796c8bd45ae8b7d69e8a1f46bf.tar.xz serverdata-72ce1f8218902a796c8bd45ae8b7d69e8a1f46bf.zip |
Contrabandist Stock
-rw-r--r-- | npc/015-2/contrabandist.txt | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/npc/015-2/contrabandist.txt b/npc/015-2/contrabandist.txt index 7d332d620..bc0ffca9f 100644 --- a/npc/015-2/contrabandist.txt +++ b/npc/015-2/contrabandist.txt @@ -10,11 +10,38 @@ if (!.active) end; -//buyingstore(2); -searchstores(2, 1); -//openshop; +openshop; close; + function Contraband_Unload { + if (getarg(0,0) & 1) + stopselling(IronOre); + if (getarg(0,0) & 2) + stopselling(TitaniumOre); + if (getarg(0,0) & 4) + stopselling(LeatherPatch); + if (getarg(0,0) & 8) + stopselling(GoldenPearlRing); + if (getarg(0,0) & 16) + stopselling(ThornArrow); + } + function Contraband_Load { + .DDMPrice=min(30000,50000-($ARKIM_ST/2)+(4500/2)); + if ($ARKIM_ST > 4500) + sellitem DarkDesertMushroom, .DDMPrice, 1; + + if (getarg(0,0) & 1) + sellitem IronOre, 2000, 1; + if (getarg(0,0) & 2) + sellitem TitaniumOre, 4000, 1; + if (getarg(0,0) & 4) + sellitem LeatherPatch, 2500, 1; + if (getarg(0,0) & 8) + sellitem GoldenPearlRing, 1000000, 1; + if (getarg(0,0) & 16) + sellitem ThornArrow, -1, 3; + } + OnInit: .active=0; .sex = G_OTHER; @@ -25,21 +52,26 @@ OnInit: .active=1; } - .Good1= tradertype(NST_MARKET); - + .CurrentValue=rand(1,31); + Contraband_Load(.CurrentValue); end; OnMinute21: OnMinute46: setnpcdisplay .name$, NPC_KOGA; .active=1; + + .CurrentValue=rand(1,31); + Contraband_Load(.CurrentValue); end; OnMinute23: OnMinute48: setnpcdisplay .name$, NPC_NO_SPRITE; .active=0; + + Contraband_Unload(.CurrentValue); end; } |