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

Auto Attack


Zopto
 Share

Recommended Posts

whit this tutorial your character  will kill auto when you click on checkbox ^^
Go to:**Client Side**
then
go to :**frmMain**
then make **1 checkbox(option main or any other)**

```
Name: chkAtk
Caption: Auto Attack
```
then go to **modgameLogic** and found :
```
If CanMoveNow Then
                Call CheckMovement ' Check if player is trying to move
                Call CheckAttack  ' Check to see if player is trying to attack
            End If
```**replace it whit this :**
```
If CanMoveNow Then
                If frmMain.chkAtk.Value = YES Then
                    ControlDown = True
                End If

                Call CheckMovement ' Check if player is trying to move
                Call CheckAttack  ' Check to see if player is trying to attack
            End If
```i hope i litl help newbies or any other Enjoy!
Link to comment
Share on other sites

I noticed in the code that theres nothing about facing the npc. You could be facing upwards, and the npc is to your left. The npc attacks, and you attack, but not the npc. Also, this doesnt go into accout of npc with spells. You'd have to check to make sure that the npc is next to you.

EDIT: I might be wrong. I didn't get a chance to implement it yet.
Link to comment
Share on other sites

You could do something like```
if the players y - 1 = the npcs y or if the players y + 1 = the npcs y
```and
```
if the players x - 1 = the npcs x or if the players x + 1 = the npcs x
```
then for the facing, i guess it would be if the npc is looking left then player is looking right and etc for all ways. I'll test it out later.
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...