Did you previously run a crack?
Printable View
So, do you have any ETA on a fix?
Thanks for fixing skinner DarkstaR. Works much, much better now.
@DarkstaR
Since when is the function sleep only in steps of 100 ms ?
A lot of scripts have parts in it like : wait(250,350)
Since this is random it will almost always make the script sleep for exactly 300ms ... So crazy detectable?!?!
lua code:
function Rounder(num)
return math.floor(num*100)*10
end
for i = 1, 100 do
local s = os.clock()
wait(250,350)
print(Rounder(os.clock() - s))
end
Are you sure about that ? :P Did some tests:
wait(150,200) sleeps 100.0% for 200 ms and 0.0% for 0ms (993tests)
wait(150,210) sleeps 82.4% for 200 ms and 17.7% for 300ms (998tests)
wait(150,220) sleeps 70.2% for 200 ms and 29.8% for 300ms (1000tests)
wait(150,230) sleeps 62.8% for 200 ms and 37.2% for 300ms (1000tests)
wait(150,240) sleeps 56.9% for 200 ms and 43.1% for 300ms (1000tests)
wait(150,250) sleeps 51.6% for 300 ms and 48.5% for 200ms (996tests)
wait(150,260) sleeps 54.6% for 300 ms and 45.4% for 200ms (1000tests)
wait(150,270) sleeps 56.4% for 300 ms and 43.7% for 200ms (999tests)
wait(150,280) sleeps 60.9% for 300 ms and 39.1% for 200ms (1000tests)
wait(150,290) sleeps 62.7% for 300 ms and 37.3% for 200ms (1000tests)
wait(150,300) sleeps 63.3% for 300 ms and 36.7% for 200ms (1000tests)
and:
sleep(100) sleeps 78.3% for 100 ms and 8.7% for 102ms (69tests)
sleep(110) sleeps 81.0% for 200 ms and 5.0% for 203ms (100tests)
sleep(120) sleeps 65.0% for 200 ms and 15.0% for 201ms (100tests)
sleep(130) sleeps 74.0% for 200 ms and 11.0% for 201ms (100tests)
sleep(140) sleeps 69.0% for 200 ms and 20.0% for 201ms (100tests)
sleep(150) sleeps 76.0% for 200 ms and 8.0% for 201ms (100tests)
sleep(160) sleeps 67.0% for 200 ms and 15.0% for 201ms (100tests)
sleep(170) sleeps 76.0% for 200 ms and 19.0% for 201ms (100tests)
sleep(180) sleeps 74.0% for 200 ms and 12.0% for 201ms (100tests)
sleep(190) sleeps 64.0% for 200 ms and 12.0% for 202ms (100tests)
I dunno if this is new ! else i would explain the deletion spree im on :(
Just try it yourself their must be a math.ceil in your c thing!
lua code:
for i = 1, 10 do
local n = i*10 + 100
local s = os.clock()
for j = 1, 10 do
sleep(n)
end
print((os.clock() - s)*100)
end
so @DarkstaR please fix this :x
Code:int XenoScript::luaSleep(lua_State *L){
XenoScript* currentScript = XenoScript::GetCurrentScript(L);
if (!XenoScript::VerifyArgs(L, currentScript, "luaSleep", 1)) return 1;
int time = max(XenoScript::GetIntegerArg(L, 1), 100);
int criticals = currentScript->inLock;
while (currentScript->inLock > 0)
currentScript->endOperation();
while (time > 0)
{
scriptSuicideAttempt(currentScript);
int sleepFor = min(time, 100);
Sleep(sleepFor);
time -= sleepFor;
}
while (currentScript->inLock < criticals)
currentScript->beginOperation();
lua_pushnumber(L, 1);
return 1;
}
The code is fine. If this is a problem, it has something to do with the thread synchronization. I'll check it out soon.
Is it only me , it will only let me run 2 tibias , if i open a 3rd my 2 other accs just discconnect why?