The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linger Guards attacking criminals
Author Message
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #1
Linger Guards attacking criminals
I am trying the guards system and I have some difficulty to get work propperly.

If I set the region with "region.guarded = 1" and region flags: "region_flag_guarded", I get npcs calling guards when they see me (GM off) and thouse guards attack me at the instant. All ok at this point.
But when I outrun them and I come back, thouse guards spawned and which is lingering for 60 minutes (set in sphere.ini), they donĀ“t attack me even if i am a criminal.
Some "normal npc" (not guard) have to see me to call guards and begin the process again.

There is some condition for lingering guards to automatically attack criminal players? I thought that were their default behaviour, and if I can avoid script some lines it would be better use the default system than a custom one.

Anyone have experienced anything like this? Thank you. Smile

PD: Guards have set NPC=brain_guard, of course.
(This post was last modified: 03-16-2016 05:12 AM by Gil Amarth.)
03-16-2016 05:08 AM
Find all posts by this user Like Post Quote this message in a reply
Criminal
Journeyman
*

Posts: 182
Likes Given: 38
Likes Received: 22 in 22 posts
Joined: Jun 2015
Reputation: 0

SantiagoUO.com

Post: #2
RE: Linger Guards attacking criminals
ON=@NPCSeeNewPlayer
IF (<SRC.FLAGS>&STATF_CRIMINAL)
ATTACK <SRC>
ENDIF

[Image: mfqAZnj.png]
Discord: SantiagoUO
Skype:
criminaluo
03-16-2016 06:18 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #3
RE: Linger Guards attacking criminals
Yes, I know that trigger. But it would be better if I could use the default system if there is one for this matter. Tongue
03-16-2016 06:46 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #4
RE: Linger Guards attacking criminals
AI has had some changes. Will add it to the To Do list we are all working on. Thanks for the input. Soon as base packs are done, I will be back in source as well. Right now, a few of us are working in tandem to get everything faster, better, and more customized, but sticking to standards (new ones we decided on).

Xun and I are already, I think, at 36 things on a list and a bug list growing from recent commits. Roberpot and others are trying to clean source with Xun. Trying to get basepacks done and done right for users. Doing everything we can at the moment to get the community back where it should be (Though learning the new coding structures might cause you all a headache, once we are about 70% through base pack... I will open repository in one area for people to add in backwards compatability... the changes I have made are very dramatic, but they speed up sphere so much that it would be silly to stick to methods used for the past 14+ years).
(This post was last modified: 03-18-2016 08:38 PM by Khaos.)
03-18-2016 08:33 PM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #5
RE: Linger Guards attacking criminals
Thank you for all efforts you are doing.

I can make a system myself, but I wanted to know if it was some default behaviour for brain_guard in the core.
If I remember right, brain_guard checked for criminals in 056b even if they were just lingering.

Do you know if brain_guard has some default behaviour, or is it better to stick with brain_human and customs scripts?
03-20-2016 06:27 AM
Find all posts by this user Like Post Quote this message in a reply
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #6
RE: Linger Guards attacking criminals
BrainGuard does have some custom behaviors if I remember right. Just best to add in a small event on them.

Code:
On=@NPCLookAtChar
If (<Src.Flags> &StatF_Criminal)
Tele <Src.P>
Attack <Src.UID>
Return
EndIf

Or something to this fashion.
(This post was last modified: 03-25-2016 01:13 PM by Khaos.)
03-25-2016 01:12 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)