From 21fa0901dc8723627c6970aa6eff97bc27e36533 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 26 Dec 2013 01:34:12 +0100 Subject: Modernized syntax and fixed errors in the sample scripts Signed-off-by: Haru --- doc/sample/npc_trader_sample.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'doc/sample/npc_trader_sample.txt') diff --git a/doc/sample/npc_trader_sample.txt b/doc/sample/npc_trader_sample.txt index abc87f6b4..0d50af8c5 100644 --- a/doc/sample/npc_trader_sample.txt +++ b/doc/sample/npc_trader_sample.txt @@ -3,56 +3,56 @@ //===== By: ================================================== //= Hercules Dev Team //===== Current Version: ===================================== -//= 20131223 +//= 20131225 //===== Description: ========================================= //= Demonstrates NPC Trader. //============================================================ /* ordinary zeny trader */ -prontera,152,151,1 trader TestTrader 952,{ +prontera,152,151,1 trader TestTrader 4_F_EDEN_OFFICER,{ OnInit: - sellitem 2115; + sellitem Valkyrja's_Shield; end; } /* ordinary cash trader */ -prontera,152,152,1 trader TestTraderCash 952,{ +prontera,152,152,1 trader TestTraderCash 4_F_EDEN_OFFICER,{ OnInit: tradertype(NST_CASH); - sellitem 2115; + sellitem Valkyrja's_Shield; end; } /* custom npc trader */ -prontera,153,152,1 trader TestCustom2 952,{ +prontera,153,152,1 trader TestCustom2 4_F_EDEN_OFFICER,{ OnInit: tradertype(NST_CUSTOM); - sellitem 501,2; + sellitem Red_Potion,2; end; - + /* allows currency to be item 501 and 502 */ OnCountFunds: - setcurrency(countitem(501),countitem(502)); + setcurrency(countitem(Red_Potion),countitem(Orange_Potion)); end; /* receives @price (total cost) and @points (the secondary input field for cash windows) */ OnPayFunds: dispbottom "Hi: price="+@price+" and points="+@points; - if( countitem(502) < @points || countitem(501) < @price-@points ) + if( countitem(Orange_Potion) < @points || countitem(Red_Potion) < @price-@points ) end; - delitem 502,@points; - delitem 501,@price-@points; + delitem Orange_Potion,@points; + delitem Red_Potion,@price-@points; purchaseok(); end; } /* demonstrates Market Trader */ -prontera,150,160,6 trader HaiMarket 952,{ +prontera,150,160,6 trader HaiMarket 4_F_EDEN_OFFICER,{ OnInit: tradertype(NST_MARKET); - sellitem 501,-1,49; + sellitem Red_Potion,-1,49; end; - + OnClock0000://resupplies red potions on midnight OnMyResupply: - if( shopcount(501) < 20 ) - sellitem 501,-1,49; + if( shopcount(Red_Potion) < 20 ) + sellitem Red_Potion,-1,49; end; -} \ No newline at end of file +} -- cgit v1.2.3-60-g2f50