script:
function onModalWindow(cid, modalWindowId, buttonId, choiceId)
local rank = getCreatureStorage(cid, rankStorage)
if rank < 0 then
doCreatureSetStorage(cid, rankStorage, 0)
end
local r_string = function() if tasks[choiceId].repeatable then return...