With help of the Forums i could get this Scriptline which checks the current amount of all items (not the equiped ones, but thats not needed here)
You check how many Items before shop Visit Eventcommand, and you check again after the shop, than you compare the amount and safe it to a 3rd variable. than check if 3rd variable is 100 for example, than add a potion as gift.
The Scriptline checks the amount of items from id 1 to 100, if you have less than 100item ids this will result in game crash, so make sure to put the right number there.
Code:
$gameVariables.setValue(1, 0 )
for (var a = 1; a <= 100; a++) { $gameVariables.setValue(1, $gameVariables.value(1) +
$gameParty.numItems($dataItems[a], false) ) }
Eventcommand Shop
Code:
$gameVariables.setValue(2, 0 )
for (var a = 1; a <= 100; a++) { $gameVariables.setValue(2, $gameVariables.value(2) +
$gameParty.numItems($dataItems[a], false) ) }
Now Var2 sub Var1 = The difference in Items.
Var3 add Var2 (the amount of items bought)
if var3 equal or more 100? if yes add poition and set var3 to 0.
This should work in theory.
The Code Works, but the moment i finished it i realised a big Problem. What if the player not only Buys items but also Sells some, than
the number comparsion would not work anymore.
So you would maybe need a Plugin which changes how the shop works. Not sure.