HdVaderII Posted March 29, 2008 Share Posted March 29, 2008 1. What script can you use to take an object out of a creature's inventory, lets say, the PC's inventory? 2. I'm using this script, void main () { TakeGoldFromCreature( GetFirstPC(),10); } but for some reason, I'm getting weird errors with the line starting "TakeGoldFromCreature" Help is always welcome. Link to comment Share on other sites More sharing options...
Stream Posted March 29, 2008 Share Posted March 29, 2008 There shouldn't be a space in between then bracket and GetFirstPC. --Stream Link to comment Share on other sites More sharing options...
stoffe Posted March 29, 2008 Share Posted March 29, 2008 1. What script can you use to take an object out of a creature's inventory, lets say, the PC's inventory? If it should just be taken and be gone for good you can use the DestroyObject() function to do it. Like: void main () { DestroyObject( GetItemPossessedBy(GetFirstPC(), "[color=Yellow]TagofItem[/color]") ); } Where TagofItem should be changed to the tag of the item to take from the player. but for some reason, I'm getting weird errors with the line starting "TakeGoldFromCreature" You have the parameters to the function in the wrong order. The first should be the amount to take, the second should be who to take it from: void main () { TakeGoldFromCreature( 10, GetFirstPC() ); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.