or3o Posted April 15, 2012 Author Share Posted April 15, 2012 Anyone know how to make it so a tool such as a pickaxe or hatchet cant be used to hurt npcs but still does damage to resources? im sorry if this is a stupid question but i havent exactly figured it out yet. Thank you for taking the time to read this. Link to comment Share on other sites More sharing options...
RyokuHasu Posted April 15, 2012 Share Posted April 15, 2012 Make a combat check! =D``` If Item(GetPlayerEquipment(attacker, Weapon)).Data3 <> 0 Then PlayerMsg Index, "You cant attack with a NPC with a tool", BrightRed Exit Sub End If``` Link to comment Share on other sites More sharing options...
or3o Posted April 17, 2012 Author Share Posted April 17, 2012 thank you soo much man! now I just gotta figure out how to make resources give xp lol Link to comment Share on other sites More sharing options...
Matt Posted April 25, 2012 Share Posted April 25, 2012 Where exactly do i place this code? I tried in PlayerAttackNpc, CanPlayerAttackNpc, TryPlayerAttackNpc and it doesnt work. Link to comment Share on other sites More sharing options...
or3o Posted July 1, 2012 Author Share Posted July 1, 2012 i believe this goes in modcombat player attacknpc right after it checks if you have a weapon. i cant open vb6 at the moment but ill check it out soon as i get on my other pc. Link to comment Share on other sites More sharing options...
tslusny Posted July 1, 2012 Share Posted July 1, 2012 @Ryoku:> Make a combat check! =D> > ```> If Item(GetPlayerEquipment(attacker, Weapon)).Data3 <> 0 Then> PlayerMsg Index, "You cant attack with a NPC with a tool", BrightRed> Exit Sub> End If> > ```You cant use Index there.ReplacePlayerMsg Index, "You cant attack with a NPC with a tool", BrightRedwithPlayerMsg Attacker, "You cant attack with a NPC with a tool", BrightRed Link to comment Share on other sites More sharing options...
abhi2011 Posted July 1, 2012 Share Posted July 1, 2012 I beleive it goes in CanPlayerAttNpc. Link to comment Share on other sites More sharing options...
RyokuHasu Posted July 1, 2012 Share Posted July 1, 2012 1\. this was an OLD post.2\. that was just an outline of the code. If you were to put it in the code death beam was correct. 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