From 32fd3ee3030574d6771a20f16917032bea43abd2 Mon Sep 17 00:00:00 2001 From: Cahyadi Ramadhan Togihon Date: Sun, 1 Dec 2013 00:33:22 +0700 Subject: [PATCH] Initial release of 'itemshop' and 'pointshop' -- Suggestion: http://rathena.org/board/topic/84169-specialty-shops/ -- Credits: Aleos & Akinari for first diff file that I used to finish this and testing/debugging (well, I don't know the original ones, just tell us or just do pull request if you know the first creator.) -- How to use? ---> -%TAB%itemshop%TAB%%TAB%,,:{,:...} ---> -%TAB%pointshop%TAB%%TAB%,,:{,:...} Signed-off-by: Cahyadi Ramadhan Togihon --- conf/msg_conf/map_msg.conf | 17 +++- doc/script_commands.txt | 25 +++-- src/map/map.h | 2 +- src/map/npc.c | 189 ++++++++++++++++++++++++++++--------- src/map/npc.h | 2 + src/map/pc.c | 6 +- src/map/script.c | 10 +- 7 files changed, 189 insertions(+), 62 deletions(-) diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index 67af5d558d..bd6cdfa559 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -676,10 +676,6 @@ 678: You are no longer the Guild Master. 679: You have become the Guild Master! 680: You have been recovered! -681: Item %d has been removed from your inventory. -682: Item %d has been removed from your cart. -683: Item %d has been removed from your storage. -//684-899 free 681: Rune Knight T 682: Warlock T @@ -707,7 +703,18 @@ 706: Player '%s' is now VIP for %d years, %d months, %d days, %d hours and %d minutes. 707: You are VIP until: %s 708: The player is now VIP until: %s -//709-899 free + +709: Item %d has been removed from your inventory. +710: Item %d has been removed from your cart. +711: Item %d has been removed from your storage. + +//Item shop +712: You do not have enough %s (%d). +713: You do not have enough '%s'. +714: Item Shop List: %s (%d) +715: Point Shop List: '%s' +716: Your '%s' now: %d +//717-899 free //------------------------------------ // More atcommands message diff --git a/doc/script_commands.txt b/doc/script_commands.txt index e67e681c12..30d69c9749 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -268,11 +268,17 @@ normally mean it's pointless since it can't do anything, but there are exceptions, mostly related to running scripts at specified time, which is what these floating NPC objects are for. More on that below. -** Define a shop/cashshop NPC. +** Define a shop/cashshop/itemshop/pointshop NPC. -%TAB%shop%TAB%%TAB%,:{,:...} ,,,%TAB%shop%TAB%%TAB%,:{,:...} +-%TAB%itemshop%TAB%%TAB%,,:{,:...} +,,,%TAB%itemshop%TAB%%TAB%,,:{,:...} + +-%TAB%pointshop%TAB%%TAB%,,:{,:...} +,,,%TAB%pointshop%TAB%%TAB%,,:{,:...} + This will define a shop NPC, which, when triggered (which can only be done by clicking) will cause a shop window to come up. No code whatsoever runs in shop NPCs and you can't change the prices otherwise than by editing the script @@ -291,17 +297,24 @@ This type of shop will not allow you to sell items at it, you may only purchase items here. The layout used to define sale items still count, and "" refers to how many points will be spent purchasing the them. -** Define an warp/shop/cashshop/NPC duplicate. +Since trunk rX you can alternatively use "itemshop" or "pointshop" in place +of "shop" to use the Shop interface, allowing you to buy items with a specific +item or special points from a variable. 'pointshop' only supported variable types +are permanent character variables, temporary character variables, permanent +local account variables, or permanent global account variables. These variables +must be of integer type, not string. + +** Define an warp/shop/cashshop/itemshop/pointshop/NPC duplicate. warp: ,,,%TAB%duplicate(