Ir para conteúdo

[Pedido] Contador De Monstros Mortos


rokaroma

Posts Recomendados

Olá, procurei em todos os site e nao axei o script que conta a quantidade de monstros que o player mato.

 

Ex:10 demon...

100 dragons

50 dragon lord

 

TFS:0.3.6

Protocolo:8.60

 

Editado por rokaroma
Link para o comentário
Compartilhar em outros sites

creaturescript/script

 

 

mcount.lua

function onKill(cid, target)

--[[ adicione os monstro aqui monstros
nome do monstro,storage
]]--

local m = {
["demon"] = 12001,
["dragon lord"] = 12002,
["dragon"] = 12003,
}


-- checkagem

if(isMonster(target) == TRUE) then
local n = getCreatureName(target)
local name_monster = m[string.lower(n)]
if(name_monster) then
local contagem = getPlayerStorageValue(cid, name_monster)
if(contagem == -1) then
contagem = 1
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ja matou "..contagem .." " .. n .. ".")
setPlayerStorageValue(cid, name_monster, contagem + 1)
end
end
return TRUE
end

 

em creaturesccript/script/login.lua adicione a tag:

 

registerCreatureEvent(cid, "ContaMonstro")

 

em creaturescript.xml adicione:

 

<event type="kill" name="ContaMonstro" script="mcount.lua"/> 

Editado por Vodkart
Link para o comentário
Compartilhar em outros sites

Obrigado!

 

Contador De Monstros :button_ok:

 

ta mais eu keria com mais monstros e nao apenas esses tres

 

todos esse aki

 

 

 

 

["demon"] = 12001,

["dragon lord"] = 12002,

["dragon"] = 12003,

["Acolyte Of The Cult"] = 12004,

["Adept Of The Cult"] = 12005,

["Amazon"] = 12006,

["Ancient Scarab"] = 12007,

["Banshee"] = 12008,

["Behemoth"] = 12009,

["Beholder"] = 12010,

["Carrion Worm"] = 12011,

["Cave Rat"] = 12012,

["Cyclops"] = 12013,

["Demon Skeleton"] = 12014,

["Fire Elemental"] = 12015,

["Gargoyle"] = 12016,

["Ghost"] = 120017,

["Ghoul"] = 12018,

["Hydra"] = 12019,

["Kongra"] = 12020,

["Larva"] = 12021,

["Lizard Sentinels"] = 12022,

["Lizard Snakecharmer"] = 12023,

["Lizard Templar"] = 12024,

["Minotaur"] = 12025,

["Minotaur Archer"] = 12026,

["Necromancer"] = 12027,

["Novice Of The Cult"] = 12028,

["Demodras"] = 12029,

["Orshabaal"] = 12030,

["The Old Widow"] = 12031,

["Ashmunrah"] = 12032,

["Dipthrah"] = 12033,

["Morguthis"] = 12034,

["Thalas"] = 12035,

["Water Elemental"] = 12036,

["Warlock"] = 12037,

["Giant Spider"] = 12038,

["Grim Reaper"] = 12039,

["Spectre"] = 12040,

["Banshee"] = 12041,

["Tiquandas Revenge"] = 12042,

["Yakchal"] = 120043,

["Bog Raider"] = 12044,

["Hellfire Fighter"] = 12045,

["Massive Energy Elemental"] = 12046,

["Water Elemental"] = 12047,

["Triple Medusa"] = 12048,

["Draken Elite"] = 12049,

["Ghazbaran"] = 12050,

["Ferumbras"] = 12051,

["Bazir"] = 12052,

["Apocalypse"] = 12053,

["Lizard Abonimation"] = 12054,

["Draken Spellweaver"] = 12055,

["Infernatil"] = 12056,

["Morgaroth"] = 12057,

["Living Plant"] = 12058,

["The Plasmother"] = 12059,

["Infernalist"] = 12060,

["Drasilla"] = 12061,

["The Obliverator"] = 12062,

["Abomination Fury"] = 12063,

["Behemoth"] = 12064,

["Wyrm"] = 12065,

["Draken Abomination"] = 12066,

["Frost Dragon"] = 12067,

 

 

Editado por rokaroma
Link para o comentário
Compartilhar em outros sites

ta e eu posso saber porque você não adicionou no script?

 

ta ai malandrão rs

 

function onKill(cid, target) 

--[[ adicione os monstro aqui monstros 
nome do monstro,storage 
]]-- 

local m = { 
["demon"] = 12001,
["dragon lord"] = 12002,
["dragon"] = 12003,
["acolyte of the cult"] = 12004,
["adept of the cult"] = 12005,
["amazon"] = 12006, 
["ancient scarab"] = 12007,
["banshee"] = 12008,
["behemoth"] = 12009,
["beholder"] = 12010,
["carrion worm"] = 12011,
["cave rat"] = 12012,
["cyclops"] = 12013,
["demon skeleton"] = 12014,
["fire elemental"] = 12015,
["Gargoyle"] = 12016,
["ghost"] = 120017,
["ghoul"] = 12018,
["hydra"] = 12019, 
["kongra"] = 12020,
["larva"] = 12021,
["Lizard sentinels"] = 12022,
["lizard Snakecharmer"] = 12023,
["lizard templar"] = 12024,
["minotaur"] = 12025, 
["minotaur archer"] = 12026,
["necromancer"] = 12027,
["novice of the cult"] = 12028,
["demodras"] = 12029,
["orshabaal"] = 12030,
["the old widow"] = 12031,
["ashmunrah"] = 12032,
["dipthrah"] = 12033, 
["morguthis"] = 12034,
["thalas"] = 12035, 
["Water Elemental"] = 12036,
["Warlock"] = 12037,
["giant spider"] = 12038,
["grim eeaper"] = 12039,
["spectre"] = 12040,
["banshee"] = 12041,
["tiquandas Revenge"] = 12042,
["yakchal"] = 120043,
["bog raider"] = 12044,
["hellfire fighter"] = 12045,
["massive energy elemental"] = 12046,
["Water elemental"] = 12047,
["triple medusa"] = 12048,
["draken elite"] = 12049,
["ghazbaran"] = 12050,
["ferumbras"] = 12051,
["bazir"] = 12052,
["apocalypse"] = 12053,
["lizard abonimation"] = 12054,
["draken spellweaver"] = 12055,
["infernatil"] = 12056,
["morgaroth"] = 12057,
["living plant"] = 12058,
["the plasmother"] = 12059,
["infernalist"] = 12060,
["drasilla"] = 12061,
["the obliverator"] = 12062,
["abomination fury"] = 12063,
["behemoth"] = 12064,
["wyrm"] = 12065,
["draken abomination"] = 12066,
["frost dragon"] = 12067, 
} 


-- checkagem 

if(isMonster(target) == TRUE) then 
local n = getCreatureName(target) 
local name_monster = m[string.lower(n)] 
if(name_monster) then 
local contagem = getPlayerStorageValue(cid, name_monster) 
if(contagem == -1) then 
contagem = 1 
end 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ja matou "..contagem .." " .. n .. ".") 
setPlayerStorageValue(cid, name_monster, contagem + 1) 
end 
end 
return TRUE 
end

Link para o comentário
Compartilhar em outros sites

  • 10 months later...
×
×
  • Criar Novo...