Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

I need items to spawn into my inventory

Page: 1 of 1
 jezter
02-13-2007, 12:09 PM
#1
I've read the tutorials, and still have trouble with this.

The item cheat codes are:

giveitem force_jump

giveitem g_w_drkjdisbr001

I'm having trouble editing the endtrask.dlg, I made script's last night.

None have been successful in game. I want to make a script that spawns

those items into my inventory, after trask say's, i'm trask.
 Hangout Hermit
02-13-2007, 1:44 PM
#2
Well try this...

void main {
int nQuantity = 1;
CreateItemOnObject("force_jump", GetFirstPC(), nQuantity)
CreateItemOnObject("g_w_drkjdisbr001", GetFirstPC(), nQuantity)
}

Compile it to a .ncs file and attach it to a dialog string.
 jezter
02-13-2007, 4:49 PM
#3
Because it wouldn't compile any of the script you gave me,

the kotor tool keeps getting errors, when I compiled the script

he gave me.
 Hangout Hermit
02-13-2007, 5:23 PM
#4
What sort of errors do you get?
 jezter
02-13-2007, 5:37 PM
#5
givemestuff.nss(1): Error: Syntax error at "{"

givemestuff.nss(3): Error: Syntax error at "CreateItemOnObject"

The script is supposed to be for Kotor 1, if that helps.
 Hangout Hermit
02-14-2007, 4:11 AM
#6
Try this
void main() {
int nQuantity = 1;
CreateItemOnObject("force_jump", GetFirstPC(), nQuantity);
CreateItemOnObject("g_w_drkjdisbr001", GetFirstPC(), nQuantity);
}

Sorry about that I was in a rush when I posted the first one.
 jezter
02-14-2007, 4:56 AM
#7
To get the item's I needed to be in that start out foot locker,

but thank's anyway's.
 T7nowhere
02-14-2007, 4:22 PM
#8
Try this
void main() {
int nQuantity = 1;
CreateItemOnObject("force_jump", GetFirstPC(), nQuantity);
CreateItemOnObject("g_w_drkjdisbr001", GetFirstPC(), nQuantity);
}

Sorry about that I was in a rush when I posted the first one.

you don't need the "nQuantity" the function will defualt to 1 if its left blank.
 Hangout Hermit
02-14-2007, 4:35 PM
#9
Yes, but it makes the scirpts more visably readable for future referance. :)
Page: 1 of 1