Ir para conteúdo

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

Featured Replies

Postado

Funcionou , vlw... deixei assim para evitar que o player mate 1 bicho sumon e conte tb... 

if isPlayer(cid) and ehMonstro(target) and not isSummon(target) then

 

pode adicionar isso no topico, se quiser avisar que funciona em PDA , 8.54 e só tem que por essa tag ae.

2 horas atrás, kbpaulo disse:

Funcionou , vlw... deixei assim para evitar que o player mate 1 bicho sumon e conte tb... 


if isPlayer(cid) and ehMonstro(target) and not isSummon(target) then

 

pode adicionar isso no topico, se quiser avisar que funciona em PDA , 8.54 e só tem que por essa tag ae.

 

 

@Vodkart vlw... Aqui sei que e na 3.0 pq vejo seguindo esse Mod seu deis do 1.0.  a task em sequencia e bom pois tenho um sistema de saga e vou intercalar com ela , mais essa task diaria tem como aparecer 1 lista e o player escolher? ou mexiria de mais no script, como npc , etc.

* dica pro 5.0 xD..-- você escolher se quer que o player faça em ordem ou ele que escolha a task ou diaria que ele quer fazer ..kkkk

tipo 1 local dentro do mod = automatico = true/false

 

Achei outro erro  no look verifiquei  que o PDA tem uma função look e acho que vai ter que adapitar para ver o rank das tasks

olhe

Lib tem isso.

 

Spoiler



function getPlayerDesc(cid, thing, TV)
if (not isCreature(cid) or not isCreature(thing)) and not TV then return "" end

local pos = getThingPos(thing)
local ocup = youAre[getPlayerGroupId(thing)]
local rank = (getPlayerStorageValue(thing, 86228) <= 0) and getPlayerVocationName(thing) or lookClans[getPlayerStorageValue(thing, 86228)][getPlayerStorageValue(thing, 862281)] 
-- local rank = "..getPlayerVocationName(thing).." and lookClans[getPlayerStorageValue(thing, 86228)][getPlayerStorageValue(thing, 862281)] or false
local name = thing == cid and "yourself" or getCreatureName(thing)     
local art = thing == cid and "You are" or (getPlayerSex(thing) == 0 and "She is" or "He is")
local vocation = getPlayerVocationName(thing)

local str = {}
table.insert(str, "You see "..name..". "..art.." ")
if youAre[getPlayerGroupId(thing)] then
	if getPlayerStorageValue(thing, 86228) > 0 then
		table.insert(str, (ocup).." , "..getPlayerVocationName(thing).." end "..rank.." from ".. getTownName(getPlayerTown(thing))..".")   
	else
		table.insert(str, (ocup).." end "..rank.." from ".. getTownName(getPlayerTown(thing))..".")   
	end
else
	if getPlayerStorageValue(thing, 86228) > 0 then
   -- table.insert(str, (rank).." from ".. getTownName(getPlayerTown(thing))..".") 
		table.insert(str, (vocation).." e "..rank.." da ".. getTownName(getPlayerTown(thing))..".")
	else
		table.insert(str, (vocation).." da ".. getTownName(getPlayerTown(thing))..".")
	end
end
if getPlayerGuildId(thing) > 0 then
   table.insert(str, " "..art.." "..getPlayerGuildRank(thing).." from the "..getPlayerGuildName(thing)..".")
end
if TV then
   table.insert(str, " "..art.." watching TV.")
end
table.insert(str, ((isPlayer(cid) and youAre[getPlayerGroupId(cid)]) and "\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]" or "")) 

return table.concat(str) 
end


 

 

 

CreatureEvent tem isso. LOOK

 

if isPlayer(thing.uid) then     --player
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false))  
return false
end

 

por isso o look do mod não funfa, pode ser isso?

Editado por kbpaulo (veja o histórico de edições)

  • Respostas 296
  • Visualizações 46.6k
  • 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

@Vodkart Testei o sistema em um servidor 0.4 funcionou, porém hora de receber a recompensa ele me da 2000 de exp mesmo eu configurando no mods, sabe o que pode ser ?

 

Postado
Em 26/04/2018 em 23:02, hortense95 disse:

@Vodkart Testei o sistema em um servidor 0.4 funcionou, porém hora de receber a recompensa ele me da 2000 de exp mesmo eu configurando no mods, sabe o que pode ser ?

 

 

 

a premiação fica no NPC nessa parte se for diaria ou task sequenciada.
 

Spoiler

 


if v then -- original task(sequencia)
            if getPlayerStorageValue(cid, v.start) > 0 then
                if getPlayerStorageValue(cid,task_sys_storages[3]) >= v.count then
                    if #v.items > 0 and not doRemoveItemsFromList(cid, v.items) then
                        npcHandler:say("Desculpe, Mas você também precisa entregar os itens desta lista: "..getItemsFromList(v.items), cid) return true
                    end
             if v.exp > 0 then      doPlayerAddExp(cid, v.exp) str = str.."".. (str == "" and "" or ", ") .." "..v.exp.." de exp" end
                 if v.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+v.points)) str = str.."".. (str == "" and "" or ", ") .." + "..v.points.."task points" end
                 if v.money > 0 then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ", ") ..""..v.money.." gps" end
                 if table.maxn(v.reward) > 0 then GiveRewardsTask(cid, v.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(v.reward) end
                    npcHandler:say("Obrigado pela sua ajuda Recompensas: "..(str == "" and "nenhuma" or ""..str.."").." por ter completado a task do "..v.name, cid)
                    setPlayerStorageValue(cid, task_sys_storages[3], 0)
                    setPlayerStorageValue(cid, task_sys_storages[1], (task+1))
                else
                    npcHandler:say("Desculpe, Mas você ainda não terminou a sua task do "..v.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and v.count or -(getPlayerStorageValue(cid,task_sys_storages[3])-v.count)).." Destes monstros terriveis!", cid)
                end
            end
        end
        if k then -- daily task  Quest diaria
            if getPlayerStorageValue(cid, task_sys_storages[7]) > 0 then
                if getPlayerStorageValue(cid, task_sys_storages[5]) >= k.count then
                if k.exp > 0 then doPlayerAddExp(cid, v.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end
                 if k.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+k.points)) rst = rst.."".. (rst == "" and "" or ", ") .." + "..k.points.."task points" end
                 if k.money > 0 then doPlayerAddMoney(cid, k.money) rst = rst.."".. (rst == "" and "" or ", ") ..""..k.money.." gps" end
                 if table.maxn(k.reward) > 0 then GiveRewardsTask(cid, k.reward) rst = rst.."".. (rst == "" and "" or ", ") ..""..getItemsFromList(k.reward) end
                    npcHandler:say("Obrigado pela sua ajuda! Recompensas: "..(rst == "" and "nenhuma" or ""..rst.."").." por ter completado a task do "..k.name, cid)
                    setPlayerStorageValue(cid, task_sys_storages[4], 0)
                    setPlayerStorageValue(cid, task_sys_storages[5], 0)
                    setPlayerStorageValue(cid, task_sys_storages[7], 0)
                    else
                    npcHandler:say("Desculpe, Mas você ainda não terminou a sua task diaria do "..k.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and k.count or -(getPlayerStorageValue(cid,task_sys_storages[5])-k.count)).." Destes monstros!", cid)
                end
            end
        end

 

 

 

 

o erro ta nessa linha

 

if k.exp > 0 then doPlayerAddExp(cid, v.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end

em ves de ta k.exp  ele pois v.exp  ta pegando exp da outra task.

se o Pai ajudou e nois xD..

@Vodkart verdade mesmo cara nem tinha reparado a linha esta errada mesmo.. ate no topico principal

 

if k.exp > 0 then doPlayerAddExp(cid, v.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end

 

Editado por kbpaulo (veja o histórico de edições)

Postado
Em 01/05/2018 em 00:37, Adm Evolution disse:

Aqui não está contando os monstros, mesmo ativando contador, obs: OTX, server linux teste, não sei se irá funcionar normalmente na vps, também é otx.

 

qual servidor se for pokemon tem que usar ehMonstro..

meu aqui deixei assim.

 

if isPlayer(cid) and ehMonstro(target) and not isSummon(target) then

 

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