SOLVED
hello outlanders
could someone help me convert this script and the TFS version 1.2, it is that this does not work, and I'm really bad when it refers to scripts: D
thanx
hello outlanders
could someone help me convert this script and the TFS version 1.2, it is that this does not work, and I'm really bad when it refers to scripts: D
Code:
--[[ Script by slawkens, modified by Zonet]]--
local monsters = {
["dragon"] = 9541,
["dragon lord"] = 9542,
["frost dragon"] = 9543,
["wyrm"] = 9544,
["demon"] = 9545,
["troll"] = 9546,
["troll champion"] = 9547,
["swamp troll"] = 9548,
["frost troll"] = 9549,
["rotworm"] = 9550,
["carrion worm"] = 9551,
}
function onKill(cid, target)
if(isPlayer(target) ~= true and isPlayer(cid)) then
local name = getCreatureName(target)
local monster = monsters[string.lower(name)]
if(monster) then
local killedMonsters = getPlayerStorageValue(cid, monster)
if(killedMonsters < 0) then
killedMonsters = 1
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You killed " .. killedMonsters .. " " .. name .. "'s.")
setPlayerStorageValue(cid, monster, killedMonsters + 1)
end
end
return true
end
thanx
Last edited: