diff options
author | shennetsind <ind@henn.et> | 2013-12-24 02:03:04 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-12-24 02:03:04 -0200 |
commit | cf19b26d50ac96111e44c33a80afd1f1ea935cec (patch) | |
tree | e8cd836dddf1881b5776c40fc76b5893f0db44e0 /doc/sample | |
parent | 2fbfedddcd5b7b67eb465e162a4de08ffcb1b298 (diff) | |
download | hercules-cf19b26d50ac96111e44c33a80afd1f1ea935cec.tar.gz hercules-cf19b26d50ac96111e44c33a80afd1f1ea935cec.tar.bz2 hercules-cf19b26d50ac96111e44c33a80afd1f1ea935cec.tar.xz hercules-cf19b26d50ac96111e44c33a80afd1f1ea935cec.zip |
Christmas Patch - 2013-12-23 Support
Info:
http://hercules.ws/board/topic/3614-christmas-patch-gifto/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'doc/sample')
-rw-r--r-- | doc/sample/npc_trader_sample.txt | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/sample/npc_trader_sample.txt b/doc/sample/npc_trader_sample.txt new file mode 100644 index 000000000..abc87f6b4 --- /dev/null +++ b/doc/sample/npc_trader_sample.txt @@ -0,0 +1,58 @@ +//===== Hercules Script ======================================= +//= Sample: NPC Trader +//===== By: ================================================== +//= Hercules Dev Team +//===== Current Version: ===================================== +//= 20131223 +//===== Description: ========================================= +//= Demonstrates NPC Trader. +//============================================================ + +/* ordinary zeny trader */ +prontera,152,151,1 trader TestTrader 952,{ + OnInit: + sellitem 2115; + end; +} +/* ordinary cash trader */ +prontera,152,152,1 trader TestTraderCash 952,{ + OnInit: + tradertype(NST_CASH); + sellitem 2115; + end; +} +/* custom npc trader */ +prontera,153,152,1 trader TestCustom2 952,{ + OnInit: + tradertype(NST_CUSTOM); + sellitem 501,2; + end; + +/* allows currency to be item 501 and 502 */ +OnCountFunds: + setcurrency(countitem(501),countitem(502)); + 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 ) + end; + delitem 502,@points; + delitem 501,@price-@points; + purchaseok(); + end; +} +/* demonstrates Market Trader */ +prontera,150,160,6 trader HaiMarket 952,{ +OnInit: + tradertype(NST_MARKET); + sellitem 501,-1,49; + end; + +OnClock0000://resupplies red potions on midnight +OnMyResupply: + if( shopcount(501) < 20 ) + sellitem 501,-1,49; + end; +}
\ No newline at end of file |