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

[Bug Fix] Correction in Time of Attack Npc


Valentine90
 Share

Recommended Posts

**Sorry my english**

Robin forgot to put a code in the Function that checks the time "attack" of player against a npc, ie, the NPC can be "attacked" before the appointed time. Not a problem for monsters, but for other types of NPCs, as npc shop for example. Don't There is a very serious problem in _Eclipse Origins v2_, but in _Crystal shire_ drifts and other engines that use the types of npcs more than usual yes, however if it is a bug then it should be corrected.

**Open Server**

**1 -** In **modCombat**, search for:

```
If Len(Trim$(Npc(npcNum).AttackSay)) > 0 Then

PlayerMsg attacker, Trim$(Npc(npcNum).Name) & ": " & Trim$(Npc(npcNum).AttackSay), White

End If
```

**2 -** Below this line add:

```
' Reset attack timer

TempPlayer(attacker).AttackTimer = GetTickCount
```

**Credits:**

Valentine
Link to comment
Share on other sites

Sorry the message then, but it is of great importance.

A change was made on the topic, the code:

```
TempPlayer(attacker).AttackTimer = GetTickCount
```

It should be added after:

```
If Len(Trim$(Npc(npcNum).AttackSay)) > 0 Then

PlayerMsg attacker, Trim$(Npc(npcNum).Name) & ": " & Trim$(Npc(npcNum).AttackSay), White

End If
```

And not after of

```
If npcNum > 0 And GetTickCount > TempPlayer(attacker).AttackTimer + attackspeed Then
```
How was the topic before!
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...