anyone can explain for me this script ??
Code:
local key = 125
function onKill(cid, target, damage, flags)
if isMonster(target) and getPlayerLevel(cid) >= 400 and getCreatureMaxHealth(target) >= 500 and getCreatureMaster(target) == target and getCreatureStorage(cid, 126) == -1 then
local n = math.max(0, getCreatureStorage(cid, key)) + 1
doCreatureSetStorage(cid, key, n)
if n >= 800 then
local add, a, b, r = math.random(2) == 1
if add then
a, b = math.random(20), math.random(20)
else
a = math.random(5, 25)
b = math.random(a-1)
end
doCreatureSay(cid, "Please answer this question within 10 minutes to avoid being banished: " .. a .. (add and "+" or "-") .. b .. " = ?\nExample 1+1: !answer 2", TALKTYPE_ORANGE_1, false, cid)
doCreatureSetStorage(cid, 126, ',' .. a .. (add and "+" or "-") .. b)
doCreatureSetStorage(cid, 127, add and a+b or a-b)
doCreatureSetStorage(cid, 128, os.time() + 600)
end
end
return true
end