If you want to get all the players you're going to need
NPC Code:
for(i=0;i<playerscount;i++) {
with(players[i]) {
script;
}
}
To get serverside NPCs use:
NPC Code:
for(i=0;i<npcscount;i++) {
with(npcs[i]) {
script;
}
}
This works for classes aswell. You can control text's of a class and such with this, possibly warpto in the script, Which I have never tried.
I'm starting to lose understanding of your question.