russogracie
New Member
- Joined
- Sep 9, 2010
- Messages
- 205
- Reaction score
- 2
The scoring system is wrong because you have two people attacking a demon, the second will earn points not only of death and the person who has gained more exp.
There's no fix?
There's no fix?
Code:
local monsters = {
["demon"] = 9545,
}
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