SCTX |
scn SECutterSCRIPT
;!!!NOTE: ANY CHANGES TO THE SMITH HAMMER IDLE ANIMATION SCRIPTING PROBABLY SHOULD BE MADE FOR SEDumagGraBonkScript AS WELL !!!
;This script handles giving her a non-offers services pick idle package so that she is hammering when the player enters the cell
;If the player approaches her or after a timer runs out, she evps to an offer services package so she can conduct business as normal
float idleTimer ;used to make sure that after a little while she stops hammering and follows the player around per normal (switch to a OfferServices flagged package)
short idleDone ;a flag used for the same purpose
Float Timer ; When to say a rooftop cheer
Begin GameMode
if getInCell SENSCuttersWeapons
if getInSameCell Player
if getDistance Player < 200
if idleTimer > 0
set idleTimer to -1
endif
endif
if idleTimer >= 0
set idleTimer to idleTimer - getSecondsPassed
else
if idleDone == 0
if getIsCurrentPackage SE30CutterHammer8x12 == 1
set idleDone to 1
evp
endif
endif
endif
endif
endif
End
Begin OnActivate
if SEHerdirRef.TargetRef == SECutterRef
if IsActionRef Player == 1
return
endif
else
Activate
endif
End
Begin OnPackageStart SE30CutterHammer8x12
set idleTimer to 20
set idleDone to 0
End
Begin OnPackageDone SE30CutterServices8x12LockAtEnd512
set idleTimer to 20
set idleDone to 0
End
Begin OnPackageChange SE30CutterServices8x12LockAtEnd512
set idleTimer to 20
set idleDone to 0
End
begin OnDeath
SETombstoneCutterREF.enable
end
; Cutter is a member of the Duelists society which stages mock fights on the rooftop
; When her fight starts, add a weapon to make sure she has one. Remove it when she it done.
; Set the variable which is used for packages and idles.
Begin OnPackageStart SECutterFightMon20x2
AddItem WeapIronDagger 1
Set SECrime.RooftopFighting to 1
If SEMazaddhaRef.GetIsCurrentPackage SEMazaddaFightMon20x2 == 0
SEMazaddhaRef.AddScriptPackage SEMazaddaFightMon20x2 ; make sure partner gets up at same time
EndIf
End
Begin OnPackageChange SECutterFightMon20x2
RemoveItem WeapIronDagger 1
Set SECrime.RooftopFighting to 0
End
Begin OnPackageStart SECutterFightAfterSE05Mon20x2
AddItem WeapIronDagger 1
Set SECrime.RooftopFighting to 1
If SEUshnarGroShadborgobRef.GetIsCurrentPackage SEUshnarFightAfterSE05Mon20x2 == 0
SEUshnarGroShadborgobRef.AddScriptPackage SEUshnarFightAfterSE05Mon20x2 ; make sure partner gets up at same time
EndIf
End
Begin OnPackageChange SECutterFightAfterSE05Mon20x2
RemoveItem WeapIronDagger 1
Set SECrime.RooftopFighting to 0
End
Begin OnPackageStart SECutterFightAfterSE05Wed20x2
AddItem WeapIronDagger 1
Set SECrime.RooftopFighting to 1
If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightAfterSE05Wed20x2 == 0
SECaldanaMonriusRef.AddScriptPackage SECaldanaFightAfterSE05Wed20x2 ; make sure partner gets up at same time
EndIf
End
Begin OnPackageChange SECutterFightAfterSE05Wed20x2
RemoveItem WeapIronDagger 1
Set SECrime.RooftopFighting to 0
End
Begin OnPackageStart SECutterFightThu20x2
AddItem WeapIronDagger 1
Set SECrime.RooftopFighting to 1
If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightThu20x2 == 0
SECaldanaMonriusRef.AddScriptPackage SECaldanaFightThu20x2 ; make sure partner gets up at same time
EndIf
End
Begin OnPackageChange SECutterFightThu20x2
RemoveItem WeapIronDagger 1
Set SECrime.RooftopFighting to 0
End
Begin OnPackageStart SECutterFightFri20x2
AddItem WeapIronDagger 1
Set SECrime.RooftopFighting to 1
If SEMuurineRef.GetIsCurrentPackage SEMuurineFightFri20x2 == 0
SEMuurineRef.AddScriptPackage SEMuurineFightFri20x2 ; make sure partner gets up at same time
EndIf
End
Begin OnPackageChange SECutterFightFri20x2
RemoveItem WeapIronDagger 1
Set SECrime.RooftopFighting to 0
End
Begin GameMode
If GetIsCurrentPackage SECutterCheer20x2 == 1
If Timer <=0
Say SERooftopCheer ; if she is cheering, have her say somthing every now and then.
Set Timer to 11.1
If GetDistance SECheerCutterMarker <= 64
PickIdle ; run and idle if she is close enough.
EndIf
EndIf
Endif
If GetIsCurrentPackage SECutterFightMon20x2 == 1 || GetIsCurrentPackage SECutterFightThu20x2 == 1 || GetIsCurrentPackage SECutterFightFri20x2 == 1
If Timer <= 0
Say Hit ; when she is fighting, have her grunt every now and then.
Set Timer to 9.1
EndIf
EndIf
If Timer > 0
Set Timer to Timer - GetSecondsPassed
EndIf
End
|