Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. scn LDAddThrowingSpearScript
  2.  
  3. ;Adds throwing spear to target of attack
  4. ;This happens to both NPCs and player, allowing them to use throwing spears they've been struck with
  5. ;essentially they're pulling them out and throwing them back
  6.  
  7. int iRand
  8. float fDT
  9. Ref rTarget
  10.  
  11. BEGIN ScriptEffectStart
  12. Let rTarget := GetOwnerLastTarget
  13. Print "Target: " + $rTarget
  14.  
  15. Let iRand := GetRandomPercent
  16. Print "iRand: " + $iRand
  17.  
  18. Let fDT := rTarget.GetAV DamageThreshold
  19. Print "DT: " + $fDT
  20.  
  21. Let fDT := (fDT * 4.5)
  22. Print "DT x 4.5: " + $fDT
  23.  
  24. if iRand >= fDT
  25. rTarget.Additem WeapNVThrowingSpear 1 1
  26. Print $rTarget + " should have a new spear."
  27. Else
  28. rTarget.Additem BrokenThrowingSpear 1 1
  29. Print $rTarget + " should have a new broken spear."
  30. EndIf
  31. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement