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:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
attacker
Author Message
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #1
attacker
Greetings! How i can remove data of attackers group on character (attacker.last, etc.) without waiting?
08-17-2012 07:59 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: attacker
<ACT> is the attacker under a trigger such a @GETHIT

ACT=

Would clear that

I don't know how or when you are wanting to remove the attacker though, so there could be another way, depending on what you are wanting to do.

[Image: 2nis46r.jpg]
08-17-2012 08:16 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #3
RE: attacker
I want to renew (remove previous if it's exist) attacker info right before combat.
08-17-2012 09:00 AM
Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #4
RE: attacker
So how to do it with script? Like:

[FUNCTION removeAttacker]
...

I don't think ACT= going there.
08-18-2012 03:53 PM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #5
RE: attacker
you can try attacket.clear, but it seems to be broken. maybe it works for you.

http://tracker.sphere.torfo.org/bugs/view.php?id=2084

alternatively you can write your own attacker thing with @gethit and mysql.
(This post was last modified: 08-18-2012 04:18 PM by Shaklaban.)
08-18-2012 04:17 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #6
RE: attacker
I need to calculate damage. If player did attack with 50 for example, but enemy have armor and he got only 25 damage, how i can calculate it was 25 damage? Because ON=@GetHit shows full amount of attackers hit, but not shows really received damage after armor calculation. I can put memory with timer and calculate new amount of hits with previous amount.. but that timer have delay 1 second. Somebody can drink heal potion instantly after hit in same second, and then memory will count received damage incorrect.
(This post was last modified: 08-19-2012 01:31 PM by Art.)
08-19-2012 01:30 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #7
RE: attacker
You can clear all attackers using attacker.clear in on=@gethit
You can find all 'attacker' functions in revisions.txt inside your server folder, just find for 'attacker'.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
08-19-2012 01:40 PM
Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #8
RE: attacker
I have Sphere build of 2009 year. I tried use attacker.clear and it said wrong command. Or it works only in gethit? I need remove attackers only once, before fight. So i should call before fight gethit with attacker.clear ?
Previous question about gethit and getting amount of real damage i asked because of 'write own thing'.
08-19-2012 06:03 PM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #9
RE: attacker
attacker.clear not exist on the 2009 build. you maybe you can try to combine @gethit with @userstats. @userstats triggered when players stats, hp, gold etc. changed and new status packet needs to be sended to client.

example:

Code:
on=@gethit
tag.oldhits=<hits>
tag.attacker=<src>

on=@userstats
ref1=<tag0.attacker>
if <ref1>
    sysmessage hits before <ref1.name> hit me: <tag0.oldhits>
    sysmessage hits after <ref1.name> hit me: <hits>
endif

also you can try to use timerd (which can have 0.1 seconds minimum but in 0.1 second player still can get hit etc.)
(This post was last modified: 08-19-2012 09:09 PM by Shaklaban.)
08-19-2012 09:08 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Art
Journeyman
*

Posts: 118
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2012
Reputation: 0



Post: #10
RE: attacker
I'm already using timerd item on the ground for calculation received damage, but it's not always correct. Because character can receive few damages at same 0.1 second.

But thank you for advice about on=@userstats, didn't knew about it. I will try it.

Hm just tested

ON=@UserStats
serv.log TEST

And this works only when i press 'Status' button. It doesn't works when character fights and his stats changing Sad
(This post was last modified: 08-19-2012 11:41 PM by Art.)
08-19-2012 11:31 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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