Is it possible to have a skill costing money?

mellanny

I have no idea what I'm doing
Veteran
Joined
May 4, 2020
Messages
30
Reaction score
13
First Language
Portuguese
Primarily Uses
RMMV
Hey :kaoluv:

I'm thinking about sort of a Mammonita skill, from Ragnarök Online, that costs mp/tp and a few gold pieces. I have Yanfly Battle Engine/Action Sequence 1/2/3 plugins, thought I could make it with common events or something but couldn't figure out how. Any ideas?
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,869
Reaction score
615
First Language
Dutch
Primarily Uses
RMMV
I know it is possible, but I dont know how to make the lunatic code.
if you know how to do it, you need to include:

let gold = (code of gold they have)
let value = 30 (or any amount of gold required to cast it)

and some more.
but this should be in before casting the skill that check the amount of gold available.
lunatic code is something many people need help on unless they know JS.

but there are lunatic codes online on the tip and trick on his site.
you can check what is closest what you need, and adjust that part
with the gold adding.
 

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
909
Reaction score
384
First Language
English
Primarily Uses
RMMV
<Custom Execution>
$gameParty.loseGold(1000);
</Custom Execution>

You need Yanfly skill core
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,217
Reaction score
1,121
First Language
English
Primarily Uses
RMMV
Yeah, with a few yanfly plugins, although if you want the player to know the cost, you'd need to put it in the tooltip or something unless you plan on getting some custom plugin to add it to the cost section. The plugin you'll need is YEP_SkillCore (I think?), so:

Code:
<Custom Requirement>
value = $gameParty.gold() >= 12345
</Custom Requirement>
<Custom Execution>
$gameParty.loseGold(12345);
</Custom Execution>
Custom Requirement makes sure you can't use the skill if you don't have enough gold and Custom Execution subtracts the gold cost. Replace the two "12345"s with however much you want it to cost.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Worst part about doing a plugin based on an existing system: figuring out the best way for developers to set up the data.
Right now, my free time is less when Covid 19 in my country.
Begin to reduce the number of daily infections to 0.
Okay someone really needs to fix that broken railing, its a health hazard...

Forum statistics

Threads
99,210
Messages
963,074
Members
130,798
Latest member
dirty_score
Top