Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scn LDAddThrowingSpearScript
- ;Adds throwing spear to target of attack
- ;This happens to both NPCs and player, allowing them to use throwing spears they've been struck with
- ;essentially they're pulling them out and throwing them back
- int iRand
- float fDT
- Ref rTarget
- BEGIN ScriptEffectStart
- Let rTarget := GetOwnerLastTarget
- Print "Target: " + $rTarget
- Let iRand := GetRandomPercent
- Print "iRand: " + $iRand
- Let fDT := rTarget.GetAV DamageThreshold
- Print "DT: " + $fDT
- Let fDT := (fDT * 4.5)
- Print "DT x 4.5: " + $fDT
- if iRand >= fDT
- rTarget.Additem WeapNVThrowingSpear 1 1
- Print $rTarget + " should have a new spear."
- Else
- rTarget.Additem BrokenThrowingSpear 1 1
- Print $rTarget + " should have a new broken spear."
- EndIf
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement