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
Question
Author Message
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #21
RE: Question
hmmm its for 56b or 56c?

I think @step is much lighter than @userstats, and more acurrate... what do u think?

ON=@Step

ON=@UserStats //is
01-14-2016 04:00 AM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #22
RE: Question
Can't remember, but i would use 0.56c anyways Big Grin I think that @UserStats would be lighter, but i would hear also Coruja's suggestions. Try to do:
ON=@UserStats
SERV.LOG userstats
and look how much times it's called in 10 seconds, then i would compare it to a char or two in a dungeon with some npcs, which means probably more calls in this case than @userstats
01-14-2016 04:08 AM
Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #23
RE: Question
my fear is:

I only want to set the stam from 0 to 1 when the player moves.

if u put it on @userstat, it will be countinusly check the stam even if there is no need too check it.. (player not moving)

If I put on @step trigger, maybe it check for stams more time, but only when its totally necessary (player walking)
So.. i think its more accurate and consume less pc power.


Is there anyway to put this 3 lanes into a single lane?

IF (<stam><2)
stam=1
endif

maybe something like this?

stam = <qval (<stam> < 2) ? 1 : <stam>>

this will be lighter right??? Can it be more light than this? ty
01-14-2016 04:32 AM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #24
RE: Question
Scripting engine is complicated, i can't give you a theoric answer. Best way to try is to put the code inside a FOR 10000 loop and SERV.LOG <SERV.TIME> before and after the loop, and compare the time elapsed doing the if/endif or qval check.
As you said, if @step checks stam more times, then it'll be heavier than @userstats Tongue to be lighter not only the players should be most of the time still, but also the npcs in the active sectors. Moreover, imagine 10 chars running for 10 minutes, it isn't that light

Inviato dal mio LG-D855 utilizzando Tapatalk
(This post was last modified: 01-14-2016 04:51 AM by karma.)
01-14-2016 04:50 AM
Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #25
RE: Question
yeah I need to do some check as u point. ty

I think the first method is lighter, more lanes but less bites.

Anyway, u lose stam while running so it will execute the trigger. 10 guys running gonna do almost the same checks, but if they also fight will be check even more than @step cos check more times.
Dont know. lets test as u said. Ty for the advice.
01-14-2016 04:59 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #26
RE: Question
I cant remember exactly, but the server and also the client have stamina checks

the client by default can't walk over chars that have stam > your stam. This check can be skipped only on trammel facet (map1) which probably the check is on client-side too. The server also have some extra internal checks just to block noob players using stamina hack trying to exploit these client stamina checks to walk over chars even when it's not possible

a possible example that could break server checks is when the client try to walk over another char with stam > your stam. The client itself will block the movement and won't even send the walk packet to server, so in this case there's nothing that can be done on server-side

also when the server block the movement, it will cause a small rubberband effect on client. When the client block the movement itself there's no rubberband because the client don't even tried to walk. But when it send the walk request to server and the server block it, this will cause an rubberband effect making sending the char back to previous position
01-19-2016 02:13 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #27
RE: Question
Ty coruja and karma. u helped me a lot.
01-19-2016 03:49 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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