Static Alchemy
Jump to navigation
Jump to search
Introduction[edit | edit source]
In this article we are going to learn how to create static alchemy apparati (actually it’s an activator, not static). This script is created to make things like creating potions and poisons easier because now you don’t need to pick up the four apparati and when you’re done creating potions and poisons you have to set them all back.
First we are going to determine the player’s alchemy level. Below 25 is novice, between 25 and 50 is apprentice, between 50 and 75 is journeyman, between 75 and 100 is expert and 100 (or above) is master. Then we need to add the apparati to the player, activate them and remove them afterwards and all this according to the player’s level. (This script is similar to the Player's Leveled Spell script.)
The Script[edit | edit source]
Scn StaticAlchemy
Short Novice
Short Apprentice
Short Journeyman
Short Expert
Short Master
Begin OnActivate
If Active == 0
Set Active to 1
Endif
If Player.GetActorValue Alchemy <= 24
Set Novice to 1
Elseif Player.GetActorValue Alchemy >= 25 && Player.GetActorValue Alchemy <= 49
Set Apprentice to 1
Elseif Player.GetActorValue Alchemy >= 50 && Player.GetActorValue Alchemy <= 74
Set Journeyman to 1
Elseif Player.GetActorValue Alchemy >= 75 && Player.GetActorValue Alchemy <= 99
Set Expert to 1
Elseif Player.GetActorValue Alchemy >= 100
Set Master to 1
Endif
If Novice == 1
Player.AddItem Alembic 1
Player.AddItem Calcinator 1
Player.AddItem MortarPestle 1
Player.AddItem Retort 1
Player.EquipItem Alembic
Elseif Apprentice == 1
Player.AddItem AlembicApprentice 1
Player.AddItem CalcinatorApprentice 1
Player.AddItem MortarPestleApprentice 1
Player.AddItem RetortApprentice 1
Player.EquipItem AlembicApprentice
Elseif Journeyman == 1
Player.AddItem AlembicJourneyman 1
Player.AddItem CalcinatorJourneyman 1
Player.AddItem MortarPestleJourneyman 1
Player.AddItem RetortJourneyman 1
Player.EquipItem AlembicJourneyman
Elseif Expert == 1
Player.AddItem AlembicExpert 1
Player.AddItem CalcinatorExpert 1
Player.AddItem MortarPestleExpert 1
Player.AddItem RetortExpert 1
Player.EquipItem AlembicExpert
Elseif Master == 1
Player.AddItem AlembicMaster 1
Player.AddItem CalcinatorMaster 1
Player.AddItem MortarPestleMaster 1
Player.AddItem RetortMaster 1
Player.EquipItem AlembicMaster
Endif
End
Begin Gamemode
If Active == 0
Return
Elseif Active == 1
Set Active to 0
If Novice == 1
Player.RemoveItem Alembic 1
Player.RemoveItem Calcinator 1
Player.RemoveItem MortarPestle 1
Player.RemoveItem Retort 1
Elseif Apprentice == 1
Player.RemoveItem AlembicApprentice 1
Player.RemoveItem CalcinatorApprentice 1
Player.RemoveItem MortarPestleApprentice 1
Player.RemoveItem RetortApprentice 1
Elseif Journeyman == 1
Player.RemoveItem AlembicJourneyman 1
Player.RemoveItem CalcinatorJourneyman 1
Player.RemoveItem MortarPestleJourneyman 1
Player.RemoveItem RetortJourneyman 1
Elseif Expert == 1
Player.RemoveItem AlembicExpert 1
Player.RemoveItem CalcinatorExpert 1
Player.RemoveItem MortarPestleExpert 1
Player.RemoveItem RetortExpert 1
Elseif Master == 1
Player.RemoveItem AlembicMaster 1
Player.RemoveItem CalcinatorMaster 1
Player.RemoveItem MortarPestleMaster 1
Player.RemoveItem RetortMaster 1
Endif
Endif
End