I want this script to fire when the module starts. I want it to strip all of the vanilla crap out of the PC's inventory, then give the PC a piece of armor I made myself, then auto-equip it, then start the intro conversation.
However, the latter two things aren't happening and I do not know why. Please help.
void main(){ object oItem;
// Get the creature who triggered this event. object oPC = GetEnteringObject();
// Only fire for (real) PCs. if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) ) return;
// Only fire once. if ( GetLocalInt(OBJECT_SELF, "DO_ONCE") ) return; SetLocalInt(OBJECT_SELF, "DO_ONCE", TRUE);
// Give "worndress" to the PC. CreateItemOnObject("worndress", oPC);
// Have the PC perform a sequence of actions. AssignCommand(oPC, ClearAllActions()); AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(OBJECT_SELF, "worndress"), INVENTORY_SLOT_CHEST));
// Relieve the PC of its possessions. oItem = GetFirstItemInInventory(oPC); while ( oItem != OBJECT_INVALID ) { DestroyObject(oItem); oItem = GetNextItemInInventory(oPC); }
// Relieve the PC of its gold. TakeGoldFromCreature(GetGold(oPC), oPC, TRUE);
// The PC holds an inner dialog. AssignCommand(oPC, ActionStartConversation(oPC, "intro", TRUE, FALSE));}





Retour en haut







