More script problems

Post » Sat Mar 19, 2011 1:41 am

Well, I've almost got everything working in my updated RoI script, except that the choices in the scripted and cloned message boxes won't save the choice into the variables... Any reason why?

scn CloneItemScriptref OldObjectref NewObjectshort Equippedshort LMouseButtonshort Qtyshort buttonshort button2short multiModebegin GameMode	If Equipped == 1		Message "You've exited the inventory! Aborting..."		set Equipped to 0		set LMouseButton to 0		set multiMode to 0		EnableKey 256	endif;end;begin OnEquip	if MenuMode 1002 == 1		set Equipped to 1		set LMouseButton to 0;		MessageBox "Please select the item you wish to modify. Note that this is meant for non-vanilla items! Tap left control for multiple conversions. Right-click to cancel the operation.";	else		MessageBox "The Rune of Independence requires you to be in the inventory menu.";	endifend;begin MenuMode 1002	if Equipped == 1		if LMouseButton == 0			DisableKey 256;			set button to -1;			set button2 to -1;			PrintToConsole "RoI:In click Mode"			if IsKeyPressed 1				set OldObject to GetActiveMenuSelection;				PrintToConsole "RoI: Player has chosen %n", OldObject				set LMouseButton to 1			endif;			if IsKeyPressed 2				Message "Aborted by user"				EnableKey 256				set Equipped to 0			endif;			if OnKeyDown 29				if multiMode == 0					Message "Multi mode activated", 2					set multiMode to 1				else					Message "Multi mode deactivated", 2					set multiMode to 0				endif;			endif;		endif;		if LMouseButton == 1			PrintToConsole "RoI:Processing Item";			if IsClonedForm OldObject				EnableKey 256				MessageBox "This is already cloned. Do you wish to remove it from the save? Note that it will no longer be in your inventory afterwards.", "No", "Yes"				set button to GetButtonPressed				if button == 1					DisableKey 256					set Qty to Player.GetItemCount OldObject					player.removeItem OldObject Qty					OldObject.DeleteReference					Message "Item removed from save."					set Equipped to 0					set LMouseButton to 0					set multiMode to 0				elseif button == 0					Message "Aborted by user", 2					set Equipped to 0					set LMouseButton to 0					set multiMode to 0				endif;			elseif IsArmor OldObject || IsWeapon OldObject || IsClothing OldObject || IsAmmo OldObject || IsIngredient OldObject				if IsScripted OldObject && button2 == -1					EnableKey 256					MessageBox "The item you have selected has a scripted effect. Unpredictable results are likely to occur! Do you wish to continue?","No","Yes"					set button2 to GetButtonPressed				elseif IsScripted OldObject == 0 || button2 == 1					DisableKey 256					PrintToConsole "RoI:Acceptable item..."					set NewObject to CloneForm OldObject					PrintToConsole "RoI: %n cloned", OldObject					set Qty to Player.GetItemCount OldObject					player.AddItemNS NewObject Qty					player.RemoveItemNS OldObject Qty					PrintToConsole "RoI: %n swapped", NewObject					if multiMode == 1						set LMouseButton to 0						Message "Move to save data complete! Please select another item.";																			else						set Equipped to 0						set LMouseButton to 0						EnableKey 256						Message "Move to save data complete!";					endif;				else					Message "Aborted by user", 2					EnableKey 256					set Equipped to 0					set multiMode to 0				endif;			else				Message "Oops! Try again", 2				set LMouseButton to 0;			endif;		endif;	endif;end;

User avatar
Aman Bhattal
 
Posts: 3424
Joined: Sun Dec 17, 2006 12:01 am

Return to IV - Oblivion