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-nmm7 (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-nmm7 (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-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Request] Attacker.add/del
Author Message
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #1
[Request] Attacker.add/del
Hello, i'm making a custom system that controls how many time and in wich circunstances can a NPC be in combat to make special habilites and more things.

The problem I have is that the attacker system cares about who attacked the mob itself and I want some kind of 'enemy.add uid' because attacker is created when npc receives a hit and not in @attack. I've tried a workaround that do dmg 1,01,<src> in the @attack but it's a little ugly with aos damage and I see no other way scripting.
08-11-2013 07:08 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #2
RE: [Request] Attacker.add/del
It depends what exactely do you want the NPC to do... I would suggest to loop through chars (forchars) and check their aggressions. Who are they attacking... iow. whether they are attacking the NPC. But think about casters, they aren't attacking. I would recommend you to invent another ability. :-/ For example, wouldn't be sufficient just checking how many players are around? Or the AoE dmg, why not.. its simple and effective. Smile
(This post was last modified: 08-11-2013 07:35 AM by Alaric.)
08-11-2013 07:29 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: [Request] Attacker.add/del
Until engage combat I check every second that each enemy (using attacker.x) is in certain range and in line of sight (or have been out of them for less than a defined time), have been active in the combat in the last x seconds and he's not death, and I want to delete him from the 'system' if he doesn't pass this arguments but i see no way for deleting a char from attacker list, even deleting memory attached to him, i also want this system to have control of damage done for a loot and exp system and also being able to cast some abilities or do some custom moves, speech, or whatever I like and have defined in some tag/def pointing to this char without making a script to every npc. I would need to rewrite whole system using tags for each enemy/dmg as I already have to use for distance/los, and it would help to make more active combats, when npc haves 0 enemies acording to this system I make him heal, so you can't run and dmg to kill him in 30 tries and also try to give more use to the party system by having to kill in groups some monsters

Edit: BTW, attackear.clear doesn't work either by script or ingame command, you type .xshow attacker after using it and list is still up
(This post was last modified: 08-11-2013 08:28 PM by XuN.)
08-11-2013 04:53 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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