I tried the following script which didn't work
can anyone tell me what have I done wrong?
$gameActors.actor(0).addParam(2, $gameActors.actor(0).param[2])
where did you call that script? And what do you want it to do?
Because that command is a permanent addition to the value, no temporary buff...
And if you're talking about the damage formula, keep in mind that the damage formula is processed only after a hit is confirmed on a target.
For future references, when you have a problem it is always better to explain what you want to do (ingame results) instead of how you want to do it (technical mechanic), because often people either misread what you want or you are already too deep in the engine and the solution is elsewhere.
I want to create an item which can buff the character status for a while
I use item to call a common event, then type this script in the event
that is the completely wrong way to go - don't use common event or scripts for temporary effects.
go to states. make a state that has the trait ATK*200%, give it the properties you want (like how long it should last, how it is removed and so on),
then go to the item and add that state as the effect of that item.
finished, no need for common event or script commands
I strongly suggest you follow the link to the starting point in my signature and take a month to learn how the engine works.
This will speed up your later game development a lot, especially considering that you first asked how to prevent the menu from closing after using an item and then tried to apply the answers you got there in a way here that is needlessly complex for the effect you wanted.
You'll need to know what options exist in the engine to prevent those delays (waiting for answers).
yes you are absolutely right
I even don't know I can make it by just simply set in the state
thanks for your suggestion I will find some time to study it more