local monsters = {
--name = storage
["rotworm"] = 35001,
["orc"] = 35002,
["orc spearman"] = 35003,
["orc warrior"] = 35004,
}
local name = getCreatureName(target)
local monster = monsters[string.lower(name)]
function onKill(cid, target)
if(isPlayer(target) ~= TRUE) then
if(monster) then
if getPlayerStorageValue(cid, 30101) == 1 then
if getPlayerStorageValue(cid, rotworm) == -1 then
if setPlayerStorageValue(cid, rotworm, 1) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, rotworm) .. " " .. name .. ".")
end
elseif getPlayerStorageValue(cid, rotworm) >= 1 and getPlayerStorageValue(cid, rotworm) <= 20 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, rotworm) .. " " .. name .. "'s.")
setPlayerStorageValue(cid, monster, getPlayerStorageValue(cid, rotworm) + 1)
end
end
if getPlayerStorageValue(cid, 30102) == 1 then
if getPlayerStorageValue(cid, orc) == -1 then
if setPlayerStorageValue(cid, orc, 1) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, orc) .. " " .. name .. ".")
end
elseif getPlayerStorageValue(cid, orc) >= 1 and getPlayerStorageValue(cid, orc) <= 12 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, orc) .. " " .. name .. "'s.")
setPlayerStorageValue(cid, monster, getPlayerStorageValue(cid, orc) + 1)
end
[COLOR="Red"]if getPlayerStorageValue(cid, orc spearman) == -1 then
[/COLOR] if setPlayerStorageValue(cid, orc spearman, 1) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, orc spearman) .. " " .. name .. ".")
end
elseif getPlayerStorageValue(cid, orc spearman) >= 1 and getPlayerStorageValue(cid, orc spearman) <= 6 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, orc spearman) .. " " .. name .. "'s.")
setPlayerStorageValue(cid, monster, getPlayerStorageValue(cid, orc spearman) + 1)
end
if getPlayerStorageValue(cid, orc warrior) == -1 then
if setPlayerStorageValue(cid, orc warrior, 1) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, orc warrior) .. " " .. name .. ".")
end
elseif getPlayerStorageValue(cid, orc warrior) >= 1 and getPlayerStorageValue(cid, orc warrior) <= 2 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed " .. getPlayerStorageValue(cid, orc warrior) .. " " .. name .. "'s.")
setPlayerStorageValue(cid, monster, getPlayerStorageValue(cid, orc warrior) + 1)
end
end
end
end
return TRUE
end