scriptname FlamingSwordofRhuin
ref user
short startingblade
begin OnAdd
_ set user to GetContainer
_ if user.IsShieldOut == 1
_ _ ???
_ endif
_ user.EquipItem wFlamingswordofrhuin
end
begin OnEquip
_ ModActorValue Strength 30
_ set startingblade to user.GetActorValue Blade
_ if user.GetBaseActorValue Blade < 86
_ _ user.SetActorValue Blade 85
_ endif
end
begin GameMode
_ if user.IsCasting == 1
_ _ user.UnequipItem wFlamingswordofrhuin
_ endif
_ if user.IsShieldOut == 1
_ _user.UnequipItem wFlamingswordofrhuin
_ endif
end
begin OnUnequip
_ ModActorValue Strength -30
_ user.SetActorValue Blade startingblade
_ user.RemoveItem wFlamingswordofrhuin, 1
_ return
end
*the underscores represent spaces for readability as multiple spaces don't seem to appear on the forum. And sorry I haven't added any comments yet but it is simple enough I think.
So a few questions here. Is there a function I can use at the question marks to get the shield reference of the user? So then I potentially add a new ref variable called "shield" and insert the following at the question marks:
set shield to user."GetShield"
user.UnequipItem shield
Also I have read that using the blocktype GameMode is evil and will slow down frame rate on slow computers. I don't have a slow computer but I want to learn how to script as efficiently as possible and was wondering if there is a work around that I don't know about.
Sorry if this is too much information, if I am not using the right coding words, or if this is really obvious. I hope I am able to convey want I am trying to convey so if anything is unclear I will try to put it better. I am open to any general criticism of the script as well. Thank you for your time.
edit: noticed a typo