sekan Posted April 24, 2008 Share Posted April 24, 2008 I, I need some help with a script I'm trying to make. This is the script so far... int StartingConditional() { object oNPC = (OBJECT_SELF); // A action that checks what weapon a npc have in it's right weapon slot if ((GetIsObjectValid(something) == TRUE)) { return TRUE; } return FALSE; } I need to add so it checks what weapon the npc have in the right weapon slot but I don't know how. Thanks and take care Link to comment Share on other sites More sharing options...
stoffe Posted April 24, 2008 Share Posted April 24, 2008 I need some help with a script I'm trying to make. This is the script so far... I need to add so it checks what weapon the npc have in the right weapon slot but I don't know how. int StartingConditional() { object oNPC = GetObjectByTag("[color=Red]TagOfNPC[/color]"); return (GetTag(GetItemInSlot( INVENTORY_SLOT_RIGHTWEAPON , oNPC)) == "[color=Yellow]TagOfWeapon[/color]"); } Change TagOfWeapon to the Tag of the weapon to check for, and TagOfNPC to the tag of the NPC to check the weapon of. Link to comment Share on other sites More sharing options...
glovemaster Posted April 24, 2008 Share Posted April 24, 2008 Here is what you want. int StartingConditional() { object oNPC = OBJECT_SELF; // A action that checks what weapon a npc have in it's right weapon slot if(GetIsObjectValid(GetItemInSlot( INVENTORY_SLOT_RIGHTWEAPON , oNPC))) { return TRUE; } return FALSE; } EDIT: Damn, Stoffe beat me to it And this one will return true or false if the character has any weapon in the right hand rather than Stoffe's which gets if they have a specific weapon. Link to comment Share on other sites More sharing options...
sekan Posted April 25, 2008 Author Share Posted April 25, 2008 Thanks it works Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.