Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
NPC Follow/Guard
|
Author |
Message |
Gil Amarth ![](images/flags/Spain.png)
Journeyman
![*](images/star.gif)
Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0
![]()
|
RE: NPC Follow/Guard
It is possible, yes. But you have to script it. I use this system (it´s in spanish, sorry).
Code:
[ITEMDEF i_memory_npc_seguir]
ID = i_memory
NAME = Memoria de Seguir
TYPE = t_eq_script
ON=@EQUIP
TIMER = 2
TAG.PASOS = 1000
CONT.EVENTS +e_siguiendo
ON=@UNEQUIP
CONT.ACTION=
IF (<CONT.SPAWNITEM> == 0)
CONT.TIMERF 300 HOMEDIST = 15
ELSE
CONT.TIMERF 300 CONT.HOMEDIST = <CONT.SPAWNITEM.MOREZ>
CONT.TIMERF 300 CONT.HOME = <CONT.SPAWNITEM.P>
ENDIF
CONT.EVENTS -e_siguiendo
ON=@TIMER
REF1 = <TAG.OBJETIVO_SEGUIR>
IF (<REF1.ISCHAR>)
IF (<REF1.DISTANCE <CONT.UID>> <= 15)
IF (<TAG.PASOS> > 0)
CONT.HOME = <REF1.P>
CONT.ACTION = 06d
IF !(<TAG0.NO_TIEMPO>)
TAG.PASOS -= 1
ENDIF
TIMER = 2
RETURN 1
ENDIF
ENDIF
ENDIF
REMOVE
RETURN 1
[EVENTS e_siguiendo]
ON=@ATTACK
FINDID.i_memory_npc_seguir.REMOVE
ON=@GETHIT
FINDID.i_memory_npc_seguir.REMOVE
You have to add this timer to the npc with the correct TAGs, TAG.OBJETIVO_SEGUIR and TAG.NO_TIEMPO, of course you can add more interrupts to the timer at the event.
(This post was last modified: 05-16-2013 07:39 PM by Gil Amarth.)
|
|
05-16-2013 07:36 PM |
|
|
User(s) browsing this thread: 1 Guest(s)