View Single Post
Old 02-01-2012, 03:24 PM   #99
Qui-Don Jorn
Junior Member
 
Qui-Don Jorn's Avatar
 
Join Date: Apr 2010
Location: The Fleet, where are you?
Posts: 435
Current Game: The Old Republic
Helpful! 
ok..this works but still, I need to remove my sub2 and just insert my new stringGLOB tags...i cut top off for brevity.

Code:
intGLOB_151 = 1;
	int intGLOB_152 = 2;
	int intGLOB_153 = 3;
	int intGLOB_154 = 4;
	int intGLOB_155 = 5;
	int intGLOB_156 = 6;
	string stringGLOB_1 = "bastila";
	string stringGLOB_2 = "carth";
	string stringGLOB_3 = "dan13_WP_council";
	string stringGLOB_4 = "g_w_lghtsbr01";
	string stringGLOB_5 = "g_w_lghtsbr03";
	string stringGLOB_6 = "g_w_lghtsbr04";
	string stringGLOB_7 = "dan_wanderhound";
	string stringGLOB_8 = "pc_lghtsbr_001";
	string stringGLOB_9 = "pc_lghtsbr_002";
	string stringGLOB_10 = "pc_lghtsbr_003";

// Prototypes
object sub2();
object sub1();

object sub2() {
	object oPC = GetFirstPC();
	object object5;	
	int nGlobal = GetGlobalNumber("DAN_PATH_STATE");
	if ((nGlobal > 0)) {
		if ((nGlobal == intGLOB_148)) {
			object5 = CreateItemOnObject(stringGLOB_8, oPC, 1);
		}
		else {
			if ((nGlobal == intGLOB_149)) {
				object5 = CreateItemOnObject(stringGLOB_10, oPC, 1);
			}
			else {
				if ((nGlobal == intGLOB_150)) {
					object5 = CreateItemOnObject(stringGLOB_9, oPC, 1);
				}
			}
		}
	}
	if (GetIsObjectValid(object5)) {
		DelayCommand(0.3, AssignCommand(oPC, ActionEquipItem(object5, 4, 0)));
	}
	return object5;
}

object sub1() {
	object oPC = GetFirstPC();
	object object3;
	object object4 = GetItemPossessedBy(GetFirstPC(), "dan13_plotcrys");
	SetPlotFlag(object4, 0);
	DestroyObject(object4, 0.0, 0, 0.0);
	int nGlobal = GetGlobalNumber("DAN_PATH_STATE");
	if ((nGlobal > 0)) {
		if ((nGlobal == intGLOB_148)) {
			object3 = CreateItemOnObject(stringGLOB_4, oPC, 1);
		}
		else {
			if ((nGlobal == intGLOB_149)) {
				object3 = CreateItemOnObject(stringGLOB_6, oPC, 1);
			}
			else {
				if ((nGlobal == intGLOB_150)) {
					object3 = CreateItemOnObject(stringGLOB_5, oPC, 1);
				}
			}
		}
	}
	if (GetIsObjectValid(object3)) {
		DelayCommand(0.1, AssignCommand(oPC, ActionEquipItem(object3, 4, 0)));
	}
	return object3;
}

void main() {
	object object1 = sub1();
	DestroyObject(object1, 0.0, 0, 0.0);  
	object object2 = sub2();
	ShowUpgradeScreen(object2);  	
}
When I originally did it I only had 3 closes at the end of the if/else statements in sub2, so the pc wasn't equipping the saber. So I fixed that but haven't re-tested.
Qui-Don Jorn is offline   you may: quote & reply,