Jump to content
  • 0

About Buying in NPC, Please Help


mightyryan

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   2
  • Joined:  10/03/12
  • Last Seen:  

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

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;

}

}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   2
  • Joined:  10/03/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   18
  • Joined:  08/18/15
  • Last Seen:  

Is it every dealer or just a particular dealer? It could be any number of different things, so we'd have to narrow that down.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  354
  • Reputation:   108
  • Joined:  01/30/13
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   2
  • Joined:  10/03/12
  • Last Seen:  

these are all official shop, anyway it took me 3 days to figure out but can't find any answer so maybe ill just change my emulator to a newer one. thanks for the help everyone!

Link to comment
Share on other sites

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.

×
×
  • Create New...