From 311efdbdfb76061e9d2166efab7613243f10ab77 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 8 Jan 2019 22:07:39 -0200 Subject: Dustman Exchange Booth. --- npc/018-2-1/dustman.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'npc/018-2-1') diff --git a/npc/018-2-1/dustman.txt b/npc/018-2-1/dustman.txt index 455aedd9c..3dac2c29c 100644 --- a/npc/018-2-1/dustman.txt +++ b/npc/018-2-1/dustman.txt @@ -132,6 +132,12 @@ L_SkipIntro: if (.state == 0) { mesn; mesq l("The event starts hourly, when the minute clock hits zero. I'll tell everyone on this room when it starts and ends."); + mesc l("Do you want to exchange some of your @@ @@ for items?", countitem(BottledDust), getitemid(BottledDust)); + mes ""; + if (askyesno() == ASK_YES) { + openshop; + closedialog; + } close; } @@ -187,6 +193,13 @@ OnInit: .sex=G_MALE; .distance=5; .state=0; // 0- Closed, 1- Open TODO begin at right state + + tradertype(NST_CUSTOM); + + // CoD Exchange Booth Selection + sellitem Dustynator,3000; + sellitem StrangeCoin,10; + sellitem HeroCoin,1; end; OnMinute00: @@ -206,5 +219,17 @@ OnMinute30: donpcevent("#COD_BossManager::OnCleanUp"); end; +// CoD Exchange Booth Prices +OnCountFunds: + setcurrency(countitem(BottledDust)); + end; + +OnPayFunds: + if( countitem(BottledDust) < @price ) + end; + delitem BottledDust,@price; + purchaseok(); + end; + } -- cgit v1.2.3-60-g2f50