DovahbearIsNuts Posted April 23, 2016 Share Posted April 23, 2016 Hi, does somebody know how I can implement the following scripts (shown below), in order to create a summon chest spell? Many thanks. scn SummonStorageChestCheckScript begin ScriptEffectStart if GetShouldAttack Player > 0 && getDead == 0 set StorageChestQuest.ChestFail to 1 endif end scn SummonStorageChestRemoteScript begin onActivate StorageChestMisc.Activate Player 0 end scn SummonStorageChestScript ref me short button float timer short doState short spellfail ref myToucher float myZ begin ScriptEffectStart set timer to 0 set me to getself if isincombat message "Cannot cast while in combat." 1 set spellfail to 1 else set doState to 0 set myToucher to StorageChestActivatorToucherRef endif end begin ScriptEffectUpdate set timer to timer + ScriptEffectElapsedSeconds if spellfail return elseif doState == 0 && timer > 0.1 set myZ to Getpos Z myToucher.moveto me 0 0 0 myToucher.setpos Z myZ Set StorageChestQuest.ChestFail to 0 myToucher.cast StorageChestCheckSpell me set doState to 1 elseif doState == 1 && timer > 0.5 if StorageChestQuest.ChestFail message "Cannot cast while enemies are nearby." 1 else StorageChestMisc.Activate Player 0 endif set doState to 2 endif end Note: The edited scripts used are taken from "Midas Magic Spells of Aurum". Link to comment Share on other sites More sharing options...
Recommended Posts