Postado Março 23, 2015 10 anos O primeiro esta certo! agora vou trocar o script para ver se funciona! Eu fiz exatamente oque vc falou e não funcionou! continua sem contar os kills! Alguem pode me ajudar?
Postado Março 24, 2015 10 anos Autor coloca um print(getPlayerStorageValue(cid, id do storage que salva o nome do monstro aqui) -- e ve se aparece no console o nome do monstro
Postado Março 24, 2015 10 anos Pronto coloquei certinho, na distro aparece o nome do monstro da task! mas cuntinua sem contar kill!
Postado Março 24, 2015 10 anos Autor agr vc precisa checar as condições do creaturescript: vc tá usando partycount como true ou false? troca seu creaturescript por esse OU coloca os prints que eu coloquei nas mesmas posições e me fala oque aparece no seu console qnd vc mata um monstro local storages = { name = 95672, count = 95673, maxcount = 95674, } local config = { partycount = true, --- true ou false pra ativar/desativar que os kills dos membros da party contem pra voce killdistance = 7 --- distancia que conta os kills } function onKill(cid, target, lastHit) print("work") if isMonster(target) and getPlayerStorageValue(cid, storages.maxcount) > 3 and getCreatureMaster(target) == target and (not(isInParty(cid)) or config.partycount ~= true) then print(1) if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(cid, storages.name)) then print(3) setPlayerStorageValue(cid, storages.count, getPlayerStorageValue(cid, storages.count) + 1) if getPlayerStorageValue(cid, storages.count) == getPlayerStorageValue(cid, storages.maxcount) then doPlayerSendTextMessage(cid, 19, "You finished your task.") elseif getPlayerStorageValue(cid, storages.count) < getPlayerStorageValue(cid, storages.maxcount) then doPlayerSendTextMessage(cid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(cid, storages.count) .."/".. getPlayerStorageValue(cid, storages.maxcount) .."].") end end elseif isMonster(target) and getCreatureMaster(target) == target and isInParty(cid) and config.partycount == true then print(2) leader = getPartyLeader(cid) party = getPartyMembers(leader) for i = 1, #party do pid = party[i] if getDistanceBetween(getThingPos(target), getThingPos(pid)) < config.killdistance then if getPlayerStorageValue(pid, storages.maxcount) > 3 then if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(pid, storages.name)) then setPlayerStorageValue(pid, storages.count, getPlayerStorageValue(pid, storages.count) + 1) if getPlayerStorageValue(pid, storages.count) == getPlayerStorageValue(pid, storages.maxcount) then doPlayerSendTextMessage(pid, 19, "You finished your task.") elseif getPlayerStorageValue(pid, storages.count) < getPlayerStorageValue(pid, storages.maxcount) then doPlayerSendTextMessage(pid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(pid, storages.count) .."/".. getPlayerStorageValue(pid, storages.maxcount) .."].") end end end end end end return true end Editado Março 24, 2015 10 anos por xWhiteWolf (veja o histórico de edições)
Postado Março 24, 2015 10 anos Amigo, eu resolvi este problema facil, facil sosinho, eu tive a ideia com outro script que eu tava editando mas dai coloquei a mesma ideia e funcionou! Em todos os "doPlayerSendTextMessage(cid, 19, ...)" eu modifiquei e deixei assim : doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ...) e funcionou perfeitamente! Mas obrigador por tentar me ajudar! eu tive este ideia no mesmo momento que vc mandou eu printar o nome do monstro!
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.