//:://///////////////////////////////////////////// //:: Name hen_gentokens_at //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* "Which trap should I set?" */ //::////////////////////////////////////////////// //:: Created By: nereng //:: Created On: 03.05.06 //::////////////////////////////////////////////// void main() { // Generate custom tokens int i = 1; object oItem = GetFirstItemInInventory(); while(oItem != OBJECT_INVALID) { if (GetBaseItemType(oItem) == BASE_ITEM_TRAPKIT) { SetCustomToken(7100 + i, GetName(oItem)); // Storing it as a local object for later reference SetLocalObject(OBJECT_SELF, "TRAP" + IntToString(i), oItem); // Need to know how many traps there are SetLocalInt(OBJECT_SELF, "NO_OF_TRAPS", i); i++; } oItem = GetNextItemInInventory(); } }