inomoz Posted October 10, 2017 Share Posted October 10, 2017 Looking some way to use potion or it's effect (Skooma) in papyrus script (quest) Better just cast Skooma magic effect to hero, some like this: Skill.cast(game.getplayer()) But As I understand Skooma potion has magic effect, not skill, is any solution to apply it's magic effect in script? Link to comment Share on other sites More sharing options...
JonathanOstrus Posted October 10, 2017 Share Posted October 10, 2017 (edited) If you have a skooma in inventory you could actually do something like PlayerRef.EquipItem(Skooma)And it should use the potion as if you went to inventory and did it manually. Therefore giving exactly the same effects. Alternatively you can cast any spell using SpellFormID.Cast(RefToCastAs, RefToCastOn)See https://www.creationkit.com/index.php?title=Cast_-_Spell for more info on spell casting. RefToCastOn is optional and only relevant for things that can be cast on others and not self. For things that cast on self the RefToCastAs is relevant. Edited October 10, 2017 by BigAndFlabby Link to comment Share on other sites More sharing options...
inomoz Posted October 11, 2017 Author Share Posted October 11, 2017 Item is adding (AddItem(Skooma...)) but not activating PlayerRef.EquipItem(Skooma) Link to comment Share on other sites More sharing options...
Recommended Posts