viesty Posted May 5, 2009 Author Share Posted May 5, 2009 Hello everyone!I have big problem with npc attack. I can hurt npc's with weapons (bows,swords) BUT i can't hurt them with my fists (without any weapon). This is my whole attack sub.. Is there something wrong?```'######### ATTACK AND DEATH #########'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Sub OnAttack(Index, Damage, Hit)'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Dim SkillCheckDim WeaponDim DirDim RequiredWeaponDim TargetWeapon = GetPlayerInvItemNum(Index, GetPlayerWeaponSlot(Index))Dir = GetPlayerDir(Index) If Int(Hit) = 1 Then 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 IfSelect Case Int(Dir) Case 0 'Up SkillCheck = CheckSkill(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) - 1) Case 1 'Down SkillCheck = CheckSkill(GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index) + 1) Case 2 'Left SkillCheck = CheckSkill(GetPlayerMap(Index), GetPlayerX(Index) - 1, GetPlayerY(Index)) Case 3 'Right SkillCheck = CheckSkill(GetPlayerMap(Index), GetPlayerX(Index) + 1, GetPlayerY(Index)) Case Else Call PlayerMsg(Index, "BUGGER!", 4)End SelectRequiredWeapon = GetVar("Scripts\Skill\Skill" & SkillCheck & ".ini", "General", "Item")'end subIf Cint(SkillCheck) > 0 Then If CInt(RequiredWeapon) = CInt(Weapon) Then Call SkillDo(Int(Index), Int(SkillCheck)) End IfEnd IfEnd Sub``` Link to comment Share on other sites More sharing options...
unnown Posted May 5, 2009 Share Posted May 5, 2009 hmm i think that has nothing to do with your main, but with your strenght and attack without a weapon Link to comment Share on other sites More sharing options...
viesty Posted May 11, 2009 Author Share Posted May 11, 2009 Nope.. it has got no problem. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 11, 2009 Share Posted May 11, 2009 This isn't a scripting thing, you're just not strong enough to hurt the NPC without a weapon. 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