Hello, need help to fix this script of "Creaturescripts", The script work perfectly, the problem is the next, When team-killing these creatures on the list, the storage count does not always count, since sometimes one player does more damage than another, I was investigating and the solution is to add the "Damage Type Map" function or something else for him. style and I have seen different scripts but I don't know how to add that function to this script, if you could help me thanks! I give REP and more ++
Lua:
local monsters = {
--name = storage
["rotworm"] = 35001,
["zombies"] = 35002,
["the abomination"] = 35003,
["death priest shargon"] = 35004,
["the ravager"] = 35005,
["terofar"] = 35006,
["furyosa"] = 35007,
["deep protector"] = 35008,
["yakchal"] = 35009,
["horror tormentor"] = 35010,
["the keeper"] = 35011,
["devovorga"] = 35012,
["malthael"] = 35013,
["omrafir"] = 35014,
["cursed machine"] = 35015,
["battlemaster zunzu"] = 35016,
["demon oak"] = 35017,
["the devil [6]"] = 35018,
["king ferumbras"] = 35019,
["darkseid"] = 35020,
["tree of life"] = 35021,
["eclipse knight"] = 35022,
["triton"] = 35023,
["lord voldemort"] = 35024,
["darakan the executioner"] = 35025,
["valakas"] = 35026,
["prince drazzak"] = 35027,
["the gleam eyes"] = 35028,
["versperoth"] = 35029,
["obujos"] = 35030,
["tanjis"] = 35031,
["jaul"] = 35032,
["zushuka"] = 35033,
["enraged mother nature"] = 35034,
["micerinos"] = 35035,
["horestis"] = 35036,
["gloombringer"] = 35037,
["the frog prince"] = 35038,
["osama bin laden"] = 35039,
["ramses"] = 35040,
["osiris"] = 35041,
["mouldpincer"] = 35042,
["abyssal horror"] = 35043,
["grodd"] = 35044,
["isis"] = 35045,
}
function onKill(cid, target)
if(isMonster(target) == TRUE) then
local name = getCreatureName(target)
local monster = monsters[string.lower(name)]
if(monster) then
local killedMonsters = getPlayerStorageValue(cid, monster)
if(killedMonsters == -1) then
killedMonsters = 1
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You Killed " .. killedMonsters .. " " .. name .. "s.")
setPlayerStorageValue(cid, monster, killedMonsters + 1)
end
end
return TRUE
end