Postado Outubro 4, 2021 3 anos @Vodkart estou com 2 problemas no sistema: * Eu usei sua correção para os kills que registravam string no storage, mas ai parou de contar os bichos pra task * Gostaria que no comando /task viesse quantos pontos de task o player já tem Editado Outubro 4, 2021 3 anos por Bruno Rezende correção de informação (veja o histórico de edições)
Postado Outubro 19, 2021 3 anos Em 20/08/2019 em 13:33, Vodkart disse: pra quem tem o bug no distro que troca os números da storage por string. no mods: troca <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> por <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[3]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[5]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> Não funcionou no meu servidor, os monstros continuam não caindo (as vezes) e o valor vai incorreto pro Storage
Postado Outubro 27, 2021 3 anos Em 19/10/2021 em 16:07, Bruno Rezende disse: Não funcionou no meu servidor, os monstros continuam não caindo (as vezes) e o valor vai incorreto pro Storage @Vodkart ainda dá suporte pra esse script?
Postado Outubro 27, 2021 3 anos Autor Em 27/10/2021 em 15:26, Bruno Rezende disse: @Vodkart ainda dá suporte pra esse script? Sim, mas preciso ver os erros, qual distro é, etc... me manda seu discord [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Outubro 27, 2021 3 anos Em 27/10/2021 em 16:12, Vodkart disse: Sim, mas preciso ver os erros, qual distro é, etc... me manda seu discord @Vodkarttava falando contigo la: p0t1nh0 #2150
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.