Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Olá pessoal estou arrumando um ot para deixar Online, mas estou enfrentando o seguinte problema:

Quando mato o mostro ele não morre fica sem a barra de HP e fica em pé , descobri que o problema está atrelado a TASK SYSTEM que veio junto com servidor .

 

i6f4ht.gif

Mas quando removo a seguinte linha do script ele não funciona porém o monstro morre normalmente .

function onKill(cid, target, lasthit)

Poderiam me ajudar ?

Link para o post
Compartilhar em outros sites

*OFFTOPIC: to com essa mesma base num estágio bem avançado de correção de bugs, tanto nos scripts quanto no mapa, se quiser dar uma olhada no projeto me contata por skype, que é: hiago.benevenutti

 

 

Voltando para o tópico...

 

Bom, abra o arquivo /creaturescripts/scripts/killinginthenameof.lua e substitua tudo o que há dentro dele por esse código e teste.

 

local questCreatures =
{
["troll"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15000, killsRequired = 100, raceName = "Trolls"},
["frost troll"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15001, killsRequired = 100, raceName = "Trolls"},
["furious troll"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15002, killsRequired = 100, raceName = "Trolls"},
["island troll"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15003, killsRequired = 100, raceName = "Trolls"},
["swamp troll"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15004, killsRequired = 100, raceName = "Trolls"},
["troll champion"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15005, killsRequired = 100, raceName = "Trolls"},
["troll legionnaire"] = {questStarted = 65000, questStorage = 65000, creatureStorage = 15006, killsRequired = 100, raceName = "Trolls"},
["goblin"] = {questStarted = 65001, questStorage = 65001, creatureStorage = 15007, killsRequired = 150, raceName = "Goblins"},
["goblin assassin"] = {questStarted = 65001, questStorage = 65001, creatureStorage = 15008, killsRequired = 150, raceName = "Goblins"},
["goblin leader"] = {questStarted = 65001, questStorage = 65001, creatureStorage = 15009, killsRequired = 150, raceName = "Goblins"},
["goblin scavenger"] = {questStarted = 65001, questStorage = 65001, creatureStorage = 15010, killsRequired = 150, raceName = "Goblins"},
["rotworm"] = {questStarted = 65002, questStorage = 65002, creatureStorage = 15011, killsRequired = 300, raceName = "Rotworms"},
["carriom worm"] = {questStarted = 65002, questStorage = 65002, creatureStorage = 15012, killsRequired = 300, raceName = "Rotworms"},
["cyclops"] = {questStarted = 65003, questStorage = 65003, creatureStorage = 15013, killsRequired = 500, raceName = "Cyclops"},
["cyclops smith"] = {questStarted = 65003, questStorage = 65003, creatureStorage = 15014, killsRequired = 500, raceName = "Cyclops"},
["cyclops drone"] = {questStarted = 65003, questStorage = 65003, creatureStorage = 15015, killsRequired = 500, raceName = "Cyclops"},
["crocodile"] = {questStarted = 14007, questStorage = 14007, creatureStorage = 15016, killsRequired = 300, raceName = "Crocodiles"},
["tarantula"] = {questStarted = 14008, questStorage = 14008, creatureStorage = 15017, killsRequired = 300, raceName = "Tarantulas"},
["carniphila"] = {questStarted = 14009, questStorage = 14009, creatureStorage = 15018, killsRequired = 150, raceName = "Carniphilas"},
["stone golem"] = {questStarted = 14010, questStorage = 14010, creatureStorage = 15019, killsRequired = 200, raceName = "Stone Golems"},
["mammoth"] = {questStarted = 14011, questStorage = 14011, creatureStorage = 15020, killsRequired = 300, raceName = "Mammoths"},
["ice golem"] = {questStarted = 14012, questStorage = 14012, creatureStorage = 15021, killsRequired = 300, raceName = "Ice Golems"},
["quara predator scout"] = {questStarted = 14013, questStorage = 14013, creatureStorage = 15022, killsRequired = 300, raceName = "Quaras Scout"},
["quara constrictor scout"] = {questStarted = 14013, questStorage = 14013, creatureStorage = 15023, killsRequired = 300, raceName = "Quaras Scout"},
["quara hydromancer scout"] = {questStarted = 14013, questStorage = 14013, creatureStorage = 15024, killsRequired = 300, raceName = "Quaras Scout"},
["quara mantassin scout"] = {questStarted = 14013, questStorage = 14013, creatureStorage = 15025, killsRequired = 300, raceName = "Quaras Scout"},
["quara pincher scout"] = {questStarted = 14013, questStorage = 14013, creatureStorage = 15026, killsRequired = 300, raceName = "Quaras Scout"},
["quara predator"] = {questStarted = 14014, questStorage = 14014, creatureStorage = 15027, killsRequired = 300, raceName = "Quaras"},
["quara constrictor"] = {questStarted = 14014, questStorage = 14014, creatureStorage = 15028, killsRequired = 300, raceName = "Quaras"},
["quara hydromancer"] = {questStarted = 14014, questStorage = 14014, creatureStorage = 15029, killsRequired = 300, raceName = "Quaras"},
["quara mantassin"] = {questStarted = 14014, questStorage = 14014, creatureStorage = 15030, killsRequired = 300, raceName = "Quaras"},
["quara pincher"] = {questStarted = 14014, questStorage = 14014, creatureStorage = 15031, killsRequired = 300, raceName = "Quaras"},
["water elemental"] = {questStarted = 14015, questStorage = 14015, creatureStorage = 15032, killsRequired = 70, raceName = "Water Elementals"},
["roaring water elemental"] = {questStarted = 14015, questStorage = 14015, creatureStorage = 15033, killsRequired = 70, raceName = "Water Elementals"},
["slick water elemental"] = {questStarted = 14015, questStorage = 14015, creatureStorage = 15034, killsRequired = 70, raceName = "Water Elementals"},
["massive water elemental"] = {questStarted = 14015, questStorage = 14015, creatureStorage = 15035, killsRequired = 70, raceName = "Water Elementals"},
["earth elemental"] = {questStarted = 14016, questStorage = 14016, creatureStorage = 15036, killsRequired = 70, raceName = "Earth Elementals"},
["jagged earth elemental"] = {questStarted = 14016, questStorage = 14016, creatureStorage = 15037, killsRequired = 70, raceName = "Earth Elementals"},
["massive earth elemental"] = {questStarted = 14016, questStorage = 14016, creatureStorage = 15038, killsRequired = 70, raceName = "Earth Elementals"},
["muddy earth elemental"] = {questStarted = 14016, questStorage = 14016, creatureStorage = 15039, killsRequired = 70, raceName = "Earth Elementals"},
["energy elemental"] = {questStarted = 14017, questStorage = 14017, creatureStorage = 15040, killsRequired = 70, raceName = "Energy Elementals"},
["charged energy elemental"] = {questStarted = 14017, questStorage = 14017, creatureStorage = 15041, killsRequired = 70, raceName = "Energy Elementals"},
["massive energy elemental"] = {questStarted = 14017, questStorage = 14017, creatureStorage = 15042, killsRequired = 70, raceName = "Energy Elementals"},
["overcharged energy elemental"] = {questStarted = 14017, questStorage = 14017, creatureStorage = 15043, killsRequired = 70, raceName = "Energy Elementals"},
["fire elemental"] = {questStarted = 14018, questStorage = 14018, creatureStorage = 15044, killsRequired = 70, raceName = "Fire Elementals"},
["blazing fire elemental"] = {questStarted = 14018, questStorage = 14018, creatureStorage = 15045, killsRequired = 70, raceName = "Fire Elementals"},
["blistering fire elemental"] = {questStarted = 14018, questStorage = 14018, creatureStorage = 15046, killsRequired = 70, raceName = "Fire Elementals"},
["massive fire elemental"] = {questStarted = 14018, questStorage = 14018, creatureStorage = 15047, killsRequired = 70, raceName = "Fire Elementals"},
["mutated rat"] = {questStarted = 14019, questStorage = 14019, creatureStorage = 15048, killsRequired = 200, raceName = "Mutated Rats"},
["giant spider"] = {questStarted = 14020, questStorage = 14020, creatureStorage = 15049, killsRequired = 500, raceName = "Giant Spiders"},
["hydra"] = {questStarted = 14021, questStorage = 14021, creatureStorage = 15050, killsRequired = 2000, raceName = "Hydras"},
["sea serpent"] = {questStarted = 14001, questStorage = 14001, creatureStorage = 15051, killsRequired = 2000, raceName = "Sea Serpents"},
["behemoth"] = {questStarted = 14022, questStorage = 14022, creatureStorage = 15052, killsRequired = 2000, raceName = "Behemoths"},
["serpent spawn"] = {questStarted = 14002, questStorage = 14002, creatureStorage = 15053, killsRequired = 1500, raceName = "Serpents Spawn"},
["green djinn"] = {questStarted = 65022, questStorage = 65022, creatureStorage = 15054, killsRequired = 500, raceName = "Green Djinns"},
["efreet"] = {questStarted = 65022, questStorage = 65022, creatureStorage = 15055, killsRequired = 500, raceName = "Green Djinns"},
["blue djinn"] = {questStarted = 65023, questStorage = 65023, creatureStorage = 15056, killsRequired = 500, raceName = "Blue Djinns"},
["marid"] = {questStarted = 65023, questStorage = 65023, creatureStorage = 15057, killsRequired = 500, raceName = "Blue Djinns"},
["pirate buccaneer"] = {questStarted = 65024, questStorage = 65024, creatureStorage = 15058, killsRequired = 3000, raceName = "Pirates"},
["pirate corsair"] = {questStarted = 65024, questStorage = 65024, creatureStorage = 15059, killsRequired = 3000, raceName = "Pirates"},
["pirate cutthroat"] = {questStarted = 65024, questStorage = 65024, creatureStorage = 15060, killsRequired = 3000, raceName = "Pirates"},
["pirate ghost"] = {questStarted = 65024, questStorage = 65024, creatureStorage = 15061, killsRequired = 3000, raceName = "Pirates"},
["pirate marauder"] = {questStarted = 65024, questStorage = 65024, creatureStorage = 15062, killsRequired = 3000, raceName = "Pirates"},
["pirate skeleton"] = {questStarted = 65024, questStorage = 65024, creatureStorage = 15063, killsRequired = 3000, raceName = "Pirates"},
["pirate buccaneer"] = {questStarted = 65025, questStorage = 65025, creatureStorage = 15064, killsRequired = 3000, raceName = "Pirates"},
["pirate corsair"] = {questStarted = 65025, questStorage = 65025, creatureStorage = 15065, killsRequired = 3000, raceName = "Pirates"},
["pirate cutthroat"] = {questStarted = 65025, questStorage = 65025, creatureStorage = 15066, killsRequired = 3000, raceName = "Pirates"},
["pirate ghost"] = {questStarted = 65025, questStorage = 65025, creatureStorage = 15067, killsRequired = 3000, raceName = "Pirates"},
["pirate marauder"] = {questStarted = 65025, questStorage = 65025, creatureStorage = 15068, killsRequired = 3000, raceName = "Pirates"},
["pirate skeleton"] = {questStarted = 65025, questStorage = 65025, creatureStorage = 15069, killsRequired = 3000, raceName = "Pirates"},
["minotaur"] = {questStarted = 14004, questStorage = 14004, creatureStorage = 15070, killsRequired = 5000, raceName = "Minotaurs"},
["necromancer"] = {questStarted = 14003, questStorage = 14003, creatureStorage = 15071, killsRequired = 4000, raceName = "Magicians"},
["priestess"] = {questStarted = 14003, questStorage = 14003, creatureStorage = 15072, killsRequired = 4000, raceName = "Magicians"},
["necromancer"] = {questStarted = 14103, questStorage = 14103, creatureStorage = 15073, killsRequired = 1000, raceName = "Magicians"},
["priestess"] = {questStarted = 14103, questStorage = 14103, creatureStorage = 15074, killsRequired = 1000, raceName = "Magicians"},
["demon"] = {questStarted = 14023, questStorage = 14023, creatureStorage = 15075, killsRequired = 6666, raceName = "Demons"}
}
local msgType = MESSAGE_STATUS_CONSOLE_ORANGE
function onKill(cid, target, lastHit)
local creature = questCreatures[getCreatureName(target):lower()]
if creature then
if isPlayer(target) then return true end
if getCreatureStorage(cid, creature.questStarted) > 0 then
if getCreatureStorage(cid, creature.questStorage) < creature.killsRequired then
if getCreatureStorage(cid, creature.questStorage) < 0 then
doCreatureSetStorage(cid, creature.questStorage, 0)
end
if getCreatureStorage(cid, creature.creatureStorage) < 0 then
doCreatureSetStorage(cid, creature.creatureStorage, 0)
end
doCreatureSetStorage(cid, creature.questStorage, getCreatureStorage(cid, creature.questStorage) + 1)
doCreatureSetStorage(cid, creature.creatureStorage, getCreatureStorage(cid, creature.creatureStorage) + 1)
doPlayerSendTextMessage(cid, msgType, getCreatureStorage(cid, creature.creatureStorage) .. " " .. getCreatureName(target) .. " defeated. Total [" .. getCreatureStorage(cid, creature.questStorage) .. "/" .. creature.killsRequired .. "] " .. creature.raceName .. ".")
end
end
end
return true
end

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo