Ir para conteúdo

[8.6] Task System 4.0! (Task system + Daily Task System)

Featured Replies

Postado

@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 por Bruno Rezende
correção de informação (veja o histórico de edições)

  • 3 weeks later...
  • Respostas 296
  • Visualizações 45.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • tenta deixar essa linha: if isPlayer(cid) and isMonster(target) and not isSummon(target) then assim if isPlayer(cid) and isMonster(target) then   e testa

  • gostei dessa ideia, então estou num projeto e estou meio sem tempo, já passei parto do simple task pra tfs 1.2 e tal. terminando esse projeto e de passar o sistema pra tfs 1.2 eu começo a editar o sis

Posted Images

Postado
  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

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo