Bummer. I was hoping to avoid FOSE. Whats the difference between the two? Because I would like to use FOSE as little as possible.
For what you SEEM to want to do, I wouldn't think you need FOSE, it would be like...
ScriptName TestScriptNameBegin GameModeIf playerref.GetEquipped WeapMinigun == 0 player.additem Minigun 1 1 player.equipitem Minigun 1 1EndIFEnd
Now if you need that variable for some reason, I couldn't tell you .. but for just getting that job done that I saw in your code, I think you'd be set.
If you actually need to steal the item the player is holding... that actual item, seriously steal it.. that is not possible in the regular scripting setup. You will at best get to steal one, assuming you know what it is or take a lengthy process to figure it out, and if the player happens to have 2, it will pick whichever one it feels like snatching.