lfnetwork.com mark read register faq members calendar

Thread: Get credits
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-10-2007, 02:17 PM   #1
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Get credits

What is the script to get credits?

I was thinking this:

Giveitem ("credits", "2000")

But I don't think that would work.


Mindtwistah is offline   you may: quote & reply,
Old 06-10-2007, 02:22 PM   #2
Gargoyle King
Veteran
 
Gargoyle King's Avatar
 
Join Date: Apr 2007
Location: In My Own Little World!
Posts: 895
Quote:
Originally Posted by Mindtwistah
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 )
Gargoyle King is offline   you may: quote & reply,
Old 06-10-2007, 02:27 PM   #3
Master Zionosis
Relax On Air
 
Master Zionosis's Avatar
 
Join Date: Sep 2006
Location: High In The Sky
Posts: 1,280
Current Game: TR 8: Underworld
Contest winner - Modding 
A script like this would work, obviously "gold" is credits, lol:

Code:
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.

Master Zionosis is offline   you may: quote & reply,
Old 06-10-2007, 02:35 PM   #4
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
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");


Mindtwistah is offline   you may: quote & reply,
Old 06-10-2007, 03:10 PM   #5
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by Mindtwistah
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:

Code:
void main() {
    GiveGoldToCreature(GetFirstPC(), 1000);
}
...where you replace 1000 with how many credits you want to give.
stoffe is offline   you may: quote & reply,
Old 06-10-2007, 03:29 PM   #6
Mindtwistah
Junior Member
 
Mindtwistah's Avatar
 
Join Date: Apr 2007
Location: Derka Derka
Posts: 470
Thanks to all of you for your help. I will probably use Stoffes scripts since it is the smallest one.


Mindtwistah is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Get credits

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:11 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.