// op6_setup void main() { object oPC=GetPCSpeaker(); object oWP; int nC=0; int nTC=0; int nBase=GetLocalInt(oPC,"nCarpetBase"); object oMod=GetModule(); SetCustomToken(5001,""); SetCustomToken(5002,""); SetCustomToken(5003,""); SetCustomToken(5004,""); SetCustomToken(5005,""); SetCustomToken(5006,""); SetCustomToken(5007,""); SetCustomToken(5008,""); SetCustomToken(5009,""); SetCustomToken(5010,""); DeleteLocalInt(oMod,"bCarpetLoc1"); DeleteLocalInt(oMod,"bCarpetLoc2"); DeleteLocalInt(oMod,"bCarpetLoc3"); DeleteLocalInt(oMod,"bCarpetLoc4"); DeleteLocalInt(oMod,"bCarpetLoc5"); DeleteLocalInt(oMod,"bCarpetLoc6"); DeleteLocalInt(oMod,"bCarpetLoc7"); DeleteLocalInt(oMod,"bCarpetLoc8"); DeleteLocalInt(oMod,"bCarpetLoc9"); DeleteLocalInt(oMod,"bCarpetLoc10"); oWP=GetObjectByTag("FLYING_CARPET",nC); while(GetIsObjectValid(oWP)&&nTC<10) { // build custom tokens if (nC>=nBase) { // in range nTC++; SetCustomToken(5000+nTC,GetName(GetArea(oWP))); SetLocalInt(oMod,"bCarpetLoc"+IntToString(nTC),TRUE); } // in range nC++; oWP=GetObjectByTag("FLYING_CARPET",nC); } // build custom tokens }