hollywoodkid Posted July 15, 2009 Author Share Posted July 15, 2009 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 Subin 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 More sharing options...
Diskmaster Posted July 15, 2009 Share Posted July 15, 2009 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 More sharing options...
Admiral Refuge Posted July 15, 2009 Share Posted July 15, 2009 So, you want the pseudocode "case 0 if item9 true call scripted spell 9" converted to sadscript?Well, this might work:Case 0 If CanTake(Index, 9, 1) = True Then Call ScriptedSpell(Index, 9) End IfAs Diskmaster said, you'll need Godlord's inventory script. Link to comment Share on other sites More sharing options...
hollywoodkid Posted July 15, 2009 Author Share Posted July 15, 2009 says type mismatch "on arrow hit." Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 15, 2009 Share Posted July 15, 2009 Paste your current Arrowonhit sub (or w/e it's called). Link to comment Share on other sites More sharing options...
hollywoodkid Posted July 16, 2009 Author Share Posted July 16, 2009 > 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 Subone quick question when it says " CanTake (index 9,1) whats the 1 mean? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 16, 2009 Share Posted July 16, 2009 The "1" is the amount that can be taken.Anyway, it looks right; you've installed Godlord's inventory script that other user linked to, right? Link to comment Share on other sites More sharing options...
hollywoodkid Posted July 16, 2009 Author Share Posted July 16, 2009 @Admiral:> The "1" is the amount that can be taken.> > Anyway, it looks right; you've installed Godlord's inventory script that other user linked to, right?maybe i didnt install it correctly? ill try again. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now