I found a download for VarrockScape from 2012, and by the looks of it, it should be somewhere along the lines of
Code:
if (c.playerLevel[c.playerAttack] >= 90) {
// Actual teleport command
} else {
c.sendMessage("You need an attack level of 90 to use this teleport");
}
This probably won't take into consideration boosting, that could probably be done by changing from c.playerLevel... to c.PlayerXP[c.playerAttack] >= c.getPA().getLevelForXP(90)
if c isn't defined, c should be an instance of Client.
Here's the alternatives to c.playerAttack
Code:
public int playerAttack = 0;
public int playerDefence = 1;
public int playerStrength = 2;
public int playerHitpoints = 3;
public int playerRanged = 4;
public int playerPrayer = 5;
public int playerMagic = 6;
public int playerCooking = 7;
public int playerWoodcutting = 8;
public int playerFletching = 9;
public int playerFishing = 10;
public int playerFiremaking = 11;
public int playerCrafting = 12;
public int playerSmithing = 13;
public int playerMining = 14;
public int playerHerblore = 15;
public int playerAgility = 16;
public int playerThieving = 17;
public int playerSlayer = 18;
public int playerFarming = 19;
public int playerRunecrafting = 20;