Page 1 of 1

player vendors & guards

Posted: Mon May 05, 2008 1:22 pm
by BELL
guards attacking player vendors..... help? )

Posted: Mon May 05, 2008 6:10 pm
by CWO
Try looking in their script for when they pick a target. Make sure you check either...

Code: Select all

if (target.acctname)
or

Code: Select all

if (!(target.isA(POLCLASS_NPC))
You don't need to use both of those codes, just one.

Posted: Tue May 06, 2008 11:17 am
by BELL
yes, but if im set this code in guards ai, guards dont attack evil monsters and etc??

Posted: Tue May 06, 2008 2:20 pm
by Pierce
yes, but if im set this code in guards ai, guards dont attack evil monsters and etc??
If you set this in your script Guards won't attack anything except for players.

The question is: Why do the guards attack player vendors.
A normal guard script checks for criminals. I don't know what your guard script looks, but if it checks for criminals --> How does the player vendors get criminal :)

If you don't know yet a small code in the guard script can solve this problem as long as you find the real problem (opponent and playervendor must perhaps be changed to your script):

Code: Select all

if(opponent.npctemplate != "playervendor")
...
endif

Posted: Wed May 07, 2008 7:51 am
by BELL
thx :)
im may set this or another code in guards, ai script, but i dont really understand this situation...