Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
Author Message
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #15
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other?
hmmm, it may be hardcoded then, if so anyone have any tips on a work around?

I don't have elves on my server at all, when I get home I'll try making all my guards "Elves" bodies and see if that fixes it. It won't correct the hardcoded issue, but at least it'll allow my guards to attack anything on my server as they should be.

Update:

Using c_elf_male/female works like a champ, they attack everything now! Since I have no plans on ever having elves on my server, I just simply have to cover their ears with the right hairstyles and no one is the wiser. I'm not keen on hacky workarounds, but hey, it's working! Tongue

Now I just need to code the guards correctly. Does anyone know if there's a way to detect if the target is hostile? Not necessarily in combat mode, but just red/aggressive?

Right now, this is my basic "attack" script:
Code:
ON=@NPCLookAtChar
    IF (<SRC.KARMA> < -2999) || (<SRC.BRAIN> = brain_monster) || (<SRC.BRAIN> = brain_undead) || <SRC.FLAGS>&statf_criminal)
ATTACK
ELSE
RETURN 0

I know it's missing a few flags/brains, I just set it up for testing purposes. But is there a more simple way to do it or do I have to specify every condition that makes a target red/aggressive?

[Image: 4_Logo.png]
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
(This post was last modified: 08-02-2012 06:18 AM by Rayvolution.)
08-02-2012 05:47 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Why do NPCs attacking eachother (Seemingly randomly) run away from each other? - Rayvolution - 08-02-2012 05:47 AM

Forum Jump:


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