Advise / Suggestion....
Well..since rAthena able differentiate the account using Group ID
you can just simply create a New Group ID that blocked from trading / selling / dropping / vending and etc.
by using this permission ...and disable those other @warp / @go command for this group.
//Ability to trade or otherwise distribute items (drop, storage, vending etc)
can_trade : false
since your script is just alter the gm level .....you can just basically alter the group ID when they have insert the correct code..
and instead of storing the "Correct" password tries using permanant variable, you can just use temporary variable.
or if you insist the current way to insert 10 commands.. i believe using a loop method will make your script look better.
hope you understand what i trying to said.. >.< ( bad english )