Hi there! BD
I'm trying to find a way to make certain enemies able to steal gold from players. (They don't need to keep it, I only need the player to lose 10 or 20 % of his/her money)
This would create a "stealing paranoia" that would push players to use the bank.
I've been doing well with other people scripts but this one, I cannot find.
Any help?
Thanks in advance! 🙂
If I had to guess, it'd be something like: x = $game_party.gold ; x *= 0.2 ; $game_party.lose_gold(x), but I can't really test it right now.
Ok It works but only if It does damage to HP or MP or absorbs or recovers HP or MP.
If "type" is "none", the skill won't work.
The thing is that it does very high damage or absorption compared to a normal attack (Like 2000% more) and that is not convenient at all. I suppose that damage dealt is based on the amount of gold stolen but it doesn't look that way.
I'd like this skill to only steal gold, not to do any damage unless that damage is a fixed amount like 1 HP that wouldn't be any problem.
Hope this is understandable (I'm from Spain x) )
Thanks again for the effort 🙂
[IMG]http://s10.postimg.org/nhfogzel5/2015_07_04_12_53_15.png[/IMG]
Does this formula need .to_i so that it doesn't take gold to decimal points?
Just a thought about the amount of damage.
Would it help to add a state instead of doing damage? You could make a blank state called 'Robbed' for example. Then the formula might look like this (not tested as I don't have access to Ace at the moment). I've given that state the fictitious id of 67
x = $game_party.gold; x *=0.2; $game_party.lose_gold(x); b.add_state(67)
Not sure if it should be this (I never know about 'end' until I've tested).
x = $game_party.gold; x *=0.2; $game_party.lose_gold(x); end; b.add_state(67)
I didn't expect it to deal damage. Interesting. There's an easy fix though. Just add 1 or 0 to the end of the formula to deal 1 or no damage respectively.
x = $game_party.gold ; x *= 0.2 ; $game_party.lose_gold(x); 0
Edit: ksjp17's suggestion of adding a state would probably work as well.
The damage dealt is ALWAYS the last number processed in the damage formula - that's why it's called damage formula after all...
If you want to add other effects, you have to make sure to end the formula with the damage you want to be dealt to the target - that's what the
; 0is about - the semicolon to tell the processing that a new command follows, and the zero for the intended damage - if you replace the zero with other formulae it'll deal that damage in addition to whatever the first commands did.