Items Scripts
NWN Script: clear_inventory_002.htm
|
||||||
Reply to Jamus_se's striptease script... found one flaw in the script... it
wont take the PC's gold...
from what i can tell it's because the TakeGold FromCreature (TakeGold &
FromCreature is all one word.. this stupid thing says its to big a word and wont
post unless I split it :/ )
command has to originate from a valid object as the caller to work...
so anyone using it and it's not taking the PC's gold place a trigger (ie. valid
object for the caller) at the spawn in point and use this script in the OnEnter
of the trigger... its pretty much the same as Jamus_se had it in the
OnClientEnter script but it gives it a vald object for the caller and it works
perfectly...
void main()
{
// Get entering object
object oTriggerer = GetEnteringObject();
// Rob and strip the player
if( GetIsPC(oTriggerer) && !(GetLocalInt (oTriggerer, "GotRobbed2")) )
{
// Ensure that the robbing only happens once
SetLocalInt(oTriggerer, "GotRobbed2", TRUE);
// Take away gold
TakeGold FromCreature(GetGold(oTriggerer), oTriggerer, TRUE);
}
}
once again (TakeGold & FromCreature is all one word.. this stupid thing says its
to big a word and wont post unless I split it :/ )