Boydon 
Apprentice

Posts: 5
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2012
Reputation: 0
![]()
|
RE: Command to force a NPC to attack a given target
(05-01-2012 03:54 AM)khaos Wrote: Just script the function using targeting code.
Some advice on targeting code in sphere 51a? Cause the ATTACK function seems to have the same behavior also script side (the NPC is attacking me and not the desired target).
I've tried many ways also forcing the ACT of the NPC supposed to attack and giving the desired target'UID as argument of the ATTACK function, but with no luck...
This is what I have so far:
Code:
[7020]
//Wand of attack
NAME=Wand of attack
ID=0df2
COLOR=GOLDEN_ARMOR_COLOR
TYPE=13
HITPOINTS=101-115
REQSTR=0
WEIGHT=1
ATTR=04
CATEGORY=Custom
SUBSECTION=Boydon
DESCRIPTION=Wand of Attack
ONTRIGGER=DCLICK
IF (<SRC.ACCOUNT.PLEVEL> >= 2)
SRC.SYSMESSAGE Please select target of attack
TARGET
RETURN 0
ELSE
SRC.SYSMESSAGE I'm a lamer and I will go to jail for using this!
SRC.JAIL
REMOVE
RETURN 1
ENDIF
ONTRIGGER=TARGON_ITEM
SRC.SYSMESSAGE You have to target a player or an NPC...
RETURN 1
ONTRIGGER=TARGON_CHAR
SRC.NEWITEM 7021
SRC.ACT.MORE1=<SRC.TARG.UID>
SRC.ACT.EQUIP
SRC.ACT.DCLICK
RETURN 1
[7021]
ID=1EA7
NAME=Wand of Attack memory
TYPE=13
ATTR=96
ONTRIGGER=DCLICK
SRC.SYSMESSAGE Please select the soruce of the attack...
RETURN 0
ONTRIGGER=TARGON_CHAR
SRC.TARG.ACT=<MORE1>
SRC.TARG.UPDATE
SRC.TARG.ATTACK <MORE1>
REMOVE
RETURN 1
ONTRIGGER=TARGON_ITEM
SRC.MESSAGE You have to target a player or an NPC, please try again...
REMOVE
RETURN 1
(This post was last modified: 05-01-2012 11:08 AM by Boydon.)
|
|
05-01-2012 11:03 AM |
|
|