summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-01-30 07:20:34 +0300
committerAndrei Karas <akaras@inbox.ru>2020-02-09 21:30:38 +0300
commit154907849eebff8657149b6bca08f601aee1a3fb (patch)
treefafe781c4e10001fd75088e98794a28a19f493df /npc
parentcce37f009f7012ff311c8d0983cbdf8389a80f34 (diff)
downloadhercules-154907849eebff8657149b6bca08f601aee1a3fb.tar.gz
hercules-154907849eebff8657149b6bca08f601aee1a3fb.tar.bz2
hercules-154907849eebff8657149b6bca08f601aee1a3fb.tar.xz
hercules-154907849eebff8657149b6bca08f601aee1a3fb.zip
Add expanded barter shop sample script
For enable, uncomment line: //"npc/custom/expandedbartershop.txt",
Diffstat (limited to 'npc')
-rw-r--r--npc/custom/expandedbartershop.txt63
-rw-r--r--npc/scripts_custom.conf1
2 files changed, 64 insertions, 0 deletions
diff --git a/npc/custom/expandedbartershop.txt b/npc/custom/expandedbartershop.txt
new file mode 100644
index 000000000..5ba988ad9
--- /dev/null
+++ b/npc/custom/expandedbartershop.txt
@@ -0,0 +1,63 @@
+//===== Hercules Script ======================================
+//= Expanded barter shop demo
+//===== By: ==================================================
+//= 4144
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= Expanded barter shop demo in prontera.
+//============================================================
+
+prontera,160,284,4 trader Expanded Barter Shop#prt 4_M_KID1,{
+ end;
+OnInit:
+ tradertype(NST_EXPANDED_BARTER);
+
+ // Selling Orange_Potion with items price and 4 items price
+ startsellitem(Orange_Potion, 2, 100000);
+ sellitemcurrency(Banana, 2);
+ sellitemcurrency(Apple, 1);
+ sellitemcurrency(Carrot, 2);
+ sellitemcurrency(Sweet_Potato, 1);
+ endsellitem();
+
+ // sell item with price only in zeny
+ sellitem(White_Herb, 1, 100);
+ // sell item with zeny and item price
+ sellitem(Blue_Herb, 22, 200, Orange_Potion, 2, 3);
+
+ // sell item with price only in zeny (infinite amount)
+ sellitem(Green_Herb, 3, -1);
+
+ // sell item with zeny and two items price (1)
+ sellitem(Orange_Potion, 20, 100000, Banana, 2, -1, Berserk_Potion, 10, -1);
+
+ // sell item with zeny and two items price (same as before but with different zeny price)
+ sellitem(Orange_Potion, 1, 100000, Banana, 2, -1, Berserk_Potion, 10, -1);
+
+ // sell item with item price
+ sellitem(Blade, 0, 1000, Sword, 2, -1);
+
+ // sell item with zeny and two items price
+ sellitem(Scimiter, 2000, -1, Sword, 1, 2, Sword, 1, 5);
+
+ // sell item with zeny and two items price (selling another Orange_Potion)
+ sellitem(Orange_Potion, 1, 100000, Green_Herb, 2, -1);
+
+ // modify selling Orange_Potion with items price (same as previous)
+ // modification reset amount stored in db
+ startsellitem(Orange_Potion, 1, 100);
+ sellitemcurrency(Green_Herb, 2);
+ endsellitem();
+
+ // sell item with zeny and item price (selling another White_Herb)
+ sellitem(White_Herb, 10, 100, Banana, 1, -1);
+
+ // stop selling blades
+// stopselling(Blade, 1);
+
+ // sell item with zeny and two items price (modify amount for entry (1))
+// sellitem(Orange_Potion, 1, 200000, Banana, 2, -1, Berserk_Potion, 10, -1);
+
+ end;
+}
diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf
index 4e346238f..bf970b8ca 100644
--- a/npc/scripts_custom.conf
+++ b/npc/scripts_custom.conf
@@ -51,6 +51,7 @@
//"npc/custom/item_signer.txt",
//"npc/custom/woe_controller.txt",
//"npc/custom/bartershop.txt",
+//"npc/custom/expandedbartershop.txt",
//================= Other Scripts =========================================
// -- MVP Arena