The top one can be done like so:
void main()
{
object oPC = GetEnteringObject();
object oTarget = GetNearestObjectByTag("dancer");
object oObject = GetNearestObjectByTag("GS_GUILD");
int nInstance = GetLocalInt(oObject, "GS_INSTANCE");
if (GetCampaignInt("GUILD", "DANCER") != nInstance && GetLocalInt(OBJECT_SELF, "DO_ONCE"))
{
CreateObject(OBJECT_TYPE_CREATURE, "guild_dancer", GetLocation(oTarget));
SetLocalInt(OBJECT_SELF, "DO_ONCE", TRUE);
}
}
The bottom one should probably look like this:
void main()
{
object oPC = GetPCSpeaker();
object oTarget = GetNearestObjectByTag("dancer");
object oObject = GetNearestObjectByTag("GS_GUILD");
int nInstance = GetLocalInt(oObject, "GS_INSTANCE");
if (GetLocalInt(OBJECT_SELF, "DO_ONCE"))
{
SetCampaignInt("GUILD", "DANCER", nInstance);
CreateObject(OBJECT_TYPE_CREATURE, "guild_dancer", GetLocation(oTarget));
TakeGoldFromCreature(10000, oPC, TRUE);
SetLocalInt(OBJECT_SELF, "DO_ONCE", TRUE);
}
}
Modifié par Squatting Monk, 23 janvier 2013 - 06:00 .