Dyto Posted October 6, 2010 Author Share Posted October 6, 2010 ' Executes when a player presses the CONTROL key.Sub OnAttack(Index, Damage)Dim TargetDim RangeDim DMGRange = Rand(100, 1)DMG = Int(Damage) + Int(Range)If Int(Damage) > 0 ThenIf Int(GetPlayerTarget(Index)) > 0 ThenTarget = GetPlayerTarget(Index)Call DamagePlayer(Index, Target, Int(DMG))ElseTarget = GetPlayerTargetNPC(Index)Call DamageNPC(Index, Target, Int(DMG))End IfEnd IfEnd SubSub OnArrowHit(Index, Damage)Dim TargetDim RangeDim DMGRange = Rand(100, 1)DMG = Int(Damage) + Int(Range)If Int(Damage) > 0 ThenIf Int(GetPlayerTarget(Index)) > 0 ThenTarget = GetPlayerTarget(Index)Call DamagePlayer(Index, Target, Int(DMG))ElseTarget = GetPlayerTargetNPC(Index)Call DamageNPC(Index, Target, Int(DMG))End IfEnd IfEnd SubSub PlayerHit(Index, NPCNum, Damage)Dim RangeDim DMGRange = Rand(100, 1)DMG = Int(Damage) + Int(Range)If Damage > 0 thenCall NPCAttack(NPCNum, Index, Int(DMG))End IfEnd SubJust trying to change the damage numbers but nothing seems to change the dmg and I've been spending like 2 hours trying to figure it out lol Link to comment Share on other sites More sharing options...
Robin Posted October 6, 2010 Share Posted October 6, 2010 Scripting questions are over there.points. 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