Jump to content

Home

Give item Script


ExiledFish

Recommended Posts

You can attach this script to a line in a .dlg that will fire when that line is spoken:

 

void main()
{
object me = GetFirstPC();
CreateItemOnObject("[color=red]YOUR_ITEM_NAME[/color]", me);
CreateItemOnObject("[color=red]YOUR_ITEM_NAME[/color]", me);
CreateItemOnObject("[color=red]YOUR_ITEM_NAME[/color]", me);
CreateItemOnObject("[color=red]YOUR_ITEM_NAME[/color]", me);
}

 

Replace "YOUR_ITEM_NAME" with your item's name's of the .UTI file's.

 

As far as I am aware there isn't a way to have items given to you at a certain point in game, it has to be attached to a .dlg or some other means to activate it.

Link to comment
Share on other sites

Replace "YOUR_ITEM_TAG" with your item's Tag's in their .UTI file's.

 

As far as I am aware there isn't a way to have items given to you at a certain point in game, it has to be attached to a .dlg or some other means to activate it.

 

You don't specify the tag in the CreateItemOnObject() function parameter, you specify the name of the UTI file (without the .uti extension). They are often set to the same, but doesn't necessarily have to be.

 

As for giving items at certain points you can accomplish that by modifying existing scripts in the game that run during that point. Though that should be avoided if possible since it will make it a lot harder to make the mod compatible with other mods. :)

Link to comment
Share on other sites

You don't specify the tag in the CreateItemOnObject() function parameter, you specify the name of the UTI file (without the .uti extension). They are often set to the same, but doesn't necessarily have to be.

 

Whoops, thats what i meant, it was pretty late in the night when i posted that, I'll correct it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...