Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local exhaust = createConditionObject(CONDITION_EXHAUST)
- setConditionParam(exhaust, CONDITION_PARAM_TICKS, 30000)
- setConditionParam(exhaust, CONDITION_PARAM_SUBID, 4)
- function onSay(cid, words, param, channel)
- local a = getCreatureStorage(cid, 127)
- if a == -1 then
- return true
- end
- if param == '' or tonumber(param) == nil then
- doCreatureSay(cid, 'Invalid answer.', TALKTYPE_ORANGE_1, false, cid)
- elseif hasCondition(cid, CONDITION_EXHAUST, 4) then
- doPlayerSendCancel(cid, 'Please wait before answering again.')
- elseif tonumber(param) ~= a then
- doAddCondition(cid, exhaust)
- doCreatureSay(cid, 'Incorrect answer.', TALKTYPE_ORANGE_1, false, cid)
- else
- for i = 125, 128 do
- doCreatureSetStorage(cid, i)
- end
- doCreatureSay(cid, 'Thank you for not afking!', TALKTYPE_ORANGE_1, false, cid)
- end
- return true
- end
Add Comment
Please, Sign In to add comment