Jump to content

"random" items in weapon/armor shop


Go to solution Solved by TMP4,

Recommended Posts

Version of Files XXX

[[ Hi / Hello / Hey... ]]

[[ It is a template to help you with your problem... ]]

 

1. Description of the problem / Question :

Is it possible to show random items from a bigger list of items for the npc shops, so they change every once in a while? If yes, I'm barely a beginner so I would really appreciate some guiding.

 

 

 

 

 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Contributor
  • Solution

I don't think anyone will give you a c++ code, it's not 1-2 line.

 

Alternative solution:

You can make some shops for the same npc and at quest you open a random one. You can make a timer for it, or eventflag, or even you can use the date time or what meets your needs.

 

example:

 

when npcid.click begin

local x = math.random(1,3)

if x == 1 then npc.open_shop(1) end

if x == 2 then npc.open_shop(2) end

if x == 2 then npc.open_shop(3) end

end

 

-------------------------------------------------------------------

 

Or grab gaya system and change point_gem to point_gold.

You'll face some problem because it only support 1 slot items for example and the released one at turkmmo is quite bad made.

Edited by TMP4
Link to comment
Share on other sites

10 hours ago, TMP4 said:

I don't think anyone will give you a c++ code, it's not 1-2 line.

 

Alternative solution:

You can make some shops for the same npc and at quest you open a random one. You can make a timer for it, or eventflag, or even you can use the date time or what meets your needs.

 

example:

 

when npcid.click begin

local x = math.random(1,3)

if x == 1 then npc.open_shop(1) end

if x == 2 then npc.open_shop(2) end

if x == 2 then npc.open_shop(3) end

end

 

-------------------------------------------------------------------

 

Or grab gaya system and change point_gem to point_gold.

You'll face some problem because it only support 1 slot items for example and the released one at turkmmo is quite bad made.

The quest idea with a timer is exactly what I need, considering I don't want it 100% random so that it may get annoying. Thanks for the idea, hope I will be able to implement it

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.