Customize NPC Shop

Jezu

New member
Messages
223
Points
0
Emulator
Hercules
Hello guys!

As you can see, customize NPC shops like Euphy's script is a bit hard but it is understand-able when you read it throughly. Why don't we make it simple. 

Just like 'cashshop' and 'shop' on ordinary NPC. This is an example and it comes the idea from eAmod.

prontera,156,176,5,<itemid><tab>Headgears<tab>900,ItemID:Amount,ItemID:Amount,...

the <itemid> will be the currency of the said NPC. It will be much easier and can be more customizable. 

Helpful with rewards, main currencies, etc etc.

 
Last edited by a moderator:

Attachments

Last edited by a moderator:
I made this, Just Wait for some minute for me to upload this patch.

File : 
attachicon.gif
ItemShop-May15.diff

Usage:

<map name>,<x>,<y>,<facing>,<item_id> ishop <npc name> <spriteid>,<itemid>:<amount>,..... 
Once download gets approved by mods, http://herc.ws/board/files/file/6-customized-shop-needs-item/

Tested And Working.

Wow! This is great! :3 What a nice response from dastgir :3 Thanks a lot for this patch! It will be easier now to create customize shops.

 
I made this, Just Wait for some minute for me to upload this patch.

File : 
attachicon.gif
ItemShop-May15.diff

Usage:

<map name>,<x>,<y>,<facing>,<item_id> ishop <npc name> <spriteid>,<itemid>:<amount>,..... 
Once download gets approved by mods, http://herc.ws/board/files/file/6-customized-shop-needs-item/

Tested And Working.
Hi! Can you make in this format <itemid>:<amount>:<item_required>,<itemid>:<amount>:<item_required>,..... I think its better this way. Suggestion only
default_smile.png


 
Last edited by a moderator:
I made this, Just Wait for some minute for me to upload this patch.

File : 
attachicon.gif
ItemShop-May15.diff

Usage:

<map name>,<x>,<y>,<facing>,<item_id> ishop <npc name> <spriteid>,<itemid>:<amount>,..... 
Once download gets approved by mods, http://herc.ws/board/files/file/6-customized-shop-needs-item/

Tested And Working.
Hi! Can you make in this format <itemid>:<amount>:<item_required>,<itemid>:<amount>:<item_required>,..... I think its better this way. Suggestion only
default_smile.png
It would be a problem then , bcoz we can't differentiate items , nor we can change item name, since the packet is sended in the form of item_id not item_name.

 
if you use git as command line :

git apply filename

I don't know about softwares, bcoz i use git command-line.

 
Excuse me but I'm here to report some bugs.

I diffed the file, and when I recompiled, I got errors :

 
 
patching file map/npc.c
Hunk #1 succeeded at 1203 (offset -10 lines).
Hunk #2 succeeded at 1308 (offset -10 lines).
Hunk #3 succeeded at 1357 (offset -10 lines).
Hunk #4 succeeded at 1440 (offset -10 lines).
Hunk #5 succeeded at 1488 (offset -10 lines).
Hunk #6 succeeded at 1867 (offset -11 lines).
Hunk #7 succeeded at 2213 (offset -9 lines).
Hunk #8 FAILED at 2337.
Hunk #9 FAILED at 2638.
Hunk #10 FAILED at 2691.
Hunk #11 succeeded at 3713 (offset -46 lines).
 

 
patching file map/npc.h
Hunk #1 FAILED at 37.
 
Can you please help me ? Guess I did everything right. Thanks in advance.

 
We already have been discussing how to implement such things for some time now, should be out once we wrap it up.

 
i have a question regarding on this mod, how can i possibly make it as callshop? i want only 1 npc and then there are multiple categories,

i always got errors when i trying to make this mod to callshop

ex:

close2;

callshop "ishop",1;

break;

my question is, what should i use in this script?

cashshop? shop? or ishop? thanks.

 
I think you should call the shop name, not the shop type.

Example (as said in doc/script_commands.txt):

//Will call the shop named DaShop and opens the buy menu.callshop "DaShop",1;

The first argument passed to callshop is the NPC name that has the shop, as you can see. You should declare a shop with your very own name elsewhere and then call it (by its name) from callshop.

 
yes, i know about that, but there's a error when i use this script

Code:
-<tab>ishop<tab>DaShop<tab>-1,501:10
the problem is where should i put the item_id that will set in my shop? ex: 7227 - TCG CARD

 
Back
Top