Hello all!
I don't know this work for 100%, i'm not tested it, but i had PM for script it!
should work... if any errors ingame/console report in this thread.
Player don't get any warnings, this a suprise, when him/his get ban. (no warning for more tries, when lag etc. ^^); d
Whats should work?
1. in random time (5-25 minutes) event start and add paralyze for 2 seconds.
2. first event start's next event (every 0.01 second) which tests time to lost paralyze
3. next event start's when paralyze has been lost and looks times when last paralyzes has lost...
4. if 3 paralyzes are losen in the same time - auto ban 24H!, easy?
I don't know this work for 100%, i'm not tested it, but i had PM for script it!
should work... if any errors ingame/console report in this thread.
Player don't get any warnings, this a suprise, when him/his get ban. (no warning for more tries, when lag etc. ^^); d
Whats should work?
1. in random time (5-25 minutes) event start and add paralyze for 2 seconds.
2. first event start's next event (every 0.01 second) which tests time to lost paralyze
3. next event start's when paralyze has been lost and looks times when last paralyzes has lost...
4. if 3 paralyzes are losen in the same time - auto ban 24H!, easy?
PHP:
local tests = {}
function delParal(o)
local cid = o[1]
local _time = o[2]+10
if not(getPlayerCondition(cid, CONDITION_PARALYZE)) then
table.insert(tests[getPlayerGUID(cid)], _time)
getParals(cid)
else
addEvent(delParal, {cid, _time}, 10)
end
end
function getParals(cid)
local tested = {}
local warn = 0
for _,test in ipairs(tests[getPlayerGUID(cid)]) do
if(isInArray(tested, test)then
warn = warn+1
else
table.insert(tested, test)
end
end
if(warn == 3)then
doAddBanishment(getPlayerAccountID(cid), 24 * 3600, 23, ACTION_BANISHMENT, "Anti-paralyze", getPlayerGUID(cid), "Anti-paralyze")
end
end
function paralyzeTest(cid)
if not(getPlayerCondition(cid, CONDITION_PARALYZE)) then
local paral = createConditionObject(CONDITION_PARALYZE)
setConditionParam(paral, CONDITION_PARAM_TICKS, 2000)
doAddCondition(cid, paral)
addEvent(delParal, {cid, 0}, 10)
addEvent(paralyzeTest, cid, math.random(1000*60*5, 1000*60*30))
else
addEvent(paralyzeTest, cid, math.random(1000*60*1, 1000*60*3)
end
end
function onLogin(cid)
if(type(tests[getPlayerGUID(cid)]) ~= "table")then tests[getPlayerGUID(cid)] = {} end
addEvent(paralyzeTest, cid, math.random(1000*60*5, 1000*60*30))
return TRUE
end