summaryrefslogtreecommitdiff
path: root/npc/sample/npc_dynamic_shop.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/sample/npc_dynamic_shop.txt')
-rw-r--r--npc/sample/npc_dynamic_shop.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/npc/sample/npc_dynamic_shop.txt b/npc/sample/npc_dynamic_shop.txt
index ddc39dceb..1a1f174c9 100644
--- a/npc/sample/npc_dynamic_shop.txt
+++ b/npc/sample/npc_dynamic_shop.txt
@@ -2,13 +2,14 @@
prontera,181,200,4 script Dynamic Shop 123,{
callshop "dyn_shop1",0;
+npcshopattach "dyn_shop1";
end;
OnSellItem:
for(set @i, 0; @i < getarraysize(@sold_nameid); set @i, @i + 1){
- if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] || @sold_quantity[@i] <= 0){
+ if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] && @sold_quantity[@i] <= 0){
mes "omgh4x!";
- end;
+ close;
}
if(@sold_nameid[@i] == 501){
set $@rpotsleft, $@rpotsleft + @sold_quantity[@i];