Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Tools cant hurt npcs?


or3o
 Share

Recommended Posts

          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

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

  • 2 months later...
@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.
Replace
PlayerMsg Index, "You cant attack with a NPC with a tool", BrightRed
with
PlayerMsg Attacker, "You cant attack with a NPC with a tool", BrightRed
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...