There's also another way that is making an npc that blocks an array of class ID's and duplicate at the entrance of every castle with the npc ID 139...this way 3rd classes will be pulled out if they try to enter:
prtg_cas01,99,32,0 script nopass#h1-1::nothirds 139,3,3,{
if (class >= 4054 && class <= 4079) || (class >= 4096 && class <= 4108) { goto L_nopass; end; }
else { end; }
L_nopass:
message strcharinfo(0),"3rd Classes aren't allowed in here.";
warp "SavePoint",0,0;
end;
}
//Duplicates
//Working examples:
//Add your desired blockages here
prtg_cas04,86,13,0 duplicate(nothirds) nopass#h1-2 139,3,3
prtg_cas02,43,229,0 duplicate(nothirds) nopass#h1-3 139,3,3