SphereCommunity
NPC igonre "high strength" players - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: NPC igonre "high strength" players (/Thread-NPC-igonre-high-strength-players)



NPC igonre "high strength" players - WRWR - 09-20-2012 08:03 PM

why npcs don't attack heavily armored players?

ON=@NPCLOOKATCHAR
ATTACK


RE: NPC igonre armored players - Skul - 09-20-2012 08:10 PM

NPCs attack any player in the area on my server, no 'extra' code was required. You might have something in your scripts blocking the attack, take a look at some of your @attack triggers, see if there is some code in there that might be blocking the attack for a reason or another.


RE: NPC igonre armored players - Rayvolution - 09-20-2012 11:08 PM

You need to specify what it's attacking, I believe.

My guards and all my manual/forced attacking in my AI scripts use:
ATTACK <SRC>

DON'T use this code, it won't work on your server. But it's a good reference:
Code:
[EVENTS e_AI_Guard]
ON=@NPCLookAtChar
    IF (<SRC.isTEVENT.e_AI_Hostile>) || (<SRC.FLAGS>&statf_criminal)
ATTACK <SRC>
f_guard_regeneration
ELSE
f_guard_regeneration
ENDIF
RETURN 0

[ITEMDEF i_mem_guard_regeneration]
ID=i_memory
NAME=Guard Health Regeneration
TYPE=t_eq_script
on=@timer
       LINK.HITPOINTS=<LINK.HITPOINTS> +10
       IF (<LINK.STR> < <LINK.HITPOINTS>)
        LINK.HITPOINTS=<LINK.STR>
       ENDIF
       TIMER=1
       RETURN 1

[FUNCTION f_guard_regeneration]
    IF (<RESTEST i_mem_guard_regeneration>)

    ELSE
        SERV.NEWITEM i_mem_guard_regeneration
        EQUIP <NEW>
           NEW.LINK=<UID>
        NEW.TIMER=1
    ENDIF



RE: NPC igonre armored players - WRWR - 09-21-2012 01:48 AM

For example Spiders, attack always
but if player HIGH STR (180 for example) they just ignoring and not attack
default scripts and work with all weak monsters
i don't know, maybe its monster strength based or something else.


RE: NPC igonre armored players - Shaklaban - 09-21-2012 01:50 AM

i never heard of this, you can check these .ini settings. maybe one of them cause this.

// NPC AI settings
// NPC_AI_PATH 0001 NPC pathfinding
// NPC_AI_FOOD 0002 NPC food search (objects + grass)
// NPC_AI_EXTRA 0004 NPC magics, etc
// NPC_AI_ALWAYSINT 0008 Always be as smart as possible with pathfinding
// NPC_AI_INTFOOD 0010 NPC food search (more intelligent and trusworthy)
// NPC_AI_COMBAT 0040 Look for friends in combat
// NPC_AI_VEND_TIME 0080 vendors closing their shops at nighttime
// NPC_AI_LOOTING 0100 loot corpses an the way
// NPC_AI_MOVEOBSTACLES 0200 if moveable items block my way, try to move them
NPCAI=

// Monsters run when scared of death
MonsterFear=0


RE: NPC igonre "high strength" players - WRWR - 09-21-2012 01:55 AM

i find it! High player STR its a reason, not armor


RE: NPC igonre "high strength" players - Mordaunt - 09-21-2012 02:18 AM

Interesting.... what happens if you increase the STR of the NPC? does it then attack?


RE: NPC igonre "high strength" players - Extreme - 09-21-2012 02:23 AM

Are you testing with player character or gm character?
At @NpcActFight, if ARGN2 or ARGN1, I don't remember, is negative, they will not attack =D


RE: NPC igonre "high strength" players - WRWR - 09-21-2012 02:54 AM

testing with player character

high strength on npc work ))))
so, weak monsters can't attack strong players )))