26 lines
796 B
Plaintext
26 lines
796 B
Plaintext
void main()
|
|
{
|
|
//Get object that just entered trigger and assign to variable oPlayer
|
|
object oNPC = GetEnteringObject();
|
|
object olvl = GetObjectByTag("leveler");
|
|
//Check to see if entering object is really a player
|
|
if (GetIsPC(oNPC))
|
|
{
|
|
//Check to see if player has the gate key
|
|
if (GetXP(oNPC) < 1000 ) // Player is less than level 2
|
|
{
|
|
//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
|
|
|
|
|
|
|
|
|