enderalse/scripts/source/spearsalias.psc

109 lines
7.0 KiB
Plaintext
Raw Normal View History

Scriptname SpearsAlias extends ReferenceAlias
SpearsQuest Property myMod2 Auto
Actor property Me auto
keyword property SpearWeapon auto
bool bOk = false
event OnPlayerLoadGame()
int current_crc = FNIS_aa.GetInstallationCRC()
if ( current_crc == 0 )
;installation error: no AA generated by FNIS
elseif (current_crc != myMod2.myModCRC2)
myMod2.myModID2 = FNIS_aa.GetAAModID("tsc", "Spears", true) ;test only
myMod2.my_1hmidle_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._1hmidle(),"Spears",true)
myMod2.my_1hmmt_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._1hmmt(),"Spears",true)
myMod2.my_1hmatk_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._1hmatk(), "Spears",true)
myMod2.my_1hmatkpow_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._1hmatkpow(),"Spears",true)
myMod2.my_1hmblock_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._1hmblock(),"Spears",true)
myMod2.my_1hmeqp_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._1hmeqp(),"Spears",true)
myMod2.my_2hmidle_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hmidle(),"Spears",true)
myMod2.my_2hmmt_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hmmt(),"Spears",true)
myMod2.my_2hmatk_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hmatk(), "Spears",true)
myMod2.my_2hmatkpow_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hmatkpow(),"Spears",true)
myMod2.my_2hmblock_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hmblock(),"Spears",true)
myMod2.my_2hmeqp_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hmeqp(),"Spears",true)
myMod2.my_2hwidle_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hwidle(),"Spears",true)
myMod2.my_2hwatk_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hwatk(), "Spears",true)
myMod2.my_2hwatkpow_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hwatkpow(),"Spears",true)
myMod2.my_2hwblock_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hwblock(),"Spears",true)
myMod2.my_2hweqp_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._2hweqp(),"Spears",true)
myMod2.my_magidle_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._magidle(),"Spears",true)
myMod2.my_magmt_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._magmt(),"Spears",true)
myMod2.my_magatk_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._magatk(),"Spears",true)
myMod2.my_mageqp_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._mageqp(),"Spears",true)
myMod2.my_shield_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._shield(),"Spears",true)
myMod2.my_sneakidle_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._sneakidle(),"Spears",true)
myMod2.my_sneakmt_base2 = FNIS_aa.GetGroupBaseValue(myMod2.myModID2,FNIS_aa._sneakmt(),"Spears",true)
myMod2.myModCRC2 = current_crc
endif
endEvent
Auto State NoSpearEquipped
Event OnBeginState()
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmidle", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmmt", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmatk", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmatkpow", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmblock", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmeqp", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmidle", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmmt", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmatk", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmatkpow", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmblock", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmeqp", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwidle", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwatk", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwatkpow", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwblock", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hweqp", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_bowidle", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_bowmt", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_bowatk", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_boweqp", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_shield", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_sneakidle", 0, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_sneakmt", 0, 0, "Spears", true)
EndEvent
Event OnObjectEquipped(Form akBaseItem, ObjectReference akReference)
if akBaseItem as Weapon
if akBaseItem.HasKeyword(SpearWeapon)
GoToState("SpearEquipped")
EndIf
EndIf
EndEvent
EndState
State SpearEquipped
Event OnBeginState()
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmidle", myMod2.my_1hmidle_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmmt", myMod2.my_1hmidle_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmatk", myMod2.my_1hmatk_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmatkpow", myMod2.my_1hmatkpow_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmblock", myMod2.my_1hmblock_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_1hmeqp", myMod2.my_1hmeqp_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmidle", myMod2.my_2hmidle_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmmt", myMod2.my_2hmidle_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmatk", myMod2.my_2hmatk_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmatkpow", myMod2.my_2hmatkpow_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmblock", myMod2.my_2hmblock_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hmeqp", myMod2.my_2hmeqp_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwidle", myMod2.my_2hwidle_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwatk", myMod2.my_2hwatk_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwatkpow", myMod2.my_2hwatkpow_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hwblock", myMod2.my_2hwblock_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_2hweqp", myMod2.my_2hweqp_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_shield", myMod2.my_shield_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_sneakidle", myMod2.my_sneakidle_base2, 0, "Spears", true)
bOk = FNIS_aa.SetAnimGroup(Me, "_sneakmt", myMod2.my_sneakmt_base2, 0, "Spears", true)
EndEvent
Event OnObjectUnequipped(Form akBaseItem, ObjectReference akReference)
GoToState("NoSpearEquipped")
EndEvent
EndState