Just thought I'd share something I wandered across - and I'm sure others have too...
Contrary to what the Lexicon states, TakeGold and TakeGoldFromCreature can be made to fire from the Module's OnModuleLoad or an Area's OnEnter event by using this block of code:
ExecuteScript("script_name", GetEnteringObject());
Calling TakeGold or TakeGoldFromCreature from within the executed script bypasses the restriction upon the functions. Thus script_name.nss would look something like this:
void main()
{
int nAmount = 100;
TakeGoldFromCreature(nAmount, OBJECT_SELF, TRUE);
}
This would take 100 gold from the caller (the entering creature) and destroy it.
Can't help but woinder what other limitations can be bypassed by using the ExecuteScript function...
Modifié par Pstemarie, 26 janvier 2013 - 04:16 .