Jump to content

Home

[TSL] Need little help with a script


sekan

Recommended Posts

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

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

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 :p

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...