Jump to content

Home

Get credits


Mindtwistah

Recommended Posts

What is the script to get credits?

 

I was thinking this:

 

Giveitem ("credits", "2000")

 

But I don't think that would work.

 

I'm quite a noob when it comes to modding, but i believe it is this:

 

To get credits:

GiveGoldToCreature( GetFirstPC(),nAmount);

 

To take credits away:

TakeGoldFromCreature( GetFirstPC(),nAmount);

 

- i think after the n, instead of "Amount" you put in the value for the credits.

 

Hope this helps! (if it's correct :lol: )

Link to comment
Share on other sites

A script like this would work, obviously "gold" is credits, lol:

 

void main() {
int nGoldPieces = (500);
object oNPC=GetObjectByTag("your_npc_tag");
GiveGoldToCreature(oNPC, nGoldPieces);
}

 

Replace 500 with the number of credits you want to be given to you, and replace "your_npc_tag" with the tag of the NPC thats giving you the credits. ;)

Link to comment
Share on other sites

If I put it in a dialog file where for example Bastila is giving me credits, do I have to put in this?

object oNPC=GetObjectByTag("your_npc_tag");

 

No, if you give the credits to GetFirstPC() they will be added to the player/party credit account. This should be enough:

 

void main() {
   GiveGoldToCreature(GetFirstPC(), [color=Yellow]1000[/color]);
}

...where you replace 1000 with how many credits you want to give.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...