Presiso Uma Scripts Modificada Asim
Teno Esta Scripts
script sim error
function onUse(cid) local monster = { ["Mew"] = {1, 1800} } local cd = { cdtime = 86400, --//-- quanto tempo fica sem usar o item str = 69872, } tempo = 60000*30 --//-- tempo em segundos que o monstro vai ajudar o player summon = getCreatureSummons(cid) for l, m in pairs(monster) do if getPlayerStorageValue(cid, cd.str) < os.time() and summon then setPlayerStorageValue(cid, cd.str, os.time() + cd.cdtime) doConvinceCreature(cid, doSummonCreature(l, getCreaturePosition(cid))) doRemoveItem(item.uid, 1) -- Essa função faz com que o item seja removido! doCreatureSay(cid, "Go!", 1) doSendMagicEffect(getThingPos(cid), 10) break else return doPlayerSendTextMessage(cid, 25, 'Tienes Que Esperar 1 hora para volver a usar este item..') and doSendMagicEffect(getThingPos(cid), 2) end end for _, monster in ipairs(getCreatureSummons(cid)) do addEvent(doRemoveCreature, tempo, monster) end if summon and getPlayerStorageValue(cid, cd.str) >= os.time() or getPlayerStorageValue(cid, cd.str) < os.time() then for n, p in ipairs(summon) do doRemoveCreature(p) end end return true end
mais presiso uma scripts asim
scripts com error
local config = { -- Mew and Mewtwo Cards -- [19846] = {name = "Cmew", cd = 2 * 60 * 60, remove = true}, [19847] = {name = "Cmewtwo", cd = 2 * 60 * 60, remove = true}, -- Legendary Cards -- [19849] = {name = "Cmoltres", cd = 2 * 60 * 60, remove = true}, [19850] = {name = "Czapdos", cd = 2 * 60 * 60, remove = true}, [19851] = {name = "Carticuno", cd = 2 * 60 * 60, remove = true}, -- Other Cards -- [19580] = {name = "Cporygon", cd = 2 * 60 * 60, remove = true}, [19848] = {name = "Cdragonite", cd = 2 * 60 * 60, remove = true}, [19853] = {name = "Caerodactyl", cd = 2 * 60 * 60, remove = true}, [19852] = {name = "Csnorlax", cd = 2 * 60 * 60, remove = true} } -- cd em segundos local cdStorage = 53799 function onUse(cid, item, frompos, item2, topos) local usedItem = config[item.itemid] if usedItem then if getPlayerLevel(cid) >= 120 then local att = getPlayerStorageValue(cid, cdStorage) if att == -1 or os.time() >= tonumber(att)+usedItem.cd or isGod(cid) then if getChanceCard(item.uid) >= 1 then doCreateNpcWithFocus(usedItem.name, getClosestFreeTile(cid, getCreaturePosition(cid)), cid) setPlayerStorageValue(cid, cdStorage, os.time()) --setPlayerStorageValue(cid, 2152525, 1) removeChanceCard(item.uid) doSendMsg(cid, "Para mais informações sobre o card: https://trello.com/c/L19NuYta/16-pokémon-card") else if usedItem.remove then doRemoveItem(item.uid, 1) end end else stringTime = math.floor(((tonumber(att)+usedItem.cd)-os.time())) stringMinOrSec = "segundos" if stringTime > 60 then stringTime = math.floor(stringTime/60) stringMinOrSec = "minutos" end doPlayerSendCancel(cid, "Você poderá usar novamente em: "..stringTime.." "..stringMinOrSec) end end else doPlayerSendCancel(cid, "Você precisa de level 120 para poder usar o card.") end return true end