I don't know what Tibuda's script is but if you want to access the global switches, they are stored as a Game_Switches instance in the variable $game_switches. The class is very simple so read it through.
$game_self_switches works the same but the key is instead an array [mapid,eventid,sym] where sym is the variable character.
Sure you mean x >= 22 && x <= 21 as there is no such x.