player vendors & guards

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.
Post Reply
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

player vendors & guards

Post by BELL »

guards attacking player vendors..... help? )
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post 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.
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Post by BELL »

yes, but if im set this code in guards ai, guards dont attack evil monsters and etc??
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post 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
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Post by BELL »

thx :)
im may set this or another code in guards, ai script, but i dont really understand this situation...
Post Reply