Postado Abril 30, 2018 7 anos Solução 3 horas atrás, Jociel disse: @Luis360 vo testa jaja digo o resultado Edit: Eu testei e deu o seguinte erro [30/04/2018 09:58:26] [Error - LuaScriptInterface::loadFile] data/actions/scripts/bonus/mystic protector.lua:27: ')' expected near 'ï' [30/04/2018 09:58:26] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/bonus/mystic protector.lua) [30/04/2018 09:58:26] data/actions/scripts/bonus/mystic protector.lua:27: ')' expected near 'ï' @Luis360 Agora deve funcionar. local config = { storageSummon = 7475, storageTime = 7477, tempo = 20 -- equivale a 20 segundos } local pet = { ["Rinnegan [Protector]"] = {201,1000}, ["Rinnegan [Protector]"] = {201,1000} } function onUse(cid, item, fromPosition, target, toPosition, isHotkey) if #getCreatureSummons(cid) > 1 then doPlayerSendCancel(cid,"Your Demonio is already summoned.") end if getPlayerStorageValue(cid,config.storageSummon) == 1 then local z = getCreatureSummons(cid)[1] addEvent(function() setPlayerStorageValue(cid, config.storageSummon, -1) setPlayerStorageValue(cid, config.storageTime, os.time()+ config.tempo) end, 100) doCreatureSay(cid,"Back my summon!",TALKTYPE_ORANGE_1) doSendMagicEffect(getCreaturePosition(z), 2) doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3) return doRemoveCreature(z) end local summons = getCreatureSummons(cid) if ( not getTilePzInfo(getCreaturePosition(cid)) ) then if ( getPlayerStorageValue(cid, config.storageTime) <= os.time() ) then for k,v in pairs(pet) do -- 1 if getPlayerStorageValue(cid,config.storageSummon) < 1 then if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2 if (table.maxn(summons) < 1)then -- 3 x = doSummonCreature(k, getCreaturePosition(cid)) doConvinceCreature(cid, x) setPlayerStorageValue(cid,4194,1) setPlayerStorageValue(cid,config.storageSummon,1) doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2) end end end end else return doCreatureSay(cid, "Espere "..config.storageTime.." para usar novamente", TALKTYPE_ORANGE_1) end else doCreatureSay(cid, "Voce nao pode usar em area Protection Zone", TALKTYPE_ORANGE_1) end return true end OBS: Testei no meu otServ e está funcionando normal.
Postado Abril 30, 2018 7 anos Autor @Luis360 Cara Vlw Vc é um Gênio REP + 3 Vlw ? EDIT: @Luis360 se puder me ajuda em mais 1 pequeno bug agradeço ! quando um player usa o item ele chamar o protetor porem ele pode passar para outro player chamar o protetor ttbm! se me ajuda nisso dou mais Rep+ Editado Abril 30, 2018 7 anos por Jociel EDIT (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.