Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Shops

RaGEZONE VIP
[VIP] Member
Joined
Sep 12, 2020
Messages
442
Reaction score
224
So iam trying to work on adding more items to shops let say "blacksmith recipes" to a npc ID 124235

i see the shop tables, but how do they connect to the npc above ?

what tables do you need to change to add new items?
 
Initiate Mage
Joined
Mar 22, 2017
Messages
84
Reaction score
7
I am not shure but i thought i saw a lua File which is for all those npc which is defining the Shops. I can Look tomorrow for this If you want?

 
Upvote 0
Initiate Mage
Joined
Jul 25, 2021
Messages
22
Reaction score
18
You need to write some lua code, like the following:

function Blacksmith_RecipeList_Init34()
SetMinimapIcon ( OwnerID(), EM_MapIconType_Mat );
SetShop( OwnerID() , 600103, "Test_Shop_Close" );
end


 
Last edited:
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Sep 12, 2020
Messages
442
Reaction score
224
ok another question here .. When working with shops that sell items where the cost of that item you are selling ??

If you say sql please tell me where ?

I ask this question because i add more sell items to a vendor and it will not sell me that item but when i click on the older ones in that vender it will sell to me for 20000 so i looked for this in sql and said vendor has NO sell amounts for anything ? where is the Amount ?

as for adding a new shop for recipes it simple ...


Recipe Shops only

To add a shop to lets say NPC 124666 you have to start buy createing a new lua code with



1. function Carpenter_RecipeList_Init34() -- The call from QuestNPCObjectDB in sql (szluainitscript) table you also need lua_buytheskill_1 in table (szluascript).
2. SetMinimapIcon ( OwnerID(), EM_MapIconType_Mat ); -- setting the mapicon.
3. SetShop( OwnerID() , 601013, "Test_Shop_Close" ); -- Createing sell item from ShopObjectDB in sql.
4. end

we will use the Carpenter_RecipeList_Init34 to add in the sell items like below.



1. function Carpenter_RecipeList_Init34() -- Assigning it to the function above
2. AddRecipe( OwnerID(), 553336 ); -- the actual item added to sell
3. AddRecipe( OwnerID(), 553338 );
4. end
after this you need to finish the function for the sell that would be add like this



the whole lua code would look like this


as long as you add in your sql links to lua code everything will work ...
 
Upvote 0
Initiate Mage
Joined
Apr 17, 2013
Messages
46
Reaction score
13
Can you use the same to add items, like wood, golden eggs etc or perhaps buffs, like luck buff? (or clear buffs)
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Sep 12, 2020
Messages
442
Reaction score
224
Can you use the same to add items, like wood, golden eggs etc or perhaps buffs, like luck buff? (or clear buffs)


This just adds the AddRecipes to the npc , recipes have to have 2 entries in lua like i have and in shopobjectDB, where items and other things have to be in just shopObjectDB . as for how it looks too me .. I maybe wrong but it works...
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Sep 12, 2020
Messages
442
Reaction score
224
When adding in recipes why is it when i add them to the list of buy options they turn into somthing else in game ?

any ideas from anyone on this ?
 
Upvote 0
Back
Top