![]() |
Question - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Question (/Thread-Question) |
RE: Question - rastrero - 01-14-2016 04:00 AM 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 RE: Question - karma - 01-14-2016 04:08 AM Can't remember, but i would use 0.56c anyways ![]() 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 RE: Question - rastrero - 01-14-2016 04:32 AM 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 RE: Question - karma - 01-14-2016 04:50 AM 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 ![]() Inviato dal mio LG-D855 utilizzando Tapatalk RE: Question - rastrero - 01-14-2016 04:59 AM 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. RE: Question - Coruja - 01-19-2016 02:13 AM 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 RE: Question - rastrero - 01-19-2016 03:49 AM Ty coruja and karma. u helped me a lot. |