sekan Posted June 14, 2007 Share Posted June 14, 2007 I need help with some scripting on k1. I'm very new on kotor modding and my english is not very good so i dont understand so mutch. void main() { AdjustAlignment( GetFirstPC(),ALIGNMENT_LIGHT_SIDE, 2); object oItem=CreateItemOnObject ( "tat18_dragonprl", GetFirstPC()); TakeGoldFromCreature( GetFirstPC(),2000); } I know there is something wrong with TakeGoldFromCreature but i dont know what's wrong. Link to comment Share on other sites More sharing options...
Master Zionosis Posted June 14, 2007 Share Posted June 14, 2007 Give this a go, its a little rough but it does the job: void main() { object me = GetFirstPC(); AdjustAlignment( GetFirstPC(),ALIGNMENT_LIGHT_SIDE, 2); object oItem=CreateItemOnObject ( "tat18_dragonprl", GetFirstPC()); TakeGoldFromCreature(2000, me, TRUE); } Post if you have more problems Link to comment Share on other sites More sharing options...
stoffe Posted June 14, 2007 Share Posted June 14, 2007 I know there is something wrong with TakeGoldFromCreature but i dont know what's wrong. The problem is the order of the parameters you specified to it. The TakeGoldFromCreature() function takes two required parameters and one optional parameter. First you specify the amount of credits to take, second you specify the object to take the credits from. The third optional parameter lets you decide if the credits is added to the inventory of the object running the script (if it has one), or if it's just destroyed. If the parameter is left out it defaults to FALSE, i.e. the credits will be added to the inventory of the script owner. The function prototypes for all the standard NWScript functions are listed inside the nwscript.nss file (found inside scripts.bif, you can look in this file to determine what parameters you need to specify for a particular function. Link to comment Share on other sites More sharing options...
sekan Posted June 14, 2007 Author Share Posted June 14, 2007 Thanks it works now Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.