Postado Julho 31, 2014 10 anos Estou com esse problema: http://prntscr.com/487rh5 script: local config = { ['verminor'] = {amount = 2000, storage = 19555, startstorage = 5555, startvalue = 1}, } function onKill(cid, target) local monster = config[getCreatureName(target):lower()] if isPlayer(target) or not monster or isSummon(target) then return true end if getPlayerStorageValue(cid, monster.storage) >= -1 and (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Task: Matou '..(getPlayerStorageValue(cid, monster.storage)+1)..' de '..monster.amount..' '..getCreatureName(target)..'s.') end if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Parabens, voce matou '..(getPlayerStorageValue(cid, monster.storage)+1)..' '..getCreatureName(target)..'s e completou a missao dos '..getCreatureName(target)..'s.') setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1) end return true end
Postado Julho 31, 2014 10 anos Testa Assim local config = { ['verminor'] = {amount = 2000, storage = 19555, startstorage = 5555, startvalue = 1}, } function onKill(cid, target) local monster = config[getCreatureName(target):lower()] if isPlayer(target) or not monster or isSummon(target) then return true end if getPlayerStorageValue(cid, monster.storage) > -1 and (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Task: Matou '..(getPlayerStorageValue(cid, monster.storage)+1)..' de '..monster.amount..' '..getCreatureName(target)..'s.') end if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Parabens, voce matou '..(getPlayerStorageValue(cid, monster.storage)+1)..' '..getCreatureName(target)..'s e completou a missao dos '..getCreatureName(target)..'s.') setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1) end return true end
Postado Julho 31, 2014 10 anos Autor Da a mesma coisa, fora que os bixos ficam no ar quando morrem, nao caiem...
Postado Agosto 12, 2014 10 anos Autor up Olha como fica a storage na database quando buga: http://prntscr.com/4byje3
Postado Agosto 12, 2014 10 anos O script ficou meio noob, mas não acostumei trabalhar daquela forma acima, mas o que vale é funcionar. Removido Boa sorte. Editado Agosto 13, 2014 10 anos por Adriano SwaTT (veja o histórico de edições) Gosta do meu trabalho? Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs. Atenciosamente,Adriano Swatt' Para ver meus tutoriais acesse meu perfil.
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.