Jump to content
  • 0

About Buying in NPC, Please Help


Question

Posted (edited)

Hello I have problem with regards to buying items through NPC

 

ex. When I buy 1  Magnifying Glass which cost 40z, it will remove 80z to the player who is buying...

(same with other items,armors).

 

I don't see any error with my map-server.

 

is this Src related problem? Please I need help

Edited by mightyryan

5 answers to this question

Recommended Posts

Posted

Can we see your code? This is the only real way we can tell what the issue is. I highly doubt this is source related. Most likely, there's something slightly wrong with your code where the NPC is performing the same action twice, in this case- removing zeny. Try my code and see if it works for you. If so, you're welcome to simply change the NPC name/text and item/zeny numbers and use it as your own.

mes "[Tester]";
mes "I'm the Tester. Let's test this zeny script! What would you like to buy?";
next;
menu "1 Test Item Please.",B_1,"Quit.",B_2;
next;

B_1:
if (Zeny > 99) goto A_2;
mes "[Tester]";
mes "Sorry, you don't have enough zeny to purchase the test item!";
close;

A_2:
mes "[Tester]";
mes "Here is your item!";
getitem 1074,1;
set Zeny,Zeny-100;
close;

B_2:
close;

}

}
Posted

Hi sorry for the late reply, I tested this script and it works fine by reducing -100 zeny and getting the item 1074.

 

I also tested vending of a player and it also works fine the problem is when a player buy something to a tool dealer / armor dealer (Shop NPCs) it reduces 2x of his zeny. any ideas how to fix this?

Posted

Hi sorry for the late reply, I tested this script and it works fine by reducing -100 zeny and getting the item 1074.

 

I also tested vending of a player and it also works fine the problem is when a player buy something to a tool dealer / armor dealer (Shop NPCs) it reduces 2x of his zeny. any ideas how to fix this?

 

These are custom NPC Shops or oficial shop?

 

If are custom you can post here the script?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...