function onUse(cid, item, frompos, item2, topos)
local go = "Rat"
if getPlayerLevel(cid) >= 11 and getPlayerLevel(cid) <= 20 then
go = "Monk"
elseif getPlayerLevel(cid) >= 21 and getPlayerLevel(cid) <= 30 then
go = "Dragon"
elseif getPlayerLevel(cid) >= 31 and getPlayerLevel(cid) <= 40 then
go = "Dragon Lord"
end
end
local summon = getCreatureSummons(cid)
---------------------------------------------------
if #summon >= 1 then
for _, pid in ipairs(summon) do
doRemoveCreature(pid)
doCreatureSay(cid, "Can go rest ["..go.."]", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, 1978, 1)
doPlayerAddItem(cid, 1979, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You used the sacred book of the Necromancers , now wait 30 minutes to use again!.")
end
return true
end
doConvinceCreature(cid, doSummonCreature(go, getCreaturePosition(cid)))
doCreatureSay(cid, "Let battle ["..go.."]", TALKTYPE_ORANGE_1)
return true
end
Quero adicionar um tempo entre as ações doPlayerAddItem(cid, 1978, 1) e doPlayerAddItem(cid, 1979, 1).
Tempo de 10 segundos, acontece a função doPlayerAddItem(cid, 1978, 1) e depois de 10 segundos acontece a doPlayerAddItem(cid, 1979, 1), podem me ajudar ?