- trigger when you activate the object (light)
- dont allow the light to be equiped
- ask the player to consume it or pick it up
- when consumed, restore all magicka and disable the object
- otherwise put it into inventory
Begin PB_WelkyndStone_Scriptshort PCSkipEquipshort buttonshort messageOnshort drinkshort goneSet PCSkipEquip to 1 ; disable if used (a 1 use item)if ( gone == 1 ) Disable set gone to 0 returnendifif ( MenuMode == 1 ) returnendifif ( OnActivate == 1 ) Set messageOn to 2endifif ( messageOn == 0 ) returnendifif ( messageOn == 2 ) MessageBox "Do you wish to consume the Wekynd Stone? This stone will restore all your Magicka but will be destroyed in the process." "Consume the Welkynd Stone." "Pick it up." Set messageOn to 1endifif ( messageOn == 1 ) set button to GetButtonPressed if ( button == 0 ) ; consume it Set drink to 1 Set messageOn to 0 endif if ( button == 1 ) ; pick it up Activate Set messageOn to 0 return endifendif ; consume the stoneif ( drink == 1 ) Player-&--#62;PlaySound "restoration hit" Player-&--#62;ModCurrentMagicka, 10000endif ; cleanupset gone to 1set drink to 0end
Thanks in advance