RandomReward XP

RandomReward XP

by Kyonides
​

Introduction

Just as the script's name clearly implies, it allows you to set some sort of reward lotto into motion by using a single script call.

After it has granted the reward to the player, you can press the OK or Cancel button to return to the map. It could also close itself if no input is given.

How Does it Work?

You just need a simple script call to open the Reward scene.

Ruby:
random_reward([Type, ID, Amount], [:g, Amount], etc.)

Available Types: :i for Item, :w for Weapon, :a for Armor, :g for Gold

Example:
Ruby:
now_reward([:i,1,5],[:i,2,3],[:w,1,1],[:w,25,1],[:g,2000])

Spoiler: 2 Snapshots
randomreward_xp01.jpg

randomreward_xp02.jpg


Terms & Conditions

Free for use in ANY game.
Due credit is mandatory.
Include a link to this post in your Credits text file.
That's it! 😛
Script Bug Fix + More Customization!​

Oops! I didn't notice that the Viewport class had no width method by default, meaning it would crash after talking to the NPC...
But don't worry about it! 😀
It's been fixed already! :awink:

From now on, the script allows you to set the Y coordinate of the window you see on screen plus the font's name and size of your reward message.
Script Updated Once Again!​

Version 1.1.0 comes with 2 brand new features:

1. Events can now "get" random rewards, too.
😅 Well, it just simulates that they actually did at least.

Example:

Ruby:
now_reward(:e, 3, [:w, 8, 1], [g:, 470], [:i, 12, 1])

There Event #3 will pretend it got the reward.

2. The reward system itself can be rigged from the very beginning! 😮

Here is an example of a rigged system:

Ruby:
now_reward(1, [:w, 8, 1], [g:, 470], [:i, 12, 1])

In the example above you can see how the player will always get the gold reward in position 1 aka the second reward.

Side Note:

😅 I had to develop this rigged game feature while developing my short game Just Another Crisis: The Shutdown. Curiously, the one getting that reward was the RTP character Ghost aka Ghost-o in my game.

Original thread: https://forums.rpgmakerweb.com/threads/randomreward-xp.164304/