;{{{--Click functionsbegin MenuMode if DisabledLMB set DisabledLMB to 0 EnableKey 256 endif if (MenuMode 1002) ;|| (MenuMode 1008) ;Don't allow in 1008 - not sure of need for it, would require shift-click to move and code to refresh container menu if (GetActiveMenuSelection == P1DkeyChain) && ((IsKeyPressed3 42) == 0) && ((IsKeyPressed3 54) == 0) ;, set DisabledLMB to 1 DisableKey 256 if (OnKeyDown 256) if Clicks set Clicks to 2 set ClickTimer to -1 else set Clicks to 1 set ClickTimer to .5 endif endif endif if Clicks if (ClickTimer > 0) && (GetActiveMenuSelection == P1DkeyChain) set ClickTimer to (ClickTimer - GetSecondsPassed) else if (Clicks == 1) ;Hook/unhook keys if P1Dkey.Hooked P1DkeyUnhook.Activate2 P1DkeyActRef, 1 message "Unhooked keys from keychain" else P1DkeyHook.Activate2 P1DkeyActRef, 1 message "Hooked keys to keychain" endif else ;if (Clicks == 2) ;Open up the options menu P1DkeyOptions.Activate2 P1DkeyActRef, 1 endif set Clicks to 0 endif endif elseif Clicks set Clicks to 0 endifendbegin GameMode if DisabledLMB set DisabledLMB to 0 EnableKey 256 endif if Clicks set Clicks to 0 endifend;}}}
scn CloneItemScriptref OldObjectref NewObject;short inMenuModeshort RMouseButtonbegin OnEquip if MenuMode 1002 == 1 MessageBox "Please select the item you wish to modify. Note that this is meant for non-vanilla items!"; while MenuMode 1002 if GetButtonPressed 256 && RMouseButton == 0 let OldObject := GetActiveMenuSelection; let RMouseButton := 1 endif; if OldObject.IsClonedForm && RMouseButton == 1 Message "This is already cloned, no need to move it to save data again!" break elseif OldObject.IsActor && RMouseButton == 1 Message "Invalid choice. Aborting..."; break elseif OldObject.IsArmor || OldObject.IsWeapon || OldObject.IsClothing || OldObject.IsAmmo || OldObject.IsIngredient && RMouseButton == 1 set NewObject to CloneForm OldObject player.addItem NewObject 1 player.removeItem OldObject 1 Message "Move to save data complete!"; break else let RMouseButton := 0; endif; Print "Loop finished" Loop; else MessageBox "The Rune of Nothing requires you to be on the inventory screen."; endif;end;
begin OnEquip if MenuMode 1002 == 1 set Equipped to 1 MessageBox "Please select the item you wish to modify. Note that this is meant for non-vanilla items!"; else MessageBox "The Rune of Nothing requires you to be on the inventory screen."; endifendbegin MenuMode 1002 if Equipped if GetButtonPressed 256 && RMouseButton == 0 let OldObject := GetActiveMenuSelection; let RMouseButton := 1 endif; if OldObject.IsClonedForm && RMouseButton == 1 Message "This is already cloned, no need to move it to save data again!" elseif OldObject.IsActor && RMouseButton == 1 Message "Invalid choice. Aborting..."; elseif OldObject.IsArmor || OldObject.IsWeapon || OldObject.IsClothing || OldObject.IsAmmo || OldObject.IsIngredient && RMouseButton == 1 set NewObject to CloneForm OldObject player.addItem NewObject 1 player.removeItem OldObject 1 Message "Move to save data complete!"; else let RMouseButton := 0; endif; endif;end
scn CloneItemScriptref OldObjectref NewObjectshort Equippedshort RMouseButtonshort Qtybegin OnEquip if MenuMode 1002 == 1 set Equipped to 1 set RMouseButton to 0; MessageBox "Please select the item you wish to modify. Note that this is meant for non-vanilla items! Right-click to cancel the operation."; else MessageBox "The Rune of Nothing requires you to be in the inventory menu."; endifend;begin MenuMode 1002 if Equipped DisableKey 256; if IsKeyPressed 256 && RMouseButton == 0 let OldObject := GetActiveMenuSelection; let RMouseButton := 1 endif; if IsKeyPressed 257 Message "Aborted by user" EnableKey 256 set Equipped to 0 endif; if OldObject.IsClonedForm && RMouseButton == 1 MessageBox "This is already cloned, no need to move it to save data again!" EnableKey 256 set Equipped to 0 elseif OldObject.IsActor && RMouseButton == 1 MessageBox "Invalid choice. Aborting..."; EnableKey 256 set Equipped to 0 elseif OldObject.IsArmor || OldObject.IsWeapon || OldObject.IsClothing || OldObject.IsAmmo || OldObject.IsIngredient && RMouseButton == 1 set NewObject to CloneForm OldObject set Qty to Player.GetItemCount OldObject player.AddItemNS NewObject Qty player.RemoveItemNS OldObject Qty MessageBox "Move to save data complete!"; EnableKey 256 set Equipped to 0 else let RMouseButton := 0; endif; endif;end;
if IsKeyPressed 256 && RMouseButton == 0 let OldObject := GetActiveMenuSelection; ... if OldObject.IsClonedForm && RMouseButton == 1
begin MenuMode 1002 if Equipped DisableKey 256; if IsKeyPressed 256 && RMouseButton == 0 let OldObject := GetActiveMenuSelection; let RMouseButton := 1 endif; if IsKeyPressed 257 Message "Aborted by user" EnableKey 256 set Equipped to 0 endif; if RMouseButton == 1 if OldObject.IsClonedForm MessageBox "This is already cloned, no need to move it to save data again!" EnableKey 256 set Equipped to 0 elseif OldObject.IsActor MessageBox "Invalid choice. Aborting..."; EnableKey 256 set Equipped to 0 elseif OldObject.IsArmor || OldObject.IsWeapon || OldObject.IsClothing || OldObject.IsAmmo || OldObject.IsIngredient set NewObject to CloneForm OldObject set Qty to Player.GetItemCount OldObject player.AddItemNS NewObject Qty player.RemoveItemNS OldObject Qty MessageBox "Move to save data complete!"; EnableKey 256 set Equipped to 0 else let RMouseButton := 0; endif endif; endif;end;
if RMouseButton == 0 PrintToConsole "In click Mode" if IsKeyPressed 256 set OldObject to GetActiveMenuSelection; set RMouseButton to 1 endif; if IsKeyPressed 257 Message "Aborted by user" EnableKey 256 set Equipped to 0 endif; endif; if RMouseButton == 1
scn CloneItemScriptref OldObjectref NewObjectshort Equippedshort LMouseButtonshort Qtybegin 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! 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 DisableKey 256; if LMouseButton == 0 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; endif; if LMouseButton == 1 PrintToConsole "RoI:Processing Item"; if OldObject.IsClonedForm set Equipped to 0 EnableKey 256 Message "This is already cloned, no need to move it to save data again!" elseif OldObject.IsActor set Equipped to 0 EnableKey 256 Message "Invalid choice. Aborting..."; elseif OldObject.IsArmor || OldObject.IsWeapon || OldObject.IsClothing || OldObject.IsAmmo || OldObject.IsIngredient PrintToConsole "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 set Equipped to 0 EnableKey 256 Message "Move to save data complete!"; else Message "Oops! Try again" set LMouseButton to 0; endif; endif; endif;end;