HiddenTradition_PRC8/_module/nss/wiztp_on_activat.nss

24 lines
676 B
Plaintext
Raw Permalink Normal View History

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;
}