Jump to content
  • 0

My first shop, Please Help


nickyb

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   1
  • Joined:  07/22/12
  • Last Seen:  

So I created my first shop for vendoring potions:

prontera,154,198,4<TAB>shop<TAB>Tall Boy Vendor<TAB>910,717:0,501:0,502:0,503:0,504:0,505:0

I saved this as vendor.txt. I then added the following line to scripts_custom.txt

npc: npc/custom/vendor.txt

But for some reason the script is not working. I have no problem getting regular npc scripts to work, but this is my first shop. Any help would be greatly appreciated.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   5
  • Joined:  06/25/12
  • Last Seen:  

What doesn't work?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   1
  • Joined:  07/22/12
  • Last Seen:  

The vendor isn't in the game at the designated cords.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   5
  • Joined:  06/25/12
  • Last Seen:  

It does show. Make sure the script is really in your npc\custom.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

** Define a shop/cashshop NPC.

-%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}

<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}

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

itself. (No variables even exist at this point of scripting, so don't even

bother trying to use them.)

The item id is the number of item in the 'item_db.txt' database. If Price is set

to -1, the 'buy price' given in the item database will be used. Otherwise, the

price you gave will be used for this item, which is how you create differing

prices for items in different shops.

Since trunk r12264 you can alternatively use "cashshop" in place of "shop"

to use the Cash Shop interface, allowing you to buy items with special points

(Currently stored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS.)

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

"<price>" refers to how many points will be spent purchasing the them.

https://rathena.svn....pt_commands.txt

You can always use shops within the shop.txt script to help you get a layout: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/pre-re/merchants/shops.txt

As Eroces mentioned, make sure that you've loaded your NPC correctly.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   1
  • Joined:  07/22/12
  • Last Seen:  

Weird, the file is located in the npc/custom folder and I did spell the name of the file i'm calling correctly.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Are you placing the root location to be loaded in your scripts_custom?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   1
  • Joined:  07/22/12
  • Last Seen:  

I just have it like the rest of my scripts:

npc: npc/custom/vendor.txt

I even tried changing the cords and sprite just to see if it would produce something, but no dice.

Edited by nickyb
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Um.. maybe switch all your 0's into actual 1 to whatever amount of zeny. See if that works. Within a shop, I doubt you are allowed to make an item be 0z. =/ I think it has to be a minimum of 1z.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   1
  • Joined:  07/22/12
  • Last Seen:  

Resolved

I took what i had and added it to the shops.txt file making it uniform to the rest of the code and it worked. Thanks for all the help and suggestions.

Edited by nickyb
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Resolved

I took what i had and added it to the shops.txt file making it uniform to the rest of the code and it worked. Thanks for all the help and suggestions.

Making it uniform by doing what exactly? Correcting spacing or something? o_O

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   5
  • Joined:  06/25/12
  • Last Seen:  

Um.. maybe switch all your 0's into actual 1 to whatever amount of zeny. See if that works. Within a shop, I doubt you are allowed to make an item be 0z. =/ I think it has to be a minimum of 1z.

Tested it. Setting the price to 0z is possible.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  59
  • Reputation:   1
  • Joined:  01/15/12
  • Last Seen:  

and use instead of 0 => -1 and set the item prices in item_db to 0

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...