GeorgNihilus Posted March 6, 2009 Share Posted March 6, 2009 Hi folks I'm trying to check if a female exile is in her danceroutfit or her undies ... with something like this: //:: c_pclightdre /* checks if a female exile is in her undies or her danceroutfit */ //:: Created By: int StartingConditional() { string sWearingThis; string sShirtTag = GetScriptStringParameter(); object oWearingThis = GetItemInSlot(INVENTORY_SLOT_BODY, GetFirstPC()); int ix=-1; if (GetIsObjectValid(oWearingThis)) { sWearingThis=GetTag(oWearingThis); ix=FindSubString(sWearingThis, "g_dancerou"); } if (!GetIsObjectValid(oWearingThis) && GetGlobalBoolean("000_PLAYER_GENDER") == FALSE) { // underwear & female return (sShirtTag==""); } return (0 || ix>-1); // or danceroutfit & female } it compiles clean and works properly for the underwear, but it does not detect the danceroutfit, at all, ignoring it (maybe problem is in that last return command, in red? in the turquoise if?). Any ideas or just another script for this?? Link to comment Share on other sites More sharing options...
Star Admiral Posted March 7, 2009 Share Posted March 7, 2009 Try this one: int StartingConditional() { string sShirtTag = GetScriptStringParameter(); object oWearingThis = GetItemInSlot( INVENTORY_SLOT_BODY, GetFirstPC() ); if( GetIsObjectValid( oWearingThis ) ) { if( GetTag( oWearingThis ) == sShirtTag ) return TRUE; } return FALSE; } It returns true if the item the PC is wearing matches the tag that is passed in from the string parameter. - Star Admiral Link to comment Share on other sites More sharing options...
Ferc Kast Posted March 7, 2009 Share Posted March 7, 2009 I just made an alternative solution for your script from a conditional I made the other day. int StartingConditional() { int Item = GetScriptParameter(1); string sShirtTag; object oWearingThis = GetItemInSlot( INVENTORY_SLOT_BODY, GetFirstPC() ); if (GetIsObjectValid(oWearingThis) && GetGlobalBoolean("000_PLAYER_GENDER") == FALSE) { switch(Item){ case 0: // if wearing nothing sShirtTag = ""; break; case 1: // if wearing the Dancer's Outfit sShirtTag = "DancersOutfit"; break; case 2: // if wearing something else sShirtTag = GetScriptStringParameter(); break; } } if( GetTag( oWearingThis ) == sShirtTag ) return TRUE; return FALSE; } If you set P1's value to 0, it'll check to see if nothing is being worn by the PC. If you set P1's value to 1, it'll check to see the PC is wearing the Dancer Outfit. (You had the wrong tag for the Dancer Outfit in your script, which may be the only thing that was wrong with your script.) Link to comment Share on other sites More sharing options...
GeorgNihilus Posted March 7, 2009 Author Share Posted March 7, 2009 Thanks guys! both scripts work ... although the second is working for both undies and danceroutfit which is what I prefer. And yes Ferc, tag was wrong, I typed in the file name ... clumsy me ... but even fixing that my script doesn't work. Thanks again ... good modding! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.