void WizTPActivate(object oPC, string sItemTag) { if (sItemTag == "wiztpstaff")//check if the activated item was the staff { if (GetLevelByClass(CLASS_TYPE_WIZARD, oPC) >= 7)//check if player has sufficient level { AssignCommand (oPC, ActionStartConversation (oPC, "wiz_teleport", FALSE)); SetLocalInt (oPC, "wiz_level", GetLevelByClass(CLASS_TYPE_WIZARD, oPC)); //set the level to check later if he can teleport to that area } } return; } void main() { string sItemTag = GetTag(GetItemActivated()); object oPC = GetItemActivator(); WizTPActivate(oPC,sItemTag); return; }