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.

What does this script do?

Page: 1 of 1
 Seamhainn
01-11-2008, 4:57 AM
#1
Hello!

For those in the know (I'd like to know for the restoration of the Vulkar Base):


00000008 42 0000006C T 0000006C
0000000D 1E 00 00000008 JSR fn_00000015
00000013 20 00 RETN
00000015 04 03 00000002 CONSTI 00000002
0000001B 04 05 0012 str CONSTS "Tar_VulkarElevator"
00000031 05 00 0245 02 ACTION SetGlobalNumber(0245), 02
00000036 04 04 00000000 CONSTF 0.000000
0000003C 04 03 00000000 CONSTI 00000000
00000042 04 04 00000000 CONSTF 0.000000
00000048 04 05 000F str CONSTS "tar10_powercell"
0000005B 05 00 0224 00 ACTION GetFirstPC(0224), 00
00000060 05 00 001E 02 ACTION GetItemPossessedBy(001E), 02
00000065 05 00 00F1 04 ACTION DestroyObject(00F1), 04
0000006A 20 00 RETN


Bear in mind that I am a newbe at scripting, so please explain also what the script does gaming-wise.

Thanks and take care
 Stream
01-11-2008, 5:07 PM
#2
Did you double click on a .ncs file in KoTOR Tool? if so extract the .ncs file and decompile it using DeNCS (http://www.starwarsknights.com/tools.php#sct) and then post it here and I'll try help.

--Stream
 stoffe
01-12-2008, 7:47 AM
#3
Hello!

For those in the know (I'd like to know for the restoration of the Vulkar Base):
Bear in mind that I am a newbe at scripting, so please explain also what the script does gaming-wise.

The source code for what you posted would look roughly like:

void main() {
SetGlobalNumber("Tar_VulkarElevator", 2);
DestroyObject(GetItemPossessedBy(GetFirstPC(), "tar10_powercell"));
}

It sets the global number variable (defined in globalcat.2da) Tar_VulkarElevator to 2, and removes the item with the tag tar10_powercell from the player's inventory.
 Seamhainn
01-12-2008, 8:30 AM
#4
You are my goddess, s! Though don't tell my wife.

Take care
Page: 1 of 1