gah, you're still not getting the point. I'll post the class.
PHP Code:
//this.w: width of link (in tiles)
//this.h: height of link (in tiles)
//this.reqdir: required dir to pass the link
//-1,0,1,2,3 : superfluous, up, left, down, right
//--------NOT DONE
//this.reqflags[]: two-dimensional array representing booleans
//to be evaluated
//if no false in the boolean representation of this.reqflags[0],
//it warps to this.level[0],this.newx[0],this.newy[0]
//level[]: array of levels for which is the first case this.reqflags is true
//newx[]: array of newxs parallel to level[]
//newy[]: array of newys parallel to level[]
function onCreated() {
setshape(1,this.w*16,this.h*16);
}
function onPlayerTouchsMe() {
for (i=0; i<this.reqflags.size(); i++) {
/*------THIS IS WHERE I NEED TO EFFING EVALUATE THE BOOLEANS---*/
if (!0 in this.reqflags[i]) {
if (this.reqdir in {player.dir,-1}) {
setlevel2(this.level[0],this.newx[0],this.newy[0]);
}
}
}
}
Here would be an NPC ex.
PHP Code:
join("warplink");
function onCreated() {
this.w = 2;
this.h = 1;
this.reqdir = -1;
/*---IF I DIDN'T STRESS ENOUGH, YOU CAN'T EVALUATE THESE YET---*/
this.reqflags = {"!clientr.quest_dungeon[0]","clientr.quest_dungeon[0]"};
this.level = {"quest_dungeon_15.nw","quest_dungeon_15_flooded.nw"};
this.newx = {12.5,12.5};
this.newy = {30,30};
}