Jump to content

Home

Items that award xp when used


gamerlj

Recommended Posts

Hello all,

 

I am trying to create some items that award xp when used. I was wondering how I might go about giving xp to just the player character, or all currently recruited characters, etc using scripts. I looked through the scripts in kotor tool, but none of the scripts seem to be what I need. If anyone can give some pointers that would be great. Thanks.

 

--gamerlj

Link to comment
Share on other sites

You could also do it another way which would be relatively easy.

 

Take the line that says something to the affect of "Manaan_Plot_Sonic_Gun" in Spells.2da and copy it at the bottom of Spells.2da.

 

All you really need to do is change the script to give you exp. You can use the one below, it should compile.

 

void main () {

GiveXPToCreature(GetFirstPC(),nAmount);

}

 

Then you need to go to your item's properties and add one that activates this new row in Spells.2da.

 

Note: There is a downfall to this strategy. If my logic is correct the script will fire every time you use the weapon so you will need to either do one of two things:

 

Option 1 (Easy Path) - Make the script give you very small amounts so that on average you'll get the amount of exp that you are looking for.

 

Option 2 (Hard Path) - Have somebody like Star Admiral or another well known scripter make you a script that gets the tag of the selected target, then check to see when they die, and then give you the desired exp.

 

 

 

Hope this helps.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...