34 lines
520 B
Plaintext
34 lines
520 B
Plaintext
#include "nw_i0_plot"
|
|
|
|
|
|
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
object oApple = GetObjectByTag("GoldenApple");
|
|
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
|
|
//make sure only one apple is spawned per party
|
|
|
|
int AppleDoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
|
|
|
if (AppleDoOnce==TRUE) return;
|
|
|
|
SetPLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
|
|
|
|
|
// spawn apple
|
|
|
|
object oTarget;
|
|
object oSpawn;
|
|
oTarget = GetWaypointByTag("WP_GoldenApple");
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "goldenapple", GetLocation(oTarget));
|
|
|
|
}
|
|
|