Syner Posted March 13, 2009 Author Share Posted March 13, 2009 Sub OnAttack(Index, Damage)Dim TargetDim RangeDim LevelDim PowerIf Int(GetPlayerTarget(index)) > 0 Then Range = Rand(Int(GetPlayerSTR(index) + Int(Damage)) + GetPlayerLevel(Target), Int(GetPlayerSTR(index)+ Int(Damage)) - GetPlayerDef(Target))End IfIf Int(GetPlayerTarget(index)) < 0 Then Range = Rand(Int(GetPlayerSTR(index) + Int(Damage)) + GetPlayerLevel(index), Int(GetPlayerSTR(index)+ Int(Damage)) - GetPlayerLevel(index))End If If Int(Range) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Range) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Range) End If Else If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, 0) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, 0) End If End IfEnd SubI'm trying to change up somebody's damage range skill and incorporate def in the equation for NPC and players but I can't get the scripts to return the NPC def to givew the damage Link to comment Share on other sites More sharing options...
Nubbs Posted March 13, 2009 Share Posted March 13, 2009 GetNpcDef(index) or GetNpcDef(map,npcnum) sorry im not on my comp so io cant be sure which one 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