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

[EO] Auto-Target on Attack


RyokuHasu
 Share

Recommended Posts

Over in the Q&A section there was talk about having an Auto-Target and I thought it would be fun to share it with everyone.

It basically does what the title says, you attack and the targets is auto-selected so you can easily cast spells and skills.

This is a simple edit and does not require any credit to me or anyone.

**Server side**

in modCombat

in "CanPlayerAttackNpc", above "CanPlayerAttackNpc = True" add
```
TempPlayer(attacker).targetType = TARGET_TYPE_NPC
TempPlayer(attacker).target = mapNpcNum
SendTarget attacker

```
in "CanPlayerAttackPlayer", above "CanPlayerAttackPlayer = True" add
```
TempPlayer(attacker).targetType = TARGET_TYPE_PLAYER
TempPlayer(attacker).target = Victim
SendTarget attacker

```
Link to comment
Share on other sites

i think its great and all but what if you are attacking one melee and you want to target another npc, wont it reset your target to the one infront of you once you hit attack again?  so something like this would be dificult im guessing.

healer attacking a npc, it autotargets that npc.  healer targets player to heal, but attacks before casting heal spell and it resets the target to the npc again. 

i duno, was just thinking about it.
Link to comment
Share on other sites

I kinda like the way you did it though and the fact that you will have to click back and forth to heal a person and attack another makes it more intense which is more fun to me anyways thanks for the code!! (healers shouldn't be doing melee combat anyways right?) =)
Link to comment
Share on other sites

well i was just using it as an example.  it would be gold with the option to use it or not.  but i think its all about gameplay preference.  anyways a good simple tut.
Link to comment
Share on other sites

Well I installed VB6 with a lot of problems.  Probably has to do with Windows 7.  I got the program up and running though and the lay out is much nicer.  I can access all the source files and I can actually view the forms for server and client lol.

Gonna install this on my XP machine and see if that fixes the registry/runtime errors.
Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...
  • 2 months later...

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...