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
Swing swinging at record of the fight + source
Author Message
Khaos
Master
**

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



Post: #11
RE: Swing swinging at record of the fight + source
It needs to be an option in the hard code as I stated to Coruja. I know what you mean. I do remember there being a delay in the past before the first swing on EA. I am just sort of swamped with my own server to even look into the source right now to fix it or add in optional post hit delays.
02-18-2016 12:17 PM
Find all posts by this user Like Post Quote this message in a reply
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #12
Question RE: Swing swinging at record of the fight + source
(02-18-2016 12:17 PM)Khaos Wrote:  It needs to be an option in the hard code as I stated to Coruja. I know what you mean. I do remember there being a delay in the past before the first swing on EA. I am just sort of swamped with my own server to even look into the source right now to fix it or add in optional post hit delays.

If he agree that would be awesome. Smile
(This post was last modified: 02-19-2016 11:29 AM by Mad Gunther.)
02-19-2016 11:28 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: #13
RE: Swing swinging at record of the fight + source
Unf. I wish I had time. I would do it myself. If someone doesn't get around to it, I might check it out and see what I can do. There are a few other things I am considering as well.
02-19-2016 11:37 AM
Find all posts by this user Like Post Quote this message in a reply
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #14
RE: Swing swinging at record of the fight + source
(02-19-2016 11:37 AM)Khaos Wrote:  Unf. I wish I had time. I would do it myself. If someone doesn't get around to it, I might check it out and see what I can do. There are a few other things I am considering as well.

Ok if you through it and need some info,help or whatever let me know and just knock yourself out, greetings.
02-21-2016 03:13 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: #15
RE: Swing swinging at record of the fight + source
(02-21-2016 03:13 AM)Mad Gunther Wrote:  
(02-19-2016 11:37 AM)Khaos Wrote:  Unf. I wish I had time. I would do it myself. If someone doesn't get around to it, I might check it out and see what I can do. There are a few other things I am considering as well.

Ok if you through it and need some info,help or whatever let me know and just knock yourself out, greetings.

OKay
(This post was last modified: 02-21-2016 09:13 AM by Khaos.)
02-21-2016 09:12 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: #16
RE: Swing swinging at record of the fight + source
Just an IDEA. Not tested and probably should reference ATTACKER lists instead, but this was quickly done to give you an idea of how to simulate what you want in game.

Code:
// Add to player
on=@DClick
if (<src.flags> |statf_warmode)
if (<src.tag0.first_swing.<argv0>> != <uid>)
  src.tag.first_swing=<uid>,0
endif
endif

on=@HitTry
if (<src.tag0.first_swing.<argv1>> == 1)
return 0
else
src.tag0.first_swing.<argv1> == 1
argn1=1.2
endif

on=@Kill
// replace this with a forloop on @Death with NPC later. I don't feel like coding it.
if (<src.tag0.first_swing.<argv0>> == <argo.uid>)
src.tag0.first_swing=1,1
endif

Really this could be handled in this manner or a memory object or attacker list with more detail. But it can be done.
(This post was last modified: 02-21-2016 12:00 PM by Khaos.)
02-21-2016 12:00 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Khaos's post
XuN
Sphere Developer
*****

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



Post: #17
RE: Swing swinging at record of the fight + source
I might not get the whole concept here, the thread is full of large posts Tongue, so I might say something already wroten:

local.AnimDelay sets a delay telling sphere how much time wait to start the animation, setting it to 1 (not 10) will emulate the old behaviour (it was doing SetTimeout(), hence firing in the next tick, NOT at the next second).

You can add different ARGN1 values for new and old enemies by using something like this:
Code:
ON=@CombatAdd //called when a combat starts (memories are added, and so) with someone.
ctag.firstStrike<src>=1 //ctag will make it faster, since people don't seem to use it a lot, it's being cleared automatically and tag count seems to be insane on most servers.

ON=@CombatDel // called when memories of a target expire out ( timer = AttackerTimeout (sphere.ini) ).
ctag.firstStrike<src> // removing this ctag.

ON=@HitTry
if (<ctag0.firstStrike<src>>) // first time we are going to thit this target
ctag.firstStrike<src> // should this be cleared after trying to hit?? we may fail, run away, etc ... you might want to have this removed on a successfull @Hit or @HitMiss.
ARGN1 += 10 // add this +1second to the delay
endif

About strike back you can try something like this:
Code:
ON=@Attack
src.attacker.add <uid>
So the target will have you as enemy and try to fight you out (if he doesn't have more enemies with higher priority, etc already).
02-23-2016 05:56 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like XuN's post
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #18
RE: Swing swinging at record of the fight + source
Thanks for the answers guys. i have this end of weekend some time to spare so i´m gonna give a try, both are really helpful i think that working on this with a couple tweaks are gonna work like i want. I´ll post the script if it works asap, greetings.
02-27-2016 03:07 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Mad Gunther's post
Mad Gunther
Apprentice
*

Posts: 45
Likes Given: 11
Likes Received: 5 in 5 posts
Joined: Oct 2015
Reputation: 1



Post: #19
RE: Swing swinging at record of the fight + source
Hello again and sorry for being too slowly to answer hehe. I have been able to finally match the system to my 51a purposes ^^. The issue got complicated since the pre delay is fire in 4 differents situations and not just in one like i thought at first. I have been spending more time this weeks testing with 51a than rather scripting in 0.56c to make damn sure it works 100%.

This system only should work for characters, npc´s should not use it if you want to replicate the old era.

Some info.

The script:

Code:
[events e_51a_combat]
ON=@HitTry
if (<ctag0.restartstrike<uid>>)
ctag0.firststrike<uid>=1
ctag0.strikefire<uid>=<serv.time>
ctag0.restartstrike<uid>//clear the tag.
ctag0.combatstarted<uid>=1
return 1
endif
if (<ctag0.engaged<uid>>!=<src.uid>)
ctag0.firststrike<uid>=1
ctag0.strikefire<uid>=<serv.time>
ctag0.engaged<uid>=<src.uid>
ctag0.combatstarted<uid>=1
return 1
endif
if (<ctag0.firststrike<uid>>)
if (<serv.time> > <ctag0.strikefire<uid>>+<eval <dargn1>>-18)
ctag0.firststrike<uid>//clear the tag.
ctag0.strikefire<uid>//clear the tag.
return 0
else
return 1
endif
endif

On=@Userwarmode
if (<ctag0.combatstarted<uid>>)
if (<argn1>==1)
ctag0.restartstrike<uid>=1
ctag0.combatstarted<uid>//clear tag.
endif
endif

On=@Hitmiss
if !(<ctag0.firststrike<src>>) || (<ctag0.engaged<src>>!=<uid>)
src.attacker.add <uid>
endif

ON=@CombatAdd
ctag0.firststrike<uid>=1
ctag0.strikefire<uid>=<serv.time>
ctag0.combatstarted<uid>=1


local.animdelay and argn1 values are at your own since every 51a server is different even using this pre-delay system because these values.

I have checked the script ingame and it works very good for me. I don´t know if using <serv.time> many times like these can bring trouble, that is the clearest way for me to achieve it. I´m building my server for just a few friends so it doesn´t scare too much the hell out of me right now.

Any feedback, revision or idea just let me know, the goal is to run it without bugs. Thanks again to Khaos,XuN and Coruja. Their help has been very helpful, with these guys is really hard to give up.
(This post was last modified: 03-17-2016 11:47 AM by Mad Gunther.)
03-17-2016 11:45 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Mad Gunther's post
Post Reply 


Forum Jump:


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