Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

First shot help please?


Recommended Posts

ok so this is my basic outline of what i want please note ive never scripted before

> Sub OnArrowHit(Index, Damage)
> Dim Target
> case 0 if item9 true call scripted spell 9
> case 1
> If Int(Damage) > 0 Then
> If Int(GetPlayerTarget(Index)) > 0 Then
> Target = GetPlayerTarget(Index)
> Call DamagePlayer(Index, Target, Damage)
> Else
> Target = GetPlayerTargetNPC(Index)
> Call DamageNPC(Index, Target, Damage)
> End If
> End If
> End Sub

in red is what i changed id like to know what i would need to do to make this work.
and dont be like "hey hollywood this don't make sense" or something cus i dont care.
id just like someone to help me get on the right track for this script.

P.S. im trying to make it so when i hit someone/thing with an arrow if uses the scripted spell 9\. (the arrow is already item 9.)
Link to comment
Share on other sites

If CanTake(Index, YOUR ITEM NUMBER HERE!!!, 0)
First install this: [http://www.touchofdeathforums.com/smf/index.php/topic,28174.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,28174.0.html)
Then insert this at the top of your onArrow Hit!!
Link to comment
Share on other sites

> Sub OnArrowHit(Index, Damage)
> Dim Target
> Case 0
>   If CanTake(Index, 9, 1) = True Then
>       Call ScriptedSpell(Index, 9)
>   End If
>
> If Int(Damage) > 0 Then
> If Int(GetPlayerTarget(Index)) > 0 Then
> Target = GetPlayerTarget(Index)
> Call DamagePlayer(Index, Target, Damage)
> Else
> Target = GetPlayerTargetNPC(Index)
> Call DamageNPC(Index, Target, Damage)
> End If
> End If
> End Sub

one quick question when it says " CanTake (index 9,1) whats the 1 mean?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...