PoA_PRC8/_module/nss/levelertalks.nss

30 lines
863 B
Plaintext
Raw Normal View History

2022-10-07 14:20:31 -04:00
void main()
{
//Get object that just entered trigger and assign to variable oPlayer
object oPC = GetEnteringObject();
object oNPC = GetEnteringObject();
object olvl = GetObjectByTag("leveler");
//Check to see if entering object is really a player
if (!GetIsPC(oPC)) return;
if (GetIsPC(oNPC))
{
//Check to see if player has the gate key
if (GetXP(oNPC) < 2001 ) // Player is less than level 4
{
//Code here to bring up the conversation
AssignCommand(olvl, ClearAllActions());
// walk NPC to the PC. If you want NPC to run change FALSE to TRUE.
AssignCommand(olvl, ActionMoveToObject(oNPC, TRUE));
// start talking to PC.
AssignCommand(olvl, ActionStartConversation(oNPC, "", TRUE));
} //End if
} //End if
} //End main