Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • -1

"random" items in weapon/armor shop


semoka10
Go to solution Solved by TMP4,

Question

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 post

2 answers to this question

Recommended Posts

  • 0
  • Solution
Posted (edited)

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 (see edit history)
Link to post
  • 0
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 post
Guest
This topic is now closed to further replies.


  • Current Donation Goals

  • Activity

    1. 11

      Mysql56 to Mysql8

    2. 0

      Does anyone have Kami-Sama's Contact?

    3. 1

      [Trailer][1/3]NerviL2 The return of the Legend

    4. 0

      Won " price" change

    5. 10

      Inferna - The new "metin3"?

    6. 6

      We need you!

    7. 2

      Highlight system bug

  • Recently Browsing

    No registered users viewing this page.

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