RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST] TINY MEDAL

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 69
RMRK Junior
Hello, all.  I am sure most of you are familiar with Dragon Quest/Warrior..  and the Tiny Medals you find during the game and hand them into the Tiny Medal King.. What I am looking for is a way to have a shop like system in which the characters in my game can trade Elementium Shards for items at every 10 shards.

The optimal way to do this, in my opinion, would there would be one NPC that is the collector of the shards, and for every 10 shards you get, (there will be 100 in all), he gives you an item..  there would only be ten items to get, and you can never get the same item twice.. so:

if you hand in ten shards and get a potion
the next time you get 10 more shards, he gives you an elixer
10 more shards you get  a sword, until you find all 100 he gives you something really epic..

If anyone could help me with this I would appreciate it greatly. :)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
This doesn't require a script. It can be done in the collector event simply by setting a variable to the number of elemental shards possessed (it is the fourth operand in Control Variable) and then using a conditional branch on that variable to see if it is greater than 10. If it is, give the item and take 10 shards. If it isn't, tell the player to go away.

If you don't have the variable fix, however, you will need it.

***
Rep:
Level 69
RMRK Junior
Ah.. I see how that can work..  however, I've only been playing with RPG Maker for two months, and I am not too familiar with the variable aspect, which I'm guessing is a big part.  Is there a tutorial for using the control variable?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Yeah - a lot of the ones on this site are for XP, but the variable commands are identical if I recall - even if not, the functions you would need to use are present in both. See:

My Event Commands Tutorial
This actually goes through every command on the first page of the event commands in RMXP (which includes Control Variable and Conditional Branch, both of which are the same in RMVX).

Other variable tutorials are (though some of the images might be broken):

http://rmrk.net/index.php/topic,10945.0.html
http://rmrk.net/index.php/topic,11826.0.html

***
Rep:
Level 69
RMRK Junior
Yes! I figured it out! Took a little bit, I had to set a variable to +1 everytime a shard was obtained and then I used a \v[001] to show the number of shards obtained, and then 10 switches for everytime you get 10 he gives you an item. It works great.  Thanks for your help!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Instead of using ten switches, you could just use one variable and +1 to it everytime the guy gives an item.

Also, you can use the item operand to directly set a variable to the amount of items of that type the character possesses. That would make it a little easier if, for instance, you wanted to obtain shards also through battle or something of the sort.

***
Rep:
Level 69
RMRK Junior
Ah! See now this is where the simplicity comes in.. however, I'm not extremely familiar with variables.

If you have time, could you post a operand variable and what its supposed to look like for my case, or link me to a tutorial?

 Thank you again, I'm so glad I found this forum!

****
Rep:
Level 84
3...2...1...
I suppose if you really wanted to do it with a script you could use this one: http://www.rpgmakervx.net/index.php?showtopic=21330&st=0&p=188373&#entry188373